Class: Fog::Hyperv::Compute::DvdDrives
- Inherits:
-
Fog::Hyperv::Collection
- Object
- Collection
- Fog::Hyperv::Collection
- Fog::Hyperv::Compute::DvdDrives
- Defined in:
- lib/fog/hyperv/compute/models/dvd_drives.rb
Overview
Note:
Requires a vm_id to be specified, as DVD drives are not retrievable as loose objects
A collection of DVD drives attached to a VM
Instance Attribute Summary collapse
-
#computer_name ⇒ String
The name of the computer running the VM that these COM ports are attached to.
-
#vm_id ⇒ String
The GUID of the VM containing the COM ports.
Instance Method Summary collapse
-
#get(id, **filters) ⇒ Object
Get a DVD drive by ID.
Methods inherited from Fog::Hyperv::Collection
#all, get_method, #initialize, #new, requires, requires?
Constructor Details
This class inherits a constructor from Fog::Hyperv::Collection
Instance Attribute Details
#computer_name ⇒ String
Returns the name of the computer running the VM that these COM ports are attached to.
17 |
# File 'lib/fog/hyperv/compute/models/dvd_drives.rb', line 17 attribute :computer_name |
#vm_id ⇒ String
Returns the GUID of the VM containing the COM ports.
14 |
# File 'lib/fog/hyperv/compute/models/dvd_drives.rb', line 14 attribute :vm_id |
Instance Method Details
#get(id, **filters) ⇒ Object
Get a DVD drive by ID
23 24 25 26 27 |
# File 'lib/fog/hyperv/compute/models/dvd_drives.rb', line 23 def get(id, **filters) raise ArgumentError, 'Must provide a GUID' if id.nil? || id.empty? super(_by_id: id, **filters) end |