vmware.vapi.vsphere package¶
Submodules¶
vmware.vapi.vsphere.client module¶
vSphere Client
-
class
vmware.vapi.vsphere.client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
Initialize StubFactoryBase
- Parameters
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance
-
class
vmware.vapi.vsphere.client.
VsphereClient
(session, server, username, password, bearer_token, hok_token, private_key)¶ Bases:
vmware.vapi.bindings.stub.ApiClient
vSphere Client class that provides access to stubs for all services in the vSphere API
Initialize VsphereClient by creating a parent stub factory instance of all vSphere components.
- Parameters
session (
requests.Session
) – Requests HTTP session instance. If not specified,
then one is automatically created and used :type server:
str
:param server: vCenter host name or IP address :type username:str
:param username: Name of the user :type password:str
:param password: Password of the user :type bearer_token:str
:param bearer_token: SAML Bearer Token :type hok_token:str
:param hok_token: SAML Hok Token :type private_key:str
:param private_key: Absolute file path of the private key of the user
-
vmware.vapi.vsphere.client.
create_vsphere_client
(server, username=None, password=None, bearer_token=None, hok_token=None, private_key=None, session=None)¶ Helper method to create an instance of the vSphere API client. Please provide one of the following options to authenticate:
username and password,
bearer_token,
hok_token and private_key
- Parameters
server (
str
) – vCenter host name or IP addressusername (
str
) – Name of the userpassword (
str
) – Password of the userbearer_token (
str
) – SAML Bearer Tokenhok_token (
str
) – SAML Hok Tokenprivate_key (
str
) – Absolute file path of the private key of the usersession (
requests.Session
orNone
) – Requests HTTP session instance. If not specified, then one is automatically created and used
- Return type
vmware.vapi.vmc.client.VsphereClient
- Returns
Vsphere Client instance