1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/vsphere/requests/compute/modify_vm_volume.rb
2014-02-19 12:30:59 +00:00

26 lines
655 B
Ruby

module Fog
module Compute
class Vsphere
class Real
def add_vm_volume(volume)
vm_reconfig_hardware('instance_uuid' => volume.server_id, 'hardware_spec' => {'deviceChange'=>[create_disk(volume, volume.unit_number, :add)]})
end
def destroy_vm_volume(volume)
vm_reconfig_hardware('instance_uuid' => volume.server_id, 'hardware_spec' => {'deviceChange'=>[create_disk(volume, volume.unit_number, :remove)]})
end
end
class Mock
def add_vm_volume(volume)
true
end
def destroy_vm_volume(volume)
true
end
end
end
end
end