VMware vSphere Automation SDK Perl
The VMware vSphere Automation SDK for Perl supports the client-side vSphere Automation API for access to vSphere services and capabilities
 All Classes Files Functions
Classes | List of all members
Com::Vmware::Vcenter::Vm::Hardware::Ethernet Class Reference
Inheritance diagram for Com::Vmware::Vcenter::Vm::Hardware::Ethernet:
Com::Vmware::Vapi::Bindings::VapiInterface

Classes

class  BackingInfo
 
class  BackingSpec
 
class  BackingType
 
class  CreateSpec
 
class  EmulationType
 
class  Info
 
class  MacAddressType
 
class  Summary
 
class  UpdateSpec
 

Avaliable Methods

public method create ()
 
public method disconnect ()
 
public method get ()
 
public method delete ()
 
public method new ()
 
public method update ()
 
public method list ()
 
public method connect ()
 

Detailed Description

The Com::Vmware::Vcenter::Vm::Hardware::Ethernet interface provides methods* for configuring the virtual Ethernet adapters of a virtual machine. Constant String::RESOURCE_TYPE # Resource type for the virtual Ethernet adapter.

Member Function Documentation

public method Com::Vmware::Vcenter::Vm::Hardware::Ethernet::connect ( )

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[REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str.
nic[REQUIRED] Virtual Ethernet adapter identifier. The value must be an identifier for the resource type getQualifiedName(com.vmware.vcenter.vm.hardware.Ethernet). . The value must be str.
Exceptions
Com::Vmware::Vapi::Std::Errors::Errorif the system reports an error while responding to the request.
Com::Vmware::Vapi::Std::Errors::NotFoundif the virtual machine or virtual Ethernet adapter is not found.
Com::Vmware::Vapi::Std::Errors::AlreadyInDesiredStateif the virtual Ethernet adapter is already connected.
Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentStateif the virtual machine is not powered on.
Com::Vmware::Vapi::Std::Errors::ResourceBusyif the virtual machine is busy performing another operation.
Com::Vmware::Vapi::Std::Errors::ResourceInaccessibleif the virtual machine's configuration state cannot be accessed.
Com::Vmware::Vapi::Std::Errors::ServiceUnavailableif the system is unable to communicate with a service to complete the request.
Com::Vmware::Vapi::Std::Errors::Unauthenticatedif the user can not be authenticated.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user doesn't have the required privileges.
Code:
click to view
public method Com::Vmware::Vcenter::Vm::Hardware::Ethernet::create ( )

Adds a virtual Ethernet adapter to the virtual machine.

Parameters
vm[REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str.
spec[REQUIRED] Specification for the new virtual Ethernet adapter. . The value must be Com::Vmware::Vcenter::Vm::Hardware::Ethernet::CreateSpec.
Return values
VirtualEthernet adapter identifier. The value will be an identifier for the resource type getQualifiedName(com.vmware.vcenter.vm.hardware.Ethernet). The return type will be str
Exceptions
Com::Vmware::Vapi::Std::Errors::Errorif the system reported that the Ethernet adapter was created but was unable to confirm the creation because the identifier of the new adapter could not be determined.
Com::Vmware::Vapi::Std::Errors::Errorif the system reports an error while responding to the request.
Com::Vmware::Vapi::Std::Errors::NotFoundif the virtual machine or network backing is not found.
Com::Vmware::Vapi::Std::Errors::UnableToAllocateResourceif the virtual machine already has the maximum number of supported Ethernet adapters.
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif the specified PCI address is out of bounds, HOST_DEVICE is specified as the type, or a backing cannot be found in the case that backing is left null .
Com::Vmware::Vapi::Std::Errors::ResourceBusyif the virtual machine is busy performing another operation.
Com::Vmware::Vapi::Std::Errors::ResourceInaccessibleif the virtual machine's configuration state cannot be accessed.
Com::Vmware::Vapi::Std::Errors::ServiceUnavailableif the system is unable to communicate with a service to complete the request.
Com::Vmware::Vapi::Std::Errors::Unauthenticatedif the user can not be authenticated.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user doesn't have the required privileges.
Com::Vmware::Vapi::Std::Errors::Unsupportedif the guest operating system of the virtual machine is not supported and spec includes null fields that default to guest-specific values.
Code:
click to view
public method Com::Vmware::Vcenter::Vm::Hardware::Ethernet::delete ( )

Removes a virtual Ethernet adapter from the virtual machine.

Parameters
vm[REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str.
nic[REQUIRED] Virtual Ethernet adapter identifier. The value must be an identifier for the resource type getQualifiedName(com.vmware.vcenter.vm.hardware.Ethernet). . The value must be str.
Exceptions
Com::Vmware::Vapi::Std::Errors::Errorif the system reports an error while responding to the request.
Com::Vmware::Vapi::Std::Errors::NotFoundif the virtual machine or virtual Ethernet adapter is not found.
Com::Vmware::Vapi::Std::Errors::ResourceBusyif the virtual machine is busy performing another operation.
Com::Vmware::Vapi::Std::Errors::ResourceInaccessibleif the virtual machine's configuration state cannot be accessed.
Com::Vmware::Vapi::Std::Errors::ServiceUnavailableif the system is unable to communicate with a service to complete the request.
Com::Vmware::Vapi::Std::Errors::Unauthenticatedif the user can not be authenticated.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user doesn't have the required privileges.
Code:
click to view
public method Com::Vmware::Vcenter::Vm::Hardware::Ethernet::disconnect ( )

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[REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str.
nic[REQUIRED] Virtual Ethernet adapter identifier. The value must be an identifier for the resource type getQualifiedName(com.vmware.vcenter.vm.hardware.Ethernet). . The value must be str.
Exceptions
Com::Vmware::Vapi::Std::Errors::Errorif the system reports an error while responding to the request.
Com::Vmware::Vapi::Std::Errors::NotFoundif the virtual machine or virtual Ethernet adapter is not found.
Com::Vmware::Vapi::Std::Errors::AlreadyInDesiredStateif the virtual Ethernet adapter is already disconnected.
Com::Vmware::Vapi::Std::Errors::NotAllowedInCurrentStateif the virtual machine is not powered on.
Com::Vmware::Vapi::Std::Errors::ResourceBusyif the virtual machine is busy performing another operation.
Com::Vmware::Vapi::Std::Errors::ResourceInaccessibleif the virtual machine's configuration state cannot be accessed.
Com::Vmware::Vapi::Std::Errors::ServiceUnavailableif the system is unable to communicate with a service to complete the request.
Com::Vmware::Vapi::Std::Errors::Unauthenticatedif the user can not be authenticated.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user doesn't have the required privileges.
Code:
click to view
public method Com::Vmware::Vcenter::Vm::Hardware::Ethernet::get ( )

Returns information about a virtual Ethernet adapter.

Parameters
vm[REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str.
nic[REQUIRED] Virtual Ethernet adapter identifier. The value must be an identifier for the resource type getQualifiedName(com.vmware.vcenter.vm.hardware.Ethernet). . The value must be str.
Return values
Informationabout the specified virtual Ethernet adapter. The return type will be Com::Vmware::Vcenter::Vm::Hardware::Ethernet::Info
Exceptions
Com::Vmware::Vapi::Std::Errors::Errorif the system reports an error while responding to the request.
Com::Vmware::Vapi::Std::Errors::NotFoundif the virtual machine or virtual Ethernet adapter is not found.
Com::Vmware::Vapi::Std::Errors::ResourceInaccessibleif the virtual machine's configuration state cannot be accessed.
Com::Vmware::Vapi::Std::Errors::ServiceUnavailableif the system is unable to communicate with a service to complete the request.
Com::Vmware::Vapi::Std::Errors::Unauthenticatedif the user can not be authenticated.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user doesn't have the required privileges.
Code:
click to view
public method Com::Vmware::Vcenter::Vm::Hardware::Ethernet::list ( )

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

Parameters
vm[REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str.
Return values
Listof commonly used information about virtual Ethernet adapters. The return type will be Array of Com::Vmware::Vcenter::Vm::Hardware::Ethernet::Summary
Exceptions
Com::Vmware::Vapi::Std::Errors::Errorif the system reports an error while responding to the request.
Com::Vmware::Vapi::Std::Errors::NotFoundif the virtual machine is not found.
Com::Vmware::Vapi::Std::Errors::ResourceInaccessibleif the virtual machine's configuration state cannot be accessed.
Com::Vmware::Vapi::Std::Errors::ServiceUnavailableif the system is unable to communicate with a service to complete the request.
Com::Vmware::Vapi::Std::Errors::Unauthenticatedif the user can not be authenticated.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user doesn't have the required privileges.
Code:
click to view
public method Com::Vmware::Vcenter::Vm::Hardware::Ethernet::new ( )

Constructor to initialize the object

Parameters
api_provider- protocol connection to use with stubs created by this factory
StubConfig- Stub's additional configuration
Return values
Blessedobject
Code:
click to view
public method Com::Vmware::Vcenter::Vm::Hardware::Ethernet::update ( )

Updates the configuration of a virtual Ethernet adapter.

Parameters
vm[REQUIRED] Virtual machine identifier. The value must be an identifier for the resource type getQualifiedName(VirtualMachine). . The value must be str.
nic[REQUIRED] Virtual Ethernet adapter identifier. The value must be an identifier for the resource type getQualifiedName(com.vmware.vcenter.vm.hardware.Ethernet). . The value must be str.
spec[REQUIRED] Specification for updating the virtual Ethernet adapter. . The value must be Com::Vmware::Vcenter::Vm::Hardware::Ethernet::UpdateSpec.
Exceptions
Com::Vmware::Vapi::Std::Errors::Errorif the system reports an error while responding to the request.
Com::Vmware::Vapi::Std::Errors::InvalidArgumentif HOST_DEVICE is specified as the type.
Com::Vmware::Vapi::Std::Errors::NotFoundif the virtual machine, virtual Ethernet adapter, or backing network is not found.
Com::Vmware::Vapi::Std::Errors::ResourceBusyif the virtual machine is busy performing another operation.
Com::Vmware::Vapi::Std::Errors::ResourceInaccessibleif the virtual machine's configuration state cannot be accessed.
Com::Vmware::Vapi::Std::Errors::ServiceUnavailableif the system is unable to communicate with a service to complete the request.
Com::Vmware::Vapi::Std::Errors::Unauthenticatedif the user can not be authenticated.
Com::Vmware::Vapi::Std::Errors::Unauthorizedif the user doesn't have the required privileges.
Code:
click to view

The documentation for this class was generated from the following file: