The vmware_nsx.nsxlib.v3.cluster Module

class vmware_nsx.nsxlib.v3.cluster.AbstractHTTPProvider

Bases: object

Interface for providers of HTTP connections which are responsible for creating and validating connections for their underlying HTTP support.

default_scheme
is_connection_exception(exception)

Determine if the given exception is related to connection failure. Return True if it’s a connection exception and False otherwise.

new_connection(cluster_api, provider)

Create a new http connection for the said cluster and cluster provider. The actual connection should duck type requests.Session http methods (get(), put(), etc.).

provider_id

A unique string name for this provider.

validate_connection(cluster_api, endpoint, conn)

Validate the said connection for the given endpoint and cluster.

class vmware_nsx.nsxlib.v3.cluster.ClusterHealth

Bases: object

Indicator of overall cluster health with respect to the connectivity of the clusters managed endpoints.

GREEN = 'GREEN'
ORANGE = 'ORANGE'
RED = 'RED'
class vmware_nsx.nsxlib.v3.cluster.ClusteredAPI(providers, http_provider, min_conns_per_pool=1, max_conns_per_pool=500, keepalive_interval=33)

Bases: object

Duck types the major HTTP based methods of a requests.Session such as get(), put(), post(), etc. and transparently proxies those calls to one of its managed NSX manager endpoints.

cluster_id
connection(*args, **kwds)
endpoint_connection(*args, **kwds)
endpoint_for_connection(conn)
endpoints
health
http_provider
providers
class vmware_nsx.nsxlib.v3.cluster.Endpoint(provider, pool)

Bases: object

A single NSX manager endpoint (host) which includes related information such as the endpoint’s provider, state, etc.. A pool is used to hold connections to the endpoint which are doled out when proxying HTTP methods to the underlying connections.

last_updated
set_state(state)
state
class vmware_nsx.nsxlib.v3.cluster.EndpointConnection(endpoint, connection)

Bases: object

Simple data holder which contains an endpoint and a connection for that endpoint.

class vmware_nsx.nsxlib.v3.cluster.EndpointState

Bases: object

Tracks the connectivity state for a said endpoint.

DOWN = 'DOWN'
INITIALIZED = 'INITIALIZED'
UP = 'UP'
class vmware_nsx.nsxlib.v3.cluster.NSXClusteredAPI(username=None, password=None, retries=None, insecure=None, ca_file=None, concurrent_connections=None, http_timeout=None, http_read_timeout=None, conn_idle_timeout=None, http_provider=None)

Bases: vmware_nsx.nsxlib.v3.cluster.ClusteredAPI

Extends ClusteredAPI to get conf values and setup the NSX v3 cluster.

class vmware_nsx.nsxlib.v3.cluster.NSXRequestsHTTPProvider

Bases: vmware_nsx.nsxlib.v3.cluster.AbstractHTTPProvider

Concrete implementation of AbstractHTTPProvider using requests.Session() as the underlying connection.

is_connection_exception(exception)
new_connection(cluster_api, provider)
provider_id
validate_connection(cluster_api, endpoint, conn)
class vmware_nsx.nsxlib.v3.cluster.Provider(provider_id, provider_url)

Bases: object

Data holder for a provider which has a unique id and a connection URL.

class vmware_nsx.nsxlib.v3.cluster.TimeoutSession(timeout=None, read_timeout=None)

Bases: requests.sessions.Session

Extends requests.Session to support timeout at the session level.

request(*args, **kwargs)

Previous topic

The vmware_nsx.nsxlib.v3.client Module

Next topic

The vmware_nsx.nsxlib.v3.dfw_api Module

This Page