Class: OpenStack::Volume::Volume
- Defined in:
- lib/openstack/volume/volume.rb
Instance Attribute Summary collapse
-
#attachments ⇒ Object
readonly
Returns the value of attribute attachments.
-
#availability_zone ⇒ Object
readonly
Returns the value of attribute availability_zone.
-
#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.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
-
#snapshot_id ⇒ Object
readonly
Returns the value of attribute snapshot_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#volume_type ⇒ Object
readonly
Returns the value of attribute volume_type.
Instance Method Summary collapse
-
#initialize(volume_info) ⇒ Volume
constructor
A new instance of Volume.
Constructor Details
#initialize(volume_info) ⇒ Volume
Returns a new instance of Volume.
17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/openstack/volume/volume.rb', line 17 def initialize(volume_info) @id = volume_info["id"] @display_name = volume_info["display_name"] || volume_info["displayName"] @display_description = volume_info["display_description"] || volume_info["displayDescription"] @size = volume_info["size"] @volume_type = volume_info["volume_type"] || volume_info["volumeType"] @metadata = volume_info["metadata"] @availability_zone = volume_info["availability_zone"] || volume_info["availabilityZone"] @snapshot_id = volume_info["snapshot_id"] || volume_info["snapshotId"] @attachments = volume_info["attachments"] @created_at = volume_info["created_at"] || volume_info["createdAt"] @status = volume_info["status"] end |
Instance Attribute Details
#attachments ⇒ Object (readonly)
Returns the value of attribute attachments.
13 14 15 |
# File 'lib/openstack/volume/volume.rb', line 13 def @attachments end |
#availability_zone ⇒ Object (readonly)
Returns the value of attribute availability_zone.
11 12 13 |
# File 'lib/openstack/volume/volume.rb', line 11 def availability_zone @availability_zone end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
14 15 16 |
# File 'lib/openstack/volume/volume.rb', line 14 def created_at @created_at end |
#display_description ⇒ Object (readonly)
Returns the value of attribute display_description.
7 8 9 |
# File 'lib/openstack/volume/volume.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/volume.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/volume.rb', line 5 def id @id end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
10 11 12 |
# File 'lib/openstack/volume/volume.rb', line 10 def @metadata end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
8 9 10 |
# File 'lib/openstack/volume/volume.rb', line 8 def size @size end |
#snapshot_id ⇒ Object (readonly)
Returns the value of attribute snapshot_id.
12 13 14 |
# File 'lib/openstack/volume/volume.rb', line 12 def snapshot_id @snapshot_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
15 16 17 |
# File 'lib/openstack/volume/volume.rb', line 15 def status @status end |
#volume_type ⇒ Object (readonly)
Returns the value of attribute volume_type.
9 10 11 |
# File 'lib/openstack/volume/volume.rb', line 9 def volume_type @volume_type end |