Class: Deltacloud::StorageSnapshot
- Includes:
- TestPoller
- Defined in:
- lib/deltacloud/api.rb,
lib/deltacloud/models/storage_snapshot.rb
Instance Attribute Summary collapse
-
#created ⇒ Object
Returns the value of attribute created.
-
#description ⇒ Object
Returns the value of attribute description.
-
#name ⇒ Object
Returns the value of attribute name.
-
#state ⇒ Object
Returns the value of attribute state.
-
#storage_volume_id ⇒ Object
Returns the value of attribute storage_volume_id.
Instance Method Summary collapse
Methods included from TestPoller
Methods inherited from BaseModel
attr_accessor, attributes, #attributes, #id, #initialize, #to_entity
Constructor Details
This class inherits a constructor from Deltacloud::BaseModel
Instance Attribute Details
#created ⇒ Object
Returns the value of attribute created.
22 23 24 |
# File 'lib/deltacloud/models/storage_snapshot.rb', line 22 def created @created end |
#description ⇒ Object
Returns the value of attribute description.
24 25 26 |
# File 'lib/deltacloud/models/storage_snapshot.rb', line 24 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
23 24 25 |
# File 'lib/deltacloud/models/storage_snapshot.rb', line 23 def name @name end |
#state ⇒ Object
Returns the value of attribute state.
20 21 22 |
# File 'lib/deltacloud/models/storage_snapshot.rb', line 20 def state @state end |
#storage_volume_id ⇒ Object
Returns the value of attribute storage_volume_id.
21 22 23 |
# File 'lib/deltacloud/models/storage_snapshot.rb', line 21 def storage_volume_id @storage_volume_id end |
Instance Method Details
#is_completed? ⇒ Boolean
26 27 28 |
# File 'lib/deltacloud/models/storage_snapshot.rb', line 26 def is_completed? state == 'completed' end |
#to_hash(context) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/deltacloud/models/storage_snapshot.rb', line 30 def to_hash(context) { :id => self.id, :href => context.storage_snapshot_url(self.id), :state => state, :storage_volume => { :id => storage_volume_id, :href => context.storage_volume_url(storage_volume_id), :rel => :storage_volume }, :created => created } end |