vmware.vapi.lib package¶
Submodules¶
vmware.vapi.lib.connect module¶
vAPI Connection factory
- 
vmware.vapi.lib.connect.check_file_exists(filename)¶ Check if name is a file and exists
:type
str:param file name
- 
vmware.vapi.lib.connect.get_connector(rpc_provider_name, msg_protocol, ssl_context=None, **kwargs)¶ Create a connection to the vAPI Provider using the specified arguments
- Parameters
 rpc_provider_name (
str) – The RPC provider to be used for the connection. Valid values are ‘http’, ‘https’ and ‘requests’msg_protocol (
str) – The message protocol to be used for the connection. Valid values are ‘json’.ssl_context (
OpenSSL.SSL.Context) – SSL context to use for SSL connectionskwargs – Additional arguments for the RPC provider
- Return type
 vmware.vapi.protocol.client.connector.Connector- Returns
 Connection to the vAPI provider
- 
vmware.vapi.lib.connect.get_requests_connector(session, msg_protocol='json', url=None, timeout=None, pool_size=8, provider_filter_chain=None)¶ Create a connection that uses ‘requests’ library for http(s) connections to a vAPI Provider.
- Parameters
 session (
requests.Session) – Session objectmsg_protocol (
str) – Message protocol to be used for the connection. Valid values are ‘json’.url (
str) – HTTP(S) URL to be usedtimeout (
int) – Request timeoutpool_size (
int) – Connection pool size to be usedprovider_filter_chain (
listofvmware.vapi.provider.filter.ApiProviderFilter) – List of API filters in order they are to be chained
- Return type
 vmware.vapi.protocol.client.connector.Connector- Returns
 Connection to the vAPI provider
- 
vmware.vapi.lib.connect.get_requests_hok_connector(session, msg_protocol='json', url=None, timeout=None, pool_size=8)¶ Create a connection that uses SAML Hok based authentication using ‘requests’ library to connect to a vAPI Provider.
- Parameters
 session (
requests.Session) – Session objectmsg_protocol (
str) – Message protocol to be used for the connection. Valid values are ‘json’.url (
str) – HTTP(S) URL to be usedtimeout (
int) – Request timeoutpool_size (
int) – Connection pool size to be used
- Return type
 vmware.vapi.protocol.client.connector.Connector- Returns
 Connection to the vAPI provider
- 
vmware.vapi.lib.connect.get_saml_hok_connector(rpc_provider_name, msg_protocol='json', ssl_context=None, **kwargs)¶ Create a connection that uses SAML Hok based authentication to connect to a vAPI Provider
- Parameters
 rpc_provider_name (
str) – The RPC provider to be used for the connection. Valid values are ‘http’, ‘https’ or ‘requests’msg_protocol (
str) – The message protocol to be used for the connection. Valid values are ‘json’.ssl_context (
OpenSSL.SSL.Context) – SSL context to use for SSL connectionskwargs (
dictofstrandobject) – Additional arguments for the RPC provider
- Return type
 vmware.vapi.protocol.client.connector.Connector- Returns
 Connection to the vAPI provider