com.vmware.vcenter.namespace_management.networks package
Subpackages
Submodules
com.vmware.vcenter.namespace_management.networks.edges_client module
The com.vmware.vcenter.namespace_management.networks.edges_client
module
provides classes and classes to manage NSX Edge resources.
- class com.vmware.vcenter.namespace_management.networks.edges_client.Edge(id=None, load_balancer_address_ranges=None, haproxy=None, nsx=None, nsx_advanced=None, provider=None)
Bases:
VapiStruct
Edge
class contains configuration for network traffic entering and exiting a Supervisor. This class was added in vSphere API 8.0.0.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
id (
str
orNone
) –Edge.id
is a unique identifier that can be referenced for updates. This attribute was added in vSphere API 8.0.0.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.vcenter.namespace_management.network.edge.Edge
. 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.namespace_management.network.edge.Edge
. If unset, an ID will be automatically generated.load_balancer_address_ranges (
list
ofcom.vmware.vcenter.namespace_management.networks_client.IPRange
orNone
) –Edge.load_balancer_address_ranges
defines the list of addresses that a load balancer can consume to publish Kubernetes services. This range must contain at least one IP address unless the NSX Advanced provider is selected. It is recommended to supply a large enough range to support load balancers requested for pods in the control plane and Tanzu Clusters. . This attribute was added in vSphere API 8.0.0.1. This field must be set ifEdge.provider
is not an NSX Advanced Load Balancer . This field is required if you want to load balance traffic on a DHCP Workload Network.haproxy (
HAProxyConfig
) –Edge.haproxy
defines configuration for the HAProxy Load Balancer. This attribute was added in vSphere API 8.0.0.1. This attribute is optional and it is only relevant when the value ofprovider
isEdgeProvider.HAPROXY
.nsx (
NSXConfig
) –Edge.nsx
defines configuration for the NSX Load Balancer. This attribute was added in vSphere API 8.0.0.1. This attribute is optional and it is only relevant when the value ofprovider
isEdgeProvider.NSX
.nsx_advanced (
NSXAdvancedLBConfig
) –Edge.nsx_advanced
defines configuration for the NSX Advanced Load Balancer and Ingress Software. This attribute was added in vSphere API 8.0.0.1. This attribute is optional and it is only relevant when the value ofprovider
isEdgeProvider.NSX_ADVANCED
.provider (
EdgeProvider
orNone
) –Edge.provider
specifies the vendor providing edge services. This attribute was added in vSphere API 8.0.0.1. A provider is required to enable edge services for a cluster.
- class com.vmware.vcenter.namespace_management.networks.edges_client.EdgeProvider(string)
Bases:
Enum
EdgeProvider
describes the supported available edge services. An NSX edge are used on NSX-T networks, but “Advanced NSX”, HAProxy, and vSphere Foundation edges are used on VDS networks. This enumeration was added in vSphere API 8.0.0.1.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 theEdgeProvider
instance.
- HAPROXY = EdgeProvider(string='HAPROXY')
EdgeProvider.HAPROXY
is an HAProxy load balancer fronted by the Data Plane API. This class attribute was added in vSphere API 8.0.0.1.
- NSX = EdgeProvider(string='NSX')
EdgeProvider.NSX
specifies NSX-T managed edge services. This class attribute was added in vSphere API 8.0.0.1.
- NSX_ADVANCED = EdgeProvider(string='NSX_ADVANCED')
EdgeProvider.NSX_ADVANCED
specifies the NSX Advanced Load Balancer and Ingress. This class attribute was added in vSphere API 8.0.0.1.
- class com.vmware.vcenter.namespace_management.networks.edges_client.HAProxyConfig(servers=None, username=None, password=None, certificate_authority_chain=None)
Bases:
VapiStruct
HAProxyConfig
class describes configuration for the HAProxy Load Balancer. This class was added in vSphere API 8.0.0.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
servers (
list
ofServer
) –HAProxyConfig.servers
is a list of the addresses for the data plane API servers used to configure Virtual Servers. This attribute was added in vSphere API 8.0.0.1.username (
str
) –HAProxyConfig.username
is used by the HAProxy Kubernetes Operator to program the HAProxy Controller. This attribute was added in vSphere API 8.0.0.1.password (
str
) –HAProxyConfig.password
secures theHAProxyConfig.username
. This attribute was added in vSphere API 8.0.0.1.certificate_authority_chain (
str
) –HAProxyConfig.certificate_authority_chain
contains PEM-encoded CA chain which is used to verify x509 certificates received from the server. This attribute was added in vSphere API 8.0.0.1.
- class com.vmware.vcenter.namespace_management.networks.edges_client.LoadBalancerSize(string)
Bases:
Enum
The
LoadBalancerSize
class enumerates load balancer sizes supported by NSX. This enumeration was added in vSphere API 8.0.0.1.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 theLoadBalancerSize
instance.
- LARGE = LoadBalancerSize(string='LARGE')
LoadBalancerSize.LARGE
is a load balancer that hosts up to 1000 virtual servers. This class attribute was added in vSphere API 8.0.0.1.
- MEDIUM = LoadBalancerSize(string='MEDIUM')
LoadBalancerSize.MEDIUM
is a load balancer that hosts up to 100 virtual servers. This class attribute was added in vSphere API 8.0.0.1.
- SMALL = LoadBalancerSize(string='SMALL')
LoadBalancerSize.SMALL
is a load balancer that hosts up to 20 virtual servers. This class attribute was added in vSphere API 8.0.0.1.
- class com.vmware.vcenter.namespace_management.networks.edges_client.NSXAdvancedLBConfig(server=None, username=None, password=None, certificate_authority_chain=None, cloud_name=None)
Bases:
VapiStruct
NSXAdvancedLBConfig
class is used to describe the NSX Advanced Load Balancer configuration. This class was added in vSphere API 8.0.0.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
server (
Server
) –NSXAdvancedLBConfig.server
is the address for the Avi Controller, used to configure Virtual Servers. This attribute was added in vSphere API 8.0.0.1.username (
str
) –NSXAdvancedLBConfig.username
is used by the Avi Kubernetes Operator to program the Avi Controller. This attribute was added in vSphere API 8.0.0.1.password (
str
) –NSXAdvancedLBConfig.password
is the password for the username. This attribute was added in vSphere API 8.0.0.1.certificate_authority_chain (
str
) –NSXAdvancedLBConfig.certificate_authority_chain
contains PEM-encoded CA chain which is used to verify x509 certificates received from the server. This attribute was added in vSphere API 8.0.0.1.cloud_name (
str
orNone
) – The cloud name for the Avi Controller. This attribute was added in vSphere API 8.0.2.00300. Onlyset
if custom cloud name is configured for this Avi Controller. If None, it defaults to “Default-Cloud”.
- class com.vmware.vcenter.namespace_management.networks.edges_client.NSXConfig(edge_cluster_id=None, default_ingress_tls_certificate=None, routing_mode=None, egress_ip_ranges=None, t0_gateway=None, load_balancer_size=None)
Bases:
VapiStruct
NSXConfig
class describes the configuration for NSX-T Edge services. This class was added in vSphere API 8.0.0.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
edge_cluster_id (
str
orNone
) –NSXConfig.edge_cluster_id
defines the NSX Edge Cluster to be used for Kubernetes Services of type LoadBalancer, Kubernetes Ingresses, and NSX SNAT. This attribute was added in vSphere API 8.0.0.1. Defaults to a the edge cluster created earliest.default_ingress_tls_certificate (
str
orNone
) –NSXConfig.default_ingress_tls_certificate
defines a default certificate that is served on Ingress services, when another certificate is not presented. This configuration applies to all namespaces by default. This attribute was added in vSphere API 8.0.0.1. If unset, there will be no certificate served on Ingress.routing_mode (
NSXRoutingMode
orNone
) –NSXConfig.routing_mode
enables the network topology in either NAT mode or Routed Mode. Enabling routed mode will result in all the workloads i.e vSphere PODs, VMs and Tanzu clusters Node IPs to be directly accessible from networks beyond the Tier-0 router. Once a namespace mode is applied, it cannot be changed. This attribute was added in vSphere API 8.0.0.1. The default setting is NAT mode.egress_ip_ranges (
list
ofcom.vmware.vcenter.namespace_management.networks_client.IPRange
) –NSXConfig.egress_ip_ranges
lists the IP Ranges from which NSX assigns IP addresses used for performing SNAT from container IPs to external IPs. These ranges must not overlap with other IP ranges on this network. This attribute was added in vSphere API 8.0.0.1. If this range is empty, network traffic will not be able to exit the cluster.t0_gateway (
str
orNone
) –NSXConfig.t0_gateway
specifies the default Tier-0 gateway ID for the namespaces configuration. This attribute was added in vSphere API 8.0.0.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:NSXTier0Gateway
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:NSXTier0Gateway
. If unset, the default Tier-0 gateway from the edge cluster is used.load_balancer_size (
LoadBalancerSize
orNone
) –NSXConfig.load_balancer_size
describes the load balancer sizing options available. Larger sizes support more active virtual servers, but consume more resources. This attribute was added in vSphere API 8.0.0.1. If unset, the size defaults to small.
- class com.vmware.vcenter.namespace_management.networks.edges_client.NSXRoutingMode(string)
Bases:
Enum
NSXRoutingMode
enum defines an enumeration of available routing modes. This enumeration was added in vSphere API 8.0.0.1.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 theNSXRoutingMode
instance.
- NAT = NSXRoutingMode(string='NAT')
NSXRoutingMode.NAT
uses network address translation and theNSXConfig.egress_ip_ranges
to route traffic out of the cluster. This class attribute was added in vSphere API 8.0.0.1.
- ROUTED = NSXRoutingMode(string='ROUTED')
NSXRoutingMode.ROUTED
configures NSX-T to route directly to Pods cluster IP addresses. This class attribute was added in vSphere API 8.0.0.1.
- class com.vmware.vcenter.namespace_management.networks.edges_client.Server(host=None, port=None)
Bases:
VapiStruct
A
Server
class represents an endpoint used to configure load balancers. This class was added in vSphere API 8.0.0.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
host (
str
) –Server.host
specifies a the management hostname or IPv4 address for a load balancer. This attribute was added in vSphere API 8.0.0.1.port (
long
) –Server.port
specifies a management port used to access a load balancer. This attribute was added in vSphere API 8.0.0.1.
- class com.vmware.vcenter.namespace_management.networks.edges_client.StubFactory(stub_config)
Bases:
StubFactoryBase
Initialize StubFactoryBase
- Parameters:
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance
com.vmware.vcenter.namespace_management.networks.nsx_client module
The com.vmware.vcenter.namespace_management.networks.nsx_client
module
provides classes and classes for managing nsx resources.
- class com.vmware.vcenter.namespace_management.networks.nsx_client.DistributedSwitches(config)
Bases:
VapiInterface
The
DistributedSwitches
class provides methods to get the basic information of Distributed Switches. This class was added in vSphere API 8.0.0.1.- Parameters:
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
- class FilterSpec(compatible=None, zones=None)
Bases:
VapiStruct
The
DistributedSwitches.FilterSpec
class contains attributes used to filter the results when listing Distributed Switches (seeDistributedSwitches.list()
). This class was added in vSphere API 8.0.0.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
compatible (
bool
orNone
) – Compatibility criteria. If true, only Distributed Switches compatible with the vSphere Namespaces will be returned. If false, only Distributed Switches incompatible with the vSphere Namespaces will be returned. This attribute was added in vSphere API 8.0.0.1. If None, both compatible and incompatible Distributed Switches will be returned.zones (
list
ofstr
) – Zone compatibility criteria. If zones are specified, the common distributed switches across the given zones will returned. A distributed switch is considered common if it is present in all of the vSphere clusters in a given zone. This attribute was added in vSphere API 8.0.0.1. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type:com.vmware.vcenter.consumption_domains.Zone
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:com.vmware.vcenter.consumption_domains.Zone
.
- class Summary(distributed_switch=None, name=None)
Bases:
VapiStruct
The
DistributedSwitches.Summary
class contains the basic information about a Distributed Switch. This class was added in vSphere API 8.0.0.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
distributed_switch (
str
) – Identifier of the switch. The value of this field refers to the UUID of a vim.DistributedVirtualSwitch. This attribute was added in vSphere API 8.0.0.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:vSphereDistributedSwitch
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:vSphereDistributedSwitch
.name (
str
) – Human-readable identifier of the switch. This attribute was added in vSphere API 8.0.0.1.
- list(filter=None)
Returns basic information of the Distributed Switches matching the
DistributedSwitches.FilterSpec
. This method was added in vSphere API 8.0.0.1.- Parameters:
filter (
DistributedSwitches.FilterSpec
orNone
) – Specification of matching Distributed Switches for which information should be returned. If None, the behavior is equivalent to aDistributedSwitches.FilterSpec
with all attributes None which means all Distributed Switches will be returned.- Return type:
- Returns:
List of Distributed Switches summaries matching the
DistributedSwitches.FilterSpec
.- 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.InvalidArgument
if one or more fields of theDistributedSwitches.FilterSpec
is incorrect.- Raise:
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise:
com.vmware.vapi.std.errors_client.Unauthorized
if the user does not have System.Read privilege.
- class com.vmware.vcenter.namespace_management.networks.nsx_client.Edges(config)
Bases:
VapiInterface
The
Edges
class provides methods to retrieve the basic information for NSX Edges. This class was added in vSphere API 8.0.0.1.- Parameters:
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
- class FilterSpec(compatible=None, distributed_switch=None)
Bases:
VapiStruct
The
Edges.FilterSpec
class contains attributes used to filter the results when listing Edges (seeEdges.list()
). This class was added in vSphere API 8.0.0.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
compatible (
bool
orNone
) – Compatibility criteria. If true, only Edges which are compatible with vSphere Namespaces will be returned. If false, only Edges incompatible with vSphere Namespaces will be returned. This attribute was added in vSphere API 8.0.0.1. If None, both compatible and incompatible Edges will be returned.distributed_switch (
list
ofstr
) – Distributed switch UUID criteria. If distributed switches identifiers are specified, they will be used to filter the Edges. To obtain the available distributed switch UUIDs, use:DistributedSwitches.list()
. This attribute was added in vSphere API 8.0.0.1. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type:vSphereDistributedSwitch
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:vSphereDistributedSwitch
.
- class Summary(edge_cluster=None, name=None, path=None)
Bases:
VapiStruct
The
Edges.Summary
class contains the basic information about an Edge. This class was added in vSphere API 8.0.0.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
edge_cluster (
str
) – Identifier of the Edge. This attribute was added in vSphere API 8.0.0.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:NSXEdgeCluster
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:NSXEdgeCluster
.name (
str
) – Human-readable identifier of the Edge. This attribute was added in vSphere API 8.0.0.1.path (
str
) – NSX Policy path of the Edge. This attribute was added in vSphere API 8.0.0.1.
- list(filter=None)
Returns a list of Edges matching the given filter. This method was added in vSphere API 8.0.0.1.
- Parameters:
filter (
Edges.FilterSpec
orNone
) – Specification of matching Edges for which information should be returned. If None, the behavior is equivalent to aEdges.FilterSpec
with all attributes None which means all Edges will be returned.- Return type:
- Returns:
List of Edge summaries matching the given filter.
- 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.InvalidArgument
if one or more fields of theEdges.FilterSpec
is incorrect.- Raise:
com.vmware.vapi.std.errors_client.Unauthenticated
if the user cannot be authenticated.- Raise:
com.vmware.vapi.std.errors_client.Unauthorized
if the user does not haveSystem.Read
privilege.
- class com.vmware.vcenter.namespace_management.networks.nsx_client.StubFactory(stub_config)
Bases:
StubFactoryBase
Initialize StubFactoryBase
- Parameters:
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance
com.vmware.vcenter.namespace_management.networks.service_client module
- class com.vmware.vcenter.namespace_management.networks.service_client.DNS(servers=None, search_domains=None)
Bases:
VapiStruct
DNS
describes DNS servers and search domains for a given network. This class was added in vSphere API 8.0.0.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
servers (
list
ofstr
) –DNS.servers
is a list of IP addresses that clients may use for DNS resolution on a given network in priority order.If empty, no DNS servers will be configured.. This attribute was added in vSphere API 8.0.0.1.
search_domains (
list
ofstr
) –DNS.search_domains
is a list of DNS search domains to be used on this network.This field is useful for corporate networks or local domains that are not publicly resolvable.
If empty, no search domains will be configured.. This attribute was added in vSphere API 8.0.0.1.
- class com.vmware.vcenter.namespace_management.networks.service_client.NTP(servers=None)
Bases:
VapiStruct
NTP
class describes network time protocol configuration for a network. This class was added in vSphere API 8.0.0.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters:
servers (
list
ofstr
) –NTP.servers
contains a list of servers in priority order that clients can use for network time protocol. This attribute was added in vSphere API 8.0.0.1.
- class com.vmware.vcenter.namespace_management.networks.service_client.StubFactory(stub_config)
Bases:
StubFactoryBase
Initialize StubFactoryBase
- Parameters:
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance