Class: VSphereCloud::Resources::Disk
- Inherits:
-
Object
- Object
- VSphereCloud::Resources::Disk
- Defined in:
- lib/cloud/vsphere/resources/disk.rb
Instance Attribute Summary collapse
-
#cid ⇒ Object
readonly
Returns the value of attribute cid.
-
#datastore ⇒ Object
readonly
Returns the value of attribute datastore.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#size_in_mb ⇒ Object
readonly
Returns the value of attribute size_in_mb.
Instance Method Summary collapse
- #attach_spec(controller_key) ⇒ Object
-
#initialize(cid, size_in_mb, datastore, path) ⇒ Disk
constructor
A new instance of Disk.
Constructor Details
#initialize(cid, size_in_mb, datastore, path) ⇒ Disk
Returns a new instance of Disk.
6 7 8 9 10 11 |
# File 'lib/cloud/vsphere/resources/disk.rb', line 6 def initialize(cid, size_in_mb, datastore, path) @cid = cid @size_in_mb = size_in_mb @datastore = datastore @path = path end |
Instance Attribute Details
#cid ⇒ Object (readonly)
Returns the value of attribute cid.
4 5 6 |
# File 'lib/cloud/vsphere/resources/disk.rb', line 4 def cid @cid end |
#datastore ⇒ Object (readonly)
Returns the value of attribute datastore.
4 5 6 |
# File 'lib/cloud/vsphere/resources/disk.rb', line 4 def datastore @datastore end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/cloud/vsphere/resources/disk.rb', line 4 def path @path end |
#size_in_mb ⇒ Object (readonly)
Returns the value of attribute size_in_mb.
4 5 6 |
# File 'lib/cloud/vsphere/resources/disk.rb', line 4 def size_in_mb @size_in_mb end |
Instance Method Details
#attach_spec(controller_key) ⇒ Object
13 14 15 16 |
# File 'lib/cloud/vsphere/resources/disk.rb', line 13 def attach_spec(controller_key) DiskConfig.new(datastore.name, path, controller_key, size_in_mb). spec(independent: true) end |