Class: Com::Vmware::Vcenter::Vm::Hardware::Cdrom

Inherits:
VAPI::Bindings::VapiService
  • Object
show all
Defined in:
/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb

Overview

The ``Com::Vmware::Vcenter::Vm::Hardware::Cdrom`` class provides methods for configuring the virtual CD-ROM devices of a virtual machine.

Defined Under Namespace

Classes: BackingInfo, BackingSpec, BackingType, CreateSpec, DeviceAccessType, HostBusAdapterType, Info, Summary, UpdateSpec

Constant Summary

RESOURCE_TYPE =
'com.vmware.vcenter.vm.hardware.Cdrom'

Instance Method Summary (collapse)

Constructor Details

- (Cdrom) initialize(config)

Constructs a new instance.

Parameters:

  • config (VAPI::Bindings::StubConfig)

    A hash with the api provider details.



631
632
633
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 631

def initialize(config)
    super(config, @@service_info)
end

Instance Method Details

- (Void) connect(vm, cdrom)

Connects a virtual CD-ROM device of a powered-on virtual machine to its backing. Connecting the virtual device makes the backing accessible from the perspective of the guest operating system.


 For a powered-off virtual machine, the   :func:`Com::Vmware::Vcenter::Vm::Hardware::Cdrom.update`    method  may be used to configure the virtual CD-ROM device to start in the connected state when the virtual machine is powered on.

Parameters:

  • vm (String)

    Virtual machine identifier.

  • cdrom (String)

    Virtual CD-ROM device identifier.

Returns:

  • (Void)

Raises:



825
826
827
828
829
830
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 825

def connect(vm, cdrom)
    invoke_with_info(@@connect_info, {
        'vm' => vm,
        'cdrom' => cdrom,
    })
end

- (String) create(vm, spec)

Adds a virtual CD-ROM device to the virtual machine.

Parameters:

Returns:

  • (String)

    Virtual CD-ROM device identifier.

Raises:



725
726
727
728
729
730
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 725

def create(vm, spec)
    invoke_with_info(@@create_info, {
        'vm' => vm,
        'spec' => spec,
    })
end

- (Void) delete(vm, cdrom)

Removes a virtual CD-ROM device from the virtual machine.

Parameters:

  • vm (String)

    Virtual machine identifier.

  • cdrom (String)

    Virtual CD-ROM device identifier.

Returns:

  • (Void)

Raises:



790
791
792
793
794
795
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 790

def delete(vm, cdrom)
    invoke_with_info(@@delete_info, {
        'vm' => vm,
        'cdrom' => cdrom,
    })
end

- (Void) disconnect(vm, cdrom)

Disconnects a virtual CD-ROM device of a powered-on virtual machine from its backing. The virtual device is still present and its backing configuration is unchanged, but from the perspective of the guest operating system, the CD-ROM device is not connected to its backing resource.


 For a powered-off virtual machine, the   :func:`Com::Vmware::Vcenter::Vm::Hardware::Cdrom.update`    method  may be used to configure the virtual CD-ROM device to start in the disconnected state when the virtual machine is powered on.

Parameters:

  • vm (String)

    Virtual machine identifier.

  • cdrom (String)

    Virtual CD-ROM device identifier.

Returns:

  • (Void)

Raises:



860
861
862
863
864
865
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 860

def disconnect(vm, cdrom)
    invoke_with_info(@@disconnect_info, {
        'vm' => vm,
        'cdrom' => cdrom,
    })
end

- (Com::Vmware::Vcenter::Vm::Hardware::Cdrom::Info) get(vm, cdrom)

Returns information about a virtual CD-ROM device.

Parameters:

  • vm (String)

    Virtual machine identifier.

  • cdrom (String)

    Virtual CD-ROM device identifier.

Returns:

Raises:



683
684
685
686
687
688
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 683

def get(vm, cdrom)
    invoke_with_info(@@get_info, {
        'vm' => vm,
        'cdrom' => cdrom,
    })
end

- (Array<Com::Vmware::Vcenter::Vm::Hardware::Cdrom::Summary>) list(vm)

Returns commonly used information about the virtual CD-ROM devices belonging to the virtual machine.

Parameters:

  • vm (String)

    Virtual machine identifier.

Returns:

Raises:



656
657
658
659
660
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 656

def list(vm)
    invoke_with_info(@@list_info, {
        'vm' => vm,
    })
end

- (Void) update(vm, cdrom, spec)

Updates the configuration of a virtual CD-ROM device.

Parameters:

Returns:

  • (Void)

Raises:



758
759
760
761
762
763
764
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 758

def update(vm, cdrom, spec)
    invoke_with_info(@@update_info, {
        'vm' => vm,
        'cdrom' => cdrom,
        'spec' => spec,
    })
end