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.Parameters: config ( vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.-
add
(domain)¶ Add domain to DNS search domains.
Parameters: domain ( str
) – Domain to add.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.Parameters: config ( vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.-
class
Message
(message=None, result=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
Hostname.Message
class Test result and messageTip
The arguments are used to initialize data attributes with the same names.
Parameters: - message (
str
) – message - result (
Hostname.MessageStatus
) – result of the test
- message (
-
class
MessageStatus
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
Hostname.MessageStatus
class Individual test resultNote
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 theMessageStatus
instance.-
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 indicatorNote
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 theTestStatus
instance.-
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 resultTip
The arguments are used to initialize data attributes with the same names.
Parameters: - status (
Hostname.TestStatus
) – Overall status of tests run. - messages (
list
ofHostname.Message
) – messages
- status (
-
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
-
class
com.vmware.appliance.networking.dns_client.
Servers
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
Servers
class provides methods DNS server configuration.Parameters: config ( vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.-
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.
Parameters: - mode (
Servers.DNSServerMode
) – Define how to determine the DNS servers. Leave the servers argument empty if the mode argument is “DHCP”. Set the servers argument to a comma-separated list of DNS servers if the mode argument is “static”. The DNS server are assigned from the specified list. - servers (
list
ofstr
) – List of the currently used DNS servers.
- mode (
-
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.
Parameters: string ( str
) – String value for theDNSServerMode
instance.-
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 messageTip
The arguments are used to initialize data attributes with the same names.
Parameters: - message (
str
) – message - result (
Servers.MessageStatus
) – result of the test
- message (
-
class
MessageStatus
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
Servers.MessageStatus
class Individual test resultNote
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 theMessageStatus
instance.-
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 indicatorNote
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 theTestStatus
instance.-
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 resultTip
The arguments are used to initialize data attributes with the same names.
Parameters: - status (
Servers.TestStatus
) – Overall status of tests run. - messages (
list
ofServers.Message
) – messages
- status (
-
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
ofstr
) – DNS servers.Return type: Servers.TestStatusInfo
Returns: DNS reacable status Raise: com.vmware.vapi.std.errors_client.Error
Generic error
-
class
-
class
com.vmware.appliance.networking.dns_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
Initialize StubFactoryBase
Parameters: stub_config ( vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance
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.7Parameters: config ( vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.-
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.7Tip
The arguments are used to initialize data attributes with the same names.
Parameters: - mode (
Ipv4.Mode
) – The Address assignment mode. This attribute was added in vSphere API 6.7 - address (
str
) – The IPv4 address, for example, “10.20.80.191”. This attribute was added in vSphere API 6.7 This attribute is optional and it is only relevant when the value ofmode
isIpv4.Mode.STATIC
. - prefix (
long
) – The IPv4 CIDR prefix, for example, 24. See http://www.oav.net/mirrors/cidr.html for netmask-to-prefix conversion. This attribute was added in vSphere API 6.7 This attribute is optional and it is only relevant when the value ofmode
isIpv4.Mode.STATIC
. - default_gateway (
str
orNone
) – The IPv4 address of the default gateway. This configures the global default gateway on the appliance with the specified gateway address and interface. This gateway replaces the existing default gateway configured on the appliance. However, if the gateway address is link-local, then it is added for that interface. This does not support configuration of multiple global default gateways through different interfaces. This attribute was added in vSphere API 6.7 If None, the defaultGateway was never set.
- mode (
-
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.7Tip
The arguments are used to initialize data attributes with the same names.
Parameters: - configurable (
bool
) – The specified network interface is configurable or not. This attribute was added in vSphere API 6.7 - mode (
Ipv4.Mode
) – The Address assignment mode. This attribute was added in vSphere API 6.7 - address (
str
) – The IPv4 address, for example, “10.20.80.191”. This attribute was added in vSphere API 6.7 This attribute is optional and it is only relevant when the value ofmode
is one ofIpv4.Mode.STATIC
orIpv4.Mode.DHCP
. - prefix (
long
) – The IPv4 CIDR prefix, for example, 24. See http://www.oav.net/mirrors/cidr.html for netmask-to-prefix conversion. This attribute was added in vSphere API 6.7 This attribute is optional and it is only relevant when the value ofmode
is one ofIpv4.Mode.STATIC
orIpv4.Mode.DHCP
. - default_gateway (
str
) – The IPv4 address of the default gateway. This configures the global default gateway on the appliance with the specified gateway address and interface. This gateway replaces the existing default gateway configured on the appliance. However, if the gateway address is link-local, then it is added for that interface. This does not support configuration of multiple global default gateways through different interfaces. This attribute was added in vSphere API 6.7 This attribute is optional and it is only relevant when the value ofmode
is one ofIpv4.Mode.STATIC
orIpv4.Mode.DHCP
.
- configurable (
-
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.7Note
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 theMode
instance.-
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 PNIDRaise: com.vmware.vapi.std.errors_client.ResourceBusy
if the specified NIC is busy.Raise: com.vmware.vapi.std.errors_client.Error
Generic error.- interface_name (
-
class
-
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.7Parameters: config ( vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.-
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.7Tip
The arguments are used to initialize data attributes with the same names.
Parameters: - address (
str
) – The IPv6 address, for example, fc00:10:20:83:20c:29ff:fe94:bb5a. This attribute was added in vSphere API 6.7 - prefix (
long
) – The IPv6 CIDR prefix, for example, 64. This attribute was added in vSphere API 6.7
- address (
-
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.7Tip
The arguments are used to initialize data attributes with the same names.
Parameters: - origin (
Ipv6.Origin
) – The Origin of the IPv6 address. For more information, see RFC 4293. This attribute was added in vSphere API 6.7 - status (
Ipv6.Status
) – The Status of the IPv6 address. For more information, see RFC 4293. This attribute was added in vSphere API 6.7 - address (
str
) – The IPv6 address, for example, fc00:10:20:83:20c:29ff:fe94:bb5a. This attribute was added in vSphere API 6.7 - prefix (
long
) – The IPv6 CIDR prefix, for example, 64. This attribute was added in vSphere API 6.7
- origin (
-
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.7Tip
The arguments are used to initialize data attributes with the same names.
Parameters: - dhcp (
bool
) – An address will be assigned by a DHCP server. This attribute was added in vSphere API 6.7 - autoconf (
bool
) – An address will be assigned by Stateless Address Autoconfiguration (SLAAC). This attribute was added in vSphere API 6.7 - addresses (
list
ofIpv6.Address
) – The list of addresses to be statically assigned. This attribute was added in vSphere API 6.7 - default_gateway (
str
) – The default gateway for static IP address assignment. This configures the global IPv6 default gateway on the appliance with the specified gateway address and interface. This gateway replaces the existing default gateway configured on the appliance. However, if the gateway address is link-local, then it is added for that interface. This does not support configuration of multiple global default gateways through different interfaces. This attribute was added in vSphere API 6.7
- dhcp (
-
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.7Tip
The arguments are used to initialize data attributes with the same names.
Parameters: - dhcp (
bool
) – DHCP is on. This attribute was added in vSphere API 6.7 - autoconf (
bool
) – Stateless Address Autoconfiguration (SLAAC) is on. This attribute was added in vSphere API 6.7 - addresses (
list
ofIpv6.AddressInfo
) – List of addresses with their origins and statuses. This attribute was added in vSphere API 6.7 - default_gateway (
str
) – The default gateway for static IP address assignment. This configures the global IPv6 default gateway on the appliance with the specified gateway address and interface. This gateway replaces the existing default gateway configured on the appliance. However, if the gateway address is link-local, then it is added for that interface. This does not support configuration of multiple global default gateways through different interfaces. This attribute was added in vSphere API 6.7 - configurable (
bool
) – Is NIC configurable or not. This attribute was added in vSphere API 6.7
- dhcp (
-
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.7Note
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 theOrigin
instance.-
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.7Note
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 theStatus
instance.-
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.- interface_name (
-
class
-
class
com.vmware.appliance.networking.interfaces_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
Initialize StubFactoryBase
Parameters: stub_config ( vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance