Sha256: 818d544c914cdee6cc2f81d6ee9fa606f774cf740fdec32ed08acfe315d4e95f

Contents?: true

Size: 1.01 KB

Versions: 15

Compression:

Stored size: 1.01 KB

Contents

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, :add)]})
        end

        def remove_vm_volume(volume)
          vm_reconfig_hardware('instance_uuid' => volume.server_id, 'hardware_spec' => {'deviceChange'=>[create_disk(volume, :remove)]})
        end

        def destroy_vm_volume(volume)
          vm_reconfig_hardware('instance_uuid' => volume.server_id, 'hardware_spec' => {
            'deviceChange'=>[create_disk(volume, :remove, file_operation: :destroy)]
          })
        end
      end

      class Mock
        def add_vm_volume(volume)
          vm_reconfig_hardware('instance_uuid' => volume.server_id, 'hardware_spec' => {'deviceChange'=>[create_cdrom(volume, :add)]})
        end

        def remove_vm_volume(volume)
          true
        end

        def destroy_vm_volume(volume)
          true
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
fog-vsphere-2.1.1 lib/fog/vsphere/requests/compute/modify_vm_volume.rb
fog-vsphere-2.1.0 lib/fog/vsphere/requests/compute/modify_vm_volume.rb
fog-vsphere-2.0.1 lib/fog/vsphere/requests/compute/modify_vm_volume.rb
fog-vsphere-2.0.0 lib/fog/vsphere/requests/compute/modify_vm_volume.rb
fog-vsphere-1.13.1 lib/fog/vsphere/requests/compute/modify_vm_volume.rb
fog-vsphere-1.13.0 lib/fog/vsphere/requests/compute/modify_vm_volume.rb
fog-vsphere-1.12.0 lib/fog/vsphere/requests/compute/modify_vm_volume.rb
fog-vsphere-1.11.3 lib/fog/vsphere/requests/compute/modify_vm_volume.rb
fog-vsphere-1.11.2 lib/fog/vsphere/requests/compute/modify_vm_volume.rb
fog-vsphere-1.11.1 lib/fog/vsphere/requests/compute/modify_vm_volume.rb
fog-vsphere-1.11.0 lib/fog/vsphere/requests/compute/modify_vm_volume.rb
fog-vsphere-1.10.0 lib/fog/vsphere/requests/compute/modify_vm_volume.rb
fog-vsphere-1.9.2 lib/fog/vsphere/requests/compute/modify_vm_volume.rb
fog-vsphere-1.9.1 lib/fog/vsphere/requests/compute/modify_vm_volume.rb
fog-vsphere-1.9.0 lib/fog/vsphere/requests/compute/modify_vm_volume.rb