incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject svn commit: r1027303 [14/14] - in /incubator/deltacloud/trunk/site: ./ bin/ deltacloud.org/ deltacloud.org/content/ deltacloud.org/content/Scripts/ deltacloud.org/content/css/ deltacloud.org/content/css/blueprint/ deltacloud.org/content/css/blueprint/p...
Date Mon, 25 Oct 2010 23:27:05 GMT
Added: incubator/deltacloud/trunk/site/docs/api.mdown
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/docs/api.mdown?rev=1027303&view=auto
==============================================================================
--- incubator/deltacloud/trunk/site/docs/api.mdown (added)
+++ incubator/deltacloud/trunk/site/docs/api.mdown Mon Oct 25 23:26:58 2010
@@ -0,0 +1,305 @@
+[basic-relationships]: styles/basic-relationships.png
+
+# Deltacloud API
+
+The Deltacloud API is built as a service-based REST API. You do not
+directly link a Deltacloud library into your program to use it.
+Instead, a client speaks the Deltacloud API over HTTP to a server
+which implements the REST interface.
+
+Since cloud providers use their own APIs instead of the Deltacloud
+API, we provide a translation layer that makes it possible to use
+Deltacloud with these providers.
+
+## REST
+
+The Deltacloud API is a [RESTful API][1], using HATEOAS architectural
+style. The API requires no client-side URL construction. Access is
+based entirely off a single entry-point resource. This allows other
+implementors to structure their URL space however they like.
+
+[1]: http://en.wikipedia.org/wiki/Representational_State_Transfer
+
+Additionally, the Deltacloud API uses _content negotiation_ to
+determine the format of the returned representation. As of the current
+revision, the only required representation is XML. Clients wishing to
+receive XML representations must specify the HTTP `Accept` header as
+`application/xml`.
+
+## Authentication
+
+The Deltacloud API uses HTTP authentication methods for authenticating
+a given client. There is no explicit _login_ action required. If
+authentication is required, an HTTP status of 401 will be returned to
+challenge for credentials.
+
+## Primary Entry Point
+
+Any Deltacloud implementor _must_ provide exactly one well-known URL
+as an entry-point. For example, `http://fancycloudprovider.com/api`.
+
+The result of this entry-point is a set of entry-points into other
+collections, such as _images_, _instances_, _hardware profiles_ and
+_realms_, among others.
+
+Each collection is defined by a `<link>` tag with an `href` attribute
+which includes the fully-qualified URL to the collection (which _may_
+exist on different servers) and a `rel` attribute to denote which
+collection is being specified.
+
+    <api driver='ec2' version='1.0'>
+      <link href='http://fancycloudprovider.com/api/hardware_profiles' rel='hardware_profiles' />
+      <link href='http://fancycloudprovider.com/api/instance_states' rel='instance_states' />
+      <link href='http://fancycloudprovider.com/api/realms' rel='realms' />
+      <link href='http://fancycloudprovider.com/api/images' rel='images' />
+      <link href='http://fancycloudprovider.com/api/instances' rel='instances' />
+    </api>
+
+## Resources
+
+From the primary entry-point, a client may follow the URL provided for
+a collection to retrieve the resources within that collection. The
+collection representation will include the full representations of the
+items within it, along with links to retrieve each item individually.
+
+![Basic relationships][basic-relationships]
+
+### Hardware Profiles
+
+Within a cloud provider a _hardware profile_ represents a
+configuration of resources upon which a machine may be deployed. A
+hardware profile defines aspects such as local disk storage, available
+RAM, and architecture. A future revision of the Deltacloud API will
+include more aspects, including number and speed of CPUs available.
+Each provider is free to define as many (or as few) hardware profiles
+as desired.
+
+    <hardware_profiles>
+      <hardware_profile href='http://fancycloudprovider.com/api/hardware_profiles/m1-small' id='m1-small'>
+        <property kind='fixed' name='storage' unit='GB' value='160' />
+        <property kind='fixed' name='architecture' unit='label' value='i386' />
+        <property kind='fixed' name='cpu' unit='count' value='1' />
+        <property kind='fixed' name='memory' unit='MB' value='1740.8' />
+      </hardware_profile>
+
+Each `<hardware_profile>` block shall contain an `href` attribute providing a
+URL to manipulate a specific profile, along with property elements for each
+attribute of the hardware.
+
+- **`id`**            is a unique identifier for the profile
+- **`property`**      describes each of the hardware aspects
+
+Properties have the following attributes:
+
+- **`name`**          the type of the property: *e.g.* `memory` or `storage`
+- **`unit`**          the units in which the value is specified: `MB`, `GB`, `count` or `label`
+- **`value`**         the actual value of the property. It depends on the specified unit: `1024`, `2` on `x86_64`
+- **`kind`**          describes the values to chose from.
+  - **`fixed`**         only the value specified in the property is available
+  - **`enum`**          a list of available values is provided
+  - **`range`**         available values are described by a numeric range
+
+When the `kind` is either an `enum` or a `range`, there must be two additional elements specified. One
+that specifies the allowed values and the second with a way of picking a value.
+
+In the non-fixed case, the `value` property attribute specifies the default value.
+
+      <hardware_profile href='http://fancycloudprovider.com/api/hardware_profiles/m1-xlarge' id='m1-xlarge'>
+        <property kind='enum' name='storage' unit='GB' value='1024'>
+          <param href='http://fancycloudprovider.com/api/instances' method='post' name='hwp_storage' operation='create' />
+          <enum>
+            <entry value='1024' />
+            <entry value='2048' />
+            <entry value='4096' />
+          </enum>
+        </property>
+        <property kind='fixed' name='architecture' unit='label' value='x86_64' />
+        <property kind='fixed' name='cpu' unit='count' value='4' />
+        <property kind='range' name='memory' unit='MB' value='12288'>
+          <param href='http://fancycloudprovider.com/api/instances' method='post' name='hwp_memory' operation='create' />
+          <range first='12288' last='32768' />
+        </property>
+      </hardware_profile>
+    </hardware_profiles>
+
+
+At this time, hardware profile resources are immutable and read-only. In a
+future revision they may be mutable.
+
+### Realms
+
+Within a cloud provider a _realm_ represents a boundary containing
+resources. The exact definition of a realm is left to the cloud
+provider. In some cases, a realm may represent different datacenters,
+different continents, or different pools of resources within a single
+datacenter. A cloud provider may insist that resources must all exist
+within a single realm in order to cooperate. For instance, storage
+volumes may only be allowed to be mounted to instances within the same
+realm.
+
+    <realms>
+      <realm href="http://fancycloudprovider.com/api/realms/us" id='us'>
+        <name>United States</name>
+        <state>AVAILABLE</state>
+        <limit/>
+      </realm>
+      <realm href="http://fancycloudprovider.com/api/realms/eu" id='eu'>
+        <name>Europe</name>
+        <state>AVAILABLE</state>
+        <limit/>
+      </realm>
+    </realms>
+
+Each `<realm>` block shall contain an `href` attribute providing a URL
+to manipulate a specific realm, along with elements for each attribute
+of a realm.
+
+- **`id`**          A unique identifier for the realm
+- **`name`**        A short label
+- **`state`**       Indicator of the current state of a realm
+  - AVAILABLE
+  - UNAVAILABLE
+- **`limit`**       Limits applicable for the _current requester_
+
+### Images
+
+An _image_ is a platonic form of a machine. Images are not directly
+executable, but are a template for creating actual instances of
+machines.
+
+The instances collection will return a set of all images available to
+the current user.
+
+    <images>
+      <image href="http://fancycloudprovider.com/api/images/img1" id='img1'>
+        <owner_id>fedoraproject</owner_id>
+        <name>Fedora 10</name>
+        <description>Fedora 10</description>
+        <architecture>x86_64</architecture>
+      </image>
+      <image href="http://fancycloudprovider.com/api/images/img2" id='img2'>
+        <owner_id>fedoraproject</owner_id>
+        <name>Fedora 10</name>
+        <description>Fedora 10</description>
+        <architecture>i386</architecture>
+      </image>
+      <image href="http://fancycloudprovider.com/api/images/img3" id='img3'>
+        <owner_id>ted</owner_id>
+        <name>JBoss</name>
+        <description>JBoss</description>
+        <architecture>i386</architecture>
+      </image>
+    </images>
+
+Each `<image>` block _shall_ contain an `href` attribute providing a
+URL to manipulate a specific image, along with elements for each
+attribute of an image. Each element, including those for optional
+attributes must be present. Optional attributes may be specified as a
+element with empty content.
+
+These attributes include
+
+- **`id`**            A unique identifier for the image
+- **`owner_id`**      An opaque identifier which indicates the owner of an image
+- **`name`**          An _optional_ short label describing the image
+- **`description`**   An _optional_ description describing the image more fully
+- **`architecture`**  A description of the machine architecture of the image
+  which may contain values such as:
+  - `i386`
+  - `x86_64`
+
+At this time, image resources are immutable and read-only.  In a future revision
+they will be mutable.
+
+### Instances
+
+An _instance_ is a concrete machine realized from an _image_. The
+images collection may be obtained by following the link from the
+primary entry-point.
+
+    <instances>
+      <instance href="http://fancycloudprovider.com/api/instances/inst1" id='inst1'>
+        <owner_id>larry</owner_id>
+        <name>Production JBoss Instance</name>
+        <image href="http://fancycloudprovider.com/api/images/img3"/>
+        <hardware_profile href="http://fancycloudprovider.com/api/hardware_profiles/m1-small"/>
+        <realm href="http://fancycloudprovider.com/api/realms/us"/>
+
+        <state>RUNNING</state>
+        <actions>
+          <link rel="reboot" href="http://fancycloudprovider.com/api/instances/inst1/reboot"/>
+          <link rel="stop" href="http://fancycloudprovider.com/api/instances/inst1/stop"/>
+        </actions>
+        <public_addresses>
+          <address>inst1.larry.fancycloudprovider.com</address>
+        </public_addresses>
+
+        <private_addresses>
+          <address>inst1.larry.internal</address>
+        </private_addresses>
+      </instance>
+    </instances>
+
+Each `<instance>` block shall contain an href attribute providing a
+URL to manipulate a specific instance, along with elements for each
+attribute of an instance. Each element, including those for optional
+attributes must be present. Optional attributes may be specified as a
+element with empty content.
+
+Simple attributes include
+
+- **`id`**           A unique identifier for the instance
+- **`owner_id`**     An opaque identifier which indicates the owner of an instance
+- **`name`**         An _optional_ short label describing the instance
+- **`image`**        Provides a link to the platonic image from which the instance is based
+- **`hardware_profile`**       Provides a link to the hardware profile in use by the instance
+- **`realm`**        Provides a link to the realm where the instance is deployed
+- **`state`**        Indicator of the instance's current state
+  - `PENDING`
+  - `STOPPED`
+  - `RUNNING`
+
+Multiple-valued attributes include
+
+- **`public_addresses`**  Publicly routable IP addresses or names for the instance
+- **`private_addresses`**  Private network IP addresses or names for the instance
+
+In addition to the abovementioned attributes, each `<instance>` may contain an
+`<actions>` block specifying valid actions for the instance, along with the URL
+which may be used to perform the action.  Each action is specified by a `<link>`
+with an `href` attribute providing the URL, and a `rel` attribute providing
+a key to determine what the action will do.
+
+Representative actions include
+
+- `reboot`
+- `start`
+- `stop`
+
+Not all actions may be valid at all times for all instances. To invoke
+an action, a client must perform an HTTP `POST` to the URL indicated.
+
+#### Creating a new Instance
+
+Per usual REST architectural style, new instances are created by
+issuing an HTTP `POST` to the instances collection as defined through
+the primary entry-point URL. Data should be sent in
+`application/x-www-form-urlencoded` format.
+
+To create a new instance, only one parameter is required
+
+- **`image_id`**   The identifier (not URL) of the image from which to base the instance
+
+Optional parameters may also be provided
+
+- **`realm_id`**   The realm in which to launch the instance
+- **`hwp_name`**  The hardware profile upon which to launch the instance
+- **`name`**       A short label to identify the instance
+
+If `realm_id` or `hwp_name` are not specified, the provider _must_
+select reasonable defaults. The architecture of the selected harware profile
+_must_ match the architecture of the specified image.
+
+After `POST`ing the data, the server _shall_ return a representation
+of the newly-created instance's XML, including a URL to retrieve the
+instance in the future.

