Class: Fog::Compute::Hyperv::DvdDrive

Inherits:
Hyperv::Model show all
Defined in:
lib/fog/hyperv/models/compute/dvd_drive.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Hyperv::ModelExtends

#lazy_attributes

Methods included from Hyperv::ModelIncludes

#dirty?, #lazy_attributes, #parent

Instance Attribute Details

#to_controller_locationObject

TODO? VM Snapshots?



20
21
22
# File 'lib/fog/hyperv/models/compute/dvd_drive.rb', line 20

def to_controller_location
  @to_controller_location
end

#to_controller_numberObject

TODO? VM Snapshots?



20
21
22
# File 'lib/fog/hyperv/models/compute/dvd_drive.rb', line 20

def to_controller_number
  @to_controller_number
end

Instance Method Details

#reloadObject



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# File 'lib/fog/hyperv/models/compute/dvd_drive.rb', line 44

def reload
  requires :computer_name, :vm_name

  data = collection.get(
    computer_name: computer_name,
    vm_name: vm_name,
    controller_location: controller_location,
    controller_number: controller_number,

    _return_fields: self.class.attributes,
    _json_depth: 1
  )
  merge_attributes(data.attributes)
  self
end

#saveObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/fog/hyperv/models/compute/dvd_drive.rb', line 22

def save
  requires :computer_name, :vm_name

  data = service.set_vm_dvd_drive(
    computer_name: computer_name,
    vm_name: vm_name,
    passthru: true,

    controller_number: controller_number,
    controller_location: controller_location,
    resource_pool_name: pool_name,
    path: path || '$null',
    to_controller_number: to_controller_number,
    to_controller_location: to_controller_location,

    _return_fields: self.class.attributes,
    _json_depth: 1
  )
  merge_attributes(data)
  self
end