mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[rackspace] correcting exception classes on YARD docs
This commit is contained in:
parent
1173a7ef84
commit
5ed929938a
78 changed files with 519 additions and 519 deletions
|
@ -39,10 +39,10 @@ module Fog
|
|||
# @param [Fog::Storage::Rackspace::Directory] directory to publish
|
||||
# @param [Boolean] publish If true directory is published. If false directory is unpublished.
|
||||
# @return [Hash] hash containing urls for published container
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def publish_container(container, publish = true)
|
||||
enabled = publish ? 'True' : 'False'
|
||||
response = put_container(container.key, 'X-Cdn-Enabled' => enabled)
|
||||
|
@ -53,9 +53,9 @@ module Fog
|
|||
# Returns hash of urls for container
|
||||
# @param [Fog::Storage::Rackspace::Directory] container to retrieve urls for
|
||||
# @return [Hash] hash containing urls for published container
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @note If unable to find container or container is not published this method will return an empty hash.
|
||||
def urls(container)
|
||||
begin
|
||||
|
|
|
@ -52,10 +52,10 @@ module Fog
|
|||
# @param force [Boolean] Set to true to force service to create snapshot
|
||||
# @raise [Fog::Rackspace::BlockStorage::IdentifierTaken] if the snapshot has been previously saved.
|
||||
# @return [Boolean] returns true if snapshot is being created
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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 A snapshot object cannot be updated
|
||||
# @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
|
||||
|
@ -73,10 +73,10 @@ module Fog
|
|||
|
||||
# Destroys snapshot
|
||||
# @return [Boolean] returns true if snapshot was deleted
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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/DELETE_deleteSnapshot__v1__tenant_id__snapshots.html
|
||||
def destroy
|
||||
requires :identity
|
||||
|
|
|
@ -10,10 +10,10 @@ module Fog
|
|||
|
||||
# Returns list of snapshots
|
||||
# @return [Fog::Rackspace::BlockStorage::Snapshots] Retrieves a snapshots
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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_getSnapshotsSimple__v1__tenant_id__snapshots.html
|
||||
def all
|
||||
data = service.list_snapshots.body['snapshots']
|
||||
|
@ -23,10 +23,10 @@ module Fog
|
|||
# Retrieves snapshot
|
||||
# @param [String] snapshot_id for snapshot to be returned
|
||||
# @return [Fog::Rackspace::BlockStorage::Volume]
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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_getSnapshot__v1__tenant_id__snapshots.html
|
||||
def get(snapshot_id)
|
||||
data = service.get_snapshot(snapshot_id).body['snapshot']
|
||||
|
|
|
@ -62,10 +62,10 @@ module Fog
|
|||
|
||||
# Returns a list of snapshots associated with the volume
|
||||
# @return [Fog::Rackspace::BlockStorage::Snapshots]
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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]
|
||||
def snapshots
|
||||
service.snapshots.select { |s| s.volume_id == identity }
|
||||
end
|
||||
|
@ -77,10 +77,10 @@ module Fog
|
|||
# @option options [String] :display_description of snapshot
|
||||
# @option options [Boolean] :force - If set to true, snapshot will be taken even if volume is still mounted.
|
||||
# @return [Fog::Rackspace::BlockStorage::Snapshot]
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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 http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/POST_createSnapshot__v1__tenant_id__snapshots.html
|
||||
def create_snapshot(options={})
|
||||
|
@ -91,10 +91,10 @@ module Fog
|
|||
# Creates volume
|
||||
# @raise [Fog::Rackspace::BlockStorage::IdentifierTaken] if the volume has been previously saved.
|
||||
# @return [Boolean] returns true if volume was successfully created
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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 A volume object cannot be updated
|
||||
# @see http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/POST_createVolume__v1__tenant_id__volumes.html
|
||||
def save
|
||||
|
@ -112,10 +112,10 @@ module Fog
|
|||
|
||||
# Destroys Volume
|
||||
# @return [Boolean] returns true if volume was deleted
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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 http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/DELETE_deleteVolume__v1__tenant_id__volumes.html
|
||||
def destroy
|
||||
|
|
|
@ -10,10 +10,10 @@ module Fog
|
|||
|
||||
# Returns list of volume types
|
||||
# @return [Fog::Rackspace::BlockStorage::VolumeTypes] Retrieves a list volume types.
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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_getVolumeTypes__v1__tenant_id__types.html
|
||||
def all
|
||||
data = service.list_volume_types.body['volume_types']
|
||||
|
@ -23,10 +23,10 @@ module Fog
|
|||
# Retrieves volume type
|
||||
# @param [String] volume_type_id for volume_type to be returned
|
||||
# @return [Fog::Rackspace::BlockStorage::VolumeType]
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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_getVolumeType__v1__tenant_id__types.html
|
||||
def get(volume_type_id)
|
||||
data = service.get_volume_type(volume_type_id).body['volume_type']
|
||||
|
|
|
@ -10,10 +10,10 @@ module Fog
|
|||
|
||||
# Returns list of volumes
|
||||
# @return [Fog::Rackspace::BlockStorage::Volumes] Retrieves a volumes
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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_getVolumesSimple__v1__tenant_id__volumes.html
|
||||
def all
|
||||
data = service.list_volumes.body['volumes']
|
||||
|
@ -23,10 +23,10 @@ module Fog
|
|||
# Retrieves volume
|
||||
# @param [String] volume_id for snapshot to be returned
|
||||
# @return [Fog::Rackspace::BlockStorage::Volume]
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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
|
||||
def get(volume_id)
|
||||
data = service.get_volume(volume_id).body['volume']
|
||||
|
|
|
@ -26,10 +26,10 @@ module Fog
|
|||
# Attaches volume to volume to server.
|
||||
# Requires :server_id, :volume_id, and device to be populated
|
||||
# @return [Boolean] true if volume is attaching
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Attach_Volume_to_Server.html
|
||||
def save
|
||||
requires :server_id, :volume_id, :device
|
||||
|
@ -40,10 +40,10 @@ module Fog
|
|||
|
||||
# Detaches volume from server
|
||||
# @return [Boolean] true if volume is detaching
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Delete_Volume_Attachment.html
|
||||
def destroy
|
||||
requires :server_id, :volume_id
|
||||
|
|
|
@ -12,10 +12,10 @@ module Fog
|
|||
|
||||
# Retrieves attachments belonging to server
|
||||
# @return [Fog::Compute::RackspaceV2::Attachments] list of attachments
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see Server#attachments
|
||||
def all
|
||||
data = service.list_attachments(server.id).body['volumeAttachments']
|
||||
|
@ -25,10 +25,10 @@ module Fog
|
|||
# Retrieves attachment belonging to server
|
||||
# @param [String] volume_id
|
||||
# @return [Fog::Compute::RackspaceV2::Attachment] attachment for volume id
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
def get(volume_id)
|
||||
data = service.get_attachment(server.id, volume_id).body['volumeAttachment']
|
||||
data && new(data)
|
||||
|
|
|
@ -10,10 +10,10 @@ module Fog
|
|||
|
||||
# Retrieves information for all available flavors
|
||||
# @return [Fog::Compute::RackspaceV2::Flavors] list of flavors
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @note Fog's currentl implementation only returns 1000 flavors.
|
||||
# @note Fog does not retrieve all flavor details. Please use #get to retrieve all details for a specific flavor.
|
||||
def all
|
||||
|
@ -24,10 +24,10 @@ module Fog
|
|||
# Retrieve image
|
||||
# @param [String] flavor_id id of flavor
|
||||
# @return [Fog::Compute::RackspaceV2::Flavor] flavor
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Get_Flavor_Details-d1e4317.html
|
||||
def get(flavor_id)
|
||||
data = service.get_flavor(flavor_id).body['flavor']
|
||||
|
|
|
@ -89,10 +89,10 @@ module Fog
|
|||
# @param [String] ready_state By default state is ACTIVE
|
||||
# @param [Array,String] error_states By default state is ERROR
|
||||
# @return [Boolean] returns true if server is in a ready state
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::InvalidImageStateException] if server state is an error state
|
||||
def ready?(ready_state = ACTIVE, error_states=[ERROR])
|
||||
if error_states
|
||||
|
@ -104,10 +104,10 @@ module Fog
|
|||
|
||||
|
||||
# Destroy image
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
def destroy
|
||||
requires :identity
|
||||
service.delete_image(identity)
|
||||
|
|
|
@ -10,10 +10,10 @@ module Fog
|
|||
|
||||
# Returns list of images
|
||||
# @return [Fog::Compute::RackspaceV2::Images] Retrieves a list images.
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @note Fog's current implementation only returns 1000 images.
|
||||
# @note Fog does not retrieve all image details. Please use get to retrieve all details for a specific image.
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Images-d1e4435.html
|
||||
|
@ -25,10 +25,10 @@ module Fog
|
|||
# Retrieve image
|
||||
# @param [String] image_id id of image
|
||||
# @return [Fog::Compute::RackspaceV2:Image] image
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Get_Image_Details-d1e4848.html
|
||||
def get(image_id)
|
||||
data = service.get_image(image_id).body['image']
|
||||
|
|
|
@ -16,10 +16,10 @@ module Fog
|
|||
|
||||
# Retrieves all of the metadata from server
|
||||
# @return [Fog::Compute::RackspaceV2::Metadatum] list of metadatum
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
def all
|
||||
requires :parent
|
||||
return unless parent.identity
|
||||
|
@ -30,10 +30,10 @@ module Fog
|
|||
# Retrieves specific metadata from server
|
||||
# @param [String] key for metadatum
|
||||
# @return [Fog::Compute::RackspaceV2::Metadatum] metadatum
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
def get(key)
|
||||
requires :parent
|
||||
data = service.get_metadata_item(collection_name, parent.id, key).body["meta"]
|
||||
|
@ -73,10 +73,10 @@ module Fog
|
|||
end
|
||||
|
||||
# Saves the current metadata on server
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
def save
|
||||
requires :parent
|
||||
service.set_metadata(collection_name, parent.id, to_hash)
|
||||
|
|
|
@ -13,10 +13,10 @@ module Fog
|
|||
|
||||
# Remove metadatum from server
|
||||
# @return [Boolean] return true if metadatum is deleting
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
def destroy
|
||||
requires :identity
|
||||
connection.delete_metadata_item(collection_name, parent.id, key)
|
||||
|
@ -25,10 +25,10 @@ module Fog
|
|||
|
||||
# Save metadatum on server
|
||||
# @return [Boolean] return true if metadatum is saving
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
def save
|
||||
requires :identity, :value
|
||||
connection.set_metadata_item(collection_name, parent.id, key, value)
|
||||
|
|
|
@ -180,10 +180,10 @@ module Fog
|
|||
# * requires attributes: service:, :name, :image_id, and :flavor_id
|
||||
# * optional attributes :disk_config, :metadata, :personality
|
||||
# @return [Boolean] returns true if server is being created
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @note You should use servers.create to create servers instead calling this method directly
|
||||
# @see Servers#create
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/CreateServers.html
|
||||
|
@ -211,10 +211,10 @@ module Fog
|
|||
# This will update :name, :accessIPv4, and :accessIPv6 attributes.
|
||||
# @note If you edit the server name, the server host name does not change. Also, server names are not guaranteed to be unique.
|
||||
# @return true if update has started updating
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ServerUpdate.html
|
||||
#
|
||||
# * State Transition
|
||||
|
@ -234,10 +234,10 @@ module Fog
|
|||
|
||||
# Destroy the server
|
||||
# @return [Boolean] returns true if server has started deleting
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Delete_Server-d1e2883.html
|
||||
#
|
||||
# * Status Transition:
|
||||
|
@ -251,10 +251,10 @@ module Fog
|
|||
|
||||
# Server flavor
|
||||
# @return [Fog::Compute::RackspaceV2::Flavor] server flavor
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
def flavor
|
||||
requires :flavor_id
|
||||
@flavor ||= service.flavors.get(flavor_id)
|
||||
|
@ -262,10 +262,10 @@ module Fog
|
|||
|
||||
# Server image
|
||||
# @return [Fog::Compute::RackspaceV2::Image] server image
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
def image
|
||||
requires :image_id
|
||||
@image ||= service.images.get(image_id)
|
||||
|
@ -276,10 +276,10 @@ module Fog
|
|||
# @param options [Hash]:
|
||||
# @option options [Hash<String, String>] metadata hash of containing metadata key value pairs.
|
||||
# @return [Fog::ComputeRackspaceV2::Image] image being created
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Create_Image-d1e4655.html
|
||||
#
|
||||
# * State Transition:
|
||||
|
@ -298,10 +298,10 @@ module Fog
|
|||
|
||||
# Attached Cloud Block Volumes
|
||||
# @return [Fog::Compute::RackspaceV2::Attachments] attached Cloud Block Volumes
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Volume_Attachments.html
|
||||
def attachments
|
||||
@attachments ||= begin
|
||||
|
@ -316,10 +316,10 @@ module Fog
|
|||
# @param [Fog::Rackspace::BlockStorage::Volume, String] volume object or the volume id of volume to mount
|
||||
# @param [String] device name of the device /dev/xvd[a-p] (optional)
|
||||
# @return [Fog::Compute::RackspaceV2::Attachment] resulting attachment object
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Attach_Volume_to_Server.html
|
||||
def attach_volume(volume, device=nil)
|
||||
requires :identity
|
||||
|
@ -355,10 +355,10 @@ module Fog
|
|||
# Reboot server
|
||||
# @param [String<SOFT, HARD>] type 'SOFT' will do a soft reboot. 'HARD' will do a hard reboot.
|
||||
# @return [Boolean] returns true if server is being rebooted
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Reboot_Server-d1e3371.html
|
||||
#
|
||||
# * State transition:
|
||||
|
@ -375,10 +375,10 @@ module Fog
|
|||
# Rebuild removes all data on the server and replaces it with the specified image. The id and all IP addresses remain the same.
|
||||
# @param [String] image_id image to use for rebuild
|
||||
# @return [Boolean] returns true if rebuild is in process
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Rebuild_Server-d1e3538.html
|
||||
#
|
||||
# * Status Transition:
|
||||
|
@ -394,10 +394,10 @@ module Fog
|
|||
# Resize existing server to a different flavor, in essence, scaling the server up or down. The original server is saved for a period of time to allow rollback if there is a problem. All resizes should be tested and explicitly confirmed, at which time the original server is removed. All resizes are automatically confirmed after 24 hours if they are not confirmed or reverted.
|
||||
# @param [String] flavor_id to resize
|
||||
# @return [Boolean] returns true if resize is in process
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @note All resizes are automatically confirmed after 24 hours if you do not explicitly confirm or revert the resize.
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Resize_Server-d1e3707.html
|
||||
# @see #confirm_resize
|
||||
|
@ -415,10 +415,10 @@ module Fog
|
|||
|
||||
# Confirms server resize operation
|
||||
# @return [Boolean] returns true if resize has been confirmed
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @note All resizes are automatically confirmed after 24 hours if you do not explicitly confirm or revert the resize.
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Confirm_Resized_Server-d1e3868.html
|
||||
# @see #resize
|
||||
|
@ -434,10 +434,10 @@ module Fog
|
|||
|
||||
# Reverts server resize operation
|
||||
# @return [Boolean] returns true if resize is being reverted
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @note All resizes are automatically confirmed after 24 hours if you do not explicitly confirm or revert the resize.
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Revert_Resized_Server-d1e4024.html
|
||||
# @see #resize
|
||||
|
@ -454,10 +454,10 @@ module Fog
|
|||
# Change admin password
|
||||
# @param [String] password The administrator password.
|
||||
# @return [Boolean] returns true if operation was scheduled
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @note Though Rackspace does not enforce complexity requirements for the password, the operating system might. If the password is not complex enough, the server might enter an ERROR state.
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Change_Password-d1e3234.html
|
||||
#
|
||||
|
|
|
@ -11,10 +11,10 @@ module Fog
|
|||
|
||||
# Returns list of servers
|
||||
# @return [Fog::Compute::RackspaceV2::Servers] Retrieves a list servers.
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @note Fog's current implementation only returns 1000 servers
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Servers-d1e2078.html
|
||||
def all
|
||||
|
@ -24,10 +24,10 @@ module Fog
|
|||
|
||||
# Creates a new server and populates ssh keys
|
||||
# @return [Fog::Compute::RackspaceV2::Server]
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @note This method is incompatible with Cloud Servers utlizing RackConnect. RackConnect users
|
||||
# should use server personalization to install keys. Please see Server#personality for more information.
|
||||
# @example
|
||||
|
@ -48,10 +48,10 @@ module Fog
|
|||
# Retrieves server
|
||||
# @param [String] server_id for server to be returned
|
||||
# @return [Fog::Compute::RackspaceV2:Server]
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Get_Server_Details-d1e2623.html
|
||||
def get(server_id)
|
||||
data = service.get_server(server_id).body['server']
|
||||
|
|
|
@ -25,10 +25,10 @@ module Fog
|
|||
|
||||
# Saves account settings (meta_temp_url_key)
|
||||
# @return [Boolean] returns true if successfully updated
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def save
|
||||
service.post_set_meta_temp_url_key meta_temp_url_key
|
||||
true
|
||||
|
@ -36,10 +36,10 @@ module Fog
|
|||
|
||||
# Reload account with latest data from Cloud Files
|
||||
# @return [Fog::Storage::Rackspace::Account] returns itself
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def reload
|
||||
response = service.head_containers
|
||||
merge_attributes response.headers
|
||||
|
|
|
@ -11,10 +11,10 @@ module Fog
|
|||
|
||||
# Returns list of directories
|
||||
# @return [Fog::Storage::Rackspace::Directories] Retrieves a list directories.
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @note Fog's current implementation only returns 10,000 directories
|
||||
# @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/View_List_of_Containers-d1e1100.html
|
||||
def all
|
||||
|
@ -27,10 +27,10 @@ module Fog
|
|||
# @param options [Hash]:
|
||||
# @option options [String] cdn_cname CDN CNAME used when calling Directory#public_url
|
||||
# @return [Fog::Storage::Rackspace::Directory]
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @example
|
||||
# directory = fog.directories.get('video', :cdn_cname => 'http://cdn.lunenburg.org')
|
||||
# files = directory.files
|
||||
|
|
|
@ -58,10 +58,10 @@ module Fog
|
|||
|
||||
# Destroy the directory and remove it from CDN
|
||||
# @return [Boolean] returns true if directory was deleted
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @note Directory must be empty before it is destroyed.
|
||||
# @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/Delete_Container-d1e1765.html
|
||||
def destroy
|
||||
|
@ -75,10 +75,10 @@ module Fog
|
|||
|
||||
# Returns collection of files in directory
|
||||
# @return [Fog::Storage::Rackspace::Files] collection of files in directory
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def files
|
||||
@files ||= begin
|
||||
Fog::Storage::Rackspace::Files.new(
|
||||
|
@ -90,10 +90,10 @@ module Fog
|
|||
|
||||
# Is directory published to CDN
|
||||
# @return [Boolean] return true if published to CDN
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def public?
|
||||
if @public.nil?
|
||||
@public ||= (key && public_url) ? true : false
|
||||
|
@ -103,10 +103,10 @@ module Fog
|
|||
|
||||
# Reload directory with latest data from Cloud Files
|
||||
# @return [Fog::Storage::Rackspace::Directory] returns itself
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def reload
|
||||
@public = nil
|
||||
@urls = nil
|
||||
|
@ -123,10 +123,10 @@ module Fog
|
|||
# 3. return the default CDN url.
|
||||
#
|
||||
# @return [String] public url for directory
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def public_url
|
||||
return nil if urls.empty?
|
||||
return urls[:ssl_uri] if service.ssl?
|
||||
|
@ -135,10 +135,10 @@ module Fog
|
|||
|
||||
# URL used to stream video to iOS devices. Cloud Files will auto convert to the approprate format.
|
||||
# @return [String] iOS URL
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/iOS-Streaming-d1f3725.html
|
||||
def ios_url
|
||||
urls[:ios_uri]
|
||||
|
@ -146,10 +146,10 @@ module Fog
|
|||
|
||||
# URL used to stream resources
|
||||
# @return [String] streaming url
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/Streaming-CDN-Enabled_Containers-d1f3721.html
|
||||
def streaming_url
|
||||
urls[:streaming_uri]
|
||||
|
@ -157,10 +157,10 @@ module Fog
|
|||
|
||||
# Create or update directory and associated metadata
|
||||
# @return [Boolean] returns true if directory was saved
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @note If public attribute is true, directory will be CDN enabled
|
||||
# @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/Create_Container-d1e1694.html
|
||||
def save
|
||||
|
|
|
@ -51,10 +51,10 @@ module Fog
|
|||
attr_writer :public
|
||||
|
||||
# Returns the body/contents of file
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @example Retrieve and download contents of Cloud Files object to file system
|
||||
# file_object = directory.files.get('germany.jpg')
|
||||
# File.open('germany.jpg', 'w') {|f| f.write(file_object.body) }
|
||||
|
@ -77,10 +77,10 @@ module Fog
|
|||
# @param [String] target_directory_key
|
||||
# @param [String] target_file_key
|
||||
# @param options [Hash] used to pass in file attributes
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/Copy_Object-d1e2241.html
|
||||
def copy(target_directory_key, target_file_key, options={})
|
||||
requires :directory, :key
|
||||
|
@ -94,10 +94,10 @@ module Fog
|
|||
|
||||
# Destroy the file
|
||||
# @return [Boolean] returns true if file is destroyed
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/Delete_Object-d1e2264.html
|
||||
def destroy
|
||||
requires :directory, :key
|
||||
|
@ -134,10 +134,10 @@ module Fog
|
|||
|
||||
# Is file published to CDN
|
||||
# @return [Boolean] return true if published to CDN
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def public?
|
||||
directory.public?
|
||||
end
|
||||
|
@ -151,20 +151,20 @@ module Fog
|
|||
# 3. return the default CDN url.
|
||||
#
|
||||
# @return [String] public url for file
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def public_url
|
||||
Files::file_url directory.public_url, key
|
||||
end
|
||||
|
||||
# URL used to stream video to iOS devices without needing to convert your video
|
||||
# @return [String] iOS URL
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/iOS-Streaming-d1f3725.html
|
||||
def ios_url
|
||||
Files::file_url directory.ios_url, key
|
||||
|
@ -172,20 +172,20 @@ module Fog
|
|||
|
||||
# URL used to stream resources
|
||||
# @return [String] streaming url
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/Streaming-CDN-Enabled_Containers-d1f3721.html
|
||||
def streaming_url
|
||||
Files::file_url directory.streaming_url, key
|
||||
end
|
||||
|
||||
# Immediately purge file from the CDN network
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @note You may only PURGE up to 25 objects per day. Any attempt to purge more than this will result in a 498 status code error (Rate Limited).
|
||||
# @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/Purge_CDN-Enabled_Objects-d1e3858.html
|
||||
def purge_from_cdn
|
||||
|
@ -198,10 +198,10 @@ module Fog
|
|||
|
||||
# Create or updates file and associated metadata
|
||||
# @param options [Hash] additional parameters to pass to Cloud Files
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/Create_Update_Object-d1e1965.html
|
||||
def save(options = {})
|
||||
requires :body, :directory, :key
|
||||
|
|
|
@ -35,10 +35,10 @@ module Fog
|
|||
|
||||
# Returns list of files
|
||||
# @return [Fog::Storage::Rackspace::Files] Retrieves a list files.
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @see http://docs.rackspace.com/files/api/v1/cf-devguide/content/List_Objects-d1e1284.html
|
||||
def all(options = {})
|
||||
requires :directory
|
||||
|
@ -63,10 +63,10 @@ module Fog
|
|||
# Calls block for each file in the directory
|
||||
# @yieldparam [Fog::Storage::Rackspace::File]
|
||||
# @return [Fog::Storage::Rackspace::Directory] returns itself
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @note This method retrieves files in pages. Page size is defined by the limit attribute
|
||||
alias :each_file_this_page :each
|
||||
def each
|
||||
|
@ -92,10 +92,10 @@ module Fog
|
|||
# @yieldparam [Integer] remaining
|
||||
# @yieldparam [Integer] content_length
|
||||
# @return [Fog::Storage::Rackspace:File]
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @note If a block is provided, the body attribute will be empty. By default chunk size is 1 MB. This value can be changed by passing the parameter :chunk_size
|
||||
# into the :connection_options hash in the service constructor.
|
||||
# @example Download an image from Cloud Files and save it to file
|
||||
|
@ -125,10 +125,10 @@ module Fog
|
|||
# Returns the public_url for the given object key
|
||||
# @param key of the object
|
||||
# @return [String] url for object
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# @see Directory#public_url
|
||||
def get_url(key)
|
||||
requires :directory
|
||||
|
@ -141,10 +141,10 @@ module Fog
|
|||
# @param key of the object
|
||||
# @param options Required for compatibility with other Fog providers. Not Used.
|
||||
# @return [Fog::Storage::Rackspace::File]
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def head(key, options = {})
|
||||
requires :directory
|
||||
data = service.head_object(directory.key, key)
|
||||
|
|
|
@ -20,10 +20,10 @@ module Fog
|
|||
# * '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::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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 http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/POST_createSnapshot__v1__tenant_id__snapshots.html
|
||||
def create_snapshot(volume_id, options = {})
|
||||
|
|
|
@ -25,10 +25,10 @@ module Fog
|
|||
# * '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::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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/POST_createVolume__v1__tenant_id__volumes.html
|
||||
def create_volume(size, options = {})
|
||||
data = {
|
||||
|
|
|
@ -7,10 +7,10 @@ module Fog
|
|||
#
|
||||
# @param [String] snapshot_id Id of snapshot to delete
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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/POST_createSnapshot__v1__tenant_id__snapshots.html
|
||||
def delete_snapshot(snapshot_id)
|
||||
request(
|
||||
|
|
|
@ -7,10 +7,10 @@ module Fog
|
|||
#
|
||||
# @param [String] volume_id Id of volume to delete
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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 http://docs.rackspace.com/cbs/api/v1.0/cbs-devguide/content/DELETE_deleteVolume__v1__tenant_id__volumes.html
|
||||
def delete_volume(volume_id)
|
||||
|
|
|
@ -17,10 +17,10 @@ module Fog
|
|||
# * 'os-extended-snapshot-attributes:progress' [String]: -
|
||||
# * 'display_name' [String]: - display name of snapshot
|
||||
# * 'created_at' [String]: - creation time of snapshot
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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_getSnapshot__v1__tenant_id__snapshots.html
|
||||
def get_snapshot(snapshot_id)
|
||||
request(
|
||||
|
|
|
@ -21,10 +21,10 @@ module Fog
|
|||
# * 'display_name' [String]: - display name of volume
|
||||
# * 'created_at' [String]: - the volume creation time
|
||||
# * 'os-vol-tenant-attr:tenant_id' [String]: -
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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
|
||||
def get_volume(volume_id)
|
||||
request(
|
||||
|
|
|
@ -11,10 +11,10 @@ module Fog
|
|||
# * 'name' [String]: - name of volume type
|
||||
# * 'extra_specs' [Hash]: -
|
||||
# * 'id' [String]: - id of volume type
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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_getVolumeType__v1__tenant_id__types.html
|
||||
def get_volume_type(volume_type_id)
|
||||
request(
|
||||
|
|
|
@ -14,10 +14,10 @@ module Fog
|
|||
# * '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::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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_getSnapshotsSimple__v1__tenant_id__snapshots.html
|
||||
def list_snapshots
|
||||
request(
|
||||
|
|
|
@ -10,10 +10,10 @@ module Fog
|
|||
# * 'name' [String]: - name of volume type
|
||||
# * 'extra_specs' [Hash]: -
|
||||
# * 'id' [Fixnum]: - id of volume type
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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_getVolumeTypes__v1__tenant_id__types.html
|
||||
def list_volume_types
|
||||
request(
|
||||
|
|
|
@ -18,10 +18,10 @@ module Fog
|
|||
# * '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::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @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_getVolumesSimple__v1__tenant_id__volumes.html
|
||||
def list_volumes
|
||||
request(
|
||||
|
|
|
@ -9,10 +9,10 @@ module Fog
|
|||
# * container<~String> - Name of container to delete
|
||||
# * object<~String> - Name of object to delete
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def delete_object(container, object)
|
||||
request(
|
||||
:expects => 204,
|
||||
|
|
|
@ -16,10 +16,10 @@ module Fog
|
|||
# * body<~Array>:
|
||||
# * container<~String>: Name of container
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def get_containers(options = {})
|
||||
response = request(
|
||||
:expects => [200, 204],
|
||||
|
|
|
@ -18,10 +18,10 @@ module Fog
|
|||
# * 'X-User-Agent-ACL'<~String> - ?
|
||||
# * 'X-Referrer-ACL'<~String> - ?
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def head_container(container)
|
||||
response = request(
|
||||
:expects => 204,
|
||||
|
|
|
@ -15,10 +15,10 @@ module Fog
|
|||
# * 'X-User-Agent-ACL'<~String> - ?
|
||||
# * 'X-Referrer-ACL'<~String> - ?
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def post_container(name, options = {})
|
||||
response = request(
|
||||
:expects => [201, 202],
|
||||
|
|
|
@ -15,10 +15,10 @@ module Fog
|
|||
# * 'X-User-Agent-ACL'<~String> - ?
|
||||
# * 'X-Referrer-ACL'<~String> - ?
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def put_container(name, options = {})
|
||||
response = request(
|
||||
:expects => [201, 202],
|
||||
|
|
|
@ -14,10 +14,10 @@ module Fog
|
|||
# * serverId [String] - The id of the server that attached the volume
|
||||
# * id [String] - The id of the attachment
|
||||
# * volumeId [String] - The id of the volume that was attached
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Attach_Volume_to_Server.html
|
||||
def attach_volume(server_id, volume_id, device)
|
||||
data = {
|
||||
|
|
|
@ -7,10 +7,10 @@ module Fog
|
|||
# @param [String] server_id
|
||||
# @param [String] password
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @note Though Rackspace does not enforce complexity requirements for the password, the operating system might. If the password is not complex enough, the server might enter an ERROR state.
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Change_Password-d1e3234.html
|
||||
def change_server_password(server_id, password)
|
||||
|
|
|
@ -6,10 +6,10 @@ module Fog
|
|||
# Confirm server resize operation
|
||||
# @param [String] server_id The id of the server to revert
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @note All resizes are automatically confirmed after 24 hours if you do not explicitly confirm or revert the resize.
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Revert_Resized_Server-d1e4024.html
|
||||
#
|
||||
|
|
|
@ -10,10 +10,10 @@ module Fog
|
|||
# @param [Hash] options
|
||||
# @option options [Hash] :metadata - key value pairs of image metadata
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Create_Image-d1e4655.html
|
||||
#
|
||||
# * State Transition:
|
||||
|
|
|
@ -28,10 +28,10 @@ module Fog
|
|||
# * networks [Array]:
|
||||
# * [Hash]:
|
||||
# * uuid [String] - uuid of attached network
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/CreateServers.html
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Server_Metadata-d1e2529.html
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Server_Personality-d1e2543.html
|
||||
|
|
|
@ -7,10 +7,10 @@ module Fog
|
|||
# @param [String] server_id id of server containing volume to delete
|
||||
# @param [String] volume_id id of volume on server to delete
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Delete_Volume_Attachment.html
|
||||
def delete_attachment(server_id, volume_id)
|
||||
request(
|
||||
|
|
|
@ -6,10 +6,10 @@ module Fog
|
|||
# Delete an image
|
||||
# @param [String] image_id Id of image to delete
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Delete_Image-d1e4957.html
|
||||
def delete_image(image_id)
|
||||
request(
|
||||
|
|
|
@ -8,10 +8,10 @@ module Fog
|
|||
# @param [String] obj_id id of the object where the metadata is attached
|
||||
# @param [String] key the key of the metadata to delete
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Delete_Metadata_Item-d1e5790.html
|
||||
def delete_metadata_item(collection, obj_id, key)
|
||||
request(
|
||||
|
|
|
@ -6,10 +6,10 @@ module Fog
|
|||
# Deletes a specified server instance from the system.
|
||||
# @param [String] server_id the id of the server to delete
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Delete_Server-d1e2883.html
|
||||
def delete_server(server_id)
|
||||
request(
|
||||
|
|
|
@ -13,10 +13,10 @@ module Fog
|
|||
# * serverId [String] - The id of the server that attached the volume
|
||||
# * id [String] - The id of the attachment
|
||||
# * volumeId [String] - The id of the volume that was attached
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Get_Volume_Attachment_Details.html
|
||||
def get_attachment(server_id, volume_id)
|
||||
request(
|
||||
|
|
|
@ -15,10 +15,10 @@ module Fog
|
|||
# * swap [Fixnum] - amount of swap in GB
|
||||
# * vcpus [Fixnum] - number of virtual CPUs
|
||||
# * links [Array] - links to flavor
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Get_Flavor_Details-d1e4317.html
|
||||
def get_flavor(flavor_id)
|
||||
request(
|
||||
|
|
|
@ -19,10 +19,10 @@ module Fog
|
|||
# * status [String] - status of current image
|
||||
# * updated [String] - updated timestamp
|
||||
# * links [Array] - links to flavor
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Get_Image_Details-d1e4848.html
|
||||
def get_image(image_id)
|
||||
request(
|
||||
|
|
|
@ -10,10 +10,10 @@ module Fog
|
|||
# @return [Excon::Response] response:
|
||||
# * body [Hash]:
|
||||
# * meta [Hash]:
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Get_Metadata_Item-d1e5507.html
|
||||
def get_metadata_item(collection, obj_id, key)
|
||||
request(
|
||||
|
|
|
@ -33,10 +33,10 @@ module Fog
|
|||
# * tenant_id [String] - The tenant ID.
|
||||
# * updated [String] - updated timestamp
|
||||
# * user_id [Array] - The user ID.
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Get_Server_Details-d1e2623.html
|
||||
def get_server(server_id)
|
||||
request(
|
||||
|
|
|
@ -8,10 +8,10 @@ module Fog
|
|||
# @return [Excon::Response] response:
|
||||
# * body [Hash]:
|
||||
# * addresses [Hash] - key is the network name and the value are an array of addresses allocated for that network
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
def list_addresses(server_id)
|
||||
request(
|
||||
:method => 'GET',
|
||||
|
|
|
@ -14,10 +14,10 @@ module Fog
|
|||
# * [Hash]:
|
||||
# * version [Fixnum] - version of the address
|
||||
# * addr [String] - ip address
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Addresses_by_Network-d1e3118.html
|
||||
def list_addresses_by_network(server_id, network_id)
|
||||
request(
|
||||
|
|
|
@ -13,10 +13,10 @@ module Fog
|
|||
# * serverId [String] - The id of the server that attached the volume
|
||||
# * id [String] - The id of the attachment
|
||||
# * volumeId [String] - The id of the volume that was attached
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Volume_Attachments.html
|
||||
def list_attachments(server_id)
|
||||
request(
|
||||
|
|
|
@ -11,10 +11,10 @@ module Fog
|
|||
# * id [String] - flavor id
|
||||
# * links [Array] - flavor links
|
||||
# * name [String] - flavor name
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Flavors-d1e4188.html
|
||||
def list_flavors
|
||||
request(
|
||||
|
|
|
@ -11,10 +11,10 @@ module Fog
|
|||
# * id [String] - flavor id
|
||||
# * links [Array] - image links
|
||||
# * name [String] - image name
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Flavors-d1e4188.html
|
||||
def list_images
|
||||
request(
|
||||
|
|
|
@ -9,10 +9,10 @@ module Fog
|
|||
# @return [Excon::Response] response:
|
||||
# * body [Hash]:
|
||||
# * meta [Hash]:
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Metadata-d1e5089.html
|
||||
def list_metadata(collection, obj_id)
|
||||
request(
|
||||
|
|
|
@ -32,10 +32,10 @@ module Fog
|
|||
# * tenant_id [String] - The tenant ID.
|
||||
# * updated [String] - updated timestamp
|
||||
# * user_id [Array] - The user ID.
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/List_Servers-d1e2078.html
|
||||
def list_servers
|
||||
request(
|
||||
|
|
|
@ -6,10 +6,10 @@ module Fog
|
|||
# Reboots server
|
||||
# @param [String] server_id
|
||||
# @param [String<SOFT,HARD>] type type of reboot
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Reboot_Server-d1e3371.html
|
||||
def reboot_server(server_id, type)
|
||||
data = {
|
||||
|
|
|
@ -31,10 +31,10 @@ module Fog
|
|||
# * networks [Array]:
|
||||
# * [Hash]:
|
||||
# * uuid [String] - uuid of attached network
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Rebuild_Server-d1e3538.html
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Server_Metadata-d1e2529.html
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Server_Personality-d1e2543.html
|
||||
|
|
|
@ -7,10 +7,10 @@ module Fog
|
|||
# @param [String] server_id id of server to resize
|
||||
# @param [String] flavor_id id of the desired flavor
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @note All resizes are automatically confirmed after 24 hours if you do not explicitly confirm or revert the resize.
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Revert_Resized_Server-d1e4024.html
|
||||
#
|
||||
|
|
|
@ -6,10 +6,10 @@ module Fog
|
|||
# Reverts server resize operation
|
||||
# @param [String] server_id
|
||||
# @return [Excon::Response] response
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @note All resizes are automatically confirmed after 24 hours if you do not explicitly confirm or revert the resize.
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Revert_Resized_Server-d1e4024.html
|
||||
# @see Server#resize
|
||||
|
|
|
@ -10,10 +10,10 @@ module Fog
|
|||
# @return [Excon::Response] response:
|
||||
# * body [Hash]:
|
||||
# * metadata [Hash]:
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Create_or_Replace_Metadata-d1e5358.html
|
||||
def set_metadata(collection, obj_id, metadata = {})
|
||||
request(
|
||||
|
|
|
@ -11,10 +11,10 @@ module Fog
|
|||
# @return [Excon::Response] response:
|
||||
# * body [Hash]:
|
||||
# * meta [Hash]:
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Create_or_Update_a_Metadata_Item-d1e5633.html
|
||||
def set_metadata_item(collection, obj_id, key, value)
|
||||
request(
|
||||
|
|
|
@ -10,10 +10,10 @@ module Fog
|
|||
# @return [Excon::Response] response:
|
||||
# * body [Hash]:
|
||||
# * metadata [Hash]:
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Update_Metadata-d1e5208.html
|
||||
def update_metadata(collection, obj_id, metadata = {})
|
||||
request(
|
||||
|
|
|
@ -9,10 +9,10 @@ module Fog
|
|||
# @option options [Hash] name name for server
|
||||
# @option options [String] accessIPv4 The IP version 4 address.
|
||||
# @option options [Hash] accessIPv6 The IP version 6 address.
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Compute::RackspaceV2::NotFound] - HTTP 404
|
||||
# @raise [Fog::Compute::RackspaceV2::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Compute::RackspaceV2::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Compute::RackspaceV2::ServiceError]
|
||||
# @note If you edit the server name, the server host name does not change. Also, server names are not guaranteed to be unique.
|
||||
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/ServerUpdate.html
|
||||
def update_server(server_id, options={})
|
||||
|
|
|
@ -11,10 +11,10 @@ module Fog
|
|||
# * target_container_name<~String> - Name of bucket to create copy in
|
||||
# * target_object_name<~String> - Name for new copy of object
|
||||
# * options<~Hash> - Additional headers
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def copy_object(source_container_name, source_object_name, target_container_name, target_object_name, options={})
|
||||
headers = { 'X-Copy-From' => "/#{source_container_name}/#{source_object_name}" }.merge(options)
|
||||
request({
|
||||
|
|
|
@ -7,10 +7,10 @@ module Fog
|
|||
#
|
||||
# ==== Parameters
|
||||
# * name<~String> - Name of container to delete
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def delete_container(name)
|
||||
request(
|
||||
:expects => 204,
|
||||
|
|
|
@ -8,10 +8,10 @@ module Fog
|
|||
# ==== Parameters
|
||||
# * container<~String> - Name of container to delete
|
||||
# * object<~String> - Name of object to delete
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def delete_object(container, object)
|
||||
request(
|
||||
:expects => 204,
|
||||
|
|
|
@ -28,10 +28,10 @@ module Fog
|
|||
# * 'hash'<~String> - Hash of object (etag?)
|
||||
# * 'last_modified'<~String> - Last modified timestamp
|
||||
# * 'name'<~String> - Name of object
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def get_container(container, options = {})
|
||||
options = options.reject {|key, value| value.nil?}
|
||||
request(
|
||||
|
|
|
@ -17,10 +17,10 @@ module Fog
|
|||
# * 'bytes'<~Integer>: - Number of bytes used by container
|
||||
# * 'count'<~Integer>: - Number of items in container
|
||||
# * 'name'<~String>: - Name of container
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def get_containers(options = {})
|
||||
options = options.reject {|key, value| value.nil?}
|
||||
request(
|
||||
|
|
|
@ -8,10 +8,10 @@ module Fog
|
|||
# ==== Parameters
|
||||
# * container<~String> - Name of container to look in
|
||||
# * object<~String> - Name of object to look for
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def get_object(container, object, &block)
|
||||
params = {}
|
||||
|
||||
|
|
|
@ -14,10 +14,10 @@ module Fog
|
|||
# ==== Returns
|
||||
# * response<~Excon::Response>:
|
||||
# * body<~String> - url for object
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# ==== See Also
|
||||
# http://docs.rackspace.com/files/api/v1/cf-devguide/content/Create_TempURL-d1a444.html
|
||||
def get_object_https_url(container, object, expires, options = {})
|
||||
|
|
|
@ -13,10 +13,10 @@ module Fog
|
|||
# * headers<~Hash>:
|
||||
# * 'X-Container-Object-Count'<~String> - Count of containers
|
||||
# * 'X-Container-Bytes-Used'<~String> - Bytes used
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def head_container(container)
|
||||
request(
|
||||
:expects => 204,
|
||||
|
|
|
@ -10,10 +10,10 @@ module Fog
|
|||
# * headers<~Hash>:
|
||||
# * 'X-Account-Container-Count'<~String> - Count of containers
|
||||
# * 'X-Account-Bytes-Used'<~String> - Bytes used
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def head_containers
|
||||
request(
|
||||
:expects => 204,
|
||||
|
|
|
@ -8,10 +8,10 @@ module Fog
|
|||
# ==== Parameters
|
||||
# * container<~String> - Name of container to look in
|
||||
# * object<~String> - Name of object to look for
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def head_object(container, object)
|
||||
request({
|
||||
:expects => 200,
|
||||
|
|
|
@ -19,10 +19,10 @@ module Fog
|
|||
#
|
||||
# ==== Returns
|
||||
# * response<~Excon::Response>
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
# ==== See Also
|
||||
# http://docs.rackspace.com/files/api/v1/cf-devguide/content/Set_Account_Metadata-d1a4460.html
|
||||
def post_set_meta_temp_url_key(key)
|
||||
|
|
|
@ -7,10 +7,10 @@ module Fog
|
|||
#
|
||||
# ==== Parameters
|
||||
# * name<~String> - Name for container, should be < 256 bytes and must not contain '/'
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def put_container(name, options={})
|
||||
request(
|
||||
:expects => [201, 202],
|
||||
|
|
|
@ -10,10 +10,10 @@ module Fog
|
|||
# * object<~String> - Name for object
|
||||
# * data<~String|File> - data to upload
|
||||
# * options<~Hash> - config headers for object. Defaults to {}.
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def put_object(container, object, data, options = {})
|
||||
data = Fog::Storage.parse_data(data)
|
||||
headers = data[:headers].merge!(options)
|
||||
|
|
|
@ -8,10 +8,10 @@ module Fog
|
|||
# ==== Parameters
|
||||
# * container<~String> - Name for container, should be < 256 bytes and must not contain '/'
|
||||
# * object<~String> - Name for object
|
||||
# @raise [Fog::Rackspace::Errors::NotFound] - HTTP 404
|
||||
# @raise [Fog::Rackspace::Errors::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Rackspace::Errors::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Rackspace::Errors::ServiceError]
|
||||
# @raise [Fog::Storage::Rackspace::NotFound] - HTTP 404
|
||||
# @raise [Fog::Storage::Rackspace::BadRequest] - HTTP 400
|
||||
# @raise [Fog::Storage::Rackspace::InternalServerError] - HTTP 500
|
||||
# @raise [Fog::Storage::Rackspace::ServiceError]
|
||||
def put_object_manifest(container, object)
|
||||
path = "#{Fog::Rackspace.escape(container)}/#{Fog::Rackspace.escape(object)}"
|
||||
request(
|
||||
|
|
Loading…
Reference in a new issue