Class: Com::Vmware::Vcenter::Vm::Hardware::Ethernet

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::Ethernet`` class provides methods for configuring the virtual Ethernet adapters of a virtual machine.

Defined Under Namespace

Classes: BackingInfo, BackingSpec, BackingType, CreateSpec, EmulationType, Info, MacAddressType, Summary, UpdateSpec

Constant Summary

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

Instance Method Summary (collapse)

Constructor Details

- (Ethernet) initialize(config)

Constructs a new instance.

Parameters:

  • config (VAPI::Bindings::StubConfig)

    A hash with the api provider details.



2483
2484
2485
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 2483

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

Instance Method Details

- (Void) connect(vm, nic)

Connects a virtual Ethernet adapter 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::Ethernet.update`    method  may be used to configure the virtual Ethernet adapter to start in the connected state when the virtual machine is powered on.

Parameters:

  • vm (String)

    Virtual machine identifier.

  • nic (String)

    Virtual Ethernet adapter identifier.

Returns:

  • (Void)

Raises:



2671
2672
2673
2674
2675
2676
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 2671

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

- (String) create(vm, spec)

Adds a virtual Ethernet adapter to the virtual machine.

Parameters:

Returns:

  • (String)

    Virtual Ethernet adapter identifier.

Raises:



2573
2574
2575
2576
2577
2578
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 2573

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

- (Void) delete(vm, nic)

Removes a virtual Ethernet adapter from the virtual machine.

Parameters:

  • vm (String)

    Virtual machine identifier.

  • nic (String)

    Virtual Ethernet adapter identifier.

Returns:

  • (Void)

Raises:



2636
2637
2638
2639
2640
2641
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 2636

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

- (Void) disconnect(vm, nic)

Disconnects a virtual Ethernet adapter 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 Ethernet adapter is not connected to its backing resource.


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

Parameters:

  • vm (String)

    Virtual machine identifier.

  • nic (String)

    Virtual Ethernet adapter identifier.

Returns:

  • (Void)

Raises:



2706
2707
2708
2709
2710
2711
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 2706

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

- (Com::Vmware::Vcenter::Vm::Hardware::Ethernet::Info) get(vm, nic)

Returns information about a virtual Ethernet adapter.

Parameters:

  • vm (String)

    Virtual machine identifier.

  • nic (String)

    Virtual Ethernet adapter identifier.

Returns:

Raises:



2535
2536
2537
2538
2539
2540
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 2535

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

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

Returns commonly used information about the virtual Ethernet adapters belonging to the virtual machine.

Parameters:

  • vm (String)

    Virtual machine identifier.

Returns:

Raises:



2508
2509
2510
2511
2512
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 2508

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

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

Updates the configuration of a virtual Ethernet adapter.

Parameters:

Returns:

  • (Void)

Raises:



2606
2607
2608
2609
2610
2611
2612
# File '/build/mts/release/bora-4571906/build/sdk/aggregated-bindings/ruby/com/vmware/vcenter/vm/hardware.rb', line 2606

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