Class Fog::Rackspace::BlockStorage::Real
In: lib/fog/rackspace/block_storage.rb
lib/fog/rackspace/requests/block_storage/create_volume.rb
lib/fog/rackspace/requests/block_storage/list_volumes.rb
lib/fog/rackspace/requests/block_storage/delete_volume.rb
lib/fog/rackspace/requests/block_storage/delete_snapshot.rb
lib/fog/rackspace/requests/block_storage/get_volume.rb
lib/fog/rackspace/requests/block_storage/list_volume_types.rb
lib/fog/rackspace/requests/block_storage/create_snapshot.rb
lib/fog/rackspace/requests/block_storage/get_snapshot.rb
lib/fog/rackspace/requests/block_storage/list_snapshots.rb
lib/fog/rackspace/requests/block_storage/get_volume_type.rb
Parent: Fog::Rackspace::Service

Methods

Public Class methods

Public Instance methods

Create a snapshot from a volume

@param [String] volume_id Id of server to create image from @param [Hash] options @option options [String] :display_name display name for snapshot @option options [String] :display_description display description for snapshot @option options [Boolean] :force Set to true to force service to create snapshot @return [Excon::Response] response:

  * body [Hash]:
    * 'snapshot' [Hash]:
      * 'volume_id' [String]: - the volume_id of the snapshot
        * 'display_description' [String]: - display description of snapshot
        * 'status' [String]: - status of snapshot
        * 'id' [String]: - id of snapshot
        * 'size' [Fixnum]: - size of the snapshot in GB
        * 'display_name' [String]: - display name of snapshot
        * 'created_at' [String]: - creation time of snapshot

@raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404 @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400 @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500 @raise [Fog::Rackspace::BlockStorage::ServiceError] @note All writes to the volume should be flushed before creating the snapshot, either by un-mounting any file systems on the volume or by detaching the volume. @see docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/POST_createSnapshot__v1__tenant_id__snapshots.html

Create volume

@param [Integer] size size of volume in GB. Minimum size is 100 @param [Hash] options @option options [String] :display_name display name for volume @option options [String] :display_description display description for volume @option options [String] :volume_type type of volume @option options [String] :snapshot_id The optional snapshot from which to create a volume. @option options [String] :image_id The ID of an image from the compute service. If provided, a bootable volume will be

   created.

@return [Excon::Response] response:

  * body [Hash]:
    * 'volume' [Hash]:
      * 'volume_type' [String]: - type of volume
      * 'display_description' [String]: - volume description
      * 'metadata' [Hash]: - volume metadata
      * 'availability_zone'[String]: - region of the volume
      * 'status' [String]: - status of volume
      * 'id' [String]: - id of volume
      * 'attachments' [Array<Hash]: - array of hashes containing attachment information
      * 'size' [Fixnum]: - size of volume in GB (100 GB minimum)
      * 'snapshot_id' [String]: - The optional snapshot from which to create a volume.
      * 'display_name' [String]: - display name of volume
      * 'created_at' [String]: - the volume creation time

@raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404 @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400 @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500 @raise [Fog::Rackspace::BlockStorage::ServiceError] @see docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/POST_createVolume__v1__tenant_id__volumes.html

Delete snapshot

@param [String] snapshot_id Id of snapshot to delete @return [Excon::Response] response @raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404 @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400 @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500 @raise [Fog::Rackspace::BlockStorage::ServiceError] @see docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/POST_createSnapshot__v1__tenant_id__snapshots.html

Delete volume

@param [String] volume_id Id of volume to delete @return [Excon::Response] response @raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404 @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400 @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500 @raise [Fog::Rackspace::BlockStorage::ServiceError] @note You cannot delete a volume until all of its dependent snaphosts have been deleted. @see docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/DELETE_deleteVolume__v1__tenant_id__volumes.html

Retrieves snapshot detail @param [String] snapshot_id @return [Excon::Response] response:

  * body [Hash]:
    * 'snapshot' [Hash]:
      * 'volume_id' [String]: -  volume_id of the snapshot
      * 'display_description' [String]: - snapshot display description
      * 'status' [String]: - snapshot status
      * 'os-extended-snapshot-attributes:project_id' [String]: -
      * 'id' [String]: - snapshot id
      * 'size' [Fixnum]: - size of the snapshot in GB
      * 'os-extended-snapshot-attributes:progress' [String]: -
      * 'display_name' [String]: - display name of snapshot
      * 'created_at' [String]: - creation time of snapshot

@raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404 @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400 @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500 @raise [Fog::Rackspace::BlockStorage::ServiceError] @see docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getSnapshot__v1__tenant_id__snapshots.html

Retrieves volume detail @param [String] volume_id @return [Excon::Response] response:

  * body  [Hash]:
    * 'volume' [Hash]:
      * 'volume_type' [String]: - volume type
      * 'display_description' [String]: - volume display description
      * 'metadata' [Hash]: - volume metadata
      * 'availability_zone' [String]: - region of volume
      * 'status' [String]: - status of volume
      * 'id' [String]: - id of volume
      * 'attachments' [Array<Hash]: - array of hashes containing attachment information
      * 'size' [Fixnum]: - size of volume in GB (100 GB minimum)
      * 'snapshot_id' [String]: - The optional snapshot from which to create a volume.
      * 'os-vol-host-attr:host' [String]: -
      * 'display_name' [String]: - display name of volume
      * 'created_at' [String]: - the volume creation time
      * 'os-vol-tenant-attr:tenant_id' [String]: -

@raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404 @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400 @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500 @raise [Fog::Rackspace::BlockStorage::ServiceError]

  @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getVolume__v1__tenant_id__volumes.html

Retrieves volume type detail @param [String] volume_type_id @return [Excon::Response] response:

  * body [Hash]:
    * 'volume_type' [Hash]: -
      * 'name' [String]: - name of volume type
      * 'extra_specs' [Hash]: -
      * 'id' [String]: - id of volume type

@raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404 @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400 @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500 @raise [Fog::Rackspace::BlockStorage::ServiceError] @see docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getVolumeType__v1__tenant_id__types.html

Retrieves list of snapshots @return [Excon::Response] response:

  * body [Hash]:
    * 'snapshots' [Array]: -
      * 'volume_id' [String]: - volume_id of the snapshot
      * 'display_description' [String]: - display description of snapshot
      * 'status' [String]: - status of snapshot
      * 'id' [String]: - id of snapshot
      * 'size' [Fixnum]: - size of the snapshot in GB
      * 'display_name' [String]: - display name of snapshot
      * 'created_at' [String]: - creation time of snapshot

@raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404 @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400 @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500 @raise [Fog::Rackspace::BlockStorage::ServiceError] @see docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getSnapshotsSimple__v1__tenant_id__snapshots.html

Retrieves list of volume types @return [Excon::Response] response

  * body [Hash]:
    * 'volume_types' [Array]: -
      * 'name' [String]: - name of volume type
      * 'extra_specs' [Hash]: -
      * 'id' [Fixnum]: - id of volume type

@raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404 @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400 @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500 @raise [Fog::Rackspace::BlockStorage::ServiceError] @see docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getVolumeTypes__v1__tenant_id__types.html

Retrieves list of volumes @return [Excon::Response] response:

  * body [Hash]:
    * 'volumes' [Array]: -
      * 'volume_type' [String]: - volume type
      * 'display_description' [String]: - display desciption for volume
      * 'metadata' [Hash]: - metadata for volume
      * 'availability_zone' [String]: - region for volume
      * 'status' [String]: - status of volume
      * 'id' [String]: - id of volume
      * 'attachments' [Array]: - array of hashes containing attachment information
      * 'size' [Fixnum]: -  size of volume in GB (100 GB minimum)
      * 'snapshot_id' [String]: - optional snapshot from which to create a volume.
      * 'display_name' [String]: - display name of bolume
      * 'created_at' [String]: - volume creation time

@raise [Fog::Rackspace::BlockStorage::NotFound] - HTTP 404 @raise [Fog::Rackspace::BlockStorage::BadRequest] - HTTP 400 @raise [Fog::Rackspace::BlockStorage::InternalServerError] - HTTP 500 @raise [Fog::Rackspace::BlockStorage::ServiceError] @see docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getVolumesSimple__v1__tenant_id__volumes.html

[Validate]