Added: incubator/deltacloud/trunk/site/docs/client-ruby.mdown
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/docs/client-ruby.mdown?rev=1027303&view=auto
==============================================================================
--- incubator/deltacloud/trunk/site/docs/client-ruby.mdown (added)
+++ incubator/deltacloud/trunk/site/docs/client-ruby.mdown Mon Oct 25 23:26:58 2010
@@ -0,0 +1,128 @@
+# Deltacloud Client (Ruby)
+
+The Deltacloud project includes a Ruby client.  Other language-bindings
+are possible and will be supported soon.  The client aims to insulate
+users from having to deal with HTTP and REST directly.
+
+Each resource type has an associated model to ease usage.  Where
+resource reference other resources, natural navigation across the
+object model is possible.
+
+For example
+
+    puts instance.image.name
+    puts instance.hardware_profile.architecture
+
+## API Docs
+
+API Docs are [available](ruby-client/doc/index.html)
+
+## Basics
+
+To use the client, you must require `deltacloud`.
+
+    require 'deltacloud'
+
+## Connecting to a Deltacloud provider
+
+    require 'deltacloud'
+
+    api_url      = 'http://localhost:3001/api'
+    api_name     = 'mockuser'
+    api_password = 'mockpassword'
+
+    client = DeltaCloud.new( api_name, api_password, api_url )
+
+    # work with client here
+
+In addition to creating a client, operations may occur within a block
+included on the initialization
+
+    DeltaCloud.new( api_name, api_password, api_url ) do |client|
+      # work with client here
+    end
+
+In the event of a failure, any underlying HTTP transport exceptions
+will be thrown all the way out to the caller.
+
+## Listing realms
+
+You may retrieve a complete list of realms available to you
+
+    realms = client.realms
+
+You may retrieve a specific realm by its identifier
+
+    realm = client.realm( 'us' )
+
+## Listing hardware profiles
+
+You may retrieve a complete list of hardware profiles available for launching
+machines
+
+    hwp = client.hardware_profiles
+
+You may filter hardware profiles by architecture
+
+    hardware_profiles = client.hardware_profiles( :architecture=>'x86_64' )
+
+You may retrieve a specific hardware profile by its identifier
+
+    hardware_profile = client.hardware_profile( 'm1-small' )
+
+## Listing images
+
+You may retrieve a complete list of images
+
+    images = client.images
+
+You may retrieve a list of images owned by the currently authenticated
+user
+
+    images = client.images( :owner_id=>:self )
+
+You may retrieve a list of images visible to you but owned by a specific
+user
+
+    images = client.images( :owner_id=>'daryll' )
+
+You may retrieve a specific image by its identifier
+
+    image = client.image( 'ami-8675309' )
+
+## Listing instances
+
+You may retrieve a list of all instances visible to you
+
+    instances = client.instances
+
+You may retrieve a specific instance by its identifier
+
+    instance = client.instance( 'i-90125' )
+
+## Launching instances
+
+An instance may be launched using just an image identifier
+
+    image = client.image( 'ami-8675309' )
+    instance = client.create_instance( image.id )
+
+Optionally, a hardware profile or a realm may be specified
+
+    instance = client.create_instance( image.id, :hardware_profile=>'m1-small', :realm=>'us' )
+
+## Manipulating instances
+
+Given an instance, depending on its state, various actions _may_ be available.
+
+To determine what's available, the `instance#actions` method may be used.
+
+    instance.actions # [ 'reboot', 'stop' ]
+
+For a valid action, the method matching the action with an exclamation point may be called.
+
+    instance.reboot!
+
+Upon invoking an action, the instance will refresh its contents, in case the state has changed.
+To determine later if the state has changed again, the instance must be refetched using
+the `client.instance(...)` method.

