com.vmware.vcenter.vm.guest package

Submodules

com.vmware.vcenter.vm.guest.networking_client module

The com.vmware.vcenter.vm.guest.networking_client module provides classes for dealing with the guest operating system networking.

class com.vmware.vcenter.vm.guest.networking_client.Interfaces(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Interfaces class provides methods for retrieving guest operating system network interface information. This class was added in vSphere API 7.0.0.0.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class Info(dns_values=None, mac_address=None, dns=None, ip=None, wins_servers=None, nic=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Interfaces.Info class describes a virtual network adapter configured in the guest operating system. This class was added in vSphere API 7.0.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • dns_values (com.vmware.vcenter.vm.guest_client.DnsAssignedValues or None) – Client DNS values. Data assigned by DNS. This attribute was added in vSphere API 7.0.0.0. If None no DNS assigned value exists.

  • mac_address (str or None) – MAC address of the adapter. This attribute was added in vSphere API 7.0.0.0. If None then not supported by the Guest OS.

  • dns (com.vmware.vcenter.vm.guest_client.DnsConfigInfo or None) – DNS configuration of the adapter. See com.vmware.vcenter.vm.guest_client.Networking.Info.dns for system wide settings. This attribute was added in vSphere API 7.0.0.0. If None then not assigned by the Guest OS.

  • ip (Interfaces.IpConfigInfo or None) – IP configuration settings of the adapter. This attribute was added in vSphere API 7.0.0.0. If None then not supported by the Guest OS.

  • wins_servers (list of str or None) – The IP addresses of any WINS name servers for the adapter. This attribute was added in vSphere API 7.0.0.0. If None then not supported by the Guest OS.

  • nic (str or None) – Link to the corresponding virtual device. This attribute was added in vSphere API 7.0.0.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Ethernet. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Ethernet. If None then the interface is not backed by a virtual device.

class IpAddressInfo(ip_address=None, prefix_length=None, origin=None, state=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Interfaces.IpAddressInfo class describes a specific IP Address. This class was added in vSphere API 7.0.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • ip_address (str) – IPv4 address is specified using dotted decimal notation. For example, “192.0.2.1”. IPv6 addresses are 128-bit addresses specified using eight fields of up to four hexadecimal digits. A colon separates each field (:). For example, 2001:DB8:101::230:6eff:fe04:d9ff. The address can also consist of the symbol ‘::’ to represent multiple 16-bit groups of contiguous 0’s only once in an address as described in RFC 2373. This attribute was added in vSphere API 7.0.0.0.

  • prefix_length (long) – Denotes the length of a generic Internet network address prefix. Prefix length: the valid range of values is 0-32 for IPv4, and 0-128 for IPv6. A value of n corresponds to an IP address mask that has n contiguous 1-bits from the most significant bit (MSB), with all other bits set to 0. A value of zero is valid only if the calling context defines it. This attribute was added in vSphere API 7.0.0.0.

  • origin (Interfaces.IpAddressOrigin or None) – How this address was configured. This attribute was added in vSphere API 7.0.0.0. If None the data was not available.

  • state (Interfaces.IpAddressStatus) – The state of this ipAddress. This attribute was added in vSphere API 7.0.0.0.

class IpAddressOrigin(string)

Bases: vmware.vapi.bindings.enum.Enum

The Interfaces.IpAddressOrigin class specifies how an IP address was obtained for an interface. See RFC 4293 IpAddressOriginTC. This enumeration was added in vSphere API 7.0.0.0.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the IpAddressOrigin instance.

DHCP = IpAddressOrigin(string='DHCP')

The address is configured through dhcp. This class attribute was added in vSphere API 7.0.0.0.

LINKLAYER = IpAddressOrigin(string='LINKLAYER')

The address is obtained through stateless autoconfiguration (autoconf). See RFC 4862, IPv6 Stateless Address Autoconfiguration. This class attribute was added in vSphere API 7.0.0.0.

MANUAL = IpAddressOrigin(string='MANUAL')

The address is configured manually. This class attribute was added in vSphere API 7.0.0.0.

OTHER = IpAddressOrigin(string='OTHER')

Any other type of address configuration other than the below mentioned ones will fall under this category. For e.g., automatic address configuration for the link local address falls under this type. This class attribute was added in vSphere API 7.0.0.0.

RANDOM = IpAddressOrigin(string='RANDOM')

The address is chosen by the system at random e.g., an IPv4 address within 169.254/16, or an RFC 3041 privacy address. This class attribute was added in vSphere API 7.0.0.0.

class IpAddressStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

The Interfaces.IpAddressStatus class defines the present status of an address on an interface. See RFC 4293 IpAddressStatusTC. This enumeration was added in vSphere API 7.0.0.0.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the IpAddressStatus instance.

DEPRECATED = IpAddressStatus(string='DEPRECATED')

Indicates that this is a valid but deprecated address that should no longer be used as a source address. This class attribute was added in vSphere API 7.0.0.0.

DUPLICATE = IpAddressStatus(string='DUPLICATE')

Indicates the address has been determined to be non-unique on the link, this address will not be reachable. This class attribute was added in vSphere API 7.0.0.0.

INACCESSIBLE = IpAddressStatus(string='INACCESSIBLE')

Indicates that the address is not accessible because interface is not operational. This class attribute was added in vSphere API 7.0.0.0.

INVALID = IpAddressStatus(string='INVALID')

Indicates that this isn’t a valid address. This class attribute was added in vSphere API 7.0.0.0.

PREFERRED = IpAddressStatus(string='PREFERRED')

Indicates that this is a valid address. This class attribute was added in vSphere API 7.0.0.0.

TENTATIVE = IpAddressStatus(string='TENTATIVE')

Indicates that the uniqueness of the address on the link is presently being verified. This class attribute was added in vSphere API 7.0.0.0.

UNKNOWN = IpAddressStatus(string='UNKNOWN')

Indicates that the status cannot be determined. This class attribute was added in vSphere API 7.0.0.0.

class IpConfigInfo(ip_addresses=None, dhcp=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Interfaces.IpConfigInfo class describes the protocol version independent address reporting data object for network interfaces. This class was added in vSphere API 7.0.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
list(vm)

Returns information about the networking interfaces in the guest operating system. This method was added in vSphere API 7.0.0.0.

Parameters

vm (str) – Virtual machine ID The parameter must be an identifier for the resource type: VirtualMachine.

Return type

list of Interfaces.Info

Returns

Information about the interfaces configured in the guest operating system. Interfaces are ordered in a guest operating system specific determined order.

Raise

com.vmware.vapi.std.errors_client.Error if the system reports an error while responding to the request.

Raise

com.vmware.vapi.std.errors_client.NotFound if the virtual machine is not found.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable if VMware Tools is not running.

class com.vmware.vcenter.vm.guest.networking_client.Routes(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Routes class provides methods for retrieving guest operating system network routing information. This class was added in vSphere API 7.0.0.0.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class Info(network=None, prefix_length=None, gateway_address=None, interface_index=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Routes.Info class describes an individual host, network or default destination network reachable through a gateway. This class was added in vSphere API 7.0.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • network (str) – IP Address of the destination IP network. IPv4 address is specified using dotted decimal notation. For example, “192.0.2.1”. IPv6 addresses are 128-bit specified using as eight fields of up to four hexadecimal digits. A colon separates each field (:). For example, 2001:DB8:101::230:6eff:fe04:d9ff. The address can also consist of symbol ‘::’ to represent multiple 16-bit groups of contiguous 0’s only once in an address as described in RFC 2373. This attribute was added in vSphere API 7.0.0.0.

  • prefix_length (long) – The prefix length. For IPv4 the value range is 0-32. For IPv6 prefixLength is a decimal value range 0-128. The property represents the number of contiguous, higher-order bits of the address that make up the network portion of the IP address. This attribute was added in vSphere API 7.0.0.0.

  • gateway_address (str or None) – Where to send the packets for this route. Unicast IP Address of the next hop router. IPv4 address is specified using dotted decimal notation. For example, “192.0.2.1”. IPv6 addresses are 128-bit specified using as eight fields of up to four hexadecimal digits. A colon separates each field (:). For example, 2001:DB8:101::230:6eff:fe04:d9ff. The address can also consist of symbol ‘::’ to represent multiple 16-bit groups of contiguous 0’s only once in an address as described in RFC 2373. This attribute was added in vSphere API 7.0.0.0. If None no gateway is set for the route.

  • interface_index (long or None) – The network interface associated with this route. This is an index into the result of Interfaces.list() The index refers to the relative position of an element in a list. For example, an index of 0 refers to the first element in the list while an index of 1 refers to the second element. This attribute was added in vSphere API 7.0.0.0. If None the route is not associated with a network interface.

list(vm)

Returns information about network routing in the guest operating system. This method was added in vSphere API 7.0.0.0.

Parameters

vm (str) – Virtual machine ID The parameter must be an identifier for the resource type: VirtualMachine.

Return type

list of Routes.Info

Returns

Information about the network routes configured in the guest operating system.

Raise

com.vmware.vapi.std.errors_client.Error if the system reports an error while responding to the request.

Raise

com.vmware.vapi.std.errors_client.NotFound if the virtual machine is not found.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable if VMware Tools is not running.

class com.vmware.vcenter.vm.guest.networking_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance