From: Tomas Sedovic <[email protected]>

Removed the remaining references to flavors.
---
 docs/client-ruby.mdown |    8 +-
 docs/framework.mdown   |  174 ++++++++++++++++++++++++-----------------------
 2 files changed, 93 insertions(+), 89 deletions(-)

diff --git a/docs/client-ruby.mdown b/docs/client-ruby.mdown
index 5324062..5b633cb 100644
--- a/docs/client-ruby.mdown
+++ b/docs/client-ruby.mdown
@@ -60,11 +60,11 @@ machines
 
 You may filter hardware profiles by architecture
 
-    flavors = client.hardware_profiles( :architecture=>'x86_64' )
+    hardware_profiles = client.hardware_profiles( :architecture=>'x86_64' )
 
 You may retrieve a specific hardware profile by its identifier
 
-    flavor = client.hardware_profile( 'm1-small' )
+    hardware_profile = client.hardware_profile( 'm1-small' )
 
 ## Listing images
 
@@ -103,9 +103,9 @@ An instance may be launched using just an image identifier
     image = client.image( 'ami-8675309' )
     instance = client.create_instance( image.id )
 
-Optionally, a flavor or realm may be specified
+Optionally, a hardware profile or a realm may be specified
 
-    instance = client.create_instance( image.id, :flavor=>'m1-small', 
:realm=>'us' )
+    instance = client.create_instance( image.id, 
:hardware_profile=>'m1-small', :realm=>'us' )
 
 ## Manipulating instances
 
diff --git a/docs/framework.mdown b/docs/framework.mdown
index 429ed8a..0da117b 100644
--- a/docs/framework.mdown
+++ b/docs/framework.mdown
@@ -1,30 +1,29 @@
 [framework]: styles/framework.png
 
-# Deltacloud Framework (Ruby)
+# Writing Deltacloud Drivers #
 
-The _Deltacloud Framework_ is provided to assist in creating 
-intermediary [drivers](drivers.html) which speak the [Deltacloud REST 
API](api.html) on 
-the front while communicating with cloud providers using
-their own native APIs on the back.
+The _Deltacloud Core framework_ is provided to assist in creating
+intermediary [drivers](drivers.html) that speak the [Deltacloud REST
+API](api.html) on the front while communicating with cloud providers
+using their own native APIs on the back.
 
 ![Deltacloud framework][framework]
 
-The Deltacloud Framework handles all aspects of the REST
-API, while allowing driver implementors to focus on the 
-specific cloud provider native API.
+The framework handles all aspects of the REST API, while allowing
+driver implementors to focus on the specific cloud provider native
+API.
 
-The framework is implemented as a Ruby-on-Rails application.
-Drivers may be implemented in as little as one Ruby class
-and plugged into the framework for deployment.
+Drivers may be implemented in as little as one Ruby class and plugged
+into the Deltacloud Core for deployment.
 
 ## Driver SPI
 
 ### Credentials
 
-The framework will collect credentials when the driver indicates
-they are required by throwing a `DeltaCloud::AuthException`.  Each
-driver method takes a credentials hash as the first parameter,
-but unless the client has provided credentials, this hash will be empty.
+The framework will collect credentials when the driver indicates they
+are required by throwing a `DeltaCloud::AuthException`. Each driver
+method takes a credentials hash as the first parameter, but unless the
+client has provided credentials, this hash will be empty.
 
     def images(credentials, opts)
       if ( credentials[:name].nil? )
@@ -40,23 +39,25 @@ but unless the client has provided credentials, this hash 
will be empty.
 
 ### Object models used by drivers
 
-To assist driver authors, the framework provides a handful of
-model classes, representing each resource available through
-the Deltacloud API.  Please see the [API reference](api.html) for details
-about each model.  All of these model objects may be initialized
-with a hash.  Every instance _must_ be assigned an `id` in addition
-to other attributes it may have.  Unless otherwise noted, attributes
-are text.
+To assist driver authors, the framework provides a handful of model
+classes, representing each resource available through the Deltacloud
+API. Please see the [API reference](api.html) for details about each
+model. All of these model objects may be initialized with a hash.
+Every instance _must_ be assigned an `id` in addition to other
+attributes it may have. Unless otherwise noted, attributes are text.
 
 For example
 
