Class: Fog::Compute::Hyperv::FloppyDrive

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

Instance Method Summary collapse

Methods included from Hyperv::ModelExtends

#lazy_attributes

Methods included from Hyperv::ModelIncludes

#dirty?, #lazy_attributes, #parent

Instance Method Details

#reloadObject



37
38
39
40
41
42
43
44
# File 'lib/fog/hyperv/models/compute/floppy_drive.rb', line 37

def reload
  data = collection.get(
    computer_name: computer_name,
    vm_name: vm_name
  )
  merge_attributes(data.attributes)
  self
end

#saveObject

TODO? VM Snapshots?



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/fog/hyperv/models/compute/floppy_drive.rb', line 18

def save
  requires :computer_name, :vm_name

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

    resource_pool_name: pool_name,
    path: path,

    _return_fields: self.class.attributes,
    _json_depth: 1
  )

  merge_attributes(data)
  self
end