Added: incubator/deltacloud/trunk/site/docs/drivers.mdown
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/docs/drivers.mdown?rev=1027303&view=auto
==============================================================================
--- incubator/deltacloud/trunk/site/docs/drivers.mdown (added)
+++ incubator/deltacloud/trunk/site/docs/drivers.mdown Mon Oct 25 23:26:58 2010
@@ -0,0 +1,76 @@
+# Deltacloud Drivers
+
+Deltacloud provides drivers for a growing number of popular clouds. All drivers
+can handle a set of standard operations, some of them also support a number of
+optional operations to expose the features of specific clouds more closely. The
+drivers and their capabilities are:
+
+<table providers></table>
+
+## Setting up the code
+
+To set up a Deltacloud core and the drivers, install the
+[deltacloud-core][coregem] Ruby gem:
+
+[coregem]: http://rubygems.org/gems/deltacloud-core
+
+    # gem install deltacloud-core
+
+RPM package will be available soon.
+
+## Launch the server
+
+The server is launched with the `deltacloudd` command and pass it the name
+of the driver you want to use:
+
+    $ deltacloudd -i mock
+
+This will start a webserver running the mock driver on
+`http://localhost:3001/api`; you can simply browse to that URL to get a
+pretty view of the objects the driver deals with.
+
+### EC2 Driver
+
+For the Amazon EC2 you need to install the `amazon-ec2` Ruby gem:
+
+    # gem install amazon-ec2
+
+When using the driver for Amazon EC2, the credentials passed in
+response to the HTTP 401 authentication challenge should be your
+*access_key* and *secret_access_key*
+
+These credentials may be found on the [Access Identifiers](http://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key)
+page at Amazon AWS.
+
+### RHEV-M Driver
+
+The RHEV-M driver needs to be installed on a Windows machine which has the
+RHEV-M Powershell API installed and configured. Assuming the directory
+structure above is followed, you should copy the file
+deltacloud/deltacloud-driver-rhevm/config/rhevm_config.yaml.EXAMPLE to be
+rhevm_config.yaml and edit the file woith the domain you are logging into.
+The username and pasword is provided via the API.
+
+The actual RHEVM instance you are connecting to is controlled by
+the RHEVM.dll.config file which is referenced from the profile.ps1
+file located in My Documents/WindowsPowershell directory
+
+### Rackspace Driver
+
+When using the Rackspace-cloud driver (Rackspace cloud used to be called
+"Mosso") - the password in a HTTP 401 challenge should be your API key, NOT
+your rackspace account password.  (you can get the API-key, or generate a
+new one, from the rackspace console).
+
+### RimuHosting
+
+Further details coming soon.
+
+### OpenNebula
+
+When using the [OpenNebula](http://www.opennebula.org/) driver, the
+credentials passed in response to the HTTP 401 authentication challenge
+should be your OpenNebula user and password.
+
+The address, on which the OCCI server is listening, needs to be defined in
+an environment variable called OCCI_URL.

Added: incubator/deltacloud/trunk/site/docs/framework.mdown
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/docs/framework.mdown?rev=1027303&view=auto
==============================================================================
--- incubator/deltacloud/trunk/site/docs/framework.mdown (added)
+++ incubator/deltacloud/trunk/site/docs/framework.mdown Mon Oct 25 23:26:58 2010
@@ -0,0 +1,248 @@
+[framework]: styles/framework.png
+
+# Writing Deltacloud Drivers #
+
+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 framework handles all aspects of the REST API, while allowing
+driver implementors to focus on the specific cloud provider native
+API.
+
+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.
+
+    def images(credentials, opts)
+      if ( credentials[:name].nil? )
+        throw DeltaCloud::AuthException.new
+      end
+      unless ( credentials_valid?( credentials ) )
+        throw DeltaCloud::AuthException.new
+      end
+
+      # do work
+
+    end
+
+### 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.
+
+For example
+
+    HardwareProfile.new(
+      :architecture=>'x86_64',
+      :memory=>4,
+      :storage=>650,
+    )
+
+The `base_driver` interface and the already implemented drivers are
+located at `server/lib/deltacloud/` in the Deltacloud Core repository.
+
+#### `HardwareProfile`
+
+Attributes are
+
+- **`id`**
+- **`architecture`**
+- **`memory`** - Decimal, gigabytes
+- **`storage`** - Decimal, gigabytes
+- **`cpu`** - Interger, count
+
+#### `Realm`
+
+Attributes are
+
+- **`id`**
+- **`name`**
+- **`state`**
+- **`limit`**
+
+#### `Image`
+
+Attributes are
+
+- **`id`**
+- **`name`**
+- **`architecture`**
+- **`owner_id`**
+- **`description`**
+
+#### `Instance`
+
+Attributes are
+
+- **`id`**
+- **`name`**
+- **`owner_id`** - Opaque, external reference
+- **`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
+
+### Driver methods
+
+The primary methods a driver class must implement are
+
+- `hardware_profiles(credentials, opts=nil)`
+- `images(credentials, opts=nil )`
+- `realms(credentials, opts=nil)`
+- `instances(credentials, opts=nil)`
+- `create_instance(credentials, image_id, opts)`
+- `reboot_instance(credentials, id)`
+- `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.
+
+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.
+
+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.
+
+Each method will be described in more detail below.
+
+#### `hardware_profiles(credentials, opts=nil)`
+
+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 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)`
+
+The `images(...)` method should return an array of `Image` objects
+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.
+
+#### `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.
+
+#### `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 `image_id` parameter must be non-nil. The `opts` hash 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.
+
+#### `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.
+
+#### `destroy_instance(credentials, id)`
+
+The `destroy_instance(...)` method should remove the instance from the
+cloud provider, stopping it first, if necessary.
+
+
+#### `instance_states()`
+
+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
+
+    [
+      [ :origin_state1, {
+        :destination_state1=>:action1, 
+        :destination_state2=>:action2, 
+      } ],
+      [ :origin_state2, {
+        :destination_state3=>:action3, 
+        :destination_state4=>:action4, 
+      } ],
+    ]
+
+Valid states are
+
+- **`:begin`**
+- **`:pending`**
+- **`:running`**
+- **`:shutting_down`**
+- **`:stopped`**
+- **`: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.
+
+Valid transition actions are
+
+- **`:stop`**
+- **`:start`**
+- **`:reboot`**
+
+Additionally, to indicate a transition that may occur _without_ an
+action being triggered, the action **`:_auto_` may be used.

Added: incubator/deltacloud/trunk/site/framework.svg
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/framework.svg?rev=1027303&view=auto
==============================================================================
--- incubator/deltacloud/trunk/site/framework.svg (added)
+++ incubator/deltacloud/trunk/site/framework.svg Mon Oct 25 23:26:58 2010
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" version="1.1" viewBox="17 215 648 128" width="54pc" height="128pt"><metadata xmlns:dc="http://purl.org/dc/elements/1.1/"><dc:date>2009-08-19 15:13Z</dc:date><!-- Produced by OmniGraffle Professional 4.2.3 --></metadata><defs><filter id="Shadow" filterUnits="userSpaceOnUse"><feGaussianBlur in="SourceAlpha" result="blur" stdDeviation="3.488"/><feOffset in="blur" result="offset" dx="0" dy="4"/><feFlood flood-color="black" flood-opacity=".75" result="flood"/><feComposite in="flood" in2="offset" operator="in"/></filter><font-face font-family="Helvetica" font-size="12" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="541.6667" cap-height="750" ascent="770.01953" descent="-229.98047" font-weight="bold"><!--NSCTFontDescriptor &lt;0x174adb80&gt; = {
+    NSFontNameAttribute = "Helvetica-Bold";
+    NSFontSizeAttribute = 12;
+}--><font-face-src><font-face-name name="Helvetica-Bold"/></font-face-src></font-face><font-face font-family="Helvetica" font-size="12" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="-1e3" x-height="541.6667" cap-height="750" ascent="770.01953" descent="-229.98047" font-style="italic" font-weight="bold"><!--NSCTFontDescriptor &lt;0x17c1f550&gt; = {
+    NSFontNameAttribute = "Helvetica-BoldOblique";
+    NSFontSizeAttribute = 12;
+}--><font-face-src><font-face-name name="Helvetica-BoldOblique"/></font-face-src></font-face><font-face font-family="Helvetica" font-size="12" units-per-em="1000" underline-position="-75.683594" underline-thickness="49.316406" slope="0" x-height="583.33337" cap-height="750" ascent="770.01953" descent="-229.98047" font-weight="500"><!--NSCTFontDescriptor &lt;0x174ab700&gt; = {
+    NSFontNameAttribute = Helvetica;
+    NSFontSizeAttribute = 12;
+}--><font-face-src><font-face-name name="Helvetica"/></font-face-src></font-face><marker orient="auto" overflow="visible" markerUnits="strokeWidth" id="FilledArrow_Marker" viewBox="-1 -4 10 8" markerWidth="10" markerHeight="8" color="black"><g><path d="M 8 0 L 0 -3 L 0 3 Z" fill="currentColor" stroke="currentColor" stroke-width="1"/></g></marker></defs><g stroke="none" stroke-opacity="1" stroke-dasharray="none" fill="none" fill-opacity="1"><title>Canvas 1</title><g><title>Layer 1</title><g><use xl:href="#id3_Graphic" filter="url(#Shadow)"/><use xl:href="#id1_Graphic" filter="url(#Shadow)"/><use xl:href="#id4_Graphic" filter="url(#Shadow)"/></g><g id="id3_Graphic"><path d="M 169.117 231 L 458.117 231 C 460.87842 231 463.117 233.23857 463.117 236 L 463.117 314 C 463.117 316.76141 460.87842 319 458.117 319 L 169.117 319 C 166.35558 319 164.117 316.76141 164.117 314 C 164.117 314 164.117 314 164.117 314 L 164.117 236 C 164.117 233.23857 166.35558 231 169.117 231 Z" fill="white"/
 ><path d="M 169.117 231 L 458.117 231 C 460.87842 231 463.117 233.23857 463.117 236 L 463.117 314 C 463.117 316.76141 460.87842 319 458.117 319 L 169.117 319 C 166.35558 319 164.117 316.76141 164.117 314 C 164.117 314 164.117 314 164.117 314 L 164.117 236 C 164.117 233.23857 166.35558 231 169.117 231 Z" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(169.117 300.5)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="bold" x="0" y="11" textLength="124.69336">deltacloud-framework</tspan></text></g><g id="id1_Graphic"><rect x="425" y="247.134" width="143" height="31" fill="white"/><rect x="425" y="247.134" width="143" height="31" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(430 255.634)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="bold" x="6.4970703" y="11" textLength="101.34961">deltacloud-driver-</tspan><tspa
 n font-family="Helvetica" font-size="12" font-style="italic" font-weight="bold" x="107.84668" y="11" textLength="18.65625">foo</tspan></text></g><g id="id4_Graphic"><path d="M 121.75 244.634 L 237.25 244.634 C 250.912 244.634 262 252.698 262 262.634 C 262 272.57 250.912 280.634 237.25 280.634 L 121.75 280.634 C 108.088 280.634 97 272.57 97 262.634 C 97 252.698 108.088 244.634 121.75 244.634" fill="white"/><path d="M 121.75 244.634 L 237.25 244.634 C 250.912 244.634 262 252.698 262 262.634 C 262 272.57 250.912 280.634 237.25 280.634 L 121.75 280.634 C 108.088 280.634 97 272.57 97 262.634 C 97 252.698 108.088 244.634 121.75 244.634" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><text transform="translate(118.5 255.634)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x="5.4091797" y="11" textLength="32.003906">REST</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="37.202148" y="11" textLengt
 h="3.3339844"> </tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="39.879883" y="11" textLength="76.710938">API responder</tspan></text></g><path d="M 262.04324 259.15726 C 287.02634 258.10495 325.50836 254.19305 337 256 C 348.49164 257.80695 316.41803 268.36041 331 270 C 344.1124 271.47437 384.0481 268.05374 414.62372 266.34082" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><line x1="28" y1="262.634" x2="86.600006" y2="262.634" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><rect x="39.5" y="248.634" width="43" height="28" fill="white"/><text transform="translate(44.5 248.634)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".49804688" y="11" textLength="32.003906">REST</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="6.8291016" y="25" textLength="19.3417
 97">API</tspan></text><line x1="568.5" y1="262.634" x2="632.99597" y2="262.634" marker-end="url(#FilledArrow_Marker)" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/><rect x="578.63" y="248.634" width="43" height="28" fill="white"/><text transform="translate(583.63 248.634)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".4892578" y="11" textLength="32.021484">native</tspan><tspan font-family="Helvetica" font-size="12" font-weight="500" x="6.8291016" y="25" textLength="19.341797">API</tspan></text><rect x="302.05588" y="274.2247" width="63" height="14" fill="white"/><text transform="translate(307.05588 274.2247)" fill="black"><tspan font-family="Helvetica" font-size="12" font-weight="500" x=".15917969" y="11" textLength="52.68164">driver SPI</tspan></text></g></g></svg>

Added: incubator/deltacloud/trunk/site/graffle/basic-relationships.graffle
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/graffle/basic-relationships.graffle?rev=1027303&view=auto
==============================================================================
Files incubator/deltacloud/trunk/site/graffle/basic-relationships.graffle (added) and incubator/deltacloud/trunk/site/graffle/basic-relationships.graffle Mon Oct 25 23:26:58 2010 differ

Added: incubator/deltacloud/trunk/site/graffle/framework.graffle
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/graffle/framework.graffle?rev=1027303&view=auto
==============================================================================
Files incubator/deltacloud/trunk/site/graffle/framework.graffle (added) and incubator/deltacloud/trunk/site/graffle/framework.graffle Mon Oct 25 23:26:58 2010 differ

Added: incubator/deltacloud/trunk/site/images/.gitignore
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/images/.gitignore?rev=1027303&view=auto
==============================================================================
--- incubator/deltacloud/trunk/site/images/.gitignore (added)
+++ incubator/deltacloud/trunk/site/images/.gitignore Mon Oct 25 23:26:58 2010
@@ -0,0 +1,2 @@
+
+

Added: incubator/deltacloud/trunk/site/images/basic-relationships.png
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/images/basic-relationships.png?rev=1027303&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/deltacloud/trunk/site/images/basic-relationships.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: incubator/deltacloud/trunk/site/images/framework.png
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/images/framework.png?rev=1027303&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/deltacloud/trunk/site/images/framework.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: incubator/deltacloud/trunk/site/skin/skin.html.tmpl
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/skin/skin.html.tmpl?rev=1027303&view=auto
==============================================================================
--- incubator/deltacloud/trunk/site/skin/skin.html.tmpl (added)
+++ incubator/deltacloud/trunk/site/skin/skin.html.tmpl Mon Oct 25 23:26:58 2010
@@ -0,0 +1,94 @@
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+  <title>Deltacloud - Documentation</title>
+  
+  
+
+  <meta name="keywords" content="">
+  <meta name="description" content="">
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <link rel="shortcut icon" href="./styles/favicon.ico" type="image/x-icon">
+  <link rel="StyleSheet" type="text/css" href="./styles/default.css" title="Main style">
+
+  <link rel="Alternate StyleSheet" type="text/css" href="./styles/default-debug.css" title="Debug main style">
+
+</head>
+
+
+<body>
+  <div id="header">
+  	<div class="container">
+    	<div id="headerLogo" style="cursor: pointer;" onclick="location.href='index.html';">
+    	<h1>Deltacloud - Many clouds. One API. No problem.</h1>
+    	</div>
+
+	</div>
+  </div>
+
+    <div id="navigation">
+
+    <div id="menu" class="container">
+      <ul class="l0">
+		<li><a class="inactive" title="Deltacloud Home" href="./index.html">Home</a></li>
+		<li><a class="inactive" title="Tools" href="./tools.html">Tools</a></li>			
+		<li><a class="inactive" title="Get the latest releases" href="./download.html">Download</a></li>
+
+		<li><a class="inactive" title="Information about design/development process" href="./contribute.html">Contribute</a></li>
+		<li><a class="active" title="Project documentation" href="./documentation.html">Documentation</a></li>
+	  </ul>
+
+    </div>
+    </div>
+	<div id ="subnavigation">
+	<div id="submenu" class="container">
+
+          $DOC_NAV$
+
+	</div>
+	</div>
+ 
+	<div id="main">
+    <div id="content" class="container">
+      $REPLACE$
+    </div>
+  </div>
+
+  <div id="footer">
+    <div id="projects" class="container">
+       <p id="et">
+      <a href="http://et.redhat.com/"><img src="./styles/et_logo.png" alt="A Red Hat Emerging Technology Project"></a>
+
+    </p>
+      <dl id="p1">
+        <dt><a href="http://augeas.net/">Augeas</a></dt>
+
+        <dd><span>A configuration editing tool and API</span></dd>
+        <dt><a href="http://libvirt.org/">libvirt</a></dt>
+        <dd><span>The open source virtualization API</span></dd>
+      </dl>
+
+      <dl id="p2">
+        <dt><a href="http://cobbler.et.redhat.com/">Cobbler</a></dt>
+
+        <dd>OS provisioning and profile management</dd>
+        <dt><a href="http://libguestfs.org/">virt-v2v</a></dt>
+        <dd><span>Migrate guests from one hypervisor to another</span></dd>
+      </dl>
+      <dl id="p3">
+
+        <dt><a href="http://freeipa.org/">FreeIPA</a></dt>
+
+        <dd><span>Identity, policy and audit management</span></dd>
+        <dt><a href="http://virt-manager.org/">Virtual Machine Manager</a></dt>
+        <dd><span>Virtualization management from the desktop</span></dd>
+      </dl>
+
+  	</div>
+
+    </div>
+
+</body>
+</html>
+

Added: incubator/deltacloud/trunk/site/styles/dcloud.css
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/styles/dcloud.css?rev=1027303&view=auto
==============================================================================
--- incubator/deltacloud/trunk/site/styles/dcloud.css (added)
+++ incubator/deltacloud/trunk/site/styles/dcloud.css Mon Oct 25 23:26:58 2010
@@ -0,0 +1,276 @@
+.container {
+	margin: 0 auto;
+    width: 960px;
+}
+
+body {
+    background: #24292b;    
+}
+
+#main {
+	background: #FFF;
+	padding: 0 0 4em 0;
+}
+
+#header {
+    padding: 0;
+    margin: 0;
+    height: 106px;
+    width: 100%;
+    background: #6498c5 url(topbar-bg.png) no-repeat center;
+    border: 0px;
+}
+
+#headerLogo {
+	display:block;
+	padding-top: 24px;
+}
+
+#headerLogo h1{
+	height: 37px;
+    width: 600px;
+    margin: 8px 0 0 0;
+    text-indent:-9999px;
+    background: url(logo-wide.png) no-repeat;
+    display: inline-block; 
+}
+
+#headerLogo a {  
+	text-decoration: none;
+}
+
+#headerLogo a:focus {  
+	outline: none; 
+}
+
+
+#headerSearch {
+    position: absolute;
+    top: 0px;
+    right: 0px;
+    padding: 2em;
+}
+
+#headerSearch input {
+    border: 1px solid #999999;
+    color: #999999;
+    background: white;
+    padding: 3px;
+    font-size: 1em;
+}
+
+#headerSearch #submit {
+    border: 1px solid #999999;
+    background: #eeeeee;
+    color: black;
+    padding: 3px;
+    font-size: 1em;
+}
+
+
+#content {
+    padding: 2em 0 0 0;
+}
+
+/*=====  Main nav styles  =====*/
+
+#navigation {
+	background: #24292b url(navbarbg.png) repeat-x;
+	border-bottom:1px solid #d1dee4;
+	border-top:1px solid #074665;
+}
+
+#menu {
+	padding: 9px 0;
+}
+
+
+#menu li, #menu li div, #submenu li, #submenu li div {
+    display: inline;
+}
+
+#menu ul, #submenu ul {
+	padding: 0;
+	margin: 0;
+	list-style-type:none;
+}
+
+#menu ul li {
+	margin-right:6px;
+	font-size: 1.1em;
+}
+
+
+#menu ul li a, #menu ul li span {
+    text-decoration: inherit;
+    color: #FFF;
+}
+
+#menu ul li a:hover {
+	background:#5a1c1d none repeat scroll 0 0;
+	-moz-border-radius: 3px;
+	-webkit-border-radius: 3px;
+
+}
+
+#menu ul.l0 li .active {
+    color:#FFF;
+    background: #0d84bd;
+    padding: 6px 12px;
+	-moz-border-radius: 3px;
+	-webkit-border-radius: 3px;
+}
+
+#menu ul.l0 li .inactive {
+    padding: 6px 12px;
+}
+
+#subnavigation {
+	padding: 9px 0;
+	background:#e4ebef;
+}
+
+#submenu ul li {
+	margin-right:3px;
+	font-size: 1em;
+}
+
+
+#submenu ul li a, #submenu ul li span {
+    text-decoration: inherit;
+    color: #026fbd;
+}
+
+#submenu ul li a:hover {
+    text-decoration: underline;
+}
+
+#submenu ul.l1 li .active {
+    color:#333;
+    padding: 6px 9px;
+}
+
+#submenu ul.l1 li .inactive {
+    padding: 6px 9px;
+}
+/*===== End of main nav styles  ======*/
+
+
+pre {
+    font-size: 1.2em;
+    border: 1px dashed #cc0000;
+    background: #dce9e7;
+    color: black;
+    padding: 1em;
+    margin-bottom: 1em;
+}
+
+code {
+    font-size: 1.2em;
+}
+
+pre > code {
+    font-size: 1em;
+}
+
+a {
+    color: #026fbd;
+}
+
+
+h1 a, h2 a, h3 a, h4 a, h5 a {
+    color: inherit;
+    text-decoration: inherit;
+}
+
+li > h1 a, li > h2 a, li > h3 a, li > h4 a, li > h5 a { /* When headings are links that are in a list, they will be styled as links. */
+    color: #026fbd;
+    text-decoration: inherit;
+}
+
+
+#changelog .author {
+    color: #3c857c;
+    font-weight: bold;
+}
+
+p.image {
+    text-align: center;
+    border: none;
+}
+
+
+/*=====  Footer styles  =====*/
+
+#footer {
+    clear: both;
+    position: relative;
+    border: 0px;
+    background: #24292b;
+    height: 180px;
+}
+
+/* This is hidden from IE <= 6 because it can't do transparency */
+body > #footer {
+    background: #24292b url(footer_pattern.png) repeat-x;
+}
+
+/* This is hidden from IE <= 6 because it can't do transparency */
+head:first-child+body #projects dl {
+    background: url(footer_corner.png) no-repeat;
+}
+
+#footer p {
+    top: 0px;
+    left: 0px;
+    margin: 0px;
+    border: 0px;
+    width: 220px;
+    float: left;
+}
+
+#footer p a img {
+    border: 0px;
+}
+
+
+#projects dl {
+    margin: 0px;
+    height: 180px;
+    position: relative;
+    top: 0px;
+    left: 0px;
+}
+
+
+#projects #p1, #p2, #p3 {
+	width: 240px;
+    float: left;
+}
+
+#projects dl dd  {
+    display: block;
+    padding: .5em 1em 0;
+	color: #ccc;
+	font-size: .95em;
+}
+
+#projects a {
+    display: block;
+    padding-left: 1em;
+    padding-top: 1em;
+    color: white;
+    text-decoration: inherit;
+    font-weight: bold;
+}
+
+ul.toc ul {
+    margin-bottom: 0em;
+}
+
+#frontpage p.intro {
+  float : left;
+  width : 300px;
+}
+
+

Added: incubator/deltacloud/trunk/site/styles/default.css
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/styles/default.css?rev=1027303&view=auto
==============================================================================
--- incubator/deltacloud/trunk/site/styles/default.css (added)
+++ incubator/deltacloud/trunk/site/styles/default.css Mon Oct 25 23:26:58 2010
@@ -0,0 +1,3 @@
+@import url(generic.css);
+@import url(dcloud.css);
+

Added: incubator/deltacloud/trunk/site/styles/generic.css
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/site/styles/generic.css?rev=1027303&view=auto
==============================================================================
--- incubator/deltacloud/trunk/site/styles/generic.css (added)
+++ incubator/deltacloud/trunk/site/styles/generic.css Mon Oct 25 23:26:58 2010
@@ -0,0 +1,62 @@
+* {
+	padding:0;
+	margin:0;
+}
+
+html {
+	min-width: 990px;
+}
+
+body {
+	margin: 0;
+	padding: 0;
+	color: #000;
+	background: #FFF;
+	font-family: "Helvetica Neue", "Liberation Sans", Arial, sans-serif;
+	font-size: 81.25%;
+}
+
+ol,ul,dl,p {
+	padding: 0;
+	margin: 0 0 1em 0;
+	line-height: 1.6em;
+}
+
+ol,ul {
+ 	margin-left: 2em;
+}
+
+
+h1,h2,h3,h4,h5,h6 {
+	font-weight: normal;
+	margin-bottom: 0.5em;
+	padding: 0;
+	margin-top: 0;
+}
+
+h1 {
+	font-size: 1.8em;
+}
+h2 {
+	font-size: 1.4em;
+}
+h3 {
+	font-size: 1.2em;
+	font-weight: bold;
+}
+h4 {
+	font-size: 1em;
+	font-weight: bold;
+}
+h5 {
+	font-size: 0.9em;
+	font-weight: bold;
+	font-style: italic;
+}
+h6 {
+	font-size: 0.8em;
+	font-style: italic;
+}
+img {
+	border: 0;
+}
\ No newline at end of file



Mime
View raw message