Class: Fog::Hyperv::Compute::DvdDrives

Inherits:
Fog::Hyperv::Collection show all
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

Instance Method Summary collapse

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_nameString

Returns the name of the computer running the VM that these COM ports are attached to.

Returns:

  • (String)

    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_idString

Returns the GUID of the VM containing the COM ports.

Returns:

  • (String)

    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

Parameters:

  • id (String)

    the GUID of the DVD drive to retrieve

Raises:

  • (ArgumentError)


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