Class: 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 BaseModel
Instance Attribute Details
#created ⇒ Object
Returns the value of attribute created.
23 24 25 |
# File 'lib/deltacloud/models/storage_snapshot.rb', line 23 def created @created end |
#description ⇒ Object
Returns the value of attribute description.
25 26 27 |
# File 'lib/deltacloud/models/storage_snapshot.rb', line 25 def description @description end |
#name ⇒ Object
Returns the value of attribute name.
24 25 26 |
# File 'lib/deltacloud/models/storage_snapshot.rb', line 24 def name @name end |
#state ⇒ Object
Returns the value of attribute state.
21 22 23 |
# File 'lib/deltacloud/models/storage_snapshot.rb', line 21 def state @state end |
#storage_volume_id ⇒ Object
Returns the value of attribute storage_volume_id.
22 23 24 |
# File 'lib/deltacloud/models/storage_snapshot.rb', line 22 def storage_volume_id @storage_volume_id end |
Instance Method Details
#is_completed? ⇒ Boolean
27 28 29 |
# File 'lib/deltacloud/models/storage_snapshot.rb', line 27 def is_completed? state == 'completed' end |
#to_hash(context) ⇒ Object
31 32 33 34 35 36 37 38 |
# File 'lib/deltacloud/models/storage_snapshot.rb', line 31 def to_hash(context) { :id => self.id, :state => state, :storage_volume => { :id => storage_volume_id, :href => context.storage_volume_url(storage_volume_id), :rel => :storage_volume }, :created => created } end |