com.vmware.appliance.networking package

Submodules

com.vmware.appliance.networking.dns_client module

class com.vmware.appliance.networking.dns_client.Domains(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Domains class provides methods DNS search domains.

add(domain)

Add domain to DNS search domains.

Parameters:domain (str) – Domain to add.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
list()

Get list of DNS search domains.

Return type:list of str
Returns:List of domains.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
set(domains)

Set DNS search domains.

Parameters:domains (list of str) – List of domains.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.networking.dns_client.Hostname(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Hostname class provides methods Performs operations on Fully Qualified Doman Name.

class Message(message=None, result=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Hostname.Message class Test result and message

Tip

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

class MessageStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

Hostname.MessageStatus class Individual test result

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.

failure = MessageStatus(string='failure')

message indicates the test failed.

success = MessageStatus(string='success')

message indicates that the test was successful.

class TestStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

Hostname.TestStatus class Health indicator

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.

green = TestStatus(string='green')

All tests were successful for given data

orange = TestStatus(string='orange')

In case data has more than one test, this indicates not all tests were successful

red = TestStatus(string='red')

All tests failed for given data

class TestStatusInfo(status=None, messages=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Hostname.TestStatusInfo class Overall test result

Tip

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

get()

Get the Fully Qualified Doman Name.

Return type:str
Returns:FQDN.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
set(name)

Set the Fully Qualified Domain Name.

Parameters:name (str) – FQDN.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
test(name)

Test the Fully Qualified Domain Name.

Parameters:name (str) – FQDN.
Return type:Hostname.TestStatusInfo
Returns:FQDN status
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.networking.dns_client.Servers(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Servers class provides methods DNS server configuration.

class DNSServerConfig(mode=None, servers=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Servers.DNSServerConfig class This structure represents the configuration state used to determine DNS servers.

Tip

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

class DNSServerMode(string)

Bases: vmware.vapi.bindings.enum.Enum

Servers.DNSServerMode class Describes DNS Server source (DHCP,static)

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.

dhcp = DNSServerMode(string='dhcp')

DNS address is automatically assigned by a DHCP server.

is_static = DNSServerMode(string='is_static')

DNS address is static.

class Message(message=None, result=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Servers.Message class Test result and message

Tip

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

class MessageStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

Servers.MessageStatus class Individual test result

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.

failure = MessageStatus(string='failure')

message indicates the test failed.

success = MessageStatus(string='success')

message indicates that the test was successful.

class TestStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

Servers.TestStatus class Health indicator

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.

green = TestStatus(string='green')

All tests were successful for given data

orange = TestStatus(string='orange')

In case data has more than one test, this indicates not all tests were successful

red = TestStatus(string='red')

All tests failed for given data

class TestStatusInfo(status=None, messages=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Servers.TestStatusInfo class Overall test result

Tip

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

add(server)

Add a DNS server. This method fails if mode argument is “dhcp”

Parameters:server (str) – DNS server.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
get()

Get DNS server configuration.

Return type:Servers.DNSServerConfig
Returns:DNS server configuration.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
set(config)

Set the DNS server configuration. If you set the mode argument to “DHCP”, a DHCP refresh is forced.

Parameters:config (Servers.DNSServerConfig) – DNS server configuration.
Raise:com.vmware.vapi.std.errors_client.Error Generic error
test(servers)

Test if dns servers are reachable.

Parameters:servers (list of str) – DNS servers.
Return type:Servers.TestStatusInfo
Returns:DNS reacable status
Raise:com.vmware.vapi.std.errors_client.Error Generic error
class com.vmware.appliance.networking.dns_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

com.vmware.appliance.networking.interfaces_client module

class com.vmware.appliance.networking.interfaces_client.Ipv4(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Ipv4 class provides methods to perform IPv4 network configuration for interfaces. This class was added in vSphere API 6.7

class Config(mode=None, address=None, prefix=None, default_gateway=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Ipv4.Config class provides defines the IPv4 configuration of a network interface. This class was added in vSphere API 6.7

Tip

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

class Info(configurable=None, mode=None, address=None, prefix=None, default_gateway=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Ipv4.Info class defines current IPv4 configuration state of a network interface. This class was added in vSphere API 6.7

Tip

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

class Mode(string)

Bases: vmware.vapi.bindings.enum.Enum

The Ipv4.Mode class defines different IPv4 address assignment modes. This enumeration was added in vSphere API 6.7

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.

DHCP = Mode(string='DHCP')

The IPv4 address is automatically assigned by a DHCP server. This class attribute was added in vSphere API 6.7

STATIC = Mode(string='STATIC')

The IPv4 address is static. This class attribute was added in vSphere API 6.7

UNCONFIGURED = Mode(string='UNCONFIGURED')

The IPv4 protocol is not configured. This class attribute was added in vSphere API 6.7

get(interface_name)

Get IPv4 network configuration for specific NIC. This method was added in vSphere API 6.7

Parameters:interface_name (str) – The Network interface to query, for example, “nic0”. The parameter must be an identifier for the resource type: com.vmware.appliance.networking.interfaces.
Return type:Ipv4.Info
Returns:The IPv4 configuration for the queried NIC.
Raise:com.vmware.vapi.std.errors_client.NotFound if the specified NIC is not found.
Raise:com.vmware.vapi.std.errors_client.Error Generic error.
set(interface_name, config)

Set IPv4 network configuration for specific network interface. This method was added in vSphere API 6.7

Parameters:
  • interface_name (str) – Network interface to update, for example, “nic0”. The parameter must be an identifier for the resource type: com.vmware.appliance.networking.interfaces.
  • config (Ipv4.Config) – The IPv4 Network configuration to set.
Raise:

com.vmware.vapi.std.errors_client.NotFound if the specified NIC is not found.

Raise:

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the IP is used as PNID

Raise:

com.vmware.vapi.std.errors_client.ResourceBusy if the specified NIC is busy.

Raise:

com.vmware.vapi.std.errors_client.Error Generic error.

class com.vmware.appliance.networking.interfaces_client.Ipv6(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Ipv6 class provides methods to perform IPv6 network configuration for interfaces. This class was added in vSphere API 6.7

class Address(address=None, prefix=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Ipv6.Address class provides the structure used to name an IPv6 address. This class was added in vSphere API 6.7

Tip

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

class AddressInfo(origin=None, status=None, address=None, prefix=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Ipv6.AddressInfo class provides the structure that you can use to get information about an IPv6 address along with its origin and status. This class was added in vSphere API 6.7

Tip

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

class Config(dhcp=None, autoconf=None, addresses=None, default_gateway=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Ipv6.Config class provides the structure that you can use to configure IPv6 on a particular interface. Addresses can be assigned by DHCP, SLAAC or STATIC, as IPv6 permits multiple addresses per interface. This class was added in vSphere API 6.7

Tip

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

class Info(dhcp=None, autoconf=None, addresses=None, default_gateway=None, configurable=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Ipv6.Info class provides the structure that defines an existing IPv6 configuration on a particular interface. This structure is read only. This class was added in vSphere API 6.7

Tip

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

class Origin(string)

Bases: vmware.vapi.bindings.enum.Enum

The Ipv6.Origin class defines IPv6 address origin values. This enumeration was added in vSphere API 6.7

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.

DHCP = Origin(string='DHCP')

The IPv6 address is assigned by a DHCP server. See RFC 4293. This class attribute was added in vSphere API 6.7

LINKLAYER = Origin(string='LINKLAYER')

The IPv6 address is assigned by IPv6 Stateless Address Auto-configuration (SLAAC). See RFC 4293. This class attribute was added in vSphere API 6.7

MANUAL = Origin(string='MANUAL')

The IPv6 address was manually configured to a specified address, for example, by user configuration. See RFC 4293. This class attribute was added in vSphere API 6.7

OTHER = Origin(string='OTHER')

The IPv6 address is assigned by a mechanism other than manual, DHCP, SLAAC, or random. See RFC 4293. This class attribute was added in vSphere API 6.7

RANDOM = Origin(string='RANDOM')

The IPv6 address is assigned randomly by the system. See RFC 4293. This class attribute was added in vSphere API 6.7

class Status(string)

Bases: vmware.vapi.bindings.enum.Enum

The Ipv6.Status class defines IPv6 address status values. See RFC 4293. This enumeration was added in vSphere API 6.7

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.

DEPRECATED = Status(string='DEPRECATED')

The is a valid but deprecated IPv6 address. This address cannot be used as a source address in new communications, although packets addressed to such an address are processed as expected. This class attribute was added in vSphere API 6.7

DUPLICATE = Status(string='DUPLICATE')

The IPv6 address is not unique on the link and cannot be used. This class attribute was added in vSphere API 6.7

INACCESSIBLE = Status(string='INACCESSIBLE')

The IPv6 address is inaccessible because the interface to which this address is assigned is not operational. This class attribute was added in vSphere API 6.7

INVALID = Status(string='INVALID')

The IPv6 address is not a valid address. It should not appear as the destination or source address of a packet. This class attribute was added in vSphere API 6.7

OPTIMISTIC = Status(string='OPTIMISTIC')

The IPv6 address is available for use, subject to restrictions, while its uniqueness on a link is being verified. This class attribute was added in vSphere API 6.7

PREFERRED = Status(string='PREFERRED')

This is a valid IPv6 address that can appear as the destination or source address of a packet. This class attribute was added in vSphere API 6.7

TENTATIVE = Status(string='TENTATIVE')

The IPv6 address is in the process of being verified as unique. An address in this state cannot be used for general communication. It can be used to determine the uniqueness of the address. This class attribute was added in vSphere API 6.7

UNKNOWN = Status(string='UNKNOWN')

The status of this address cannot be determined. This class attribute was added in vSphere API 6.7

get(interface_name)

Get IPv6 network configuration for specific interface. This method was added in vSphere API 6.7

Parameters:interface_name (str) – Network interface to query, for example, “nic0”. The parameter must be an identifier for the resource type: com.vmware.appliance.networking.interfaces.
Return type:Ipv6.Info
Returns:IPv6 configuration.
Raise:com.vmware.vapi.std.errors_client.NotFound if the specified NIC is not found.
Raise:com.vmware.vapi.std.errors_client.Error Generic error.
set(interface_name, config)

Set IPv6 network configuration for specific interface. This method was added in vSphere API 6.7

Parameters:
  • interface_name (str) – Network interface to update, for example, “nic0”. The parameter must be an identifier for the resource type: com.vmware.appliance.networking.interfaces.
  • config (Ipv6.Config) – The IPv6 configuration.
Raise:

com.vmware.vapi.std.errors_client.ResourceBusy The specified NIC is busy.

Raise:

com.vmware.vapi.std.errors_client.NotFound The specified NIC is not found.

Raise:

com.vmware.vapi.std.errors_client.Error Generic error.

class com.vmware.appliance.networking.interfaces_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase