Class: VagrantPlugins::Openstack::Domain::Volume
- Defined in:
- lib/vagrant-openstack-provider/client/domain.rb
Instance Attribute Summary collapse
-
#bootable ⇒ Object
Whether volume is bootable or not.
-
#device ⇒ Object
device (e.g. /dev/sdb) if attached.
-
#instance_id ⇒ Object
instance id volume is attached to.
-
#size ⇒ Object
Size in Gigaoctet.
-
#status ⇒ Object
Status (e.g. ‘Available’, ‘In-use’).
Attributes inherited from Item
Instance Method Summary collapse
-
#initialize(id, name, size, status, bootable, instance_id, device) ⇒ Volume
constructor
rubocop:disable Metrics/ParameterLists.
-
#to_s ⇒ Object
rubocop:enable Metrics/ParameterLists.
Methods inherited from Item
Constructor Details
#initialize(id, name, size, status, bootable, instance_id, device) ⇒ Volume
rubocop:disable Metrics/ParameterLists
114 115 116 117 118 119 120 121 |
# File 'lib/vagrant-openstack-provider/client/domain.rb', line 114 def initialize(id, name, size, status, bootable, instance_id, device) @size = size @status = status @bootable = bootable @instance_id = instance_id @device = device super(id, name) end |
Instance Attribute Details
#bootable ⇒ Object
Whether volume is bootable or not
101 102 103 |
# File 'lib/vagrant-openstack-provider/client/domain.rb', line 101 def bootable @bootable end |
#device ⇒ Object
device (e.g. /dev/sdb) if attached
111 112 113 |
# File 'lib/vagrant-openstack-provider/client/domain.rb', line 111 def device @device end |
#instance_id ⇒ Object
instance id volume is attached to
106 107 108 |
# File 'lib/vagrant-openstack-provider/client/domain.rb', line 106 def instance_id @instance_id end |
#size ⇒ Object
Size in Gigaoctet
91 92 93 |
# File 'lib/vagrant-openstack-provider/client/domain.rb', line 91 def size @size end |
#status ⇒ Object
Status (e.g. ‘Available’, ‘In-use’)
96 97 98 |
# File 'lib/vagrant-openstack-provider/client/domain.rb', line 96 def status @status end |
Instance Method Details
#to_s ⇒ Object
rubocop:enable Metrics/ParameterLists
124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/vagrant-openstack-provider/client/domain.rb', line 124 def to_s { id: @id, name: @name, size: @size, status: @status, bootable: @bootable, instance_id: @instance_id, device: @device }.to_json end |