Class: OpenStack::Volume::Snapshot
- Inherits:
-
Object
- Object
- OpenStack::Volume::Snapshot
- Defined in:
- lib/openstack/volume/snapshot.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#display_description ⇒ Object
readonly
Returns the value of attribute display_description.
-
#display_name ⇒ Object
readonly
Returns the value of attribute display_name.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#volume_id ⇒ Object
readonly
Returns the value of attribute volume_id.
Instance Method Summary collapse
-
#initialize(snap_info) ⇒ Snapshot
constructor
A new instance of Snapshot.
Constructor Details
#initialize(snap_info) ⇒ Snapshot
Returns a new instance of Snapshot.
13 14 15 16 17 18 19 20 21 |
# File 'lib/openstack/volume/snapshot.rb', line 13 def initialize(snap_info) @id = snap_info["id"] @display_name = snap_info["display_name"] || snap_info["displayName"] @display_description = snap_info["display_description"] || snap_info["displayDescription"] @volume_id = snap_info["volume_id"] || snap_info["volumeId"] @status = snap_info["status"] @size = snap_info["size"] @created_at = snap_info["created_at"] || snap_info["createdAt"] end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
11 12 13 |
# File 'lib/openstack/volume/snapshot.rb', line 11 def created_at @created_at end |
#display_description ⇒ Object (readonly)
Returns the value of attribute display_description.
7 8 9 |
# File 'lib/openstack/volume/snapshot.rb', line 7 def display_description @display_description end |
#display_name ⇒ Object (readonly)
Returns the value of attribute display_name.
6 7 8 |
# File 'lib/openstack/volume/snapshot.rb', line 6 def display_name @display_name end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
5 6 7 |
# File 'lib/openstack/volume/snapshot.rb', line 5 def id @id end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
10 11 12 |
# File 'lib/openstack/volume/snapshot.rb', line 10 def size @size end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/openstack/volume/snapshot.rb', line 9 def status @status end |
#volume_id ⇒ Object (readonly)
Returns the value of attribute volume_id.
8 9 10 |
# File 'lib/openstack/volume/snapshot.rb', line 8 def volume_id @volume_id end |