1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[rackspace|block_storage] adding response documentaion

This commit is contained in:
Kyle Rames 2013-03-22 15:59:03 -05:00
parent f8c97d6305
commit fb788279e1
10 changed files with 90 additions and 10 deletions

View file

@ -33,7 +33,7 @@ module Fog
attribute :display_description
# @!attribute [rw] size
# @return [String] size of the volume in GB
# @return [String] size of the volume in GB (100 GB minimum)
attribute :size
# @!attribute [r] attachments

View file

@ -10,7 +10,16 @@ module Fog
# @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
# @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
# @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 http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/POST_createSnapshot__v1__tenant_id__snapshots.html
def create_snapshot(volume_id, options = {})

View file

@ -11,7 +11,20 @@ module Fog
# @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.
# @return [Excon::Response] response
# @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
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/POST_createVolume__v1__tenant_id__volumes.html
def create_volume(size, options = {})
data = {

View file

@ -5,7 +5,18 @@ module Fog
# Retrieves snapshot detail
# @param [String] snapshot_id
# @return [Excon::Response] response
# @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
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getSnapshot__v1__tenant_id__snapshots.html
def get_snapshot(snapshot_id)
request(

View file

@ -5,8 +5,23 @@ module Fog
# Retrieves volume detail
# @param [String] volume_id
# @return [Excon::Response] response
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getVolume__v1__tenant_id__volumes.html
# @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>: -
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getVolume__v1__tenant_id__volumes.html
def get_volume(volume_id)
request(
:expects => [200],

View file

@ -5,7 +5,12 @@ module Fog
# Retrieves volume type detail
# @param [String] volume_type_id
# @return [Excon::Response] response
# @return [Excon::Response] response:
# * body<~Hash>:
# * 'volume_type'<~Hash>: -
# * 'name'<~String>: - name of volume type
# * 'extra_specs'<~Hash>: -
# * 'id'<~String>: - id of volume type
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getVolumeType__v1__tenant_id__types.html
def get_volume_type(volume_type_id)
request(

View file

@ -4,7 +4,16 @@ module Fog
class Real
# Retrieves list of snapshots
# @return [Excon::Response] response
# @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
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getSnapshotsSimple__v1__tenant_id__snapshots.html
def list_snapshots
request(

View file

@ -5,6 +5,11 @@ module Fog
# 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
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getVolumeTypes__v1__tenant_id__types.html
def list_volume_types
request(

View file

@ -4,7 +4,20 @@ module Fog
class Real
# Retrieves list of volumes
# @return [Excon::Response] response
# @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
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/GET_getVolumesSimple__v1__tenant_id__volumes.html
def list_volumes
request(

View file

@ -19,7 +19,7 @@ module Fog
# * status [String] - status of current image
# * updated [String] - updated timestamp
# * links [Array] - links to flavor
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Get_Image_Details-d1e4848.html
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Get_Image_Details-d1e4848.html
def get_image(image_id)
request(
:expects => [200, 203],