Class: DeltacloudVM::Client::StorageSnapshot
- Includes:
- Methods::StorageSnapshot, Methods::StorageVolume
- Defined in:
- lib/deltacloud_vm/client/models/storage_snapshot.rb
Instance Attribute Summary collapse
-
#created ⇒ Object
readonly
Custom attributes:.
-
#storage_volume_id ⇒ Object
readonly
Returns the value of attribute storage_volume_id.
Attributes inherited from Base
#description, #name, #obj_id, #url
Class Method Summary collapse
-
.parse(xml_body) ⇒ Object
Parse the StorageSnapshot entity from XML body.
Instance Method Summary collapse
-
#destroy! ⇒ Object
Syntax sugar for destroying the current instance of StorageSnapshot.
-
#storage_volume ⇒ Object
StorageSnapshot model methods.
Methods included from Methods::StorageVolume
#attach_storage_volume, #create_storage_volume, #destroy_storage_volume, #detach_storage_volume, #storage_volumes
Methods included from Methods::StorageSnapshot
#create_storage_snapshot, #destroy_storage_snapshot, #storage_snapshot, #storage_snapshots
Methods inherited from Base
#client, #connection, convert, #entrypoint, from_collection, #id, #initialize, #original_body, #to_s, #update_instance_variables!, validate_attrs!
Methods included from Helpers::XmlHelper
Methods included from Methods::Api
#api_uri, #current_driver, #current_provider, #feature?, #features, #must_support!, #path, #support?, #supported_collections, #version
Methods included from Helpers::Model
#error, #from_collection, #from_resource, #model
Constructor Details
This class inherits a constructor from DeltacloudVM::Client::Base
Instance Attribute Details
#created ⇒ Object (readonly)
Custom attributes:
26 27 28 |
# File 'lib/deltacloud_vm/client/models/storage_snapshot.rb', line 26 def created @created end |
#storage_volume_id ⇒ Object (readonly)
Returns the value of attribute storage_volume_id.
27 28 29 |
# File 'lib/deltacloud_vm/client/models/storage_snapshot.rb', line 27 def storage_volume_id @storage_volume_id end |
Class Method Details
.parse(xml_body) ⇒ Object
Parse the StorageSnapshot entity from XML body
-
xml_body -> DeltacloudVM API XML representation of the storage_snapshot
47 48 49 50 51 52 |
# File 'lib/deltacloud_vm/client/models/storage_snapshot.rb', line 47 def self.parse(xml_body) { :created => xml_body.text_at(:created), :storage_volume_id => xml_body.attr_at('storage_volume', :id) } end |
Instance Method Details
#destroy! ⇒ Object
Syntax sugar for destroying the current instance of StorageSnapshot
38 39 40 |
# File 'lib/deltacloud_vm/client/models/storage_snapshot.rb', line 38 def destroy! destroy_storage_snapshot(_id) end |
#storage_volume ⇒ Object
StorageSnapshot model methods
31 32 33 |
# File 'lib/deltacloud_vm/client/models/storage_snapshot.rb', line 31 def storage_volume super(storage_volume_id) end |