-    Flavor.new( 
+    HardwareProfile.new(
       :architecture=>'x86_64',
       :memory=>4,
       :storage=>650,
     )
 
-#### `Flavor` (`app/models/flavor.rb`)
+The `base_driver` interface and the already implemented drivers are
+located at `server/lib/deltacloud/` in the Deltacloud Core repository.
+
+#### `HardwareProfile`
 
 Attributes are
 
@@ -64,8 +65,9 @@ Attributes are
 - **`architecture`**
 - **`memory`** - Decimal, gigabytes
 - **`storage`** - Decimal, gigabytes
+- **`cpu`** - Interger, count
 
-#### `Realm` (`app/models/realm.rb`)
+#### `Realm`
 
 Attributes are
 
@@ -74,7 +76,7 @@ Attributes are
 - **`state`**
 - **`limit`**
 
-#### `Image` (`app/models/image.rb`)
+#### `Image`
 
 Attributes are
 
@@ -84,17 +86,16 @@ Attributes are
 - **`owner_id`**
 - **`description`**
 
-#### `Instance` (`app/models/instance.rb`)
+#### `Instance`
 
 Attributes are
 
 - **`id`**
 - **`name`**
 - **`owner_id`** - Opaque, external reference
-- **`image_id`** - References an image by identifier
-- **`flavor_id`** - References a flavor image by identifier
-- **`realm_id`** - References a realm by identifier
-- **`state`** - One of `PENDING`, `RUNNING`, 'SHUTTING_DOWN', 'STOPPED'
+- **`image`** - References an image
+- **`realm`** - References a realm
+- **`state`** - One of `PENDING`, `RUNNING`, `SHUTTING_DOWN`, `STOPPED`
 - **`actions`** - Array of applicable actions
 - **`public_addresses`** - Array of IP addresses or hostnames as text
 - **`private_addresses`** - Array of IP addresses or hostnames as text
@@ -103,7 +104,7 @@ Attributes are
 
 The primary methods a driver class must implement are
 
-- `flavors(credentials, opts=nil)`
+- `hardware_profiles(credentials, opts=nil)`
 - `images(credentials, opts=nil )`
 - `realms(credentials, opts=nil)`
 - `instances(credentials, opts=nil)`
@@ -112,103 +113,106 @@ The primary methods a driver class must implement are
 - `stop_instance(credentials, id)`
 - `destroy_instance(credentials, id)`
 
-Generally, the `BaseDriver` handles singular cases while the
-specific provider driver must implement only the plural cases,
-along with specific action methods against resources.
+Generally, the `BaseDriver` handles singular cases while the specific
+provider driver must implement only the plural cases, along with
+specific action methods against resources.
 
-Additionally, to assist clients in determining what actions
-may be available without making additional requests, the following
-must be implemented.
+Additionally, to assist clients in determining what actions may be
+available without making additional requests, the following must be
+implemented.
 
 While the `credentials` hash is passed as the first parameter to each
 method, it _may_ be empty until the driver throws at least one
-`DeltaCloud::AuthException`. This exception will indicate to the 
-framework that a normal HTTP authentication challenge should be
-issued to the client.  Depending on the underlying provider the driver
-is connecting to, the credentials may not be required for some methods.
+`DeltaCloud::AuthException`. This exception will indicate to the
+framework that a normal HTTP authentication challenge should be issued
+to the client. Depending on the underlying provider the driver is
+connecting to, the credentials may not be required for some methods.
 
 Some methods also allow an optional `opts` hash, which may be `nil` or
-empty if not used for a particular invocation.  The `BaseDriver` provides
-a method `filter_on(...)` which may be used to safely filter collections.
-The `filter_on(..)` method will be demonstrated below.
+empty if not used for a particular invocation. The `BaseDriver`
+provides a method `filter_on(...)` which may be used to safely filter
+collections. The `filter_on(..)` method will be demonstrated below.
 
 - `instance_states()`
 
 Each method will be described in more detail below.
 
-#### `flavors(credentials, opts=nil)`
+#### `hardware_profiles(credentials, opts=nil)`
 
-The `flavors(...)` method should return an array of `Flavor` objects.
-The `opts` hash, if present, must be inspected for `:id` and `:architecture`
-keys.  If these keys are present, the results should be filtered by the value
-associated with each key.  The `filter_on(...)` method is useful in this case.
+The `hardware_profiles(...)` method should return an array of
+`HardwareProfile` objects. The `opts` hash, if present, must be
+inspected for `:id` and `:architecture` keys. If these keys are
+present, the results should be filtered by the value associated with
+each key. The `filter_on(...)` method is useful in this case.
 
 For example
 
-    def flavors(credentials, opts=nil)
-      flavors = fetch_all_flavors()
-      flavors = filter_on( flavors, :id, opts )
-      flavors = filter_on( flavors, :architecture, opts )
-      return flavors
+    def hardware_profiles(credentials, opts=nil)
+      hardware_profiles = fetch_all_hardware_profiles()
+      hardware_profiles = filter_on( hardware_profiles, :id, opts )
+      hardware_profiles = filter_on( hardware_profiles, :architecture, opts )
+      return hardware_profiles
     end
 
 #### `realms(credentials, opts=nil)`
 
 The `realms(...)` method should return an array of `Realm` objects.
 
-#### `images(credentials, opts=nil )`
+#### `images(credentials, opts=nil)`
 
 The `images(...)` method should return an array of `Image` objects
-visible and accessible to the current user, as defined by the `credentials`
-hash.
+visible and accessible to the current user, as defined by the
+`credentials` hash.
 
 The `opts` hash, if present, must be inspected for `:id`, `:owner_id`
-and `:architecture` keys.  If these keys are present, the results should be 
filtered 
-by the value assocaited with each key.
+and `:architecture` keys. If these keys are present, the results
+should be filtered by the value assocaited with each key.
 
 #### `instances(credentials, opts=nil)`
 
-The `instances(...)` method should return an array of `Instance` objects
-visible and accessible to the current user, as defined bv the `credentials`
-hash.  If the `opts` hash is present and contains an `:id` key, the results
-should be filtered by the value associated with the key.
+The `instances(...)` method should return an array of `Instance`
+objects visible and accessible to the current user, as defined bv the
+`credentials` hash. If the `opts` hash is present and contains an
+`:id` key, the results should be filtered by the value associated with
+the key.
 
 #### `create_instance(credentials, image_id, opts)`
 
-The `create_instance(...)` method should create within the cloud, a new
-running instance based from an image identifier.  The method should return
-an `Instance` object representing the newly-created instance.
+The `create_instance(...)` method should create within the cloud, a
+new running instance based from an image identifier. The method should
+return an `Instance` object representing the newly-created instance.
 
-The `image_id` parameter must be non-nil.  The `opts` has may contain keys
-for `flavor_id` and `realm_id`.  If they are present, they should be used
-for the creation of the instance.  If they are not present, reasonable
-defaults should be used. In the case of flavor, one compatible with the
-image should be used as the default.  
+The `image_id` parameter must be non-nil. The `opts` has may contain
+keys for `hwp_id` and `realm_id`. If they are present, they should be
+used for the creation of the instance. If they are not present,
+reasonable defaults should be used. In the case of hardware profile,
+one compatible with the image should be used as the default.
 
 #### `reboot_instance(credentials, id)`
 
-The `reboot_instance(...)` method should trigger a running instance to be
-rebooted.  This method has no return value.
+The `reboot_instance(...)` method should trigger a running instance to
+be rebooted. This method has no return value.
 
 #### `stop_instance(credentials, id)`
 
-The `stop_instance(...)` method should trigger a running instance to be
-stopped.  This method has no return value.  A cloud provider may allow
-restarting an instance, or may not.
+The `stop_instance(...)` method should trigger a running instance to
+be stopped. This method has no return value. A cloud provider may
+allow restarting an instance, or may not.
 
 #### `destroy_instance(credentials, id)`
 
 The `destroy_instance(...)` method should remove the instance from the
-cloud provider, stopping it if necessary first.
+cloud provider, stopping it first, if necessary.
 
 
 #### `instance_states()`
 
-The `instance_states()` method should return an complex array/hash
-structure representing the finite-state-machine for instances.
-Each state an instance may be in should be an element in the returned array.
-Each state itself is also an array with 2 member.  The first member is the
-name of the state, and the second member is a hash indicating valid 
transitions.
+The `instance_states()` method should return an array/hash structure
+representing the finite-state-machine for instances. Each state an
+instance may be in should be an element in the returned array. Each
+state itself is also an array with 2 members. The first member is the
+name of the state, and the second member is a hash indicating valid
+transitions.
 
 The general format for the entire FSM structure is
 
@@ -233,8 +237,8 @@ Valid states are
 - **`:end`**
 
 The `:begin` state is the state an instance is in immediate before
-being created.  The `:end` state is the state an instance is in immediately
-after being destroyed.
+being created. The `:end` state is the state an instance is in
+immediately after being destroyed.
 
 Valid transition actions are
 
-- 
1.6.6.1

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to