com.vmware.vcenter package

Subpackages

Submodules

com.vmware.vcenter.certificate_management_client module

The com.vmware.vcenter.certificate_management_client module provides classes to manage certificates.

class com.vmware.vcenter.certificate_management_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance

class com.vmware.vcenter.certificate_management_client.X509CertChain(cert_chain=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The X509CertChain class contains x509 certificate chain. This class was added in vSphere API 6.7.2.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

cert_chain (list of str) – Certificate chain in base64 format. This attribute was added in vSphere API 6.7.2.

com.vmware.vcenter.compute_client module

The com.vmware.vcenter.compute_client module provides classes for managing compute policies in VMware Cloud on AWS. Usage beyond VMware Cloud on AWS is not supported.

class com.vmware.vcenter.compute_client.Policies(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Policies class provides methods to manage compute policies in VMware Cloud on AWS. Usage beyond VMware Cloud on AWS is not supported. A compute policy defines the intended behavior for a collection of vSphere objects identified by a tag. A compute policy is an instance of a capability. It is created by providing a value for the creation type specified by the capability. See com.vmware.vcenter.compute.policies_client.Capabilities.Info.create_spec_type. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

RESOURCE_TYPE = 'com.vmware.vcenter.compute.Policy'

The resource type for the compute policy. Warning: This class attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

class Summary(policy=None, name=None, description=None, capability=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Policies.Summary class contains commonly used information about a compute policy. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • policy (str) – Identifier of the policy. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.compute.Policy. 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.compute.Policy.

  • name (str) – Name of the policy. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • description (str) – Description of the policy. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • capability (str) – Identifier of the capability this policy is based on. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.compute.policies.Capability. 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.compute.policies.Capability.

create(spec)

Creates a new compute policy in VMware Cloud on AWS. Usage beyond VMware Cloud on AWS is not supported. Warning: This method is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Parameters

spec (vmware.vapi.struct.VapiStruct) – Specification for the new policy to be created. The new policy will be an instance of the capability that has the creation type (see com.vmware.vcenter.compute.policies_client.Capabilities.Info.create_spec_type) equal to the type of the specified value (see spec). The parameter must contain all the attributes defined in com.vmware.vcenter.compute.policies_client.CreateSpec.

Return type

str

Returns

The identifier of the newly created policy. Use this identifier to get or destroy the policy. The return value will be an identifier for the resource type: com.vmware.vcenter.compute.Policy.

Raise

com.vmware.vapi.std.errors_client.AlreadyExists if a policy with the same name is already present on this vCenter server.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if a parameter passed in the spec is invalid.

Raise

com.vmware.vapi.std.errors_client.UnableToAllocateResource if more than 100 policies are created.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user doesn’t have the required privileges.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires ComputePolicy.Manage.

delete(policy)

Deletes a specific compute policy in VMware Cloud on AWS. Usage beyond VMware Cloud on AWS is not supported. Warning: This method is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Parameters

policy (str) – Identifier of the policy to be deleted. The parameter must be an identifier for the resource type: com.vmware.vcenter.compute.Policy.

Raise

com.vmware.vapi.std.errors_client.NotFound if a policy with this identifier does not exist.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user doesn’t have the required privileges.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires ComputePolicy.Manage.

get(policy)

Returns information about a specific compute policy in VMware Cloud on AWS. Usage beyond VMware Cloud on AWS is not supported. Warning: This method is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Parameters

policy (str) – Identifier of the policy for which information should be retrieved. The parameter must be an identifier for the resource type: com.vmware.vcenter.compute.Policy.

Return type

vmware.vapi.struct.VapiStruct

Returns

Detailed information about the specified compute policy. The returned value can be converted to the information type of the capability that this policy is based on. See com.vmware.vcenter.compute.policies_client.Capabilities.Info.info_type. The return value will contain all the attributes defined in com.vmware.vcenter.compute.policies_client.Info.

Raise

com.vmware.vapi.std.errors_client.NotFound if a policy with this identifier does not exist.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user doesn’t have the required privileges.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

list()

Returns information about the compute policies available in this vCenter server in VMware Cloud on AWS. Usage beyond VMware Cloud on AWS is not supported. Warning: This method is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Return type

list of Policies.Summary

Returns

The list of compute policies available on this vCenter server.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user doesn’t have the required privileges.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

class com.vmware.vcenter.compute_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.vcenter.datastore_client module

class com.vmware.vcenter.datastore_client.DefaultPolicy(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The DefaultPolicy class provides methods related to storage policies associated with datastore object. The DefaultPolicy.get() method provides information about the default storage policy associated with the specific datastore. This class was added in vSphere API 6.7.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

get(datastore)

Returns the identifier of the current default storage policy associated with the specified datastore. This method was added in vSphere API 6.7.

Parameters

datastore (str) – Identifier of the datastore for which the default policy is requested. The parameter must be an identifier for the resource type: Datastore.

Return type

str or None

Returns

Identifier of the default storage policy associated with the specified datastore. The return value will be an identifier for the resource type: com.vmware.vcenter.StoragePolicy. this field is None if there is no default storage policy associated with the datastore.

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.NotFound if the specified datastore does not exist.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable if the system is unable to communicate with a service to complete the request.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the user is not authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user does not have the required priveleges.

class com.vmware.vcenter.datastore_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.vcenter.deployment_client module

class com.vmware.vcenter.deployment_client.ApplianceState(string)

Bases: vmware.vapi.bindings.enum.Enum

The ApplianceState class defines the various states the vCenter Appliance can be in. This enumeration was added in vSphere API 6.7.

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 the ApplianceState instance.

CONFIGURED = ApplianceState(string='CONFIGURED')

The appliance has been configured. This class attribute was added in vSphere API 6.7.

CONFIG_IN_PROGRESS = ApplianceState(string='CONFIG_IN_PROGRESS')

The appliance is in the process of being configured. This class attribute was added in vSphere API 6.7.

FAILED = ApplianceState(string='FAILED')

The appliance configuration has failed. This class attribute was added in vSphere API 6.7.

INITIALIZED = ApplianceState(string='INITIALIZED')

The appliance is initialized and ready to be configured. This class attribute was added in vSphere API 6.7.

NOT_INITIALIZED = ApplianceState(string='NOT_INITIALIZED')

The appliance is in the process of being initialized and not ready for configuration. This class attribute was added in vSphere API 6.7.

QUESTION_RAISED = ApplianceState(string='QUESTION_RAISED')

The deployment script has raised a question and is waiting for an answer to continue with the appliance configuration. This class attribute was added in vSphere API 6.7.

class com.vmware.vcenter.deployment_client.ApplianceType(string)

Bases: vmware.vapi.bindings.enum.Enum

The ApplianceType class defines the vCenter appliance types. This enumeration was added in vSphere API 6.7.

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 the ApplianceType instance.

PSC_EXTERNAL = ApplianceType(string='PSC_EXTERNAL')

An external Platform Services Controller. This class attribute was added in vSphere API 6.7.

VCSA_EMBEDDED = ApplianceType(string='VCSA_EMBEDDED')

vCenter Server Appliance with an embedded Platform Services Controller. This class attribute was added in vSphere API 6.7.

VCSA_EXTERNAL = ApplianceType(string='VCSA_EXTERNAL')

vCenter Server Appliance with an external Platform Services Controller. This class attribute was added in vSphere API 6.7.

class com.vmware.vcenter.deployment_client.CheckInfo(status=None, result=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The CheckInfo class describes the result of the appliance deployment check. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • status (CheckStatus) – Status of the check. This attribute was added in vSphere API 6.7.

  • result (Notifications or None) – Result of the check. This attribute was added in vSphere API 6.7. This attribute will be None if result is not available at the current step of the task.

class com.vmware.vcenter.deployment_client.CheckStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

The CheckStatus class defines the status of the checks. This enumeration was added in vSphere API 6.7.

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 the CheckStatus instance.

FAILED = CheckStatus(string='FAILED')

A fatal error was encountered when running the sanity checks. This class attribute was added in vSphere API 6.7.

SUCCESS = CheckStatus(string='SUCCESS')

All checks have completed successfully. This class attribute was added in vSphere API 6.7.

class com.vmware.vcenter.deployment_client.HistoryMigrationOption(string)

Bases: vmware.vapi.bindings.enum.Enum

The HistoryMigrationOption class defines the vCenter history migration option choices. This enumeration was added in vSphere API 6.7.

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 the HistoryMigrationOption instance.

ALL = HistoryMigrationOption(string='ALL')

All history data will be migrated along with the core data. This class attribute was added in vSphere API 6.7.

EVENTS_TASKS = HistoryMigrationOption(string='EVENTS_TASKS')

Only event data and task data will be migrated along with the core data. This class attribute was added in vSphere API 6.7.

class com.vmware.vcenter.deployment_client.HistoryMigrationSpec(data_set=None, defer_import=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The HistoryMigrationSpec class defines how vCenter history data will be migrated. vCenter History data includes

  • Statistics

  • Events

  • Tasks

. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • data_set (HistoryMigrationOption) – Defines what part of vCenter historical data will be migrated along with core data. This attribute was added in vSphere API 6.7.

  • defer_import (bool or None) – Defines how vCenter history will be migrated. If set to true, vCenter history will be migrated separately after successful upgrade or migration, otherwise it will be migrated along with core data during the upgrade or migration process. This attribute was added in vSphere API 6.7. If None, vCenter historical data won’t be deferred and will be migrated along with core data.

class com.vmware.vcenter.deployment_client.ImportHistory(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The ImportHistory class provides methods for managing the import of vCenter historical data, e.g. Tasks, Events and Statistics, when is is imported separately from the upgrade or migration process. This class was added in vSphere API 6.7.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class CreateSpec(name=None, description=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ImportHistory.CreateSpec class contains information to create and start vCenter historical data lazy-import. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • name (str) – Name of the vCenter history import task. This attribute was added in vSphere API 6.7.

  • description (str) – Description of the vCenter history import task. This attribute was added in vSphere API 6.7.

class Info(progress=None, result=None, description=None, service=None, operation=None, parent=None, target=None, status=None, cancelable=None, error=None, start_time=None, end_time=None, user=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ImportHistory.Info class contains attributes to describe the state of vCenter history import task. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • progress (com.vmware.cis.task_client.Progress) – The progress info of this task. This attribute was added in vSphere API 6.7. This attribute is optional and it is only relevant when the value of #status is one of com.vmware.cis.task_client.Status.RUNNING, com.vmware.cis.task_client.Status.FAILED, com.vmware.cis.task_client.Status.BLOCKED, or com.vmware.cis.task_client.Status.SUCCEEDED.

  • result (Notifications or None) – Result of the operation. If an operation reports partial results before it completes, this attribute could be set before the null has the value com.vmware.cis.task_client.Status.SUCCEEDED. The value could change as the operation progresses. This attribute was added in vSphere API 6.7. This attribute will be None if result is not available at the current step of the operation.

  • description (com.vmware.vapi.std_client.LocalizableMessage) – Description of the operation associated with the task.

  • service (str) – Identifier of the service containing the operation. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vapi.service. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vapi.service.

  • operation (str) – Identifier of the operation associated with the task. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vapi.operation. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vapi.operation.

  • parent (str or None) – Parent of the current task. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.cis.task. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.cis.task. This attribute will be None if the task has no parent.

  • target (com.vmware.vapi.std_client.DynamicID or None) – Identifier of the target created by the operation or an existing one the operation performed on. This attribute will be None if the operation has no target or multiple targets.

  • status (com.vmware.cis.task_client.Status) – Status of the operation associated with the task.

  • cancelable (bool) – Flag to indicate whether or not the operation can be cancelled. The value may change as the operation progresses.

  • error (Exception or None) – Description of the error if the operation status is “FAILED”. If None the description of why the operation failed will be included in the result of the operation (see com.vmware.cis.task_client.Info.result).

  • start_time (datetime.datetime) – Time when the operation is started. This attribute is optional and it is only relevant when the value of status is one of com.vmware.cis.task_client.Status.RUNNING, com.vmware.cis.task_client.Status.BLOCKED, com.vmware.cis.task_client.Status.SUCCEEDED, or com.vmware.cis.task_client.Status.FAILED.

  • end_time (datetime.datetime) – Time when the operation is completed. This attribute is optional and it is only relevant when the value of status is one of com.vmware.cis.task_client.Status.SUCCEEDED or com.vmware.cis.task_client.Status.FAILED.

  • user (str or None) – Name of the user who performed the operation. This attribute will be None if the operation is performed by the system.

cancel()

Cancels the task for importing vCenter historical data. This method was added in vSphere API 6.7.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the caller is not authorized to perform the method.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if vCenter historical data import task cannot be canceled at this state. This can happen in the following cases:

  • If historical data import has not been started yet because a not running task cannot be canceled

  • If historical data import has already been completed because a completed task cannot be canceled

Raise

com.vmware.vapi.std.errors_client.AlreadyInDesiredState if vCenter historical data import task is already canceled.

Raise

com.vmware.vapi.std.errors_client.Error Generic error.

get()

Get the current status of the vCenter historical data import. This method was added in vSphere API 6.7.

Return type

ImportHistory.Info

Returns

Info structure containing the status information about the historical data import status.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the caller is not authorized to perform the method.

Raise

com.vmware.vapi.std.errors_client.Error Generic error

pause()

Pauses the task for importing vCenter historical data. This method was added in vSphere API 6.7.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the caller is not authorized to perform the method.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if vCenter historical data import task cannot be paused at this time. Pause can be accepted only in com.vmware.cis.task_client.Status.RUNNING state.

Raise

com.vmware.vapi.std.errors_client.AlreadyInDesiredState if vCenter historical data import task is already paused

Raise

com.vmware.vapi.std.errors_client.Error Generic error

resume()

Resumes the task for importing vCenter historical data. This method was added in vSphere API 6.7.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the caller is not authorized to perform the method.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if vCenter historical data import task cannot be resumed at this state. Resume can be accepted only in com.vmware.cis.task_client.Status.BLOCKED state

Raise

com.vmware.vapi.std.errors_client.AlreadyInDesiredState if vCenter historical data import task is already resumed.

Raise

com.vmware.vapi.std.errors_client.Error Generic error.

start(spec=None)

Creates and starts task for importing vCenter historical data. This method was added in vSphere API 6.7.

Parameters

spec (ImportHistory.CreateSpec or None) –

An optional ImportHistory.CreateSpec info that can be passed for creating a new historical data import task and starts it. If None, default value will be:

  • name : vcenter.deployment.history.import

  • description : vCenter Server history import

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the caller is not authorized to perform the method.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if vCenter historical data import task cannot be started at this time. This can happen in the following cases:

  • If historical data import has already been canceled because a canceled task cannot be re-started

  • If historical data import has already been completed because a completed task cannot be re-started

  • If historical data import has already been paused because a paused task can only be resumed or canceled

Raise

com.vmware.vapi.std.errors_client.AlreadyInDesiredState if vCenter historical data import task has already being started.

Raise

com.vmware.vapi.std.errors_client.Error Generic error

class com.vmware.vcenter.deployment_client.Install(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Install class provides methods to configure the installation of the appliance. This class was added in vSphere API 6.7.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class InstallSpec(vcsa_embedded=None, auto_answer=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Install.InstallSpec class contains information used to configure the appliance installation. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • vcsa_embedded (Install.VcsaEmbeddedSpec) – Spec used to configure an embedded vCenter Server. This field describes how the embedded vCenter Server appliance should be configured. This attribute was added in vSphere API 6.7.

  • auto_answer (bool or None) – Use the default option for any questions that may come up during appliance configuration. This attribute was added in vSphere API 6.7. If None, will default to false.

class VcsaEmbeddedSpec(standalone=None, replicated=None, ceip_enabled=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Install.VcsaEmbeddedSpec class contains information used to configure an embedded standalone or replicated vCenter Server. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • standalone (StandaloneSpec or None) – Spec used to configure a standalone embedded vCenter Server. This field describes how the standalone vCenter Server appliance should be configured. This attribute was added in vSphere API 6.7. If None, will default to None.

  • replicated (ReplicatedSpec or None) – Spec used to configure a replicated embedded vCenter Server. This field describes how the replicated vCenter Server appliance should be configured. This attribute was added in vSphere API 6.7. If None, will default to None.

  • ceip_enabled (bool) – Whether CEIP should be enabled or disabled. This attribute was added in vSphere API 6.7.

cancel()

Cancel the appliance installation that is in progress. This method was added in vSphere API 6.7.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the appliance is not in CONFIG_IN_PROGRESS state and if the operation is not INSTALL.

check(spec)

Run sanity checks using the InstallSpec parameters passed. This method was added in vSphere API 6.7.

Parameters

spec (Install.InstallSpec) – InstallSpec parameters to run sanity check with.

Return type

CheckInfo

Returns

CheckInfo containing the check results.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if external PSC credentials are not valid when configuring PSC to replicate with an external existing PSC.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if external PSC credentials are not valid when configuring a VCSA_EXTERNAL appliance.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if passed arguments are invalid.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the appliance is not in INITIALIZED state.

get()

Get the parameters used to configure the ongoing appliance installation. This method was added in vSphere API 6.7.

Return type

Install.InstallSpec

Returns

InstallSpec parameters being used to configure appliance install.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if appliance is not in INSTALL_PROGRESS state.

start(spec)

Start the appliance installation. This method was added in vSphere API 6.7.

Parameters

spec (Install.InstallSpec) – InstallSpec parameters to configure the appliance install.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the partner PSC credentials are not valid when configuring PSC to replicate with partner PSC.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if external PSC credentials are not valid when configuring a VCSA_EXTERNAL appliance.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if passed arguments are invalid.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the appliance is not in INITIALIZED state.

class com.vmware.vcenter.deployment_client.LocationSpec(hostname=None, https_port=None, ssl_thumbprint=None, ssl_verify=None, username=None, password=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LocationSpec class is used to pass the container ESXi or vCenter server of the VM to patch the size of this appliance. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • hostname (str) – The IP address or DNS resolvable name of the container. This attribute was added in vSphere API 6.7.

  • https_port (long or None) – The HTTPS port of the container. This attribute was added in vSphere API 6.7. If None, port 443 will be used.

  • ssl_thumbprint (str or None) – SHA1 thumbprint of the server SSL certificate will be used for verification. This attribute was added in vSphere API 6.7. This attribute is only relevant if sslVerify is None or has the value true.

  • ssl_verify (bool or None) – SSL verification should be enabled or disabled. If sslVerify is true and and sslThumbprint is None, the CA certificate will be used for verification. If sslVerify is true and sslThumbprint is set then the thumbprint will be used for verification. No verification will be performed if sslVerify value is set to false. This attribute was added in vSphere API 6.7. If None, ssl_verify true will be used.

  • username (str) – The administrator account on the host. This attribute was added in vSphere API 6.7.

  • password (str) – The administrator account password. This attribute was added in vSphere API 6.7.

class com.vmware.vcenter.deployment_client.Notification(id=None, time=None, message=None, resolution=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Notification class contains attributes to describe any info/warning/error messages that Tasks can raise. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • id (str) – The notification id. This attribute was added in vSphere API 6.7.

  • time (datetime.datetime or None) – The time the notification was raised/found. This attribute was added in vSphere API 6.7. Only set if the time information is available.

  • message (com.vmware.vapi.std_client.LocalizableMessage) – The notification message. This attribute was added in vSphere API 6.7.

  • resolution (com.vmware.vapi.std_client.LocalizableMessage or None) – The resolution message, if any. This attribute was added in vSphere API 6.7. Only set for warnings and errors.

class com.vmware.vcenter.deployment_client.Notifications(info=None, warnings=None, errors=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Notifications class contains info/warning/error messages that can be reported be the task. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • info (list of Notification or None) – Info notification messages reported. This attribute was added in vSphere API 6.7. Only set if an info was reported by the task.

  • warnings (list of Notification or None) – Warning notification messages reported. This attribute was added in vSphere API 6.7. Only set if an warning was reported by the task.

  • errors (list of Notification or None) – Error notification messages reported. This attribute was added in vSphere API 6.7. Only set if an error was reported by the task.

class com.vmware.vcenter.deployment_client.Operation(string)

Bases: vmware.vapi.bindings.enum.Enum

The Operation class defines the supported vCenter appliance deployment operations. This enumeration was added in vSphere API 6.7.

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 the Operation instance.

INSTALL = Operation(string='INSTALL')

The appliance installation is in progress. This class attribute was added in vSphere API 6.7.

MIGRATE = Operation(string='MIGRATE')

The appliance migration is in progress. This class attribute was added in vSphere API 6.7.

RESTORE = Operation(string='RESTORE')

The appliance restoration is in progress. This class attribute was added in vSphere API 6.7.

ROLLBACK = Operation(string='ROLLBACK')

The appliance is being rolled back to an unconfigured state. This class attribute was added in vSphere API 6.7.

UPGRADE = Operation(string='UPGRADE')

The appliance upgrade is in progress. This class attribute was added in vSphere API 6.7.

class com.vmware.vcenter.deployment_client.Question(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Question class provides methods to get the question raised during deployment and to answer them. This class was added in vSphere API 6.7.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class AnswerSpec(question_id=None, answer_val=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Question.AnswerSpec class contains attributes to describe the answer to a raised question. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • question_id (str) – Id of the question being answered. This attribute was added in vSphere API 6.7.

  • answer_val (str) – The answer value. This attribute was added in vSphere API 6.7.

class Info(questions=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Question.Info class contains attributes to describe questions raised during the deployment process. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

questions (list of Question.Question) – One or more questions raised during the deployment. This attribute was added in vSphere API 6.7.

class Question(id=None, question=None, type=None, default_answer=None, possible_answers=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Question.Question class contains attributes to describe a deployment question. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • id (str) – Id of the question raised. This attribute was added in vSphere API 6.7.

  • question (com.vmware.vapi.std_client.LocalizableMessage) – Message describing the question. This attribute was added in vSphere API 6.7.

  • type (Question.QuestionType) – Type of the question raised. This attribute was added in vSphere API 6.7.

  • default_answer (str) – Default answer value. This attribute was added in vSphere API 6.7.

  • possible_answers (list of str) – Possible answers values. This attribute was added in vSphere API 6.7.

class QuestionType(string)

Bases: vmware.vapi.bindings.enum.Enum

The Question.QuestionType class defines the type of the question raised. This enumeration was added in vSphere API 6.7.

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 the QuestionType instance.

ABORT_RETRY_IGNORE = QuestionType(string='ABORT_RETRY_IGNORE')

Question with answer values Abort/Retry/Ignore. This class attribute was added in vSphere API 6.7.

OK_CANCEL = QuestionType(string='OK_CANCEL')

Question with answer values Ok/Cancel. This class attribute was added in vSphere API 6.7.

YES_NO = QuestionType(string='YES_NO')

Question with answer values Yes/No. This class attribute was added in vSphere API 6.7.

answer(spec)

Supply answer to the raised question. This method was added in vSphere API 6.7.

Parameters

spec (Question.AnswerSpec) – AnswerSpec with the answer to the raised question.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if passed arguments are invalid.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the appliance is NOT in QUESTION_RAISED state.

Raise

com.vmware.vapi.std.errors_client.InternalServerError if answer file could not be created.

get()

Get the question that was raised during the configuration. This method was added in vSphere API 6.7.

Return type

Question.Info

Returns

Info structure containing the question.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the appliance is not in QUESTION_RAISED state.

Raise

com.vmware.vapi.std.errors_client.InternalServerError if questions could not be retrieved although the appliance is in QUESTION_RAISED state.

class com.vmware.vcenter.deployment_client.RemotePscSpec(psc_hostname=None, https_port=None, sso_admin_password=None, ssl_thumbprint=None, ssl_verify=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The RemotePscSpec class contains information used to configure an external vCenter Server that registers with a remote PSC. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • psc_hostname (str) – The IP address or DNS resolvable name of the remote PSC to which this configuring vCenter Server will be registered to. This attribute was added in vSphere API 6.7.

  • https_port (long or None) – The HTTPS port of the external PSC appliance. This attribute was added in vSphere API 6.7. If None, port 443 will be used.

  • sso_admin_password (str) – The SSO administrator account password. This attribute was added in vSphere API 6.7.

  • ssl_thumbprint (str or None) – SHA1 thumbprint of the server SSL certificate will be used for verification when ssl_verify field is set to true. This attribute was added in vSphere API 6.7. This attribute is only relevant if sslVerify is None or has the value true.

  • ssl_verify (bool or None) – SSL verification should be enabled or disabled. If sslVerify is true and and sslThumbprint is None, the CA certificate will be used for verification. If sslVerify is true and sslThumbprint is set then the thumbprint will be used for verification. No verification will be performed if sslVerify value is set to false. This attribute was added in vSphere API 6.7. If None, sslVerify true will be used.

class com.vmware.vcenter.deployment_client.ReplicatedPscSpec(sso_site_name=None, partner_hostname=None, https_port=None, sso_admin_password=None, ssl_thumbprint=None, ssl_verify=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ReplicatedPscSpec class contains information used to check if the configuring PSC can be replicated to the remote PSC. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • sso_site_name (str or None) – The SSO sitename that will be used in PSC replication. This attribute was added in vSphere API 6.7. If None, default-first-site will be used.

  • partner_hostname (str) – The IP address or DNS resolvable name of the partner PSC appliance. This attribute was added in vSphere API 6.7.

  • https_port (long or None) – The HTTPS port of the external PSC appliance. This attribute was added in vSphere API 6.7. If None, port 443 will be used.

  • sso_admin_password (str) – The SSO administrator account password. This attribute was added in vSphere API 6.7.

  • ssl_thumbprint (str or None) – SHA1 thumbprint of the server SSL certificate will be used for verification. This attribute was added in vSphere API 6.7. This attribute is only relevant if sslVerify is None or has the value true.

  • ssl_verify (bool or None) – SSL verification should be enabled or disabled. This attribute was added in vSphere API 6.7. If None, ssl_verify true will be used.

class com.vmware.vcenter.deployment_client.ReplicatedSpec(partner_hostname=None, https_port=None, sso_admin_password=None, ssl_thumbprint=None, ssl_verify=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ReplicatedSpec class contains information used to check if the configuring vCenter Server can be replicated to the remote PSC. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • partner_hostname (str) – The IP address or DNS resolvable name of the partner PSC appliance. This attribute was added in vSphere API 6.7.

  • https_port (long or None) – The HTTPS port of the external PSC appliance. This attribute was added in vSphere API 6.7. If None, port 443 will be used.

  • sso_admin_password (str) – The SSO administrator account password. This attribute was added in vSphere API 6.7.

  • ssl_thumbprint (str or None) – SHA1 thumbprint of the server SSL certificate will be used for verification. This attribute was added in vSphere API 6.7. This attribute is only relevant if sslVerify is None or has the value true.

  • ssl_verify (bool or None) – SSL verification should be enabled or disabled. This attribute was added in vSphere API 6.7. If None, ssl_verify true will be used.

class com.vmware.vcenter.deployment_client.StandalonePscSpec(sso_site_name=None, sso_admin_password=None, sso_domain_name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The StandalonePscSpec class contains information used to configure a standalone PSC appliance. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • sso_site_name (str or None) – The SSO site name used for this PSC. This attribute was added in vSphere API 6.7. If None, default-first-site will be used.

  • sso_admin_password (str) – The SSO administrator account password. This attribute was added in vSphere API 6.7.

  • sso_domain_name (str or None) – The SSO domain name to be used to configure this appliance. This attribute was added in vSphere API 6.7. If None, vsphere.local will be used.

class com.vmware.vcenter.deployment_client.StandaloneSpec(sso_admin_password=None, sso_domain_name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The StandaloneSpec class contains information used to configure a standalone embedded vCenter Server appliance. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • sso_admin_password (str) – The SSO administrator account password. This attribute was added in vSphere API 6.7.

  • sso_domain_name (str or None) – The SSO domain name to be used to configure this appliance. This attribute was added in vSphere API 6.7. If None, vsphere.local will be used.

class com.vmware.vcenter.deployment_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance

class com.vmware.vcenter.deployment_client.Upgrade(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Upgrade class provides methods to configure the upgrade of this appliance from an existing vCenter appliance. This class was added in vSphere API 6.7.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class PscSpec(ceip_enabled=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Upgrade.PscSpec class contains information used to upgrade a Platform Service Controller appliance. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

ceip_enabled (bool) – Customer experience improvement program should be enabled or disabled for this Platform Services Controller upgrade. This attribute was added in vSphere API 6.7.

class SourceApplianceSpec(hostname=None, https_port=None, ssl_thumbprint=None, ssl_verify=None, sso_admin_username=None, sso_admin_password=None, root_password=None, ssh_verify=None, ssh_thumbprint=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Upgrade.SourceApplianceSpec class contains information used to connect to the appliance used as the source for an upgrade. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • hostname (str) – The IP address or DNS resolvable name of the source appliance. This attribute was added in vSphere API 6.7.

  • https_port (long or None) – The HTTPS port of the source appliance. This attribute was added in vSphere API 6.7. If None, port 443 will be used.

  • ssl_thumbprint (str or None) – SHA1 thumbprint of the server SSL certificate will be used for verification. This attribute was added in vSphere API 6.7. This attribute is only relevant if sslVerify is None or has the value true.

  • ssl_verify (bool or None) – SSL verification should be enabled or disabled for the source appliance validations. By default it is enabled and will use SSL certificate for verification. If thumbprint is provided, will use thumbprint for the verification. This attribute was added in vSphere API 6.7. If None, ssl_verify true will be used.

  • sso_admin_username (str) – The SSO administrator account on the source appliance. This attribute was added in vSphere API 6.7.

  • sso_admin_password (str) – The SSO administrator account password. This attribute was added in vSphere API 6.7.

  • root_password (str) – The password of the root user on the source appliance. This attribute was added in vSphere API 6.7.

  • ssh_verify (bool or None) – Appliance SSH verification should be enabled or disabled. By default it is disabled and will not use any verification. If thumbprint is provided, thumbprint verification will be performed. This attribute was added in vSphere API 6.7. If None, ssh_verify true will be used.

  • ssh_thumbprint (str or None) – MD5 thumbprint of the server SSH key will be used for verification. This attribute was added in vSphere API 6.7. This attribute is only relevant if sshVerify is None or has the value true.

class UpgradeSpec(source_appliance=None, source_location=None, history=None, vcsa_embedded=None, psc=None, auto_answer=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Upgrade.UpgradeSpec class contains information used to configure the appliance upgrade. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • source_appliance (Upgrade.SourceApplianceSpec) – Source appliance spec. This attribute was added in vSphere API 6.7.

  • source_location (LocationSpec) – Source location spec. This attribute was added in vSphere API 6.7.

  • history (HistoryMigrationSpec or None) –

    Determines how vCenter history will be migrated during the upgrade process. vCenter history consists of:

    • Statistics

    • Events

    • Tasks

    By default only core data will be migrated. Use this spec to define which part of vCenter history data will be migrated and when. This attribute was added in vSphere API 6.7. If None, only core database content will be migrated.

  • vcsa_embedded (Upgrade.VcsaEmbeddedSpec or None) – Information that are specific to this embedded vCenter Server. This attribute was added in vSphere API 6.7. If None, ceip_enabled for embedded vcenter server upgrade will default to enabled.

  • psc (Upgrade.PscSpec or None) – Information that are specific to this Platform Services Controller. This attribute was added in vSphere API 6.7. If None, ceip_enabled for psc upgrade will default to enabled.

  • auto_answer (bool or None) – Use the default option for any questions that may come up during appliance configuration. This attribute was added in vSphere API 6.7. If None, will default to false.

class VcsaEmbeddedSpec(ceip_enabled=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Upgrade.VcsaEmbeddedSpec class contains information used to upgrade a Embedded vCenter Server appliance. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

ceip_enabled (bool) – Customer experience improvement program should be enabled or disabled for this embedded vCenter Server upgrade. This attribute was added in vSphere API 6.7.

cancel()

Cancel the appliance upgrade that is in progress. This method was added in vSphere API 6.7.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the appliance is not in CONFIG_IN_PROGRESS state and if the operation is not INSTALL.

check(spec)

Run sanity checks using the UpgradeSpec parameters passed. This method was added in vSphere API 6.7.

Parameters

spec (Upgrade.UpgradeSpec) – UpgradeSpec parameters to run sanity check on.

Return type

CheckInfo

Returns

CheckInfo containing the check results.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if source credentials are not valid.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if source container credentials are not valid.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if passed arguments are invalid.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the appliance is not in INITIALIZED state.

get()

Get the UpgradeSpec parameters used to configure the ongoing appliance upgrade. This method was added in vSphere API 6.7.

Return type

Upgrade.UpgradeSpec

Returns

UpgradeSpec parameters being used to configure appliance upgrade.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if appliance is not in UPGRADE_PROGRESS state.

start(spec)

Start the appliance installation. This method was added in vSphere API 6.7.

Parameters

spec (Upgrade.UpgradeSpec) – UpgradeSpec parameters to configure the appliance upgrade.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if source credentials are not valid.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if source container credentials are not valid.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if passed arguments are invalid.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the appliance is not in INITIALIZED state.

class com.vmware.vcenter.deployment_client.VerificationMode(string)

Bases: vmware.vapi.bindings.enum.Enum

The VerificationMode class defines the verification modes for SSL certificates or SSH connections. This enumeration was added in vSphere API 6.7.

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 the VerificationMode instance.

NONE = VerificationMode(string='NONE')

No verification will be performed. This class attribute was added in vSphere API 6.7.

THUMBPRINT = VerificationMode(string='THUMBPRINT')

Passed thumbprint will be used for verification. This class attribute was added in vSphere API 6.7.

com.vmware.vcenter.guest_client module

The com.vmware.vcenter.guest_client module provides classes for managing guest customization specifications in the vCenter Server.

class com.vmware.vcenter.guest_client.AdapterMapping(mac_address=None, adapter=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The AdapterMapping class specifies the association between a virtual network adapter and its IP settings. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • mac_address (str or None) – The MAC address of a network adapter being customized. This attribute was added in vSphere API 7.0.0. If None, the customization process maps the the settings from the list of AdapterMappings.IPSettings in the CustomizationSpec.interfaces to the virtual machine’s network adapters, in PCI slot order. The first virtual network adapter on the PCI bus is assigned interfaces[0].IPSettings, the second adapter is assigned interfaces[1].IPSettings, and so on.

  • adapter (IPSettings) – The IP settings for the associated virtual network adapter. This attribute was added in vSphere API 7.0.0.

class com.vmware.vcenter.guest_client.ConfigurationSpec(windows_config=None, linux_config=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ConfigurationSpec class specifies the settings for customizing a guest operating system. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • windows_config (WindowsConfiguration or None) – Guest customization specification for a Windows guest operating system. This attribute was added in vSphere API 7.0.0. If None, ConfigurationSpec.linux_config must be set. Otherwise, an appropriate fault will be thrown.

  • linux_config (LinuxConfiguration or None) – Guest customization specification for a linux guest operating system. This attribute was added in vSphere API 7.0.0. If None, ConfigurationSpec.windows_config must be set. Otherwise, an appropriate fault will be thrown.

class com.vmware.vcenter.guest_client.CustomizationSpec(configuration_spec=None, global_dns_settings=None, interfaces=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The CustomizationSpec class contains information required to customize a virtual machine when deploying it or migrating it to a new host. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • configuration_spec (ConfigurationSpec) – Settings to be applied to the guest during the customization. This attribute was added in vSphere API 7.0.0.

  • global_dns_settings (GlobalDNSSettings) – Global DNS settings constitute the DNS settings that are not specific to a particular virtual network adapter. This attribute was added in vSphere API 7.0.0.

  • interfaces (list of AdapterMapping) – IP settings that are specific to a particular virtual network adapter. The AdapterMapping class maps a network adapter’s MAC address to its IPSettings. May be empty if there are no network adapters, else should match number of network adapters configured for the VM. This attribute was added in vSphere API 7.0.0.

class com.vmware.vcenter.guest_client.CustomizationSpecs(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The CustomizationSpecs class provides methods to manage guest customization specifications in the vCenter Server. This class was added in vSphere API 6.7.1.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class CreateSpec(spec=None, description=None, name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The CustomizationSpecs.CreateSpec class contains specification information and specification object that can be passed to the CustomizationSpecs.create() method. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • spec (CustomizationSpec) – The specification object. This attribute was added in vSphere API 7.0.0.

  • description (str) – Description of the specification. This attribute was added in vSphere API 7.0.0.

  • name (str) – Name of the specification. This attribute was added in vSphere API 7.0.0.

class FilterSpec(names=None, os_type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The CustomizationSpecs.FilterSpec class contains attributes used to filter the results when listing guest customization specifications (see CustomizationSpecs.list()). If multiple attributes are specified, only guest customization specifications matching all of the attributes match the filter. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • names (set of str or None) – Names that guest customization specifications must have to match the filter (see CustomizationSpecs.Summary.name). This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: com.vmware.vcenter.guest.CustomizationSpec. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: com.vmware.vcenter.guest.CustomizationSpec. If None or empty, guest customization specifications with any name match the filter.

  • os_type (CustomizationSpecs.OsType or None) – Guest operating system type that guest customization specifications must have to match the filter (see CustomizationSpecs.Summary.os_type). This attribute was added in vSphere API 6.7.1. If None, guest customization specifications with any guest operating system type match the filter.

class Format(string)

Bases: vmware.vapi.bindings.enum.Enum

The CustomizationSpecs.Format class specifies the formats the customization specification can be exported to. This enumeration was added in vSphere API 7.0.0.

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 the Format instance.

JSON = Format(string='JSON')

JSON format. This class attribute was added in vSphere API 7.0.0.

XML = Format(string='XML')

XML format. This class attribute was added in vSphere API 7.0.0.

class Info(last_modified=None, spec=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The CustomizationSpecs.Info class describes a guest customization specification and the timestamp when it was last modified. This is returned by the CustomizationSpecs.get() method. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • last_modified (datetime.datetime) – Time when the specification was last modified. This attribute was added in vSphere API 7.0.0.

  • spec (CustomizationSpecs.Spec) – The Spec object including specification and metadata information. This attribute was added in vSphere API 7.0.0.

class Metadata(description=None, name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The CustomizationSpecs.Metadata class contains metadata i.e. name and description related to a customization specification. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • description (str) – Description of the specification. This attribute was added in vSphere API 7.0.0.

  • name (str) – Name of the specification. This attribute was added in vSphere API 7.0.0.

class OsType(string)

Bases: vmware.vapi.bindings.enum.Enum

The CustomizationSpecs.OsType class defines the types of guest operating systems for which guest customization is supported. This enumeration was added in vSphere API 6.7.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 the OsType instance.

LINUX = OsType(string='LINUX')

A customization specification for a Linux guest operating system. This class attribute was added in vSphere API 6.7.1.

WINDOWS = OsType(string='WINDOWS')

A customization specification for a Windows guest operating system. This class attribute was added in vSphere API 6.7.1.

RESOURCE_TYPE = 'com.vmware.vcenter.guest.CustomizationSpec'

The resource type for a vCenter guest customization specification. This class attribute was added in vSphere API 6.7.1.

class Spec(fingerprint=None, spec=None, description=None, name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The CustomizationSpecs.Spec class contains the specification information and specification object. This is passed to the CustomizationSpecs.set() method. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • fingerprint (str) – The fingerprint is a unique identifier for a given version of the configuration. Each change to the configuration will update this value. A client cannot change this value. If specified when updating a specification, the changes will only be applied if the current fingerprint matches the specified fingerprint. This field can be used to guard against updates that has happened between the specification content was read and until it is applied. This attribute was added in vSphere API 7.0.0.

  • spec (CustomizationSpec) – The specification object. This attribute was added in vSphere API 7.0.0.

  • description (str) – Description of the specification. This attribute was added in vSphere API 7.0.0.

  • name (str) – Name of the specification. This attribute was added in vSphere API 7.0.0.

class Summary(name=None, description=None, os_type=None, last_modified=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The CustomizationSpecs.Summary class contains commonly used information about a guest customization specification. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • name (str) – Name of the guest customization specification. This attribute was added in vSphere API 6.7.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.guest.CustomizationSpec. 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.guest.CustomizationSpec.

  • description (str) – Description of the guest customization specification. This attribute was added in vSphere API 6.7.1.

  • os_type (CustomizationSpecs.OsType) – Guest operating system type for which that this guest customization specification applies. This attribute was added in vSphere API 6.7.1.

  • last_modified (datetime.datetime) – Date and tme when this guest customization specification was last modified. This attribute was added in vSphere API 6.7.1.

create(spec)

Creates a customization specification. This method was added in vSphere API 7.0.0.

Parameters

spec (CustomizationSpecs.CreateSpec) – The information i.e. name, description and the settings i.e hostname, ip address etc for the new customization specification that needs to be created.

Return type

str

Returns

The name of the customization specification that is created. The return value will be an identifier for the resource type: com.vmware.vcenter.guest.CustomizationSpec.

Raise

com.vmware.vapi.std.errors_client.AlreadyExists if a customization specification is already present with the same name.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if the specified specification is not a valid one.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable if the system is unable to communicate with a service to complete the request.

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 doesn’t have the required privileges.

delete(name)

Deletes a customization specification with the specified identifier. This method was added in vSphere API 7.0.0.

Parameters

name (str) – The name of the customization specification that needs to be deleted. The parameter must be an identifier for the resource type: com.vmware.vcenter.guest.CustomizationSpec.

Raise

com.vmware.vapi.std.errors_client.NotFound if a customization specification is not found.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable if the system is unable to communicate with a service to complete the request.

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 doesn’t have the required privileges.

export(name, format)

Returns the content of the customization specification in the specified format. Note that any passwords in the customization specification will be set to blank values during the export method. This method was added in vSphere API 7.0.0.

Parameters
  • name (str) – The name of the customization specification that has to be returned. The parameter must be an identifier for the resource type: com.vmware.vcenter.guest.CustomizationSpec.

  • format (CustomizationSpecs.Format) – The format in which the customization specification has to be returned.

Return type

str

Returns

The string representation of the customization specification in the specified format.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument If value of format is not valid.

Raise

com.vmware.vapi.std.errors_client.NotFound if the customization specification is not found.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable if the system is unable to communicate with a service to complete the request.

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 doesn’t have the required privileges.

get(name)

Returns the guest customization specification from vCenter with the specified identifier. This method was added in vSphere API 7.0.0.

Parameters

name (str) – The name of the customization specification. The parameter must be an identifier for the resource type: com.vmware.vcenter.guest.CustomizationSpec.

Return type

CustomizationSpecs.Info

Returns

A customization spec with the specified identifier.

Raise

com.vmware.vapi.std.errors_client.NotFound if a customization specification is not found.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable if the system is unable to communicate with a service to complete the request.

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 doesn’t have the required privileges.

import_specification(customization_spec)

Converts a well formatted string to a CustomizationSpecs.CreateSpec. The resulting object can be passed to CustomizationSpecs.create() method. This method was added in vSphere API 7.0.0.

Parameters

customization_spec (str) – content to be converted to the spec.

Return type

CustomizationSpecs.CreateSpec

Returns

A proper specification of type CustomizationSpecs.CreateSpec

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if the specified content cannot be properly converted into a proper valid CustomizationSpecs.CreateSpec object.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable if the system is unable to communicate with a service to complete the request.

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 doesn’t have the required privileges.

list(filter=None)

Returns information about at most 1000 visible (subject to permission checks) guest customization specifications in vCenter matching the CustomizationSpecs.FilterSpec. This method was added in vSphere API 6.7.1.

Parameters

filter (CustomizationSpecs.FilterSpec or None) – Specification of matching guest customization specifications for which information should be returned. If None, the behavior is equivalent to a CustomizationSpecs.FilterSpec with all attributes None which means all guest customization specifications match the filter.

Return type

list of CustomizationSpecs.Summary

Returns

Commonly used information about the guest customization specifications matching the CustomizationSpecs.FilterSpec.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if the CustomizationSpecs.FilterSpec.os_type attribute contains a value that is not supported by the server.

Raise

com.vmware.vapi.std.errors_client.UnableToAllocateResource if more than 1000 guest customization specifications match the CustomizationSpecs.FilterSpec.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable if the system is unable to communicate with a service to complete the request.

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 doesn’t have the required privileges.

set(name, spec)

Sets an existing specification, possibly after retrieving (by using CustomizationSpecs.get()) and editing it. This method was added in vSphere API 7.0.0.

Parameters
  • name (str) – The name of the customization specification that needs to be set. The parameter must be an identifier for the resource type: com.vmware.vcenter.guest.CustomizationSpec.

  • spec (CustomizationSpecs.Spec) – The new specification that will overwrite the existing specification.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument If, based on the item’s fingerprint value, the set process detects that the specification has changed since its retrieval, then the method throws InvalidArgument exception to warn the client that he might overwrite another client’s change.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument If the settings in spec are not valid.

Raise

com.vmware.vapi.std.errors_client.NotFound if a customization specification is not found.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable if the system is unable to communicate with a service to complete the request.

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 doesn’t have the required privileges.

class com.vmware.vcenter.guest_client.Domain(type=None, workgroup=None, domain=None, domain_username=None, domain_password=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Domain class specifies the information needed to join a workgroup or domain. This structure maps to the Identification key in the sysprep.xml answer file. These values are transferred into the sysprep.xml file that VirtualCenter stores on the target virtual disk. For more information about performing unattended installation, check https://technet.microsoft.com/en-us/library/cc771830(v=ws.10).aspx. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • type (Domain.Type) – The type of network to join after the customization. This attribute was added in vSphere API 7.0.0.

  • workgroup (str) – The workgroup that the virtual machine should join. This attribute was added in vSphere API 7.0.0. This attribute is optional and it is only relevant when the value of type is Domain.Type.WORKGROUP.

  • domain (str) – The domain to which the virtual machine should be joined. This attribute was added in vSphere API 7.0.0. This attribute is optional and it is only relevant when the value of type is Domain.Type.DOMAIN.

  • domain_username (str) – The domain user that has permission to join the domain after virtual machine is joined. This attribute was added in vSphere API 7.0.0. This attribute is optional and it is only relevant when the value of type is Domain.Type.DOMAIN.

  • domain_password (str) – The domain user password that has permission to join the Domain.domain_username after customization. This attribute was added in vSphere API 7.0.0. This attribute is optional and it is only relevant when the value of type is Domain.Type.DOMAIN.

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

The Domain.Type class defines the types of network the virtual machine should join to after the customization is completed. This enumeration was added in vSphere API 7.0.0.

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 the Type instance.

DOMAIN = Type(string='DOMAIN')

The virtual machine should be be joined to a domain. This class attribute was added in vSphere API 7.0.0.

WORKGROUP = Type(string='WORKGROUP')

The virtual machine should be be joined to a workgroup. This class attribute was added in vSphere API 7.0.0.

class com.vmware.vcenter.guest_client.GlobalDNSSettings(dns_suffix_list=None, dns_servers=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The GlobalDNSSettings class specifies a collection of global IP settings in the guest operating system. In Linux, DNS server settings are global. The settings can either be statically set or supplied by a DHCP server. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • dns_suffix_list (list of str or None) – List of name resolution suffixes for the virtual network adapter. This list applies to both Windows and Linux guest customization. For Linux, this setting is global, whereas in Windows, this setting is listed on a per-adapter basis. This attribute was added in vSphere API 7.0.0. If None, no DNS suffixes are set.

  • dns_servers (list of str or None) – List of DNS servers, for a virtual network adapter with a static IP address. If this list is empty, then the guest operating system is expected to use a DHCP server to get its DNS server settings. These settings configure the virtual machine to use the specified DNS servers. These DNS server settings are listed in the order of preference. This attribute was added in vSphere API 7.0.0. If None, no DNS servers are set.

class com.vmware.vcenter.guest_client.GuiUnattended(auto_logon=None, auto_logon_count=None, password=None, time_zone=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The GuiUnattended class maps to the GuiUnattended key in the sysprep.xml answer file. These values are plugged directly into the sysprep.xml file that VirtualCenter stores on the target virtual disk. For more detailed information about performing unattended installations, check https://technet.microsoft.com/en-us/library/cc771830(v=ws.10).aspx. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • auto_logon (bool) – Flag to determine whether or not the machine automatically logs on as Administrator. See the GuiUnattended.password property. If GuiUnattended.auto_logon flag is set, then GuiUnattended.password must not be None or the guest customization will fail. This attribute was added in vSphere API 7.0.0.

  • auto_logon_count (long) – If the GuiUnattended.auto_logon flag is set, then this property specifies the number of times the machine should automatically log on as Administrator. Generally it should be 1, but if the setup requires a number of reboots, you may want to increase it. This number may be determined by the list of commands. This attribute was added in vSphere API 7.0.0.

  • password (str or None) – The new administrator password for the machine. To specify that the password should be set to blank (that is, no password), leave it unset. This attribute was added in vSphere API 7.0.0. If None, blank password will be used.

  • time_zone (long) – The time zone index for the virtual machine. Numbers correspond to time zones at https://support.microsoft.com/en-us/help/973627/microsoft-time-zone-index-values. This attribute was added in vSphere API 7.0.0.

class com.vmware.vcenter.guest_client.HostnameGenerator(type=None, fixed_name=None, prefix=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The HostnameGenerator class specifies various mechanisms of generating the hostname for the guest inside the virtual machine while customization. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • type (HostnameGenerator.Type) – The type of the Name Generator. This attribute was added in vSphere API 7.0.0.

  • fixed_name (str) – The virtual machine name specified by the client. This attribute was added in vSphere API 7.0.0. This attribute is optional and it is only relevant when the value of type is HostnameGenerator.Type.FIXED.

  • prefix (str) – Base prefix, to which a unique number is appended. This attribute was added in vSphere API 7.0.0. This attribute is optional and it is only relevant when the value of type is HostnameGenerator.Type.PREFIX.

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

The HostnameGenerator.Type class specifies different types of Name Generators. This enumeration was added in vSphere API 7.0.0.

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 the Type instance.

FIXED = Type(string='FIXED')

Specifies that a fixed name should be used for the hostname for the virtual machine during the customization. This class attribute was added in vSphere API 7.0.0.

PREFIX = Type(string='PREFIX')

Specifies that a unique name should be generated by concatenating the base string with a number including the network name of the guest.

Virtual machine names are unique across the set of hosts and virtual machines known to the VirtualCenter instance. VirtualCenter tracks the network names of virtual machines as well as hosts. VMware Tools runs in a guest operating system and reports information to VirtualCenter.. This class attribute was added in vSphere API 7.0.0.

USER_INPUT_REQUIRED = Type(string='USER_INPUT_REQUIRED')

Indicates that the host name is not specified in advance. The user must provide a valid value when the actual customization spec is applied to a virtual machine. This class attribute was added in vSphere API 7.0.0.

VIRTUAL_MACHINE = Type(string='VIRTUAL_MACHINE')

Specifies that the VirtualCenter should generate a virtual machine name.

The name is generated from a base prefix comprising the virtual machine entity name. A number is appended, if necessary, to make it unique.

Virtual machine names are unique across the set of hosts and virtual machines known to the VirtualCenter instance. VirtualCenter tracks the network names of the virtual machines as well as hosts. VMware Tools runs in a guest operating system and reports information to VirtualCenter, including the network name of the guest.. This class attribute was added in vSphere API 7.0.0.

class com.vmware.vcenter.guest_client.IPSettings(ipv4=None, ipv6=None, windows=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The IPSettings class specifies the IP settings for a virtual network adapter. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • ipv4 (Ipv4 or None) – Specification to configure IPv4 address, subnet mask and gateway info for this virtual network adapter. This attribute was added in vSphere API 7.0.0. If None, no IPv4 addresses are set.

  • ipv6 (Ipv6 or None) – Specification to configure IPv6 address, subnet mask and gateway info for this virtual network adapter. This attribute was added in vSphere API 7.0.0. If None, no IPv6 addresses are set.

  • windows (WindowsNetworkAdapterSettings or None) – Windows settings to be configured for this specific virtual Network adapter. This is valid only for Windows guest operating systems. This attribute was added in vSphere API 7.0.0. If None, no specific Windows settings are set.

class com.vmware.vcenter.guest_client.Ipv4(type=None, ip_address=None, prefix=None, gateways=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Ipv4 class specifies the IPv4 settings that need to be applied to a virtual network adapter. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • type (Ipv4.Type) – The type of the IPv4 configuration. This attribute was added in vSphere API 7.0.0.

  • ip_address (str) – The static IPv4 address. This attribute was added in vSphere API 7.0.0. This attribute is optional and it is only relevant when the value of type is Ipv4.Type.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 7.0.0. This attribute is optional and it is only relevant when the value of type is Ipv4.Type.STATIC.

  • gateways (list of str or None) – Gateways for the IPv4 address. This attribute was added in vSphere API 7.0.0. If None, no gateways are set.

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

The Ipv4.Type class specifies different types of the IPv4 configuration. This enumeration was added in vSphere API 7.0.0.

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 the Type instance.

DHCP = Type(string='DHCP')

DHCP configuration. This class attribute was added in vSphere API 7.0.0.

STATIC = Type(string='STATIC')

Static configuration. This class attribute was added in vSphere API 7.0.0.

USER_INPUT_REQUIRED = Type(string='USER_INPUT_REQUIRED')

Indicates that the IPv4 settings are not specified in advance. The user must provide a valid value when the actual customization spec is applied to a virtual machine. This class attribute was added in vSphere API 7.0.0.

class com.vmware.vcenter.guest_client.Ipv6(type=None, ipv6=None, gateways=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Ipv6 class specifies the IPv6 settings that need to be applied to a virtual network adapter. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • type (Ipv6.Type) – The IPv6 configuration type. This attribute was added in vSphere API 7.0.0.

  • ipv6 (list of Ipv6Address) – IPv6 address. This attribute was added in vSphere API 7.0.0. This attribute is optional and it is only relevant when the value of type is Ipv6.Type.STATIC.

  • gateways (list of str or None) – gateways for the IPv6 address. This attribute was added in vSphere API 7.0.0. If None, no gateways are set.

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

The Ipv6.Type class specifies different types of the IPv6 configuration. This enumeration was added in vSphere API 7.0.0.

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 the Type instance.

DHCP = Type(string='DHCP')

DHCP IPv6 configuration. This class attribute was added in vSphere API 7.0.0.

STATIC = Type(string='STATIC')

Static IPv6 configuration. This class attribute was added in vSphere API 7.0.0.

USER_INPUT_REQUIRED = Type(string='USER_INPUT_REQUIRED')

Indicates that the IPv6 settings are not specified in advance. The user must provide a valid value when the actual customization spec is applied to a virtual machine. This class attribute was added in vSphere API 7.0.0.

class com.vmware.vcenter.guest_client.Ipv6Address(ip_address=None, prefix=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Ipv6Address class specifies the the settings for a Static IPv6 configuration. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • ip_address (str) – Static IPv6 Address. This attribute was added in vSphere API 7.0.0.

  • prefix (long) – The CIDR prefix for the interface. This attribute was added in vSphere API 7.0.0.

class com.vmware.vcenter.guest_client.LinuxConfiguration(hostname=None, domain=None, time_zone=None, script_text=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Guest customization Settings to customize a Linux guest operating system.

The LinuxConfiguration class contains settings that identify a Linux machine in the same way that the WindowsConfiguration class identifies a Windows machine.. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • hostname (HostnameGenerator) – The network host name of the Linux virtual machine. This attribute was added in vSphere API 7.0.0.

  • domain (str) – The fully qualified domain name. This attribute was added in vSphere API 7.0.0.

  • time_zone (str or None) –

    The case-sensitive time zone, such as Europe/Sofia. Valid time zone values are based on the tz (time zone) database used by Linux. The values are strings (str) in the form “Area/Location,” in which Area is a continent or ocean name, and Location is the city, island, or other regional designation.

    See the https://kb.vmware.com/kb/2145518 for a list of supported time zones for different versions in Linux.. This attribute was added in vSphere API 7.0.0. If None, time zone is not modified inside guest operating system.

  • script_text (str or None) –

    The script to run before and after Linux guest customization. The max size of the script is 1500 bytes. As long as the script (shell, perl, python…) has the right “#!” in the header, it is supported. The caller should not assume any environment variables when the script is run.

    The script is invoked by the customization engine using the command line: 1) with argument “precustomization” before customization, 2) with argument “postcustomization” after customization. The script should parse this argument and implement pre-customization or post-customization task code details in the corresponding block.

    A Linux shell script example:

    #!/bin/sh if [ x$1 == x"precustomization" ]; then echo "Do Precustomization tasks" #code for pre-customization actions... elif [ x$1 == x"postcustomization" ]; then echo "Do Postcustomization tasks" #code for post-customization actions... fi. This attribute was added in vSphere API 7.0.0.

    If None, no script will be executed.

class com.vmware.vcenter.guest_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance

class com.vmware.vcenter.guest_client.UserData(computer_name=None, full_name=None, organization=None, product_key=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The UserData class specifies the personal data pertaining to the user of the Windows guest operating system. This class maps to the UserData key in the sysprep.xml answer file. These values are transferred directly into the sysprep.xml file that VirtualCenter stores on the target virtual disk. For more detailed information about performing unattended installation, check https://technet.microsoft.com/en-us/library/cc771830(v=ws.10).aspx. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • computer_name (HostnameGenerator) – The computer name of the (Windows) virtual machine. A computer name may contain letters (A-Z), numbers(0-9) and hyphens (-) but no spaces or periods (.). The name may not consist entirely of digits. A computer name is restricted to 15 characters in length. If the computer name is longer than 15 characters, it will be truncated to 15 characters. Check HostnameGenerator for various options. This attribute was added in vSphere API 7.0.0.

  • full_name (str) – Full name of the end user. Note that this is not the username but full name specified in “Firstname Lastname” format. This attribute was added in vSphere API 7.0.0.

  • organization (str) – Name of the organization that owns the computer. This attribute was added in vSphere API 7.0.0.

  • product_key (str) – The product Key to use for activating Windows guest operating system. This attribute was added in vSphere API 7.0.0.

class com.vmware.vcenter.guest_client.WindowsConfiguration(reboot=None, sysprep=None, sysprep_xml=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The WindowsConfiguration class specifies the settings for customizing a windows guest operating system. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
class RebootOption(string)

Bases: vmware.vapi.bindings.enum.Enum

The WindowsConfiguration.RebootOption class specifies what should be done to the guest after the customization. This enumeration was added in vSphere API 7.0.0.

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 the RebootOption instance.

NO_REBOOT = RebootOption(string='NO_REBOOT')

Take no action. Leave the guest OS running after customization. This option can be used to look at values for debugging purposes. This class attribute was added in vSphere API 7.0.0.

REBOOT = RebootOption(string='REBOOT')

Reboot the guest after customization. This class attribute was added in vSphere API 7.0.0.

SHUTDOWN = RebootOption(string='SHUTDOWN')

Shutdown the guest after customization. This class attribute was added in vSphere API 7.0.0.

class com.vmware.vcenter.guest_client.WindowsNetworkAdapterSettings(dns_servers=None, dns_domain=None, wins_servers=None, net_bios_mode=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The WindowsNetworkAdapterSettings class specifies Windows specific Network settings for a virtual network adapter. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • dns_servers (list of str or None) –

    A list of server IP addresses to use for DNS lookup in a Windows guest operating system.

    These servers should be specified in the order of preference. If this list is not empty, and if a DHCP IP address is used, then these settings override the DHCP settings.. This attribute was added in vSphere API 7.0.0. If None, no DNS servers are set.

  • dns_domain (str or None) – A DNS domain suffix such as vmware.com. This attribute was added in vSphere API 7.0.0. If None, no DNS domain is set.

  • wins_servers (list of str or None) – List of WINS Servers to set for the Windows guest operating system. A Maximum of two IP addresses can be specified in this list. The first IP address will be set as the primary WINS server. The second IP address will be set as the secondary WINS server. This attribute was added in vSphere API 7.0.0. If None, no WINS Servers are set.

  • net_bios_mode (WindowsNetworkAdapterSettings.NetBIOSMode or None) – NetBIOS setting for Windows. This attribute was added in vSphere API 7.0.0. If None, existing NetBIOS mode will be retained.

class NetBIOSMode(string)

Bases: vmware.vapi.bindings.enum.Enum

The WindowsNetworkAdapterSettings.NetBIOSMode class specifies different NetBIOS settings for Windows guest operating systems. This enumeration was added in vSphere API 7.0.0.

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 the NetBIOSMode instance.

DISABLE = NetBIOSMode(string='DISABLE')

Never use NetBIOS. This class attribute was added in vSphere API 7.0.0.

ENABLE = NetBIOSMode(string='ENABLE')

Always use NetBIOS. This class attribute was added in vSphere API 7.0.0.

USE_DHCP = NetBIOSMode(string='USE_DHCP')

DHCP server decides whether or not to use NetBIOS. This class attribute was added in vSphere API 7.0.0.

class com.vmware.vcenter.guest_client.WindowsSysprep(gui_run_once_commands=None, user_data=None, domain=None, gui_unattended=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The WindowsSysprep class provides all the settings like user details, administrator details, etc that need to applied for a windows guest operating system during customization. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • gui_run_once_commands (list of str or None) – A list of commands to run at first user logon, after customizing the guest. These commands are directly mapped to the GuiRunOnce key in the sysprep.xml answer file. These commands are transferred into the sysprep.xml file that VirtualCenter stores on the target virtual disk. For more information about performing unattended installation, check https://technet.microsoft.com/en-us/library/cc771830(v=ws.10).aspx The commands listed here ar executed when a user logs on the first time after customization completes. The logon may be driven by GuiUnattended.auto_logon setting. These commands are directly mapped to the GuiRunOnce key in the. This attribute was added in vSphere API 7.0.0. If None, no commands are run.

  • user_data (UserData) – Personal data pertaining to the owner of the virtual machine. This attribute was added in vSphere API 7.0.0.

  • domain (Domain or None) – Information needed to join a workgroup or domain. This attribute was added in vSphere API 7.0.0. If None, the guest will not be joined to any workgroup or a domain.

  • gui_unattended (GuiUnattended) – Information related to unattended installation. This attribute was added in vSphere API 7.0.0.

com.vmware.vcenter.hvc_client module

The com.vmware.vcenter.hvc_client module provides classes to manage hybrid links between a local and remote Platform Service Controller. Usage beyond VMware Cloud on AWS is not supported.

Bases: vmware.vapi.bindings.stub.VapiInterface

The Links class provides methods to create, delete, get information, and list hybrid links between the local and foreign Platform Service Controller (PSC). Usage beyond VMware Cloud on AWS is not supported. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class CertificateInfo(ssl_thumbprint=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Links.CertificateInfo class contains information about the SSL certificate for a destination PSC endpoint. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

ssl_thumbprint (str) – The SHA-256 thumbprint of the SSL certificate for the destination PSC endpoint. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

class CreateSpec(psc_hostname=None, port=None, domain_name=None, username=None, password=None, ssl_thumbprint=None, admin_groups=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Links.CreateSpec class is the specification used for the hybrid link creation. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • psc_hostname (str) – The PSC hostname for the domain to be linked. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • port (str or None) – The HTTPS port of the PSC to be linked. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None 443 will be used as default.

  • domain_name (str) – The domain to which the PSC belongs. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • username (str) – The administrator username of the PSC. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • password (str) – The administrator password of the PSC. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • ssl_thumbprint (str or None) – The ssl thumbprint of the server. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. if None no thumbprint is passed.

  • admin_groups (set of str or None) – List of groups to be added to enable administrator access to. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. if None administrator access will not be set.

class Credentials(user_name=None, password=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Links.Credentials class specifies user credentials to make a successful connection to remote endpoint. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • user_name (str) – Name of the user to authenticate. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • password (str) – Password for the user. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

class Summary(link=None, display_name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Links.Summary class contains information about the hybrid link. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • link (str) – Unique identifier for the link. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.hvc.Links. 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.hvc.Links.

  • display_name (str) – The display name is set to the domain name which was set during create. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

create(spec)

Creates a new hybrid link between the local and foreign PSC. Usage beyond VMware Cloud on AWS is not supported. Warning: This method is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Parameters

spec (Links.CreateSpec) – Specification for the new link to be created.

Return type

str

Returns

The identifier of the newly linked domain. The return value will be an identifier for the resource type: com.vmware.vcenter.hvc.Links.

Raise

com.vmware.vapi.std.errors_client.AlreadyExists If the link already exists.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument If the values of any of the attributes of the spec parameter are not valid.

Raise

com.vmware.vapi.std.errors_client.Unsupported If the PSC or the VC version is not supported.

Raise

com.vmware.vapi.std.errors_client.Unauthorized If the user is not authorized.

Raise

com.vmware.vapi.std.errors_client.UnverifiedPeer If the SSL certificate of the foreign PSC cannot be validated by comparing with the thumbprint provided in Links.CreateSpec.ssl_thumbprint or if Links.CreateSpec.ssl_thumbprint is None. The value of the {\@link UnverifiedPeer#data) attribute will be a class that contains all the attributes defined in Links.CertificateInfo.

Raise

com.vmware.vapi.std.errors_client.Error if the system reports an error while responding to the request.

delete(link)

Deletes an existing hybrid link. Usage beyond VMware Cloud on AWS is not supported. Warning: This method is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Parameters

link (str) – Identifier of the hybrid link. The parameter must be an identifier for the resource type: com.vmware.vcenter.hvc.Links.

Raise

com.vmware.vapi.std.errors_client.NotFound If the hybrid link associated with link does not exist.

Raise

com.vmware.vapi.std.errors_client.Unauthorized If the user is not authorized.

Raise

com.vmware.vapi.std.errors_client.Error if the system reports an error while responding to the request.

list()

Enumerates the list of registered hybrid links. Usage beyond VMware Cloud on AWS is not supported. Warning: This method is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Return type

list of Links.Summary

Returns

The list of hybrid link information.

Raise

com.vmware.vapi.std.errors_client.Error if the system reports an error while responding to the request.

class com.vmware.vcenter.hvc_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.vcenter.identity_client module

The com.vmware.vcenter.identity_client module provides classes to manage VcIdentity.

class com.vmware.vcenter.identity_client.Providers(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Providers interface provides methods to list, read and modify vCenter Server identity providers. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class ConfigType(string)

Bases: vmware.vapi.bindings.enum.Enum

The Providers.ConfigType class contains the possible types of vCenter Server identity providers. Warning: This enumeration is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

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 the ConfigType instance.

Oauth2 = ConfigType(string='Oauth2')

Config for OAuth2. Warning: This class attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Oidc = ConfigType(string='Oidc')

Config for OIDC. Warning: This class attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

class CreateSpec(config_tag=None, oauth2=None, oidc=None, org_ids=None, is_default=None, name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.CreateSpec class contains the information used to create an identity provider. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • config_tag (Providers.ConfigType) – The config type of the identity provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • oauth2 (Providers.Oauth2CreateSpec) – OAuth2 CreateSpec. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oauth2.

  • oidc (Providers.OidcCreateSpec) – OIDC CreateSpec. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oidc.

  • org_ids (set of str or None) – The set of orgIds as part of SDDC creation which provides the basis for tenancy. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, the set will be empty.

  • is_default (bool or None) – Specifies whether the provider is the default provider. Setting isDefault of current provider to True makes all other providers non-default. If no other providers created in this vCenter Server before, this parameter will be disregarded, and the provider will always be set to the default. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None the provider will be the default provider if it is the first provider that is created, and will not be the default provider otherwise.

  • name (str or None) – The user friendly name for the provider. This name can be used for human-readable identification purposes, but it does not have to be unique, as the system will use internal UUIDs to differentiate providers. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, the name will be the empty string

class Info(org_ids=None, config_tag=None, oauth2=None, oidc=None, is_default=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.Info class contains the information about an identity provider. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • org_ids (set of str) – The set of orgIds as part of SDDC creation which provides the basis for tenancy. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • config_tag (Providers.ConfigType) – The config type of the identity provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • oauth2 (Providers.Oauth2Info) – OAuth2 Info. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oauth2.

  • oidc (Providers.OidcInfo) – OIDC Info. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oidc.

  • is_default (bool) – Specifies whether the provider is the default provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

class Oauth2AuthenticationMethod(string)

Bases: vmware.vapi.bindings.enum.Enum

The Providers.Oauth2AuthenticationMethod class contains the possible types of OAuth2 authentication methods. Warning: This enumeration is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

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 the Oauth2AuthenticationMethod instance.

CLIENT_SECRET_BASIC = Oauth2AuthenticationMethod(string='CLIENT_SECRET_BASIC')

Clients that have received a client_secret value from the Authorization Server, authenticate with the Authorization Server in accordance with Section 3.2.1 of OAuth 2.0 [RFC6749] using the HTTP Basic authentication scheme. Warning: This class attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

CLIENT_SECRET_JWT = Oauth2AuthenticationMethod(string='CLIENT_SECRET_JWT')

Clients that have received a client_secret value from the Authorization Server, create a JWT using an HMAC SHA algorithm, such as HMAC SHA-256. The HMAC (Hash-based Message Authentication Code) is calculated using the octets of the UTF-8 representation of the client_secret as the shared key. Warning: This class attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

CLIENT_SECRET_POST = Oauth2AuthenticationMethod(string='CLIENT_SECRET_POST')

Clients that have received a client_secret value from the Authorization Server, authenticate with the Authorization Server in accordance with Section 3.2.1 of OAuth 2.0 [RFC6749] by including the Client Credentials in the request body. Warning: This class attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

PRIVATE_KEY_JWT = Oauth2AuthenticationMethod(string='PRIVATE_KEY_JWT')

Clients that have registered a public key sign a JWT using that key. The client authenticates in accordance with JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [OAuth.JWT] and Assertion Framework for OAuth 2.0 Client Authentication and Authorization Grants [OAuth.Assertions]. Warning: This class attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

class Oauth2CreateSpec(auth_endpoint=None, token_endpoint=None, public_key_uri=None, client_id=None, client_secret=None, claim_map=None, issuer=None, authentication_method=None, auth_query_params=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.Oauth2CreateSpec class contains the information used to create an OAuth2 identity provider. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • auth_endpoint (str) – Authentication/authorization endpoint of the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • token_endpoint (str) – Token endpoint of the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • public_key_uri (str) – Endpoint to retrieve the provider public key for validation. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • client_id (str) – Client identifier to connect to the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • client_secret (str) – The secret shared between the client and the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • claim_map (dict of str and (dict of str and list of str)) – The map used to transform an OAuth2 claim to a corresponding claim that vCenter Server understands. Currently only the key “perms” is supported. The key “perms” is used for mapping the “perms” claim of incoming JWT. The value is another map with an external group as the key and a vCenter Server group as value. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • issuer (str) – The identity provider namespace. It is used to validate the issuer in the acquired OAuth2 token. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • authentication_method (Providers.Oauth2AuthenticationMethod) – Authentication method used by the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • auth_query_params ((dict of str and list of str) or None) –

    key/value pairs that are to be appended to the authEndpoint request.

    How to append to authEndpoint request: If the map is not empty, a “?” is added to the endpoint URL, and combination of each k and each string in the v is added with an “&” delimiter. Details:

    • If the value contains only one string, then the key is added with “k=v”.

    • If the value is an empty list, then the key is added without a “=v”.

    • If the value contains multiple strings, then the key is repeated in the query-string for each string in the value.

    . Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, the map will be empty.

class Oauth2Info(auth_endpoint=None, token_endpoint=None, public_key_uri=None, client_id=None, client_secret=None, claim_map=None, issuer=None, authentication_method=None, auth_query_params=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.Oauth2Info class contains the information about an OAuth2 identity provider. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • auth_endpoint (str) – Authentication/authorization endpoint of the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • token_endpoint (str) – Token endpoint of the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • public_key_uri (str) – Endpoint to retrieve the provider public key for validation. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • client_id (str) – Client identifier to connect to the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • client_secret (str) – The secret shared between the client and the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • claim_map (dict of str and (dict of str and list of str)) – The map used to transform an OAuth2 claim to a corresponding claim that vCenter Server understands. Currently only the key “perms” is supported. The key “perms” is used for mapping the “perms” claim of incoming JWT. The value is another map with an external group as the key and a vCenter Server group as value. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • issuer (str) – The identity provider namespace. It is used to validate the issuer in the acquired OAuth2 token. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • authentication_method (Providers.Oauth2AuthenticationMethod) – Authentication method used by the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • auth_query_params (dict of str and list of str) –

    key/value pairs that are to be appended to the authEndpoint request.

    How to append to authEndpoint request: If the map is not empty, a “?” is added to the endpoint URL, and combination of each k and each string in the v is added with an “&” delimiter. Details:

    • If the value contains only one string, then the key is added with “k=v”.

    • If the value is an empty list, then the key is added without a “=v”.

    • If the value contains multiple strings, then the key is repeated in the query-string for each string in the value.

    . Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

class Oauth2Summary(auth_endpoint=None, token_endpoint=None, client_id=None, authentication_header=None, auth_query_params=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.Oauth2Summary class contains commonly used information about an OAuth2 identity provider. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • auth_endpoint (str) – Authentication/authorization endpoint of the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • token_endpoint (str) – Token endpoint of the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • client_id (str) – Client identifier to connect to the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • authentication_header (str) – The authentication data used as part of request header to acquire or refresh an OAuth2 token. The data format depends on the authentication method used. Example of basic authentication format: Authorization: Basic [base64Encode(clientId + “:” + secret)]. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • auth_query_params (dict of str and list of str) –

    key/value pairs that are to be appended to the authEndpoint request.

    How to append to authEndpoint request: If the map is not empty, a “?” is added to the endpoint URL, and combination of each k and each string in the v is added with an “&” delimiter. Details:

    • If the value contains only one string, then the key is added with “k=v”.

    • If the value is an empty list, then the key is added without a “=v”.

    • If the value contains multiple strings, then the key is repeated in the query-string for each string in the value.

    . Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

class Oauth2UpdateSpec(auth_endpoint=None, token_endpoint=None, public_key_uri=None, client_id=None, client_secret=None, claim_map=None, issuer=None, authentication_method=None, auth_query_params=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.Oauth2UpdateSpec class contains the information used to update the OAuth2 identity provider. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • auth_endpoint (str or None) – Authentication/authorization endpoint of the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

  • token_endpoint (str or None) – Token endpoint of the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

  • public_key_uri (str or None) – Endpoint to retrieve the provider public key for validation. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

  • client_id (str or None) – Client identifier to connect to the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

  • client_secret (str or None) – Shared secret between identity provider and client. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

  • claim_map ((dict of str and (dict of str and list of str)) or None) – The map used to transform an OAuth2 claim to a corresponding claim that vCenter Server understands. Currently only the key “perms” is supported. The key “perms” is used for mapping the “perms” claim of incoming JWT. The value is another map with an external group as the key and a vCenter Server group as value. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

  • issuer (str or None) – The identity provider namespace. It is used to validate the issuer in the acquired OAuth2 token. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

  • authentication_method (Providers.Oauth2AuthenticationMethod or None) – Authentication method used by the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

  • auth_query_params ((dict of str and list of str) or None) – key/value pairs that are to be appended to the authEndpoint request. How to append to authEndpoint request: If the map is not empty, a “?” is added to the endpoint URL, and combination of each k and each string in the v is added with an “&” delimiter. Details: If the value contains only one string, then the key is added with “k=v”. If the value is an empty list, then the key is added without a “=v”. If the value contains multiple strings, then the key is repeated in the query-string for each string in the value. If the map is empty, deletes all params. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

class OidcCreateSpec(discovery_endpoint=None, client_id=None, client_secret=None, claim_map=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.OidcCreateSpec class contains the information used to create an OIDC identity provider. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • discovery_endpoint (str) – Endpoint to retrieve the provider metadata. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • client_id (str) – Client identifier to connect to the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • client_secret (str) – The secret shared between the client and the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • claim_map (dict of str and (dict of str and list of str)) – The map used to transform an OAuth2 claim to a corresponding claim that vCenter Server understands. Currently only the key “perms” is supported. The key “perms” is used for mapping the “perms” claim of incoming JWT. The value is another map with an external group as the key and a vCenter Server group as value. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

class OidcInfo(discovery_endpoint=None, auth_endpoint=None, token_endpoint=None, public_key_uri=None, client_id=None, client_secret=None, claim_map=None, issuer=None, authentication_method=None, auth_query_params=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.OidcInfo class contains information about an OIDC identity provider. OIDC is a discovery protocol for OAuth2 configuration metadata, so Providers.OidcInfo contains additional discovered OAuth2 metadata. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • discovery_endpoint (str) – Endpoint to retrieve the provider metadata. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • auth_endpoint (str) – Authentication/authorization endpoint of the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • token_endpoint (str) – Token endpoint of the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • public_key_uri (str) – Endpoint to retrieve the provider public key for validation. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • client_id (str) – Client identifier to connect to the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • client_secret (str) – The secret shared between the client and the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • claim_map (dict of str and (dict of str and list of str)) – The map used to transform an OAuth2 claim to a corresponding claim that vCenter Server understands. Currently only the key “perms” is supported. The key “perms” is used for mapping the “perms” claim of incoming JWT. The value is another map with an external group as the key and a vCenter Server group as value. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • issuer (str) – The identity provider namespace. It is used to validate the issuer in the acquired OAuth2 token. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • authentication_method (Providers.Oauth2AuthenticationMethod) – Authentication method used by the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • auth_query_params (dict of str and list of str) –

    key/value pairs that are to be appended to the authEndpoint request.

    How to append to authEndpoint request: If the map is not empty, a “?” is added to the endpoint URL, and combination of each k and each string in the v is added with an “&” delimiter. Details:

    • If the value contains only one string, then the key is added with “k=v”.

    • If the value is an empty list, then the key is added without a “=v”.

    • If the value contains multiple strings, then the key is repeated in the query-string for each string in the value.

    . Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

class OidcSummary(auth_endpoint=None, token_endpoint=None, client_id=None, authentication_header=None, auth_query_params=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.OidcSummary class contains commonly used information about an OIDC identity provider. OIDC is a discovery protocol for OAuth2 configuration metadata, so Providers.OidcSummary contains discovered OAuth2 metadata. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • auth_endpoint (str) – Authentication/authorization endpoint of the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • token_endpoint (str) – Token endpoint of the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • client_id (str) – Client identifier to connect to the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • authentication_header (str) – The authentication data used as part of request header to acquire or refresh an OAuth2 token. The data format depends on the authentication method used. Example of basic authentication format: Authorization: Basic [base64Encode(clientId + “:” + secret)]. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • auth_query_params (dict of str and list of str) –

    key/value pairs that are to be appended to the authEndpoint request.

    How to append to authEndpoint request: If the map is not empty, a “?” is added to the endpoint URL, and combination of each k and each string in the v is added with an “&” delimiter. Details:

    • If the value contains only one string, then the key is added with “k=v”.

    • If the value is an empty list, then the key is added without a “=v”.

    • If the value contains multiple strings, then the key is repeated in the query-string for each string in the value.

    . Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

class OidcUpdateSpec(discovery_endpoint=None, client_id=None, client_secret=None, claim_map=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.OidcUpdateSpec class contains the information used to update the OIDC identity provider. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • discovery_endpoint (str or None) – Endpoint to retrieve the provider metadata. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

  • client_id (str or None) – Client identifier to connect to the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

  • client_secret (str or None) – The secret shared between the client and the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

  • claim_map ((dict of str and (dict of str and list of str)) or None) – The map used to transform an OAuth2 claim to a corresponding claim that vCenter Server understands. Currently only the key “perms” is supported. The key “perms” is used for mapping the “perms” claim of incoming JWT. The value is another map with an external group as the key and a vCenter Server group as value. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

class Summary(provider=None, config_tag=None, oauth2=None, oidc=None, is_default=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.Summary class contains commonly used information about an identity provider. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • provider (str) – The identifier of the provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.identity.Providers. 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.identity.Providers.

  • config_tag (Providers.ConfigType) – The config type of the identity provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • oauth2 (Providers.Oauth2Summary) – OAuth2 Summary. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oauth2.

  • oidc (Providers.OidcSummary) – OIDC Summary. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oidc.

  • is_default (bool) – Specifies whether the provider is the default provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

class UpdateSpec(config_tag=None, oauth2=None, oidc=None, org_ids=None, make_default=None, name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.UpdateSpec class contains the information used to update the identity provider. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • config_tag (Providers.ConfigType) – The config type of the identity provider. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • oauth2 (Providers.Oauth2UpdateSpec) – OAuth2 UpdateSpec. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oauth2.

  • oidc (Providers.OidcUpdateSpec) – OIDC UpdateSpec. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oidc.

  • org_ids (set of str or None) – The set orgIds as part of SDDC creation which provides the basis for tenancy. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

  • make_default (bool or None) – Specifies whether to make this the default provider. If makeDefault is set to true, this provider will be flagged as the default provider and any other providers that had previously been flagged as the default will be made non-default. If makeDefault is set to false, this provider’s default flag will not be modified. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

  • name (str or None) – The user friendly name for the provider. This name can be used for human-readable identification purposes, but it does not have to be unique, as the system will use internal UUIDs to differentiate providers. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. If None, leaves value unchanged.

create(spec)

Create a vCenter Server identity provider. Warning: This method is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Parameters

spec (Providers.CreateSpec) – the CreateSpec contains the information used to create the provider

Return type

str

Returns

The identifier of the created identity provider. The return value will be an identifier for the resource type: com.vmware.vcenter.identity.Providers.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if authorization is not given to caller.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if invalid arguments are provided in createSpec.

delete(provider)

Delete a vCenter Server identity provider. Warning: This method is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Parameters

provider (str) – the identifier of the provider to delete The parameter must be an identifier for the resource type: com.vmware.vcenter.identity.Providers.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if authorization is not given to caller.

Raise

com.vmware.vapi.std.errors_client.NotFound if no provider found with the given provider identifier.

get(provider)

Retrieve detailed information of the specified identity provider. Warning: This method is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Parameters

provider (str) – the identifier of the provider The parameter must be an identifier for the resource type: com.vmware.vcenter.identity.Providers.

Return type

Providers.Info

Returns

Detailed information of the specified identity provider.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if authorization is not given to caller.

Raise

com.vmware.vapi.std.errors_client.NotFound if no provider found with the given provider identifier.

list()

Retrieve all identity providers. Warning: This method is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Return type

list of Providers.Summary

Returns

Commonly used information about the identity providers.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if authorization is not given to caller.

update(provider, spec)

Update a vCenter Server identity provider. Warning: This method is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Parameters
  • provider (str) – the identifier of the provider to update The parameter must be an identifier for the resource type: com.vmware.vcenter.identity.Providers.

  • spec (Providers.UpdateSpec) – the UpdateSpec contains the information used to update the provider

Raise

com.vmware.vapi.std.errors_client.Unauthorized if authorization is not given to caller.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if invalid arguments are provided in updateSpec.

Raise

com.vmware.vapi.std.errors_client.NotFound if no provider found with the given provider identifier.

class com.vmware.vcenter.identity_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.vcenter.inventory_client module

The com.vmware.vcenter.inventory_client component provides methods and classes for retrieving vCenter datastore and network information for a given list of identifiers.

class com.vmware.vcenter.inventory_client.Datastore(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Datastore class provides methods to retrieve information about datastores.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class Info(type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Datastore.Info class contains information about a datastore.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

type (str) – Type of the datastore. When clients pass a value of this class as a parameter, the attribute must be one of Datastore or StoragePod. When methods return a value of this class as a return value, the attribute will be one of Datastore or StoragePod.

find(datastores)

Returns datastore information for the specified datastores. The key in the return value dict is the datastore identifier and the value in the dict is the datastore information.

Parameters

datastores (list of str) – Identifiers of the datastores for which information will be returned. The parameter must contain identifiers for the resource type: Datastore.

Return type

dict of str and (Datastore.Info or None)

Returns

Datastore information for the specified datastores. The key in the return value dict is the datastore identifier and the value in the dict is the datastore information. The key in the return value dict will be an identifier for the resource type: Datastore.

Raise

com.vmware.vapi.std.errors_client.NotFound if no datastore can be found for one or more of the datastore identifiers in datastores

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

  • The resource Datastore referenced by the parameter datastores requires System.Read.

class com.vmware.vcenter.inventory_client.Network(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Network class provides methods to retrieve information about vCenter Server networks.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class Info(type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Network.Info class contains information about a vCenter Server network.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

type (str) – Type of the vCenter Server network. When clients pass a value of this class as a parameter, the attribute must be one of Network, DistributedVirtualPortgroup, or OpaqueNetwork. When methods return a value of this class as a return value, the attribute will be one of Network, DistributedVirtualPortgroup, or OpaqueNetwork.

find(networks)

Returns network information for the specified vCenter Server networks. The key in the return value dict is the network identifier and the value in the dict is the network information.

Parameters

networks (list of str) – Identifiers of the vCenter Server networks for which information will be returned. The parameter must contain identifiers for the resource type: Network.

Return type

dict of str and (Network.Info or None)

Returns

Network information for the specified vCenter Server networks. The key in the return value dict is the network identifier and the value in the dict is the network information. The key in the return value dict will be an identifier for the resource type: Network.

Raise

com.vmware.vapi.std.errors_client.NotFound if no datastore can be found for one or more of the vCenter Server network identifiers in networks

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

  • The resource Network referenced by the parameter networks requires System.Read.

class com.vmware.vcenter.inventory_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.vcenter.iso_client module

The com.vmware.vcenter.iso_client module provides classes and classes that will let its client mount or unmount an ISO image on a virtual machine as a CD-ROM.

class com.vmware.vcenter.iso_client.Image(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Provides an interface to mount and unmount an ISO image on a virtual machine.

This is an API that will let its client mount or unmount an ISO image on a virtual machine as a CD-ROM.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

mount(library_item, vm)

Mounts an ISO image from a content library on a virtual machine.

Parameters
  • library_item (str) – The identifier of the library item having the ISO image to mount on the virtual machine. The parameter must be an identifier for the resource type: com.vmware.content.library.Item.

  • vm (str) – The identifier of the virtual machine where the specified ISO image will be mounted. The parameter must be an identifier for the resource type: VirtualMachine.

Return type

str

Returns

The identifier of the newly created virtual CD-ROM backed by the specified ISO image. The return value will be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Cdrom.

Raise

com.vmware.vapi.std.errors_client.NotFound If either vm or the library_item is not found.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument If no .iso file is present on the library item.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState When the operation is not allowed on the virtual machine in its current state.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

  • The resource VirtualMachine referenced by the parameter vm requires VirtualMachine.Config.AddRemoveDevice.

  • The resource com.vmware.content.library.Item referenced by the parameter library_item requires ContentLibrary.DownloadSession.

unmount(vm, cdrom)

Unmounts a previously mounted CD-ROM using an ISO image as a backing.

Parameters
  • vm (str) – The identifier of the virtual machine from which to unmount the virtual CD-ROM. The parameter must be an identifier for the resource type: VirtualMachine.

  • cdrom (str) – The device identifier of the CD-ROM. The parameter must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Cdrom.

Raise

com.vmware.vapi.std.errors_client.NotFound If the virtual machine identified by vm is not found or the cdrom does not identify a virtual CD-ROM in the virtual machine.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState When the operation is not allowed on the virtual machine in its current state.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

  • The resource VirtualMachine referenced by the parameter vm requires VirtualMachine.Config.AddRemoveDevice.

  • The resource com.vmware.vcenter.vm.hardware.Cdrom referenced by the parameter cdrom requires System.Read.

class com.vmware.vcenter.iso_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.vcenter.ovf_client module

The com.vmware.vcenter.ovf_client module provides services to capture and deploy Open Virtualization Format (OVF) packages to and from the content library.

It provides the ability to deploy OVF packages from the content library with support for advanced network topologies, network services, creating virtual appliances and virtual machines in hosts, resource pools or clusters. It also provides the ability to export virtual appliances and virtual machines from hosts, resource pools or clusters as OVF packages to the content library.

class com.vmware.vcenter.ovf_client.CertificateParams(issuer=None, subject=None, is_valid=None, is_self_signed=None, x509=None, type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The CertificateParams class contains information about the public key certificate used to sign the OVF package. This class will only be returned if the OVF package is signed.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • issuer (str) – Certificate issuer. For example: /C=US/ST=California/L=Palo Alto/O=VMware, Inc. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • subject (str) – Certificate subject. For example: /C=US/ST=Massachusetts/L=Hopkinton/O=EMC Corporation/OU=EMC Avamar/CN=EMC Corporation. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • is_valid (bool) – Is the certificate chain validated. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • is_self_signed (bool) – Is the certificate self-signed. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • x509 (str) – The X509 representation of the certificate. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • type (str) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

class com.vmware.vcenter.ovf_client.DeploymentOption(key=None, label=None, description=None, default_choice=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The DeploymentOption class contains the information about a deployment option as defined in the OVF specification.

This corresponds to the ovf:Configuration element of the ovf:DeploymentOptionSection in the specification. The ovf:DeploymentOptionSection specifies a discrete set of intended resource allocation configurations. This class represents one item from that set.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • key (str) – The key of the deployment option, corresponding to the ovf:id attribute in the OVF descriptor. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • label (str) – A localizable label for the deployment option. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • description (str) – A localizable description for the deployment option. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • default_choice (bool) – A bool flag indicates whether this deployment option is the default choice. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package. If None or false, it is not the default.

class com.vmware.vcenter.ovf_client.DeploymentOptionParams(deployment_options=None, selected_key=None, type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The DeploymentOptionParams class describes the possible deployment options as well as the choice provided by the user.

This information based on the ovf:DeploymentOptionSection.

See LibraryItem.deploy() and LibraryItem.filter().

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • deployment_options (list of DeploymentOption) – list of deployment options. This attribute corresponds to the ovf:Configuration elements of the ovf:DeploymentOptionSection in the specification. It is a discrete set of intended resource allocation configurations from which one can be selected. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • selected_key (str) – The selected deployment option. Identifies the DeploymentOption in the list in the deploymentOptions attribute with a matching value in the DeploymentOption.key attribute. This attribute is optional in the input parameters when deploying an OVF package. If None the server will use the default deployment configuration, usually it’s the first one in DeploymentOptionParams.deployment_options list. This attribute is optional in the result when retrieving information about an OVF package. The value will be set only if it is specified with the optional ovf:default attribute.

  • type (str) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

class com.vmware.vcenter.ovf_client.DiskProvisioningType(string)

Bases: vmware.vapi.bindings.enum.Enum

The DiskProvisioningType class defines the virtual disk provisioning types that can be set for a disk on the target platform.

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 the DiskProvisioningType instance.

eagerZeroedThick = DiskProvisioningType(string='eagerZeroedThick')

An eager zeroed thick provisioned virtual disk has all space allocated and wiped clean of any previous contents on the physical media at creation time.

Disks specified as eager zeroed thick may take longer time to create than disks specified with the other disk provisioning types.

thick = DiskProvisioningType(string='thick')

A thick provisioned virtual disk has all space allocated at creation time and the space is zeroed on demand as the space is used.

thin = DiskProvisioningType(string='thin')

A thin provisioned virtual disk has space allocated and zeroed on demand as the space is used.

class com.vmware.vcenter.ovf_client.ExportFlag(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The ExportFlag class provides methods for retrieving information about the export flags supported by the server. Export flags can be specified in a LibraryItem.CreateSpec to customize an OVF export.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class Info(option=None, description=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ExportFlag.Info class describes an export flag supported by the server.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
list()

Returns information about the supported export flags by the server.

The supported flags are:

PRESERVE_MAC

Include MAC addresses for network adapters.

EXTRA_CONFIG

Include extra configuration in OVF export.

Future server versions might support additional flags.

Return type

list of ExportFlag.Info

Returns

A list of supported export flags.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

class com.vmware.vcenter.ovf_client.ExtraConfig(key=None, value=None, virtual_system_id=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ExtraConfig class contains the information about a vmw:ExtraConfig element which can be used to specify configuration settings that are transferred directly to the .vmx file. The behavior of the vmw:ExtraConfig element is similar to the extraConfig property of the VirtualMachineConfigSpec object in the VMware vSphere API. Thus, the same restrictions apply, such as you cannot set values that could otherwise be set with other properties in the VirtualMachineConfigSpec object. See the VMware vSphere API reference for details on this.

vmw:ExtraConfig elements may occur as direct child elements of a VirtualHardwareSection, or as child elements of individual virtual hardware items.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • key (str) – The key of the ExtraConfig element. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • value (str) – The value of the ExtraConfig element. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • virtual_system_id (str) – The identifier of the virtual system containing the vmw:ExtraConfig element. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

class com.vmware.vcenter.ovf_client.ExtraConfigParams(extra_configs=None, exclude_keys=None, include_keys=None, type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ExtraConfigParams class contains the parameters with information about the vmw:ExtraConfig elements in an OVF package.

vmw:ExtraConfig elements can be used to specify configuration settings that are transferred directly to the .vmx file.

The behavior of the vmw:ExtraConfig element is similar to the extraConfig property of the VirtualMachineConfigSpec object in the VMware vSphere API. Thus, the same restrictions apply, such as you cannot set values that could otherwise be set with other properties in the VirtualMachineConfigSpec object. See the VMware vSphere API reference for details on this.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • extra_configs (list of ExtraConfig) – list of vmw:ExtraConfig elements in the OVF package. This attribute is optional in the input parameters when deploying an OVF package. If None there are no extra configuration elements to use for this OVF package deployment. This attribute will always be present in the result when retrieving information about an OVF package. It will be an empty list if there are no extra configuration elements in the OVF package.

  • exclude_keys (list of str) –

    Specifies which extra configuration items in the list in the extraConfigs field should be ignored during deployment.

    If set, the given keys for extra configurations will be ignored during deployment. The key is defined in the ExtraConfig.key attribute. This attribute is optional in the input parameters when deploying an OVF package. It is an error to set both this and ExtraConfigParams.include_keys. This attribute is optional in the result when retrieving information about an OVF package. It is an error to set both this and ExtraConfigParams.include_keys.

  • include_keys (list of str) –

    Specifies which extra configuration items in the list in the extraConfigs field should be included during deployment.

    If set, all but the given keys for extra configurations will be ignored during deployment. The key is defined in the ExtraConfig.key attribute. This attribute is optional in the input parameters when deploying an OVF package. It is an error to set both this and ExtraConfigParams.exclude_keys. This attribute is optional in the result when retrieving information about an OVF package. It is an error to set both this and ExtraConfigParams.exclude_keys.

  • type (str) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

class com.vmware.vcenter.ovf_client.ImportFlag(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The ImportFlag class provides methods for retrieving information about the import flags supported by the deployment platform. Import flags can be specified in a LibraryItem.ResourcePoolDeploymentSpec to customize an OVF deployment.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class Info(option=None, description=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ImportFlag.Info class describes an import flag supported by the deployment platform.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
list(rp)

Returns information about the import flags supported by the deployment platform.

The supported flags are:

LAX

Lax mode parsing of the OVF descriptor.

Future server versions might support additional flags.

Parameters

rp (str) – The identifier of resource pool target for retrieving the import flag(s). The parameter must be an identifier for the resource type: ResourcePool.

Return type

list of ImportFlag.Info

Returns

A list of supported import flags.

Raise

com.vmware.vapi.std.errors_client.NotFound If the resource pool associated with rp does not exist.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

  • The resource ResourcePool referenced by the parameter rp requires System.Read.

class com.vmware.vcenter.ovf_client.IpAllocationParams(supported_allocation_scheme=None, supported_ip_allocation_policy=None, ip_allocation_policy=None, supported_ip_protocol=None, ip_protocol=None, type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The IpAllocationParams class specifies how IP addresses are allocated to OVF properties. In particular, it informs the deployment platform whether the guest supports IPv4, IPv6, or both. It also specifies whether the IP addresses can be obtained through DHCP or through the properties provided in the OVF environment.

Ovf Property elements are exposed to the guest software through the OVF environment. Each Property element exposed in the OVF environment shall be constructed from the value of the ovf:key attribute. A Property element contains a key/value pair, it may optionally specify type qualifiers using the ovf:qualifiers attribute with multiple qualifiers separated by commas.

The settings in IpAllocationParams class are global to a deployment. Thus, if a virtual machine is part of a virtual appliance, then its settings are ignored and the settings for the virtual appliance is used.

This information is based on the vmw:IpAssignmentSection in OVF package.

See LibraryItem.deploy() and LibraryItem.filter().

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • supported_allocation_scheme (list of IpAllocationParams.IpAllocationScheme) – Specifies the IP allocation schemes supported by the guest software. This attribute defines the valid values for the IP allocation policy. This setting is often configured by the virtual appliance template author or OVF package author to reflect what the guest software supports, and the IP allocation policy is configured at deployment time. See IpAllocationParams.ip_allocation_policy. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • supported_ip_allocation_policy (list of IpAllocationParams.IpAllocationPolicy) – Specifies the IP allocation policies supported. The set of valid options for the policy is based on the capabilities of the virtual appliance software, as specified by the IpAllocationParams.supported_allocation_scheme attribute. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • ip_allocation_policy (IpAllocationParams.IpAllocationPolicy) – Specifies how IP allocation is done through an IP Pool. This is typically specified by the deployer. This attribute is optional in the input parameters when deploying an OVF package. If None there is no IP allocation policy. This attribute will always be present in the result when retrieving information about an OVF package.

  • supported_ip_protocol (list of IpAllocationParams.IpProtocol) – Specifies the IP protocols supported by the guest. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • ip_protocol (IpAllocationParams.IpProtocol) – Specifies the chosen IP protocol for this deployment. This must be one of the IP protocols supported by the guest software. See IpAllocationParams.supported_ip_protocol. This attribute is optional in the input parameters when deploying an OVF package. If None there is no IP protocol chosen. This attribute will always be present in the result when retrieving information about an OVF package.

  • type (str) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

class IpAllocationPolicy(string)

Bases: vmware.vapi.bindings.enum.Enum

The IpAllocationParams.IpAllocationPolicy class defines the possible IP allocation policy for a deployment.

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 the IpAllocationPolicy instance.

DHCP = IpAllocationPolicy(string='DHCP')

Specifies that DHCP will be used to allocate IP addresses.

STATIC_IPPOOL = IpAllocationPolicy(string='STATIC_IPPOOL')

Specifies that IP addresses are allocated from the range managed by an IP pool. The IP addresses are allocated at first power-on, and remain allocated at power-off. This ensures that a virtual appliance gets a consistent IP for its life-time.

STATIC_MANUAL = IpAllocationPolicy(string='STATIC_MANUAL')

Specifies that IP addresses are configured manually upon deployment, and will be kept until reconfigured or the virtual appliance destroyed. This ensures that a property gets a consistent IP for its lifetime.

TRANSIENT_IPPOOL = IpAllocationPolicy(string='TRANSIENT_IPPOOL')

Specifies that IP addresses are allocated from an IP pool. The IP addresses are allocated when needed, typically at power-on, and deallocated during power-off. There is no guarantee that a property will receive same IP address when restarted.

class IpAllocationScheme(string)

Bases: vmware.vapi.bindings.enum.Enum

The IpAllocationParams.IpAllocationScheme class defines the possible IP allocation schemes that can be supported by the guest software.

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 the IpAllocationScheme instance.

DHCP = IpAllocationScheme(string='DHCP')

It supports DHCP to acquire IP configuration.

OVF_ENVIRONMENT = IpAllocationScheme(string='OVF_ENVIRONMENT')

It supports setting the IP configuration through the properties provided in the OVF environment.

class IpProtocol(string)

Bases: vmware.vapi.bindings.enum.Enum

The IpAllocationParams.IpProtocol class defines the IP protocols supported by the guest software.

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 the IpProtocol instance.

IPV4 = IpProtocol(string='IPV4')

It supports the IPv4 protocol.

IPV6 = IpProtocol(string='IPV6')

It supports the IPv6 protocol.

class com.vmware.vcenter.ovf_client.LibraryItem(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The LibraryItem class provides methods to deploy virtual machines and virtual appliances from library items containing Open Virtualization Format (OVF) packages in content library, as well as methods to create library items in content library from virtual machines and virtual appliances.

To deploy a virtual machine or a virtual appliance from a library item:

  1. Create a LibraryItem.DeploymentTarget to specify the target deployment type and target deployment designation.

  2. Create a LibraryItem.ResourcePoolDeploymentSpec to specify the parameters for the target deployment.

  3. Use the deploy method with the created target and parameter specifications, along with the identifier of the specified source content library item. See LibraryItem.deploy().

To create a library item in content library from a virtual machine or virtual appliance:

  1. Create a LibraryItem.DeployableIdentity to specify the source virtual machine or virtual appliance to be used as the OVF template source.

  2. Create a LibraryItem.CreateTarget to specify the target library and library item.

  3. Create a LibraryItem.CreateSpec to specify the settings for the OVF package to be created.

  4. Use the create method with the created target and parameter specifications, along with the specified source entity. See LibraryItem.create().

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class CreateResult(succeeded=None, ovf_library_item_id=None, error=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItem.CreateResult class defines the result of the create method. See LibraryItem.create().

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • succeeded (bool) – Whether the create method completed successfully.

  • ovf_library_item_id (str or None) – Identifier of the created or updated library item. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.content.library.Item. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.content.library.Item. If None, the create method failed and LibraryItem.CreateResult.error will describe the error(s) that caused the failure.

  • error (LibraryItem.ResultInfo or None) – Errors, warnings, and informational messages produced by the create method. If None, no errors, warnings, or informational messages were reported by the create method.

class CreateSpec(name=None, description=None, flags=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItem.CreateSpec class defines the information used to create or update a library item containing an OVF package.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • name (str or None) – Name to use in the OVF descriptor stored in the library item. If None, the server will use source’s current name.

  • description (str or None) – Description to use in the OVF descriptor stored in the library item. If None, the server will use source’s current annotation.

  • flags (list of str or None) – Flags to use for OVF package creation. The supported flags can be obtained using ExportFlag.list(). If None, no flags will be used.

class CreateTarget(library_id=None, library_item_id=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItem.CreateTarget class specifies the target library item when capturing a virtual machine or virtual appliance as an OVF package in a library item in a content library. The target can be an existing library item, which will be updated, creating a new version, or it can be a newly created library item in a specified library. See LibraryItem.create().

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • library_id (str or None) – Identifier of the library in which a new library item should be created. This attribute is not used if the libraryItemId attribute is specified. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.content.Library. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.content.Library. If None, the libraryItemId attribute must be specified.

  • library_item_id (str or None) – Identifier of the library item that should be should be updated. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.content.library.Item. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.content.library.Item. If None, a new library item will be created. The libraryId attribute must be specified if this attribute is None.

DEPLOYABLE = ['VirtualMachine', 'VirtualApp']

The types of resources that can be created by deploying an OVF package and can be captured to create a library item using the LibraryItem class.

class DeployableIdentity(type=None, id=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItem.DeployableIdentity class describes the resource created by a deployment, or the source resource from which library item can be created, by specifying its resource type and resource identifier.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • type (str) – Type of the deployable resource. When clients pass a value of this class as a parameter, the attribute must be one of VirtualMachine or VirtualApp. When methods return a value of this class as a return value, the attribute will be one of VirtualMachine or VirtualApp.

  • id (str) – Identifier of the deployable resource. When clients pass a value of this class as a parameter, the attribute must be an identifier for one of these resource types: null or null. When methods return a value of this class as a return value, the attribute will be an identifier for one of these resource types: null or null.

class DeploymentResult(succeeded=None, resource_id=None, error=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItem.DeploymentResult class defines the result of the deploy method. See LibraryItem.deploy().

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • succeeded (bool) – Whether the deploy method completed successfully.

  • resource_id (LibraryItem.DeployableIdentity or None) – Identifier of the deployed resource entity. If None, the deploy method failed and LibraryItem.DeploymentResult.error will describe the error(s) that caused the failure.

  • error (LibraryItem.ResultInfo or None) – Errors, warnings, and informational messages produced by the deploy method. If None, no errors, warnings, or informational messages were reported by the deploy method.

class DeploymentTarget(resource_pool_id=None, host_id=None, folder_id=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItem.DeploymentTarget class describes the location (target) where a virtual machine or virtual appliance should be deployed. It is used in the deploy and filter methods. See LibraryItem.deploy() and LibraryItem.filter().

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • resource_pool_id (str) – Identifier of the resource pool to which the virtual machine or virtual appliance should be attached. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: ResourcePool. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: ResourcePool.

  • host_id (str or None) – Identifier of the target host on which the virtual machine or virtual appliance will run. The target host must be a member of the cluster that contains the resource pool identified by LibraryItem.DeploymentTarget.resource_pool_id. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: HostSystem. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: HostSystem. If None, the server will automatically select a target host from the resource pool if LibraryItem.DeploymentTarget.resource_pool_id is a stand-alone host or a cluster with Distributed Resource Scheduling (DRS) enabled.

  • folder_id (str or None) – Identifier of the vCenter folder that should contain the virtual machine or virtual appliance. The folder must be virtual machine folder. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: Folder. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: Folder. If None, the server will choose the deployment folder.

class OvfSummary(name=None, annotation=None, eulas=None, networks=None, storage_groups=None, additional_params=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItem.OvfSummary class defines the result of the filter method. See LibraryItem.filter(). The attributes in the class describe parameterizable information in the OVF descriptor, with respect to a deployment target, for the deploy method. See LibraryItem.deploy().

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • name (str or None) – Default name for the virtual machine or virtual appliance. If None, the OVF descriptor did not specify a name.

  • annotation (str or None) – Default annotation for the virtual machine or virtual appliance. If None, the OVF descriptor did not specify an annotation.

  • eulas (list of str) – End User License Agreements specified in the OVF descriptor. All end user license agreements must be accepted in order for the deploy method to succeed. See LibraryItem.ResourcePoolDeploymentSpec.accept_all_eula.

  • networks (list of str or None) – Section identifiers for sections of type ovf:NetworkSection in the OVF descriptor. These identifiers can be used as keys in LibraryItem.ResourcePoolDeploymentSpec.network_mappings. If None, the OVF descriptor did not specify any networks.

  • storage_groups (list of str or None) – Section identifiers for sections of type vmw:StorageGroupSection in the OVF descriptor. These identifiers can be used as keys in LibraryItem.ResourcePoolDeploymentSpec.storage_mappings. If None, the OVF descriptor did not specify any storage groups.

  • additional_params (list of vmware.vapi.struct.VapiStruct or None) – Additional OVF parameters which can be specified for the deployment target. These OVF parameters can be inspected, optionally modified, and used as values in LibraryItem.ResourcePoolDeploymentSpec.additional_parameters for the deploy method. When clients pass a value of this class as a parameter, the attribute must contain all the attributes defined in OvfParams. When methods return a value of this class as a return value, the attribute will contain all the attributes defined in OvfParams. If None, the OVF descriptor does not require addtional parameters or does not have additional parameters suitable for the deployment target.

class ResourcePoolDeploymentSpec(name=None, annotation=None, accept_all_eula=None, network_mappings=None, storage_mappings=None, storage_provisioning=None, storage_profile_id=None, locale=None, flags=None, additional_parameters=None, default_datastore_id=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItem.ResourcePoolDeploymentSpec class defines the deployment parameters that can be specified for the deploy method where the deployment target is a resource pool. See LibraryItem.deploy().

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • name (str or None) – Name assigned to the deployed target virtual machine or virtual appliance. If None, the server will use the name from the OVF package.

  • annotation (str or None) – Annotation assigned to the deployed target virtual machine or virtual appliance. If None, the server will use the annotation from the OVF package.

  • accept_all_eula (bool) – Whether to accept all End User License Agreements. See LibraryItem.OvfSummary.eulas.

  • network_mappings ((dict of str and str) or None) – Specification of the target network to use for sections of type ovf:NetworkSection in the OVF descriptor. The key in the dict is the section identifier of the ovf:NetworkSection section in the OVF descriptor and the value is the target network to be used for deployment. When clients pass a value of this class as a parameter, the value in the attribute dict must be an identifier for the resource type: Network. When methods return a value of this class as a return value, the value in the attribute dict will be an identifier for the resource type: Network. If None, the server will choose a network mapping.

  • storage_mappings ((dict of str and LibraryItem.StorageGroupMapping) or None) – Specification of the target storage to use for sections of type vmw:StorageGroupSection in the OVF descriptor. The key in the dict is the section identifier of the ovf:StorageGroupSection section in the OVF descriptor and the value is the target storage specification to be used for deployment. See LibraryItem.StorageGroupMapping. If None, the server will choose a storage mapping.

  • storage_provisioning (DiskProvisioningType or None) – Default storage provisioning type to use for all sections of type vmw:StorageSection in the OVF descriptor. If None, the server will choose the provisioning type.

  • storage_profile_id (str or None) – Default storage profile to use for all sections of type vmw:StorageSection in the OVF descriptor. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: StorageProfile. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: StorageProfile. If None, the server will choose the default profile.

  • locale (str or None) – The locale to use for parsing the OVF descriptor. If None, the server locale will be used.

  • flags (list of str or None) – Flags to be use for deployment. The supported flag values can be obtained using ImportFlag.list(). If None, no flags will be used.

  • additional_parameters (list of vmware.vapi.struct.VapiStruct or None) –

    Additional OVF parameters that may be needed for the deployment. Additional OVF parameters may be required by the OVF descriptor of the OVF package in the library item. Examples of OVF parameters that can be specified through this attribute include, but are not limited to:

    When clients pass a value of this class as a parameter, the attribute must contain all the attributes defined in OvfParams. When methods return a value of this class as a return value, the attribute will contain all the attributes defined in OvfParams. If None, the server will choose default settings for all parameters necessary for the deploy method. See LibraryItem.deploy().

  • default_datastore_id (str or None) – Default datastore to use for all sections of type vmw:StorageSection in the OVF descriptor. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: Datastore. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: Datastore. If None, the server will choose the default datastore.

class ResultInfo(errors=None, warnings=None, information=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItem.ResultInfo class defines the information returned along with the result of a create or deploy method to describe errors, warnings, and informational messages produced by the server.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • errors (list of OvfError) – Errors reported by the create or deploy method. These errors would have prevented the create or deploy method from completing successfully.

  • warnings (list of OvfWarning) – Warnings reported by the create or deploy method. These warnings would not have prevented the create or deploy method from completing successfully, but there might be issues that warrant attention.

  • information (list of OvfInfo) – Information messages reported by the create or deploy method. For example, a non-required parameter was ignored.

class StorageGroupMapping(type=None, datastore_id=None, storage_profile_id=None, provisioning=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItem.StorageGroupMapping class defines the storage deployment target and storage provisioning type for a section of type vmw:StorageGroupSection in the OVF descriptor.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • type (LibraryItem.StorageGroupMapping.Type) – Type of storage deployment target to use for the vmw:StorageGroupSection section. The specified value must be LibraryItem.StorageGroupMapping.Type.DATASTORE or LibraryItem.StorageGroupMapping.Type.STORAGE_PROFILE.

  • datastore_id (str) – Target datastore to be used for the storage group. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: Datastore. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: Datastore. This attribute is optional and it is only relevant when the value of type is LibraryItem.StorageGroupMapping.Type.DATASTORE.

  • storage_profile_id (str) – Target storage profile to be used for the storage group. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: StorageProfile. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: StorageProfile. This attribute is optional and it is only relevant when the value of type is LibraryItem.StorageGroupMapping.Type.STORAGE_PROFILE.

  • provisioning (DiskProvisioningType or None) – Target provisioning type to use for the storage group. If None, LibraryItem.ResourcePoolDeploymentSpec.storage_provisioning will be used.

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

The LibraryItem.StorageGroupMapping.Type class defines the supported types of storage targets for sections of type vmw:StorageGroupSection in the OVF descriptor.

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 the Type instance.

DATASTORE = Type(string='DATASTORE')

Storage deployment target is a datastore.

STORAGE_PROFILE = Type(string='STORAGE_PROFILE')

Storage deployment target is a storage profile.

create(source, target, create_spec, client_token=None)

Creates a library item in content library from a virtual machine or virtual appliance.

This method creates a library item in content library whose content is an OVF package derived from a source virtual machine or virtual appliance, using the supplied create specification. The OVF package may be stored as in a newly created library item or in an in an existing library item. For an existing library item whose content is updated by this method, the original content is overwritten.

Parameters
  • client_token (str or None) – Client-generated token used to retry a request if the client fails to get a response from the server. If the original request succeeded, the result of that request will be returned, otherwise the operation will be retried. If None, the server will create a token.

  • source (LibraryItem.DeployableIdentity) – Identifier of the virtual machine or virtual appliance to use as the source.

  • target (LibraryItem.CreateTarget) – Specification of the target content library and library item.

  • create_spec (LibraryItem.CreateSpec) – Information used to create the OVF package from the source virtual machine or virtual appliance.

Return type

LibraryItem.CreateResult

Returns

Information about the success or failure of the method, along with the details of the result or failure.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if create_spec contains invalid arguments.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if source describes an unexpected resource type.

Raise

com.vmware.vapi.std.errors_client.NotFound if the virtual machine or virtual appliance specified by source does not exist.

Raise

com.vmware.vapi.std.errors_client.NotFound if the library or library item specified by target does not exist.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the operation cannot be performed because of the specified virtual machine or virtual appliance’s current state. For example, if the virtual machine configuration information is not available, or if the virtual appliance is running.

Raise

com.vmware.vapi.std.errors_client.ResourceInaccessible if there was an error accessing a file from the source virtual machine or virtual appliance.

Raise

com.vmware.vapi.std.errors_client.ResourceBusy if the specified virtual machine or virtual appliance is busy.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

  • The resource null or null referenced by the attribute LibraryItem.DeployableIdentity.id requires VApp.Export.

  • The resource com.vmware.content.Library referenced by the attribute LibraryItem.CreateTarget.library_id requires ContentLibrary.AddLibraryItem.

  • The resource com.vmware.content.library.Item referenced by the attribute LibraryItem.CreateTarget.library_item_id requires System.Read.

deploy(ovf_library_item_id, target, deployment_spec, client_token=None)

Deploys an OVF package stored in content library to a newly created virtual machine or virtual appliance.

This method deploys an OVF package which is stored in the library item specified by ovf_library_item_id. It uses the deployment specification in deployment_spec to deploy the OVF package to the location specified by target.

Parameters
  • client_token (str or None) – Client-generated token used to retry a request if the client fails to get a response from the server. If the original request succeeded, the result of that request will be returned, otherwise the operation will be retried. If None, the server will create a token.

  • ovf_library_item_id (str) – Identifier of the content library item containing the OVF package to be deployed. The parameter must be an identifier for the resource type: com.vmware.content.library.Item.

  • target (LibraryItem.DeploymentTarget) – Specification of the deployment target.

  • deployment_spec (LibraryItem.ResourcePoolDeploymentSpec) – Specification of how the OVF package should be deployed to the target.

Return type

LibraryItem.DeploymentResult

Returns

Information about the success or failure of the method, along with the details of the result or failure.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if target contains invalid arguments.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if deployment_spec contains invalid arguments or has attributes that are inconsistent with target.

Raise

com.vmware.vapi.std.errors_client.NotFound if the library item specified by ovf_library_item_id does not exist.

Raise

com.vmware.vapi.std.errors_client.NotFound if any resource specified by a attribute of the LibraryItem.DeploymentTarget class, specified by target, does not exist.

Raise

com.vmware.vapi.std.errors_client.ResourceInaccessible if there was an error accessing the OVF package stored in the library item specified by ovf_library_item_id.

Raise
com.vmware.vapi.std.errors_client.Unauthorized

if you do not have all of the privileges described as follows :

  • Method execution requires VirtualMachine.Config.AddNewDisk if the OVF descriptor has a disk drive (type 17) section.

  • Method execution requires VirtualMachine.Config.AdvancedConfig if the OVF descriptor has an ExtraConfig section.

  • Method execution requires Extension.Register for specified resource group if the OVF descriptor has a vServiceDependency section.

  • Method execution requires Network.Assign for target network if specified.

  • Method execution requires Datastore.AllocateSpace for target datastore if specified.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

  • The resource com.vmware.content.library.Item referenced by the parameter ovf_library_item_id requires System.Read.

  • The resource HostSystem referenced by the attribute LibraryItem.DeploymentTarget.host_id requires System.Read.

  • The resource Network referenced by the dict value of attribute LibraryItem.ResourcePoolDeploymentSpec.network_mappings requires System.Read.

  • The resource StorageProfile referenced by the attribute LibraryItem.ResourcePoolDeploymentSpec.storage_profile_id requires System.Read.

  • The resource Datastore referenced by the attribute LibraryItem.ResourcePoolDeploymentSpec.default_datastore_id requires System.Read.

  • The resource ResourcePool referenced by the attribute LibraryItem.DeploymentTarget.resource_pool_id requires VApp.Import.

  • The resource Folder referenced by the attribute LibraryItem.DeploymentTarget.folder_id requires VApp.Import.

filter(ovf_library_item_id, target)

Queries an OVF package stored in content library to retrieve information to use when deploying the package. See LibraryItem.deploy().

This method retrieves information from the descriptor of the OVF package stored in the library item specified by ovf_library_item_id. The information returned by the method can be used to populate the deployment specification (see LibraryItem.ResourcePoolDeploymentSpec when deploying the OVF package to the deployment target specified by target.

Parameters
  • ovf_library_item_id (str) – Identifier of the content library item containing the OVF package to query. The parameter must be an identifier for the resource type: com.vmware.content.library.Item.

  • target (LibraryItem.DeploymentTarget) – Specification of the deployment target.

Return type

LibraryItem.OvfSummary

Returns

Information that can be used to populate the deployment specification (see LibraryItem.ResourcePoolDeploymentSpec) when deploying the OVF package to the deployment target specified by target.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if target contains invalid arguments.

Raise

com.vmware.vapi.std.errors_client.NotFound if the library item specified by ovf_library_item_id does not exist.

Raise

com.vmware.vapi.std.errors_client.NotFound if any resource specified by a attribute of the LibraryItem.DeploymentTarget class, specified by target, does not exist.

Raise

com.vmware.vapi.std.errors_client.ResourceInaccessible if there was an error accessing the OVF package at the specified ovf_library_item_id.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

  • The resource com.vmware.content.library.Item referenced by the parameter ovf_library_item_id requires System.Read.

  • The resource ResourcePool referenced by the attribute LibraryItem.DeploymentTarget.resource_pool_id requires System.Read.

  • The resource HostSystem referenced by the attribute LibraryItem.DeploymentTarget.host_id requires System.Read.

  • The resource Folder referenced by the attribute LibraryItem.DeploymentTarget.folder_id requires System.Read.

class com.vmware.vcenter.ovf_client.OvfError(category=None, issues=None, name=None, value=None, message=None, error=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The OvfError class describes an error related to accessing, validating, deploying, or exporting an OVF package.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
class com.vmware.vcenter.ovf_client.OvfInfo(messages=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The OvfInfo class contains informational messages related to accessing, validating, deploying, or exporting an OVF package.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

messages (list of com.vmware.vapi.std_client.LocalizableMessage) – A list of localizable messages (see com.vmware.vapi.std_client.LocalizableMessage).

class com.vmware.vcenter.ovf_client.OvfMessage(category=None, issues=None, name=None, value=None, message=None, error=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The OvfMessage class describes a base OVF handling error message related to accessing, validating, deploying, or exporting an OVF package.

These messages fall into different categories defined in OvfMessage.Category:

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
class Category(string)

Bases: vmware.vapi.bindings.enum.Enum

The OvfMessage.Category class defines the categories of messages (see OvfMessage).

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 the Category instance.

INPUT = Category(string='INPUT')

The user provided input parameters are invalid.

SERVER = Category(string='SERVER')

Server error.

VALIDATION = Category(string='VALIDATION')

The OVF descriptor is invalid, for example, syntax errors or schema errors.

class com.vmware.vcenter.ovf_client.OvfParams(type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The OvfParams class defines the common attributes for all OVF deployment parameters. OVF parameters serve several purposes:

  • Describe information about a given OVF package.

  • Describe default deployment configuration.

  • Describe possible deployment values based on the deployment environment.

  • Provide deployment-specific configuration.

Each OVF parameters class specifies a particular configurable aspect of OVF deployment. An aspect has both a query-model and a deploy-model. The query-model is used when the OVF package is queried, and the deploy-model is used when deploying an OVF package.

Most OVF parameter classes provide both informational and deployment parameters. However, some are purely informational (for example, download size) and some are purely deployment parameters (for example, the flag to indicate whether registration as a vCenter extension is accepted).

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

type (str) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

class com.vmware.vcenter.ovf_client.OvfWarning(category=None, issues=None, name=None, value=None, message=None, error=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The OvfWarning class describes a warning related to accessing, validating, deploying, or exporting an OVF package.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
class com.vmware.vcenter.ovf_client.ParseIssue(category=None, file=None, line_number=None, column_number=None, message=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ParseIssue class contains the information about the issue found when parsing an OVF package during deployment or exporting an OVF package including:

  • Parsing and validation error on OVF descriptor (which is an XML document), manifest and certificate files.

  • OVF descriptor generating and device error.

  • Unexpected server error.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • category (ParseIssue.Category) – The category of the parse issue.

  • file (str) – The name of the file in which the parse issue was found.

  • line_number (long) – The line number of the line in the file (see ParseIssue.file) where the parse issue was found (or -1 if not applicable).

  • column_number (long) – The position in the line (see ParseIssue.line_number) (or -1 if not applicable).

  • message (com.vmware.vapi.std_client.LocalizableMessage) – A localizable message describing the parse issue.

class Category(string)

Bases: vmware.vapi.bindings.enum.Enum

The ParseIssue.Category class defines the categories of issues that can be found when parsing files inside an OVF package (see ParseIssue) including OVF descriptor (which is an XML document), manifest and certificate files, or exporting an OVF package.

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 the Category instance.

ATTRIBUTE_ILLEGAL = Category(string='ATTRIBUTE_ILLEGAL')

Illegal attribute error. It indicates that an illegal attribute is set for an element in the OVF descriptor. For example, empty disks do not use format, parentRef, and populatedSize attributes, if these attributes are present in an empty disk element then will get this pasrse issue.

ATTRIBUTE_REQUIRED = Category(string='ATTRIBUTE_REQUIRED')

Required attribute error. It indicates that a required attribute is missing from an element in the OVF descriptor.

ELEMENT_ILLEGAL = Category(string='ELEMENT_ILLEGAL')

Illegal element error. It indicates that an element is present in a location which is not allowed, or found multiple elements but only one is allowed at the location in the OVF descriptor.

ELEMENT_REQUIRED = Category(string='ELEMENT_REQUIRED')

Required element error. It indicates that a required element is missing from the OVF descriptor.

ELEMENT_UNKNOWN = Category(string='ELEMENT_UNKNOWN')

Unknown element error. It indicates that an element is unsupported when parsing an OVF descriptor.

EXPORT_ERROR = Category(string='EXPORT_ERROR')

Issue during OVF export, for example, malformed deviceId, controller not found, or file backing for a device not found.

GENERATE_ERROR = Category(string='GENERATE_ERROR')

OVF descriptor (which is an XML document) generating error, for example, well-formedness errors as well as unexpected processing conditions.

INTERNAL_ERROR = Category(string='INTERNAL_ERROR')

Server encountered an unexpected error which prevented it from fulfilling the request.

PARSE_ERROR = Category(string='PARSE_ERROR')

OVF package parsing error, including:

  • OVF descriptor parsing errors, for example, syntax errors or schema errors.

  • Manifest file parsing and verification errors.

  • Certificate file parsing and verification errors.

SECTION_RESTRICTION = Category(string='SECTION_RESTRICTION')

Section restriction error. It indicates that a section appears in place in the OVF descriptor where it is not allowed, a section appears fewer times than is required, or a section appears more times than is allowed.

SECTION_UNKNOWN = Category(string='SECTION_UNKNOWN')

Section unknown error. It indicates that a section is unsupported when parsing an OVF descriptor.

VALIDATION_ERROR = Category(string='VALIDATION_ERROR')

An issue with the manifest and signing.

VALUE_ILLEGAL = Category(string='VALUE_ILLEGAL')

Illegal value error. For example, the value is malformed, not a number, or outside of the given range, and so on.

class com.vmware.vcenter.ovf_client.Property(class_id=None, id=None, instance_id=None, category=None, ui_optional=None, label=None, description=None, type=None, value=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Property class contains the information about a property in an OVF package.

A property is uniquely identified by its [classid.]id[.instanceid] fully-qualified name (see Property.class_id, Property.id, and Property.instance_id). If multiple properties in an OVF package have the same fully-qualified name, then the property is excluded and cannot be set. We do warn about this during import.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • class_id (str) – The classId of this OVF property. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • id (str) – The identifier of this OVF property. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • instance_id (str) – The instanceId of this OVF property. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • category (str) – If this is set to a non-empty string, this property starts a new category. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package. If None, the property is in the same category as the previous item, otherwise, it starts a new category.

  • ui_optional (bool) –

    Whether a category is UI optional. This is only used if this property starts a new category (see Property.category).

    The value is stored in an optional attribute vmw:uioptional to the ovf:Category element. The default value is false. If this value is true, the properties within this category are optional. The UI renders this as a group with a check box, and the group is grayed out until the check box is selected. When the check box is selected, the input values are read and used in deployment. If properties within the same category specify conflicting values the default is used. Only implemented in vSphere Web Client 5.1 and later as of Nov 2012. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package.

  • label (str) – The display name of this OVF property. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • description (str) – A description of this OVF property. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package.

  • type (str) – The type of this OVF property. Refer to the configuration of a virtual appliance/virtual machine for the valid values. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • value (str) – The OVF property value. This contains the default value from ovf:defaultValue if ovf:value is not present when read. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

class com.vmware.vcenter.ovf_client.PropertyParams(properties=None, type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The PropertyParams class contains a list of OVF properties that can be configured when the OVF package is deployed.

This is based on the ovf:ProductSection.

See LibraryItem.deploy() and LibraryItem.filter().

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • properties (list of Property) – list of OVF properties. This attribute is optional in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • type (str) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

class com.vmware.vcenter.ovf_client.ScaleOutGroup(id=None, description=None, instance_count=None, minimum_instance_count=None, maximum_instance_count=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ScaleOutGroup class contains information about a scale-out group.

It allows a virtual system collection to contain a set of children that are homogeneous with respect to a prototypical virtual system or virtual system collection. It shall cause the deployment function to replicate the prototype a number of times, thus allowing the number of instantiated virtual systems to be configured dynamically at deployment time.

This is based on the ovf2:ScaleOutSection.

See LibraryItem.deploy() and LibraryItem.filter().

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • id (str) – The identifier of the scale-out group. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • description (str) – The description of the scale-out group. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • instance_count (long) – The scaling factor to use. It defines the number of replicas of the prototypical virtual system or virtual system collection. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • minimum_instance_count (long) – The minimum scaling factor. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package. This will be 1 if there is no explicit limit.

  • maximum_instance_count (long) – The maximum scaling factor. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package. This will be None if there is no explicit limit.

class com.vmware.vcenter.ovf_client.ScaleOutParams(groups=None, type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ScaleOutParams class contains information about the scale-out groups described in the OVF package.

When deploying an OVF package, a deployment specific instance count can be specified (see ScaleOutGroup.instance_count.

This is based on the ovf2:ScaleOutSection.

See LibraryItem.deploy() and LibraryItem.filter().

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • groups (list of ScaleOutGroup) – The list of scale-out groups. This attribute is optional in the input parameters when deploying an OVF package. If None there are no scale-out groups. This attribute will always be present in the result when retrieving information about an OVF package.

  • type (str) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

class com.vmware.vcenter.ovf_client.SizeParams(approximate_download_size=None, approximate_flat_deployment_size=None, approximate_sparse_deployment_size=None, variable_disk_size=None, type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The SizeParams class contains estimates of the download and deployment sizes.

This information is based on the file references and the ovf:DiskSection in the OVF descriptor.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • approximate_download_size (long) –

    A best guess as to the total amount of data that must be transferred to download the OVF package.

    This may be inaccurate due to disk compression etc.

    This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package. It will be None if there is insufficient information to provide a proper estimate.

  • approximate_flat_deployment_size (long) – A best guess as to the total amount of space required to deploy the OVF package if using flat disks. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package. It will be None if there is insufficient information to provide a proper estimate.

  • approximate_sparse_deployment_size (long) – A best guess as to the total amount of space required to deploy the OVF package using sparse disks. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package. It will be None if there is insufficient information to provide a proper estimate.

  • variable_disk_size (bool) –

    Whether the OVF uses variable disk sizes.

    For empty disks, rather than specifying a fixed virtual disk capacity, the capacity may be given using a reference to a ovf:Property element in a ovf:ProductSection element in OVF package. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package. If None or false, the OVF does not use variable disk sizes.

  • type (str) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

class com.vmware.vcenter.ovf_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance

class com.vmware.vcenter.ovf_client.UnknownSection(tag=None, info=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The UnknownSection class contains information about an unknown section in an OVF package.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • tag (str) – A namespace-qualified tag in the form {ns}tag.

  • info (str) – The description of the Info element.

class com.vmware.vcenter.ovf_client.UnknownSectionParams(unknown_sections=None, type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The UnknownSectionParams class contains a list of unknown, non-required sections.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • unknown_sections (list of UnknownSection) – list of unknown, non-required sections. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • type (str) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

class com.vmware.vcenter.ovf_client.VcenterExtensionParams(required=None, registration_accepted=None, type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The VcenterExtensionParams class specifies that the OVF package should be registered as a vCenter extension. The virtual machine or virtual appliance will gain unrestricted access to the vCenter Server APIs. It must be connected to a network with connectivity to the vCenter server.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • required (bool) – Whether registration as a vCenter extension is required. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • registration_accepted (bool) –

    Whether registration as a vCenter extension is accepted.

    If registration as a vCenter extension is required (see VcenterExtensionParams.required), this must be set to true during deployment. Defaults to false when returned from server. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • type (str) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

com.vmware.vcenter.services_client module

class com.vmware.vcenter.services_client.Service(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Service class provides methods to manage a single/set of vCenter Server services. This class was added in vSphere API 6.7.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class Health(string)

Bases: vmware.vapi.bindings.enum.Enum

The Service.Health class defines the possible values for health of a service. This enumeration was added in vSphere API 6.7.

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 the Health instance.

DEGRADED = Health(string='DEGRADED')

Service is in degraded state, it is not functional. This class attribute was added in vSphere API 6.7.

HEALTHY = Health(string='HEALTHY')

Service is in a healthy state and is fully functional. This class attribute was added in vSphere API 6.7.

HEALTHY_WITH_WARNINGS = Health(string='HEALTHY_WITH_WARNINGS')

Service is healthy with warnings. This class attribute was added in vSphere API 6.7.

class Info(name_key=None, description_key=None, startup_type=None, state=None, health=None, health_messages=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Service.Info class contains information about a service. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • name_key (str) – Service name key. Can be used to lookup resource bundle. This attribute was added in vSphere API 6.7.

  • description_key (str) – Service description key. Can be used to lookup resource bundle. This attribute was added in vSphere API 6.7.

  • startup_type (Service.StartupType) – Startup Type. This attribute was added in vSphere API 6.7.

  • state (Service.State) – Running State. This attribute was added in vSphere API 6.7.

  • health (Service.Health) – Health of service. This attribute was added in vSphere API 6.7. This attribute is optional and it is only relevant when the value of state is Service.State.STARTED.

  • health_messages (list of com.vmware.vapi.std_client.LocalizableMessage) – Localizable messages associated with the health of the service. This attribute was added in vSphere API 6.7. This attribute is optional and it is only relevant when the value of state is Service.State.STARTED.

class StartupType(string)

Bases: vmware.vapi.bindings.enum.Enum

The Service.StartupType class defines valid Startup Type for vCenter Server services. This enumeration was added in vSphere API 6.7.

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 the StartupType instance.

AUTOMATIC = StartupType(string='AUTOMATIC')

Service Startup type is Automatic, thus during starting all services or issuing explicit start on the service will start it. This class attribute was added in vSphere API 6.7.

DISABLED = StartupType(string='DISABLED')

Service Startup type is Disabled, thus it will not start unless the startup type changes to manual or automatic. This class attribute was added in vSphere API 6.7.

MANUAL = StartupType(string='MANUAL')

Service Startup type is Manual, thus issuing an explicit start on the service will start it. This class attribute was added in vSphere API 6.7.

class State(string)

Bases: vmware.vapi.bindings.enum.Enum

The Service.State class defines valid Run State for services. This enumeration was added in vSphere API 6.7.

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 the State instance.

STARTED = State(string='STARTED')

Service Run State is Started, it is fully functional. This class attribute was added in vSphere API 6.7.

STARTING = State(string='STARTING')

Service Run State is Starting, it is still not functional. This class attribute was added in vSphere API 6.7.

STOPPED = State(string='STOPPED')

Service Run State is Stopped. This class attribute was added in vSphere API 6.7.

STOPPING = State(string='STOPPING')

Service Run State is Stopping, it is not functional. This class attribute was added in vSphere API 6.7.

class UpdateSpec(startup_type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Service.UpdateSpec class describes the changes to be made to the configuration of the service. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

startup_type (Service.StartupType or None) – Startup Type. This attribute was added in vSphere API 6.7. If unspecified, leaves value unchanged.

get(service)

Returns the state of a service. This method was added in vSphere API 6.7.

Parameters

service (str) – identifier of the service whose state is being queried. The parameter must be an identifier for the resource type: com.vmware.vcenter.services.Service.

Return type

Service.Info

Returns

Service Info structure.

Raise

com.vmware.vapi.std.errors_client.NotFound if the service associated with service does not exist.

Raise

com.vmware.vapi.std.errors_client.Error if any other error occurs during the execution of the operation.

list_details()

Lists details of vCenter services. This method was added in vSphere API 6.7.

Return type

dict of str and Service.Info

Returns

Map of service identifiers to service Info structures. The key in the return value dict will be an identifier for the resource type: com.vmware.vcenter.services.Service.

Raise

com.vmware.vapi.std.errors_client.Error if any error occurs during the execution of the operation.

restart(service)

Restarts a service. This method was added in vSphere API 6.7.

Parameters

service (str) – identifier of the service to restart The parameter must be an identifier for the resource type: com.vmware.vcenter.services.Service.

Raise

com.vmware.vapi.std.errors_client.NotFound if the service associated with service does not exist.

Raise

com.vmware.vapi.std.errors_client.TimedOut if any timeout occurs during the execution of the restart operation.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the operation is denied in the current state of the service. If a stop or start operation is in progress, issuing a restart operation will lead to this error.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if a restart operation is issued on a service which has startup type Service.StartupType.DISABLED

Raise

com.vmware.vapi.std.errors_client.Error if any other error occurs during the execution of the operation.

start(service)

Starts a service. This method was added in vSphere API 6.7.

Parameters

service (str) – identifier of the service to start The parameter must be an identifier for the resource type: com.vmware.vcenter.services.Service.

Raise

com.vmware.vapi.std.errors_client.NotFound if the service associated with service does not exist.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the operation is denied in the current state of the service. If a stop or restart operation is in progress, the start operation will not be allowed.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if start operation is issued on a service which has startup type Service.StartupType.DISABLED.

Raise

com.vmware.vapi.std.errors_client.TimedOut if any timeout occurs during the execution of the start operation. Timeout occurs when the service takes longer than StartTimeout to start.

Raise

com.vmware.vapi.std.errors_client.Error if any other error occurs during the execution of the operation.

stop(service)

Stops a service. This method was added in vSphere API 6.7.

Parameters

service (str) – identifier of the service to stop The parameter must be an identifier for the resource type: com.vmware.vcenter.services.Service.

Raise

com.vmware.vapi.std.errors_client.NotFound if the service associated with service does not exist.

Raise

com.vmware.vapi.std.errors_client.Error if any other error occurs during the execution of the operation.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the operation is denied in the current state of the service. If a stop operation is in progress, issuing another stop operation will lead to this error.

update(service, spec)

Updates the properties of a service. This method was added in vSphere API 6.7.

Parameters
  • service (str) – identifier of the service whose properties are being updated. The parameter must be an identifier for the resource type: com.vmware.vcenter.services.Service.

  • spec (Service.UpdateSpec) – Service Update specification.

Raise

com.vmware.vapi.std.errors_client.NotFound if the service associated with service does not exist.

Raise

com.vmware.vapi.std.errors_client.Error if any other error occurs during the execution of the operation.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the operation is denied in the current state of the service. If a start, stop or restart operation is in progress, update operation will fail with this error.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if a request to set the Service.UpdateSpec.startup_type attribute of spec to Service.StartupType.DISABLED comes in for a service that is not in Service.State.STOPPED state.

class com.vmware.vcenter.services_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.vcenter.storage_client module

class com.vmware.vcenter.storage_client.Policies(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Policies class provides methods for managing the storage policies. This class was added in vSphere API 6.7.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class CompatibilityInfo(compatible_datastores=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Policies.CompatibilityInfo class contains info about a list of datastores compatible with a specific storage policy. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

compatible_datastores (list of Policies.CompatibleDatastoreInfo) – Info about a list of datastores compatible with a specific storage policy. This attribute was added in vSphere API 6.7.

class CompatibleDatastoreInfo(datastore=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Policies.CompatibleDatastoreInfo class contains compatible datastore’s information. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

datastore (str) – Identifier of the datastore. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: Datastore. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: Datastore.

class FilterSpec(policies=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Policies.FilterSpec class contains attributes used to filter the results when listing the storage policies (see Policies.list()). This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

policies (set of str or None) – Identifiers of storage policies that can match the filter. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: com.vmware.vcenter.StoragePolicy. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: com.vmware.vcenter.StoragePolicy. If None or empty, storage policies with any identifiers match the filter.

RESOURCE_TYPE = 'com.vmware.vcenter.StoragePolicy'

Resource type for vAPI metadata policy. This class attribute was added in vSphere API 6.7.

class Summary(policy=None, name=None, description=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Policies.Summary class contains commonly used information about a storage policy. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • policy (str) – Identifier of the storage policy. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.StoragePolicy. 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.StoragePolicy.

  • name (str) – Name of the storage policy. This attribute was added in vSphere API 6.7.

  • description (str) – Description of the storage policy. This attribute was added in vSphere API 6.7.

check_compatibility(policy, datastores)

Returns datastore compatibility summary about a specific storage policy. This method was added in vSphere API 6.7.

Parameters
  • policy (str) – The storage policy identifier The parameter must be an identifier for the resource type: com.vmware.vcenter.StoragePolicy.

  • datastores (set of str) – Datastores used to check compatibility against a storage policy. The number of datastores is limited to 1024. The parameter must contain identifiers for the resource type: Datastore.

Return type

Policies.CompatibilityInfo

Returns

datastore compatibility summary about a specific storage policy.

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.NotFound if the storage policy specified does not exist.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable if the system is unable to communicate with a service to complete the request.

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 doesn’t have the required privileges.

Raise

com.vmware.vapi.std.errors_client.UnableToAllocateResource if input more than 1024 datastores.

list(filter=None)

Returns information about at most 1024 visible (subject to permission checks) storage solicies availabe in vCenter. These storage policies can be used for provisioning virtual machines or disks. This method was added in vSphere API 6.7.

Parameters

filter (Policies.FilterSpec or None) – Specification of matching storage policies for which information should be returned. If None, the behavior is equivalent to a Policies.FilterSpec with all attributes None which means all storage policies match the filter

Return type

list of Policies.Summary

Returns

Commonly used Information about the storage policies.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if the Policies.FilterSpec contains a value that is not supported by the server.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable if the system is unable to communicate with a service to complete the request.

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 doesn’t have the required privileges.

Raise

com.vmware.vapi.std.errors_client.UnableToAllocateResource if more than 1024 storage policies exist.

class com.vmware.vcenter.storage_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.vcenter.system_config_client module

class com.vmware.vcenter.system_config_client.DeploymentType(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The DeploymentType class provides methods to get/set the type of the appliance. This class was added in vSphere API 6.7.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class Info(type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The DeploymentType.Info class contains the fields used to get the appliance type. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

type (com.vmware.vcenter.deployment_client.ApplianceType) – The type of the appliance. This attribute was added in vSphere API 6.7.

class ReconfigureSpec(type=None, remote_psc=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The DeploymentType.ReconfigureSpec class contains the fields used to get and set the appliance type. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
get()

Get the type of the vCenter appliance. This method was added in vSphere API 6.7.

Return type

DeploymentType.Info

Returns

The type of the vCenter appliance.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if appliance is not in CONFIGURED state.

reconfigure(spec)

Reconfigure the type of the vCenter appliance. This method was added in vSphere API 6.7.

Parameters

spec (DeploymentType.ReconfigureSpec) – ReconfigureSpec to set the appliance type.

Raise

com.vmware.vapi.std.errors_client.Unsupported if the appliance is in CONFIGURED state and if not changing the type from VCSA_EMBEDDED to VCSA_EXTERNAL.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if passed arguments are invalid.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if external PSC credentials are not valid.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the appliance is not in INITIALIZED or CONFIGURED state.

class com.vmware.vcenter.system_config_client.PscRegistration(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The PscRegistration class provides methods to get and set the PSC_EXTERNAL appliance a VCSA_EXTERNAL appliance is registered with. This class was added in vSphere API 6.7.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class Info(address=None, https_port=None, sso_domain=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The PscRegistration.Info class has fields to specify information about the PSC node. This class was added in vSphere API 6.7.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • address (str) – The IP address or DNS resolvable name of the PSC this appliance is registered with. This attribute was added in vSphere API 6.7.

  • https_port (long) – The HTTPs port used by the external PSC. This attribute was added in vSphere API 6.7.

  • sso_domain (str) – The Single Sign-On domain name of the external PSC. This attribute was added in vSphere API 6.7.

get()

Get information of the PSC that this appliance is registered with. This method was added in vSphere API 6.7.

Return type

PscRegistration.Info

Returns

Info structure containing information about the external PSC node this appliance is registered with.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the appliance is in NOT_INITIALIZED state.

repoint(spec)

Repoint this vCenter Server appliance to a different external PSC. This method was added in vSphere API 6.7.

Parameters

spec (com.vmware.vcenter.deployment_client.RemotePscSpec) – RemotePscSpec structure containing information about the external PSC node to repoint this vCenter Server appliance to.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the caller is not authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the passed external PSC credentials is invalid.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if the passed external PSC is not a replicating with the current PSC this appliance is registered with.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if passed arguments are invalid.

Raise

com.vmware.vapi.std.errors_client.Unsupported if the current appliance is not of the type VCSA_EXTERNAL.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the appliance is NOT in CONFIGURED state.

class com.vmware.vcenter.system_config_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.vcenter.tagging_client module

The com.vmware.vcenter.tagging_client module provides classes for managing tags.

class com.vmware.vcenter.tagging_client.Associations(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Associations class provides methods to list tag associations. This class was added in vSphere API 7.0.0.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class IterationSpec(marker=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Associations.IterationSpec class contains attributes used to break results into pages when listing tags associated to objects see Associations.list()). This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

marker (str or None) – Marker is an opaque token that allows the caller to request the next page of tag associations. This attribute was added in vSphere API 7.0.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.tagging.associations.Marker. 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.tagging.associations.Marker. If None or empty, first page of tag associations will be returned.

class LastIterationStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

The last status for the iterator. A field of this type is returned as part of the result and indicates to the caller of the API whether it can continue to make requests for more data.

The last status only reports on the state of the iteration at the time data was last returned. As a result, it not does guarantee if the next call will succeed in getting more data or not.

Failures to retrieve results will be returned as Error responses. These last statuses are only returned when the iterator is operating as expected.. This enumeration was added in vSphere API 7.0.0.

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 the LastIterationStatus instance.

END_OF_DATA = LastIterationStatus(string='END_OF_DATA')

Iterator has finished iterating through its inventory. There are currently no more entities to return and the caller can terminate iteration. If the iterator returned some data, the marker may be set to allow the iterator to continue from where it left off when additional data does become available. This value is used to indicate that all available data has been returned by the iterator. This class attribute was added in vSphere API 7.0.0.

READY = LastIterationStatus(string='READY')

Iterator has more data pending and is ready to provide it. The caller can request the next page of data at any time.

The number of results returned may be less than the usual size. In other words, the iterator may not fill the page. The iterator has returned at least 1 result.. This class attribute was added in vSphere API 7.0.0.

class ListResult(associations=None, marker=None, status=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Associations.ListResult class contains the list of tag associations in a page, as well as related metadata fields. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • associations (list of Associations.Summary) – List of tag associations. This attribute was added in vSphere API 7.0.0.

  • marker (str or None) – Marker is an opaque data structure that allows the caller to request the next page of tag associations. This attribute was added in vSphere API 7.0.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.tagging.associations.Marker. 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.tagging.associations.Marker. If None or empty, there are no more tag associations to request.

  • status (Associations.LastIterationStatus) – The last status for the iterator that indicates whether any more results can be expected if the caller continues to make requests for more data using the iterator. This attribute was added in vSphere API 7.0.0.

class Summary(tag=None, object=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Associations.Summary describes a tag association. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • tag (str) – The identifier of a tag. This attribute was added in vSphere API 7.0.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.cis.tagging.Tag. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.cis.tagging.Tag.

  • object (com.vmware.vapi.std_client.DynamicID) – The identifier of an associated object. This attribute was added in vSphere API 7.0.0.

list(iterate=None)

Returns tag associations that match the specified iteration spec. This method was added in vSphere API 7.0.0.

Parameters

iterate (Associations.IterationSpec or None) – The specification of a page to be retrieved. If None, the first page will be retrieved.

Return type

Associations.ListResult

Returns

A page of the tag associations matching the iteration spec.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if Associations.IterationSpec.marker is not a marker returned from an earlier invocation of this {\@term operation).

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user doesn’t have the required privileges.

class com.vmware.vcenter.tagging_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.vcenter.tokenservice_client module

The com.vmware.vcenter.tokenservice_client module provides Token classes.

exception com.vmware.vcenter.tokenservice_client.Error(messages=None, data=None)

Bases: vmware.vapi.bindings.error.VapiError

The Error exception describes theattributes common to all standard exceptions.

This exception serves two purposes:

  1. It is the exception that clients in many programming languages can catch to handle all standard exceptions. Typically those clients will display one or more of the localizable messages from Error.messages to a human.

  2. It is the exception that methods can report when they need to report some exception, but the exception doesn’t fit into any other standard exception, and in fact the only reasonable way for a client to react to the exception is to display the message(s) to a human.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The null, null, and null classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vcenter.tokenservice_client.InvalidGrant(messages=None, data=None)

Bases: com.vmware.vcenter.tokenservice_client.Error

The InvalidGrant exception indicates that provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The null, null, and null classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vcenter.tokenservice_client.InvalidRequest(messages=None, data=None)

Bases: com.vmware.vcenter.tokenservice_client.Error

The InvalidRequest exception indicates that TokenExchange.ExchangeSpec is missing a required parameter, includes an unsupported parameter value (other than TokenExchange.ExchangeSpec.grant_type). Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The null, null, and null classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

exception com.vmware.vcenter.tokenservice_client.InvalidScope(messages=None, data=None)

Bases: com.vmware.vcenter.tokenservice_client.Error

The InvalidScope exception indicates requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) –

    Stack of one or more localizable messages for human exception consumers.

    The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.

  • data (vmware.vapi.struct.VapiStruct or None) –

    Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.

    Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The null, null, and null classes are intended as possible values for this attribute. com.vmware.vapi.std_client.DynamicID may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.

class com.vmware.vcenter.tokenservice_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance

class com.vmware.vcenter.tokenservice_client.TokenExchange(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The TokenExchange interface provides possibility to exchange between different tokens types. Implementation of “OAuth 2.0 Token Exchange” standard (https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-12). Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

ACCESS_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:access_token'

Class attribute indicates OAuth 2.0 access token type. Warning: This class attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

BEARER_TOKEN_METHOD_TYPE = 'Bearer'

Class attribute indicates that the security token is a bearer token. Warning: This class attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

class ExchangeSpec(grant_type=None, resource=None, audience=None, scope=None, requested_token_type=None, subject_token=None, subject_token_type=None, actor_token=None, actor_token_type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The TokenExchange.ExchangeSpec class contains arguments required for token exchange. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • grant_type (str) – The value of TokenExchange.TOKEN_EXCHANGE_GRANT indicates that a token exchange is being performed. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • resource (str or None) – Indicates the location of the target service or resource where the client intends to use the requested security token. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. if can be inferred from other arguments or not needed for specific case of exchange.

  • audience (str or None) – The logical name of the target service where the client intends to use the requested security token. This serves a purpose similar to the TokenExchange.ExchangeSpec.resource parameter, but with the client providing a logical name rather than a location. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. if can be inferred from other arguments or not needed for specific case of exchange.

  • scope (str or None) – A list of space-delimited, case-sensitive strings, that allow the client to specify the desired scope of the requested security token in the context of the service or resource where the token will be used. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. if can be inferred from other arguments or not needed for specific case of exchange.

  • requested_token_type (str or None) – An identifier for the type of the requested security token. If the requested type is unspecified, the issued token type is at the discretion of the server and may be dictated by knowledge of the requirements of the service or resource indicated by the TokenExchange.ExchangeSpec.resource or TokenExchange.ExchangeSpec.audience parameter. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. if can be inferred from other arguments or not needed for specific case of exchange.

  • subject_token (str) – A security token that represents the identity of the party on behalf of whom exchange is being made. Typically, the subject of this token will be the subject of the security token issued. Token is base64-encoded. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • subject_token_type (str) – An identifier, that indicates the type of the security token in the TokenExchange.ExchangeSpec.subject_token parameter. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • actor_token (str or None) – A security token that represents the identity of the acting party. Typically, this will be the party that is authorized to use the requested security token and act on behalf of the subject. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. if not needed for specific case of exchange.

  • actor_token_type (str or None) – An identifier, that indicates the type of the security token in the TokenExchange.ExchangeSpec.actor_token parameter. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. if TokenExchange.ExchangeSpec.actor_token parameter is not present.

ID_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:id_token'

Class attribute indicates OIDC ID token type. Warning: This class attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

class Info(access_token=None, issued_token_type=None, token_type=None, expires_in=None, scope=None, refresh_token=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The TokenExchange.Info class contains data that represents successful token exchange response. Warning: This class is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • access_token (str) – The security token issued by the server in response to the token exchange request. Token is base64-encoded. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • issued_token_type (str) – An identifier, that indicates the type of the security token in the TokenExchange.Info.access_token parameter. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • token_type (str) – A case-insensitive value specifying the method of using the access token issued. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

  • expires_in (long or None) – The validity lifetime, in seconds, of the token issued by the server. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. if not applicable for issued token.

  • scope (str or None) – Scope of the issued security token. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. if the scope of the issued security token is identical to the scope requested by the client.

  • refresh_token (str or None) – A refresh token can be issued in cases where the client of the token exchange needs the ability to access a resource even when the original credential is no longer valid. Warning: This attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments. if not needed for specific case of exchange.

N_A_TOKEN_METHOD_TYPE = 'N_A'

Class attribute indicates TokenExchange.Info.token_type identifier is not applicable in that context. Warning: This class attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

REFRESH_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:refresh_token'

Class attribute indicates OAuth 2.0 refresh token type. Warning: This class attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

SAML1_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:saml1'

Class attribute indicates base64-encoded SAML 1.1 token type. Warning: This class attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

SAML2_TOKEN_TYPE = 'urn:ietf:params:oauth:token-type:saml2'

Class attribute indicates base64-encoded SAML 2.0 token type. Warning: This class attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

TOKEN_EXCHANGE_GRANT = 'urn:ietf:params:oauth:grant-type:token-exchange'

Class attribute indicates that token exchange grant type. Warning: This class attribute is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

exchange(spec)

Exchanges incoming token based on the spec and current client authorization data. Warning: This method is available as Technology Preview. These are early access APIs provided to test, automate and provide feedback on the feature. Since this can change based on feedback, VMware does not guarantee backwards compatibility and recommends against using them in production environments. Some Technology Preview APIs might only be applicable to specific environments.

Parameters

spec (TokenExchange.ExchangeSpec) – TokenExchange.ExchangeSpec class contains arguments that define exchange process.

Return type

TokenExchange.Info

Returns

TokenExchange.Info class that contains new token.

Raise

InvalidGrant provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.

Raise

InvalidScope If the server is unwilling or unable to issue a token for all the target services indicated by the TokenExchange.ExchangeSpec.resource or TokenExchange.ExchangeSpec.audience parameters.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if authorization is not given to a caller.

com.vmware.vcenter.topology_client module

class com.vmware.vcenter.topology_client.Nodes(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Nodes interface provides methods to retrieve vCenter and Platform Services Controller nodes information in the topology. This class was added in vSphere API 6.7.2.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class ApplianceType(string)

Bases: vmware.vapi.bindings.enum.Enum

The Nodes.ApplianceType class defines values for valid appliance types for the vCenter and Platform Services Controller node. See Nodes.Info. This enumeration was added in vSphere API 6.7.2.

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 the ApplianceType instance.

PSC_EXTERNAL = ApplianceType(string='PSC_EXTERNAL')

An external Platform Services Controller. This class attribute was added in vSphere API 6.7.2.

VCSA_EMBEDDED = ApplianceType(string='VCSA_EMBEDDED')

vCenter Server Appliance with an embedded Platform Services Controller. This class attribute was added in vSphere API 6.7.2.

VCSA_EXTERNAL = ApplianceType(string='VCSA_EXTERNAL')

vCenter Server Appliance with an external Platform Services Controller. This class attribute was added in vSphere API 6.7.2.

class FilterSpec(types=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Nodes.FilterSpec class contains attribute used to filter the results when listing vCenter and Platform Services Controller nodes (see Nodes.list()). This class was added in vSphere API 6.7.2.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

types (set of Nodes.ApplianceType or None) – Types of the appliance that a vCenter and Platform Services Controller node must be to match the filter (see Nodes.ApplianceType. This attribute was added in vSphere API 6.7.2. If None or empty, node of any ApplianceType match the filter.

class Info(domain=None, type=None, replication_partners=None, client_affinity=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Nodes.Info class contains vCenter or Platform Services Controller node details. This class was added in vSphere API 6.7.2.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • domain (str) – Domain name of the node. This attribute was added in vSphere API 6.7.2.

  • type (Nodes.ApplianceType) – Appliance type of the node. This attribute was added in vSphere API 6.7.2.

  • replication_partners (list of str) – List of replication partners’ node identifiers. Identifiers can be either IP address or DNS resolvable name of the partner node. This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: com.vmware.vcenter.VCenter.name. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: com.vmware.vcenter.VCenter.name. This attribute is optional and it is only relevant when the value of type is one of Nodes.ApplianceType.VCSA_EMBEDDED or Nodes.ApplianceType.PSC_EXTERNAL.

  • client_affinity (str) – Identifier of the affinitized Platform Services Controller node. Identifier can be either IP address or DNS resolvable name of the affinitized node. This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.VCenter.name. 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.VCenter.name. This attribute is optional and it is only relevant when the value of type is Nodes.ApplianceType.VCSA_EXTERNAL.

class Summary(node=None, type=None, replication_partners=None, client_affinity=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Nodes.Summary class contains commonly used information of vCenter or Platform Services Controller node. This class was added in vSphere API 6.7.2.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • node (str) – Identifier for the vCenter or Platform Services Controller node. Identifier can be either IP address or DNS resolvable name of the node. This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.VCenter.name. 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.VCenter.name.

  • type (Nodes.ApplianceType) – Appliance type of the node. This attribute was added in vSphere API 6.7.2.

  • replication_partners (list of str) – List of replication partners’ node identifiers. Identifiers can be either IP address or DNS resolvable name of the partner node. This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: com.vmware.vcenter.VCenter.name. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: com.vmware.vcenter.VCenter.name. This attribute is optional and it is only relevant when the value of type is one of Nodes.ApplianceType.VCSA_EMBEDDED or Nodes.ApplianceType.PSC_EXTERNAL.

  • client_affinity (str) – Identifier of the affinitized Platform Services Controller node. Identifier can be either IP address or DNS resolvable name of the affinitized node. This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.VCenter.name. 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.VCenter.name. This attribute is optional and it is only relevant when the value of type is Nodes.ApplianceType.VCSA_EXTERNAL.

get(node)

Retrieve details for a given identifier of the vCenter or Platform Services Controller node. This method was added in vSphere API 6.7.2.

Parameters

node (str) – Identifier of the vCenter or Platform Services Controller node. Identifier can be either IP address or DNS resolvable name of the node. The parameter must be an identifier for the resource type: com.vmware.vcenter.VCenter.name.

Return type

Nodes.Info

Returns

vCenter or Platform Services Controller node details with replication partners and client affinity information as applicable. See Nodes.Info.

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 doesn’t have the required privileges.

Raise

com.vmware.vapi.std.errors_client.NotFound if a node doesn’t exist for given node identifier.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

list(filter=None)

Returns information about all vCenter and Platform Services Controller nodes matching the Nodes.FilterSpec. This method was added in vSphere API 6.7.2.

Parameters

filter (Nodes.FilterSpec or None) – Specification of matching vCenter and Platform Services Controller nodes for which information should be returned. If None, the behavior is equivalent to a Nodes.FilterSpec with all attributes None which means all nodes match the filter.

Return type

list of Nodes.Summary

Returns

commonly used information for all vCenter and Platform Services Controller nodes matching the Nodes.FilterSpec.

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 doesn’t have the required privileges.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if the Nodes.FilterSpec.types attribute contains a value that is not supported.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

class com.vmware.vcenter.topology_client.ReplicationStatus(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The ReplicationStatus interface provides methods to retrieve replication status information of vCenter and Platform Services Controller nodes of type VCSA_EMBEDDED/PSC_EXTERNAL (see Nodes.Info.type). This class was added in vSphere API 6.7.2.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class FilterSpec(nodes=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ReplicationStatus.FilterSpec class contains attribute used to filter the results when listing replication status for the vCenter and Platform Services Controller nodes (see ReplicationStatus.list()) of type VCSA_EMBEDDED/PSC_EXTERNAL (see Nodes.Info.type). This class was added in vSphere API 6.7.2.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

nodes (set of str or None) – Identifier that a vCenter and Platform Services Controller node must have to match the filter. (see ReplicationStatus.Summary.node). This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: com.vmware.vcenter.VCenter.name. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: com.vmware.vcenter.VCenter.name. If None or empty, all vCenter and Platform Services Controller nodes of type VCSA_EMBEDDED/PSC_EXTERNAL match the filter.

class Summary(node=None, replication_partner=None, partner_available=None, status_available=None, replicating=None, change_lag=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ReplicationStatus.Summary class contains replication information of partner vCenter or Platform Services Controller node of type VCSA_EMBEDDED/PSC_EXTERNAL (see Nodes.Info.type). This class was added in vSphere API 6.7.2.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • node (str) – Identifier for the vCenter or Platform Services Controller node. Identifier can be either IP address or DNS resolvable name of the node. This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.VCenter.name. 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.VCenter.name.

  • replication_partner (str) – Identifier for the vCenter or Platform Services Controller replication partner. Identifier can be either IP address or DNS resolvable name of the replication partner. This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.VCenter.name. 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.VCenter.name.

  • partner_available (bool) – Indicates if the VMware Directory Service on partner is reachable or not. This attribute was added in vSphere API 6.7.2.

  • status_available (bool) – Indicates if the replication status for the node with respect to replication partner can be retrieved or not. This attribute was added in vSphere API 6.7.2.

  • replicating (bool or None) – Indicates if node is processing replication changes from the replication partner. This attribute was added in vSphere API 6.7.2. This attribute will be None if the partner host or replication status is not available, i.e, if ReplicationStatus.Summary.partner_available or ReplicationStatus.Summary.status_available is false.

  • change_lag (long or None) – Number of replication changes node is behind the replication partner. This attribute was added in vSphere API 6.7.2. This attribute will be None if the partner host or replication status is not available, i.e, if ReplicationStatus.Summary.partner_available or ReplicationStatus.Summary.status_available is false.

list(filter=None)

Returns the replication information of vCenter and Platform Services Controller nodes of type VCSA_EMBEDDED/PSC_EXTERNAL (see Nodes.Info.type) matching the ReplicationStatus.FilterSpec. This method was added in vSphere API 6.7.2.

Parameters

filter (ReplicationStatus.FilterSpec or None) – Specification of matching vCenter and Platform Services Controller nodes for which information should be returned. If None, the behavior is equivalent to a ReplicationStatus.FilterSpec with all attributes None which means all vCenter and Platform Services Controller nodes of type VCSA_EMBEDDED/PSC_EXTERNAL match the filter.

Return type

list of ReplicationStatus.Summary

Returns

Commonly used replication information about vCenter and Platform Services Controller nodes matching the ReplicationStatus.FilterSpec.

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 doesn’t have the required privileges.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if the ReplicationStatus.FilterSpec.nodes attribute contains a invalid value.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires System.Read.

class com.vmware.vcenter.topology_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.vcenter.trusted_infrastructure_client module

The com.vmware.vcenter.trusted_infrastructure_client module provides classes that enable a Trusted Infrastructure. They are responsible for ensuring that infrastructure nodes are running trusted software and for releasing encryption keys only to trusted infrastructure nodes.

class com.vmware.vcenter.trusted_infrastructure_client.NetworkAddress(hostname=None, port=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The NetworkAddress class contains an IP address or DNS resolvable name and a port on which a connection can be established. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • hostname (str) – The IP address or DNS resolvable name of the service. This attribute was added in vSphere API 7.0.0.

  • port (long or None) – The port of the service. This attribute was added in vSphere API 7.0.0. If None, port 443 will be used.

class com.vmware.vcenter.trusted_infrastructure_client.Principal(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Principal class contains information about the certificates which sign the tokens used by vCenter for authentication. This class was added in vSphere API 7.0.0.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class Info(certificates=None, issuer=None, principal=None, name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Principal.Info class contains the information about the principal and certificates used by this vCenter to retrieve tokens. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • certificates (list of X509CertChain) – The certificates used by the STS to sign tokens for this vCenter. This attribute was added in vSphere API 7.0.0.

  • issuer (str) – The service which created and signed the security token. This attribute was added in vSphere API 7.0.0.

  • principal (StsPrincipal) – The principal used by this vCenter instance to retrieve tokens. Currently this is the vCenter solution user. This attribute was added in vSphere API 7.0.0.

  • name (str) – The user-friednly name of the vCenter. This attribute was added in vSphere API 7.0.0.

get()

Returns information about the STS used by this vCenter instance. This method was added in vSphere API 7.0.0.

Return type

Principal.Info

Returns

\@{link Info} a summary containing the certificates used to sign tokens and the solution user used to retrieve them.

Raise

com.vmware.vapi.std.errors_client.Error if there is a generic error.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the user can not be authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires TrustedAdmin.ReadStsInfo.

class com.vmware.vcenter.trusted_infrastructure_client.StsPrincipal(id=None, type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The StsPrincipal class contains a IDM principal. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • id (StsPrincipalId) – The principal’s ID. This attribute was added in vSphere API 7.0.0.

  • type (StsPrincipalType) – The type of the principal (user or group). This attribute was added in vSphere API 7.0.0.

class com.vmware.vcenter.trusted_infrastructure_client.StsPrincipalId(name=None, domain=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The StsPrincipalId class contains an IDM principal ID. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • name (str) – The principal’s username. This attribute was added in vSphere API 7.0.0.

  • domain (str) – The principal’s domain. This attribute was added in vSphere API 7.0.0.

class com.vmware.vcenter.trusted_infrastructure_client.StsPrincipalType(string)

Bases: vmware.vapi.bindings.enum.Enum

The StsPrincipalType enum can be either users or groups. This enumeration was added in vSphere API 7.0.0.

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 the StsPrincipalType instance.

STS_GROUP = StsPrincipalType(string='STS_GROUP')

The principal is a group. This class attribute was added in vSphere API 7.0.0.

STS_USER = StsPrincipalType(string='STS_USER')

The principal is a user. This class attribute was added in vSphere API 7.0.0.

class com.vmware.vcenter.trusted_infrastructure_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance

class com.vmware.vcenter.trusted_infrastructure_client.TrustAuthorityClusters(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The TrustAuthorityClusters class manages all the Trust Authority Components on each Trust Authority Host in the cluster. The TrustAuthorityClusters class transforms a ClusterComputeResource into Trust Authority Cluster and vice versa. This class was added in vSphere API 7.0.0.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class FilterSpec(cluster=None, state=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The TrustAuthorityClusters.FilterSpec class contains the data necessary for identifying a TrustAuthorityClusters. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • cluster (set of str or None) – Identifies the cluster. This attribute was added in vSphere API 7.0.0. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: ClusterComputeResource. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: ClusterComputeResource. cluster If {\@term.unset} return all Trust Authority Clusters.

  • state (set of TrustAuthorityClusters.State or None) – The state of the TrustAuthorityClusters. This attribute was added in vSphere API 7.0.0. state If {\@term.unset} return all Trust Authority Clusters.

class Info(cluster=None, state=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The TrustAuthorityClusters.Info class contains the data necessary for retrieving the TrustAuthorityClusters info. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • cluster (str) – Identifies the cluster. This attribute was added in vSphere API 7.0.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: ClusterComputeResource. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: ClusterComputeResource.

  • state (TrustAuthorityClusters.State) – The state of the cluster. This attribute was added in vSphere API 7.0.0.

class State(string)

Bases: vmware.vapi.bindings.enum.Enum

The TrustAuthorityClusters.State class defines the states of the TrustAuthorityClusters. This enumeration was added in vSphere API 7.0.0.

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 the State instance.

DISABLE = State(string='DISABLE')

The TrustAuthorityClusters is disabled. This class attribute was added in vSphere API 7.0.0.

ENABLE = State(string='ENABLE')

The TrustAuthorityClusters is enabled. This class attribute was added in vSphere API 7.0.0.

class Summary(cluster=None, state=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The TrustAuthorityClusters.Summary class contains information about TrustAuthorityClusters id and state. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • cluster (str) – Identifies the cluster. This attribute was added in vSphere API 7.0.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: ClusterComputeResource. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: ClusterComputeResource.

  • state (TrustAuthorityClusters.State) – The state of the TrustAuthorityClusters. This attribute was added in vSphere API 7.0.0.

class UpdateSpec(state=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The TrustAuthorityClusters.UpdateSpec class contains the data necessary for update of a TrustAuthorityClusters. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

state (TrustAuthorityClusters.State or None) – The state of the TrustAuthorityClusters. This attribute was added in vSphere API 7.0.0. state If {\@term.unset} no operation is performed.

get(cluster)

Get the result of the last Update operation which matches the cluster id. This method was added in vSphere API 7.0.0.

Parameters

cluster (str) – Cluster id. The parameter must be an identifier for the resource type: ClusterComputeResource.

Return type

TrustAuthorityClusters.Info

Returns

The TrustAuthorityClusters.Info instance which contains information about the state of the cluster.

Raise

com.vmware.vapi.std.errors_client.Error if there is a generic error.

Raise

com.vmware.vapi.std.errors_client.NotFound if cluster doesn’t match to any ClusterComputeResource.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the user can not be authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires TrustedAdmin.ReadTrustedHosts.

  • The resource ClusterComputeResource referenced by the parameter cluster requires System.View.

list(spec=None)

Returns a list of clusters for this vCenter instance which matches the TrustAuthorityClusters.FilterSpec. This method was added in vSphere API 7.0.0.

Parameters

spec (TrustAuthorityClusters.FilterSpec or None) – Return only clusters matching the specified filters. If {\@term.unset} return all clusters.

Return type

list of TrustAuthorityClusters.Summary

Returns

List of TrustAuthorityClusters.Summary for a TrustAuthorityClusters.

Raise

com.vmware.vapi.std.errors_client.Error if there is a generic error.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the user can not be authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if you do not have all of the privileges described as follows:

  • Method execution requires TrustedAdmin.ReadTrustedHosts.

  • The resource ClusterComputeResource referenced by the attribute TrustAuthorityClusters.FilterSpec.cluster requires System.View.

update_task(cluster, spec)

Updates the state of a cluster. This method was added in vSphere API 7.0.0.

Parameters
  • cluster (str) – Cluster id. The parameter must be an identifier for the resource type: ClusterComputeResource.

  • spec (TrustAuthorityClusters.UpdateSpec) – The specification for update of a cluster.

Raise

com.vmware.vapi.std.errors_client.Error if there is a generic error.

Raise

com.vmware.vapi.std.errors_client.NotFound if spec doesn’t match to any cluster compute resource.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the user can not be authenticated.

class com.vmware.vcenter.trusted_infrastructure_client.X509CertChain(cert_chain=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The X509CertChain class contains x509 certificate chain. This class was added in vSphere API 7.0.0.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

cert_chain (list of str) – Certificate chain in base64 format. This attribute was added in vSphere API 7.0.0.

com.vmware.vcenter.vcha_client module

The com.vmware.vcenter.vcha_client module provides classes for deploying and monitoring a vCenter High Availability (VCHA) Cluster.

class com.vmware.vcenter.vcha_client.CertificateInfo(ssl_thumbprint=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The CertificateInfo Class contains information about the SSL certificate for a management vCenter server. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

ssl_thumbprint (str) – The SHA-256 thumbprint of the SSL certificate for a management vCenter server. This attribute was added in vSphere API 6.7.1.

class com.vmware.vcenter.vcha_client.Cluster(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Cluster class provides methods to deploy and undeploy a vCenter High Availability (VCHA) cluster, failover from the active VCHA node to the passive VCHA node, and retrieve the status of the VCHA cluster. This class was added in vSphere API 6.7.1.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class ActiveSpec(ha_network_type=None, ha_network=None, ha_ip=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Cluster.ActiveSpec class contains the deploy specification for the Active Node of the VCHA cluster. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • ha_network_type (NetworkType or None) – The type of the Network object used by the HA network. If the Cluster.ActiveSpec.ha_network attribute is set, then the Cluster.ActiveSpec.ha_network_type field must be set. If the Cluster.ActiveSpec.ha_network attribute is None, then the Cluster.ActiveSpec.ha_network_type attribute is ignored. This attribute was added in vSphere API 6.7.1. If None and the Cluster.ActiveSpec.ha_network attribute is unset, then the second NIC is assumed to be already configured. If None and the Cluster.ActiveSpec.ha_network attribute is set, then an error is reported.

  • ha_network (str or None) – The identifier of the Network object used for the HA network. If the Cluster.ActiveSpec.ha_network attribute is set, then the Cluster.ActiveSpec.ha_network_type attribute must be set. If the Cluster.ActiveSpec.ha_network attribute is None, then the Cluster.ActiveSpec.ha_network_type attribute is ignored. This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: Network:VCenter. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: Network:VCenter. If None and the Cluster.ActiveSpec.ha_network_type attribute is unset, then the second NIC is assumed to be already configured. If None and the Cluster.ActiveSpec.ha_network attribute is set, then an error is reported.

  • ha_ip (IpSpec) – IP specification for the HA network. This attribute was added in vSphere API 6.7.1.

class ClusterMode(string)

Bases: vmware.vapi.bindings.enum.Enum

The Cluster.ClusterMode class defines the possible modes for a VCHA Cluster. This enumeration was added in vSphere API 6.7.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 the ClusterMode instance.

DISABLED = ClusterMode(string='DISABLED')

VCHA Cluster is disabled. State replication between the Active and Passive node is disabled and automatic failover is not allowed. This class attribute was added in vSphere API 6.7.1.

ENABLED = ClusterMode(string='ENABLED')

VCHA Cluster is enabled. State replication between the Active and Passive node is enabled and automatic failover is allowed. This class attribute was added in vSphere API 6.7.1.

MAINTENANCE = ClusterMode(string='MAINTENANCE')

VCHA Cluster is in maintenance mode. State replication between the Active and Passive node is enabled but automatic failover is not allowed. This class attribute was added in vSphere API 6.7.1.

class ClusterState(string)

Bases: vmware.vapi.bindings.enum.Enum

The Cluster.ClusterState class defines the possible for a VCHA Cluster. This enumeration was added in vSphere API 6.7.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 the ClusterState instance.

DEGRADED = ClusterState(string='DEGRADED')

A VCHA Cluster is said to be in a degraded state for either or all of the following reasons:

  • There is a node loss.

  • State replication between the Active and Passive node fails.

. This class attribute was added in vSphere API 6.7.1.

HEALTHY = ClusterState(string='HEALTHY')

All three nodes in a VCHA Cluster are healthy and connected. State replication between Active and Passive node is working and both nodes are in sync. This class attribute was added in vSphere API 6.7.1.

ISOLATED = ClusterState(string='ISOLATED')

All three nodes are isolated from each other. This class attribute was added in vSphere API 6.7.1.

class ConfigState(string)

Bases: vmware.vapi.bindings.enum.Enum

The Cluster.ConfigState class defines the VCHA configuration state. This enumeration was added in vSphere API 6.7.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 the ConfigState instance.

CONFIGURED = ConfigState(string='CONFIGURED')

VCHA cluster is configured. This class attribute was added in vSphere API 6.7.1.

INVALID = ConfigState(string='INVALID')

VCHA cluster is in an invalid/dirty state. This class attribute was added in vSphere API 6.7.1.

NOTCONFIGURED = ConfigState(string='NOTCONFIGURED')

VCHA cluster is not configured. This class attribute was added in vSphere API 6.7.1.

PREPARED = ConfigState(string='PREPARED')

vCenter server appliance has been prepared for VCHA cluster configuration. This class attribute was added in vSphere API 6.7.1.

class DeploySpec(vc_spec=None, deployment=None, active=None, passive=None, witness=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Cluster.DeploySpec class contains the deploy specification for the three nodes of a VCHA cluster. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • vc_spec (CredentialsSpec or None) – Contains the active node’s management vCenter server credentials. This attribute was added in vSphere API 6.7.1. If None, then the active vCenter Server instance is assumed to be either self-managed or else in enhanced linked mode and managed by a linked vCenter Server instance.

  • deployment (Cluster.Type) – Contains the deployment type. This attribute was added in vSphere API 6.7.1.

  • active (Cluster.ActiveSpec) – Contains the active node’s network configuration. This attribute was added in vSphere API 6.7.1.

  • passive (Cluster.PassiveSpec) – Contains the passive node’s placement configuration. This attribute was added in vSphere API 6.7.1.

  • witness (Cluster.WitnessSpec) – Contains the witness node’s placement configuration. This attribute was added in vSphere API 6.7.1.

class ErrorCondition(error=None, recommendation=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Cluster.ErrorCondition class contains an error condition and a recommendation to handle the error condition. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
class Info(config_state=None, node1=None, node2=None, witness=None, mode=None, health_state=None, health_exception=None, health_warnings=None, manual_failover_allowed=None, auto_failover_allowed=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Cluster.Info class contains the configuration and health information of the three nodes in a VCHA Cluster. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • config_state (Cluster.ConfigState or None) – Configuration state of the VCHA cluster. The active node’s management vCenter server credentials are not required to populate this attribute. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable.

  • node1 (Cluster.NodeInfo or None) – Node configuration information for the VCHA cluster. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable.

  • node2 (Cluster.NodeInfo or None) – Node configuration information for the VCHA cluster. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable or the node is not cloned yet.

  • witness (Cluster.WitnessInfo or None) – Node configuration information for the VCHA cluster. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable or the node is not cloned yet.

  • mode (Cluster.ClusterMode or None) – Operational mode of the VCHA Cluster. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable or the node is not cloned yet.

  • health_state (Cluster.ClusterState or None) – Last known state of the VCHA Cluster. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable or the node is not cloned yet.

  • health_exception (list of com.vmware.vapi.std_client.LocalizableMessage or None) – Health warning messages if the health information is unavailable. This attribute was added in vSphere API 6.7.1. If None, then the cluster is in a healthy state.

  • health_warnings (list of Cluster.ErrorCondition or None) – A collection of messages describing the reason for a non-healthy Cluster. This attribute was added in vSphere API 6.7.1. If None, then the cluster is in a healthy state.

  • manual_failover_allowed (bool or None) – Specifies if manual failover is allowed. This attribute was added in vSphere API 6.7.1. If None, then the cluster state healthy and manual failover allowance in accordance with the cluster mode.

  • auto_failover_allowed (bool or None) – Specifies if automatic failover is allowed. This attribute was added in vSphere API 6.7.1. If None, then the cluster state healthy and automatic failover allowance in accordance with the cluster mode.

class IpFamily(string)

Bases: vmware.vapi.bindings.enum.Enum

The Cluster.IpFamily class defines the IP address family. This enumeration was added in vSphere API 6.7.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 the IpFamily instance.

IPV4 = IpFamily(string='IPV4')

IPV4 address family. This class attribute was added in vSphere API 6.7.1.

IPV6 = IpFamily(string='IPV6')

IPV6 address family. This class attribute was added in vSphere API 6.7.1.

class IpInfo(ip_family=None, ipv4=None, ipv6=None, gateway_ip=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Cluster.IpInfo class contains attributes related to an ip. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • ip_family (Cluster.IpFamily) – Family of the ip. This attribute was added in vSphere API 6.7.1.

  • ipv4 (Cluster.Ipv4Info) – If the type of the ip family is IPV4, then this will point to IPv4 address specification. This attribute was added in vSphere API 6.7.1. This attribute is optional and it is only relevant when the value of ipFamily is Cluster.IpFamily.IPV4.

  • ipv6 (Cluster.Ipv6Info) – If the type of the ip family is IPV6, then this will point to IPv6 address specification. This attribute was added in vSphere API 6.7.1. This attribute is optional and it is only relevant when the value of ipFamily is Cluster.IpFamily.IPV6.

  • gateway_ip (str or None) – Gateway IP address. This attribute was added in vSphere API 6.7.1. If None, no gateway is specified.

class Ipv4Info(address=None, subnet_mask=None, prefix=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Cluster.Ipv4Info class contains attributes to describe IPV4 information of the configured network interface. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • address (str) – IP address of the configured network interface. This attribute was added in vSphere API 6.7.1.

  • subnet_mask (str) – The subnet mask of the interface. This attribute was added in vSphere API 6.7.1.

  • prefix (long or None) – The CIDR prefix of the interface. This attribute was added in vSphere API 6.7.1. If None , then the subnet mask is invalid.

class Ipv6Info(address=None, prefix=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Cluster.Ipv6Info class contains attributes to describe IPV6 information of the configured network interface. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • address (str) – IP address of the configured network interface. This attribute was added in vSphere API 6.7.1.

  • prefix (long) – The CIDR prefix of the interface. This attribute was added in vSphere API 6.7.1.

class NodeInfo(failover_ip=None, ha_ip=None, runtime=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Cluster.NodeInfo class defines the configuration information for the active and passive nodes in the cluster. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • failover_ip (Cluster.IpInfo or None) – Failover IP address that this node will assume after the failover to serve client requests. Each failover node can have a different failover IP address. The active node’s management vCenter server credentials are not required to populate Cluster.NodeInfo.failover_ip. This attribute was added in vSphere API 6.7.1. If None, then it will assume the public IP address of the Active vCenter Server.

  • ha_ip (Cluster.IpInfo) – VCHA Cluster network configuration of the node. All cluster communication (state replication, heartbeat, cluster messages) happens over this network. The active node’s management vCenter server credentials are not required to populate this Cluster.NodeInfo.ha_ip. This attribute was added in vSphere API 6.7.1.

  • runtime (Cluster.NodeRuntimeInfo or None) – Runtime information for the node in the VCHA Cluster. The active node’s management vCenter server credentials are required to populate some attributes of Cluster.NodeInfo.runtime. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable or the specified Active vCenter server management credentials are invalid or the node is not cloned yet.

class NodeRole(string)

Bases: vmware.vapi.bindings.enum.Enum

The Cluster.NodeRole class defines the role node can be in a VCHA Cluster. This enumeration was added in vSphere API 6.7.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 the NodeRole instance.

ACTIVE = NodeRole(string='ACTIVE')

Node is having a role of Active. In this role, node runs a vCenter Server that serves client requests. This class attribute was added in vSphere API 6.7.1.

PASSIVE = NodeRole(string='PASSIVE')

Node is having a role of Passive. In this role node, runs as a standby for the Active vCenter Server and receives state updates. This node takes over the role of Active vCenter Server upon failover. This class attribute was added in vSphere API 6.7.1.

WITNESS = NodeRole(string='WITNESS')

Node is having a role of Witness. In this role, node acts as a quorum node for avoiding the classic split-brain problem. This class attribute was added in vSphere API 6.7.1.

class NodeRuntimeInfo(state=None, role=None, placement=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Cluster.NodeRuntimeInfo class describes a node’s runtime information in a VCHA Cluster. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • state (Cluster.NodeState or None) – Last known state of the node. The active node’s management vCenter server credentials are not required to populate Cluster.NodeRuntimeInfo.state. This attribute was added in vSphere API 6.7.1. If None, then information is unavailable or the passive and witness nodes are not cloned yet.

  • role (Cluster.NodeRole or None) – Last known role of the node. The active node’s management vCenter server credentials are not required to populate Cluster.NodeRuntimeInfo.role. This attribute was added in vSphere API 6.7.1. If None, then information is unavailable or the passive and witness nodes are not cloned yet.

  • placement (PlacementInfo or None) – Placement information of the node. The active node’s management vCenter server credentials are required to populate most attributes of Cluster.NodeRuntimeInfo.placement. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable or the specified Active vCenter server management credentials are invalid or the node is not cloned yet or the VCHA cluster was deployed in a manual fashion.

class NodeState(string)

Bases: vmware.vapi.bindings.enum.Enum

The Cluster.NodeState class defines possible state a node can be in a VCHA Cluster. This enumeration was added in vSphere API 6.7.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 the NodeState instance.

DOWN = NodeState(string='DOWN')

Node is down and has left the VCHA Cluster. This class attribute was added in vSphere API 6.7.1.

UP = NodeState(string='UP')

Node is up and has joined the VCHA Cluster. This class attribute was added in vSphere API 6.7.1.

class NodeVmInfo(vm=None, bios_uuid=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Cluster.NodeVmInfo class contains information to describe the Virtual Machine of a node of a VCHA cluster. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • vm (str) – The identifier of the virtual machine of the VCHA node. This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: VirtualMachine:VCenter. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: VirtualMachine:VCenter.

  • bios_uuid (str) – BIOS UUID for the node. This attribute was added in vSphere API 6.7.1.

class PassiveSpec(placement=None, ha_ip=None, failover_ip=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Cluster.PassiveSpec class contains the deploy specification for the Passive Node of the VCHA cluster. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • placement (PlacementSpec or None) – Contains the placement configuration of the node. This attribute was added in vSphere API 6.7.1. If None, then the it is assumed that the clone will be done manually by the customer. In this case, the placement configuration for the witness node should also be omitted. Only the network configuration will be setup. Once the passive and witness nodes are cloned from the active node, the VCHA high availability is turned on.

  • ha_ip (IpSpec) – IP specification for the HA network. This attribute was added in vSphere API 6.7.1.

  • failover_ip (IpSpec or None) – IP specification for the management network. This attribute was added in vSphere API 6.7.1. If None, then it will assume the public IP address of the Active vCenter Server.

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

The Cluster.Type class defines the possible deployment types for a VCHA Cluster. This enumeration was added in vSphere API 6.7.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 the Type instance.

AUTO = Type(string='AUTO')

Passive and witness nodes are cloned automatically. This class attribute was added in vSphere API 6.7.1.

MANUAL = Type(string='MANUAL')

Passive and witness nodes are not cloned automatically. After deployment, the customer should clone the passive and witness virtual machines. This class attribute was added in vSphere API 6.7.1.

class UndeploySpec(vc_spec=None, force_delete=None, vms=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Cluster.UndeploySpec class contains the undeploy specification for a VCHA cluster. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • vc_spec (CredentialsSpec or None) – Contains the active node’s management vCenter server credentials. This attribute was added in vSphere API 6.7.1. If None, then the active vCenter Server instance is assumed to be either self-managed or else in enhanced linked mode and managed by a linked vCenter Server instance.

  • force_delete (bool or None) –

    Flag controlling in what circumstances the virtual machines will be deleted. For this flag to take effect, the VCHA cluster should have been successfully configured using automatic deployment.

    • If true, the Cluster.UndeploySpec.vms attribute will be ignored, the VCHA cluster specific information is removed, and the passive and witness virtual machines will be deleted.

    • If false, the Cluster.UndeploySpec.vms attribute contains the information identifying the passive and witness virtual machines.

    • If the Cluster.UndeploySpec.vms attribute is set, then it will be validated prior to deleting the passive and witness virtual machines and VCHA cluster specific information is removed.

    • If the Cluster.UndeploySpec.vms attribute is None, then the passive and witness virtual machines will not be deleted. The customer should delete them in order to cleanup completely. VCHA cluster specific information is removed.

    . This attribute was added in vSphere API 6.7.1. If None, the Cluster.UndeploySpec.vms attribute contains the information identifying the passive and witness virtual machines.

    • If the Cluster.UndeploySpec.vms attribute is set, then it will be validated prior to deleting the passive and witness virtual machines. VCHA cluster specific information is removed.

    • If the Cluster.UndeploySpec.vms attribute is None, then the passive and witness virtual machines will not be deleted. The customer should delete them in order to cleanup completely. VCHA cluster specific information is removed.

  • vms (Cluster.VmInfo or None) –

    Contains virtual machine information for the passive and witness virtual machines. For this flag to take effect, the VCHA cluster should have been successfully configured using automatic deployment.

    If set, the Cluster.UndeploySpec.force_delete attribute controls whether this information is validated.

    • If the Cluster.UndeploySpec.force_delete attribute is true, then this information is ignored, VCHA cluster specific information is removed and the passive and witness virtual machines will be deleted.

    • If the Cluster.UndeploySpec.force_delete attribute is None or false, then this information is validated prior to deleting the passive and witness virtual machines. VCHA cluster specific information is removed.

    . This attribute was added in vSphere API 6.7.1. If None, the Cluster.UndeploySpec.force_delete attribute controls the deletion of the passive and witness virtual machines.

    • If the Cluster.UndeploySpec.force_delete attribute is true, then the passive and witness virtual machines will be deleted. VCHA cluster specific information is removed.

    • If the Cluster.UndeploySpec.force_delete attribute is None or false, then the passive and witness virtual machines will not be deleted. The customer should delete them in order to cleanup completely. VCHA cluster specific information is removed.

class VmInfo(passive=None, witness=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Cluster.VmInfo class contains information to describe the Virtual Machines of passive and witness nodes of a VCHA cluster. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • passive (Cluster.NodeVmInfo) – The virtual machine information of the passive node. This attribute was added in vSphere API 6.7.1.

  • witness (Cluster.NodeVmInfo) – The virtual machine information of the witness node. This attribute was added in vSphere API 6.7.1.

class WitnessInfo(ha_ip=None, runtime=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Cluster.WitnessInfo class defines the configuration and runtime information for the witness node in the cluster. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • ha_ip (Cluster.IpInfo) – VCHA Cluster network configuration of the node. All cluster communication (state replication, heartbeat, cluster messages) happens over this network. The active node’s management vCenter server credentials are not required to populate Cluster.WitnessInfo.ha_ip. This attribute was added in vSphere API 6.7.1.

  • runtime (Cluster.NodeRuntimeInfo or None) – Runtime information for the node in the VCHA Cluster. The active node’s management vCenter server credentials are required to populate some attributes of Cluster.WitnessInfo.runtime. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable or the node is not cloned yet.

class WitnessSpec(placement=None, ha_ip=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Cluster.WitnessSpec class contains the deploy specification for the Witness Node of the VCHA cluster. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • placement (PlacementSpec or None) – Contains the placement configuration of the node. This attribute was added in vSphere API 6.7.1. If None, then it is assumed that the clone will be done manually by the customer. In this case, the placement configuration for the witness node should also be omitted. Only the network configuration will be setup. Once the passive and witness nodes are cloned from the active node, the VCHA high availability is turned on.

  • ha_ip (IpSpec) – IP specification for the HA network. This attribute was added in vSphere API 6.7.1.

deploy_task(spec)

Prepares, clones, and configures a VCHA cluster. This method was added in vSphere API 6.7.1.

Parameters

spec (Cluster.DeploySpec) – Contains the deploy specification for all three nodes of a VCHA cluster.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument If the credentials provided for authenticating with the active node’s management vCenter server are invalid.

Raise

com.vmware.vapi.std.errors_client.Unauthorized If the user has insufficient privilege to perform the operation. Operation execution requires the Global.VCServer privilege.

Raise

com.vmware.vapi.std.errors_client.UnverifiedPeer If the SSL certificate of the management vCenter server cannot be validated. The value of the data attribute of com.vmware.vapi.std.errors_client.Error will be a class that contains all the attributes defined in CertificateInfo.

Raise

com.vmware.vapi.std.errors_client.Error If any other error occurs.

failover_task(planned)

Initiates failover from the active vCenter node to the passive node.

For forced failover, Active node immediately initiates a failover. This may result into a data loss after failover.

For planned failover, Active node flushes all the state to the Passive node, waits for the flush to complete before causing a failover. After the failover, Passive node starts without any data loss.

A failover is allowed only in the following cases:

  1. Cluster’s mode is enabled and all cluster members are present.

  2. Cluster’s mode is maintenance and all cluster members are present.

. This method was added in vSphere API 6.7.1.

Parameters

planned (bool) – If false, a failover is initiated immediately and may result in data loss. If true, a failover is initated after the Active node flushes its state to Passive and there is no data loss.

Raise

com.vmware.vapi.std.errors_client.Unauthorized If the user has insufficient privilege to perform the operation. Operation execution requires the Global.VCServer privilege.

Raise

com.vmware.vapi.std.errors_client.Error If any other error occurs.

get(vc_spec=None, partial=None)

Retrieves the status of a VCHA cluster. This method was added in vSphere API 6.7.1.

Parameters
  • vc_spec (CredentialsSpec or None) – Contains active node’s management vCenter server credentials. If None, then the active vCenter Server instance is assumed to be either self-managed or else in enhanced linked mode and managed by a linked vCenter Server instance.

  • partial (bool or None) –

    If true, then return only the information that does not require connecting to the Active vCenter Server.

    If false or unset, then return all the information.

    If None, then return all the information.

Return type

Cluster.Info

Returns

Info structure containing the VCHA configuration and health information.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument If the credentials provided for authenticating with the active node’s management vCenter server are invalid.

Raise

com.vmware.vapi.std.errors_client.Unauthorized If the user has insufficient privilege to perform the operation.

  • If partial is false or unset, then the operation execution requires the Global.VCServer privilege.

  • If partial is true, then the operation execution requires the System.Read privilege.

Raise

com.vmware.vapi.std.errors_client.UnverifiedPeer If the SSL certificate of the management vCenter server cannot be validated. The value of the data attribute of com.vmware.vapi.std.errors_client.Error will be a class that contains all the attributes defined in CertificateInfo.

Raise

com.vmware.vapi.std.errors_client.Error If any other error occurs.

undeploy_task(spec)

Destroys the VCHA cluster and removes all VCHA specific information from the VCVA appliance. Optionally, the passive and witness node virtual machines will be deleted only if VCHA was deployed using automatic deployment. The active node in the cluster continues to run as a standalone VCVA appliance after the destroy operation has been performed.

If the VCHA cluster is in a transition state and not configured, then the VCHA cluster specific information is removed.. This method was added in vSphere API 6.7.1.

Parameters

spec (Cluster.UndeploySpec) – Contains the undeploy specification for a VCHA cluster.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument If the credentials provided for authenticating with the active node’s management vCenter server are invalid.

Raise

com.vmware.vapi.std.errors_client.NotFound If the passive virtual machine is not managed by the specified vCenter server.

Raise

com.vmware.vapi.std.errors_client.NotFound If the witness virtual machine is not managed by the specified vCenter server.

Raise

com.vmware.vapi.std.errors_client.Unauthorized If the user has insufficient privilege to perform the operation. Operation execution requires the Global.VCServer privilege.

Raise

com.vmware.vapi.std.errors_client.UnverifiedPeer If the SSL certificate of the management vCenter server cannot be validated. The value of the data attribute of com.vmware.vapi.std.errors_client.Error will be a class that contains all the attributes defined in CertificateInfo.

Raise

com.vmware.vapi.std.errors_client.Error If any other error occurs.

class com.vmware.vcenter.vcha_client.ConnectionSpec(hostname=None, port=None, ssl_thumbprint=None, username=None, password=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ConnectionSpec class contains information required to connect to a vCenter server. The connection to the vCenter server always uses the HTTPS protocol. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • hostname (str) – IP Address or DNS of the vCenter. This attribute was added in vSphere API 6.7.1.

  • port (long or None) – Port number. This attribute was added in vSphere API 6.7.1. If None, port 443 will be used.

  • ssl_thumbprint (str or None) – SHA1 hash of the server SSL certificate. This attribute was added in vSphere API 6.7.1. If None, empty ssl thumbprint is assumed.

  • username (str or None) – Username to access the server. This attribute was added in vSphere API 6.7.1. This attribute is currently required. If None, an error is returned. In the future, if this attribute is None, the system will attempt to identify the user. If a user cannot be identified, then the requested operation will fail.

  • password (str or None) – Password for the specified user. This attribute was added in vSphere API 6.7.1. This attribute is currently required. If None, an empty password is assumed. In the future, if this attribute is None, the system will attempt to authenticate the user. If a user cannot be identified, then the requested operation will fail.

class com.vmware.vcenter.vcha_client.CredentialsSpec(active_location=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The CredentialsSpec class contains information to connect to the vCenter server managing the VCHA nodes. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

active_location (ConnectionSpec) – Connection information for the management vCenter Server of the Active Node in a VCHA Cluster. This attribute was added in vSphere API 6.7.1.

class com.vmware.vcenter.vcha_client.DiskInfo(datastore=None, datastore_name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The DiskInfo class contains information to describe the storage configuration of a vCenter virtual machine. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • datastore (str) – The identifier of the datastore to put all the virtual disks on. This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: Datastore:VCenter. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: Datastore:VCenter.

  • datastore_name (str) – The name of the datastore. This attribute was added in vSphere API 6.7.1.

class com.vmware.vcenter.vcha_client.DiskSpec(datastore=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The DiskSpec class contains information to describe the storage configuration of a vCenter virtual machine. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

datastore (str or None) – The identifier of the datastore to put all the virtual disks on. This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: Datastore:VCenter. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: Datastore:VCenter. This field needs to be set. If None, then see vim.vm.RelocateSpec.datastore.

class com.vmware.vcenter.vcha_client.IpFamily(string)

Bases: vmware.vapi.bindings.enum.Enum

The IpFamily class defines the Ip address family. This enumeration was added in vSphere API 6.7.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 the IpFamily instance.

IPV4 = IpFamily(string='IPV4')

IPV4 address family. This class attribute was added in vSphere API 6.7.1.

IPV6 = IpFamily(string='IPV6')

IPv6 address family. This class attribute was added in vSphere API 6.7.1.

class com.vmware.vcenter.vcha_client.IpSpec(ip_family=None, ipv4=None, ipv6=None, default_gateway=None, dns_servers=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The IpSpec class contains IP information used to configure a network interface. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • ip_family (IpFamily) – Family of the IP address to configure the interface. This attribute was added in vSphere API 6.7.1.

  • ipv4 (Ipv4Spec) – If the family of the ip is IPV4, then this will point to IPv4 address specification. This attribute was added in vSphere API 6.7.1. This attribute is optional and it is only relevant when the value of ipFamily is IpFamily.IPV4.

  • ipv6 (Ipv6Spec) – If the family of the ip is IPV6, then this will point to IPv6 address specification. This attribute was added in vSphere API 6.7.1. This attribute is optional and it is only relevant when the value of ipFamily is IpFamily.IPV6.

  • default_gateway (str or None) – The IP address of the Gateway for this interface. This attribute was added in vSphere API 6.7.1. If None, gateway will not be used for the network interface.

  • dns_servers (list of str or None) – The list of IP addresses of the DNS servers for this interface. This list is a comma separated list. This attribute was added in vSphere API 6.7.1. If None, DNS servers will not be used for the network interface.

class com.vmware.vcenter.vcha_client.Ipv4Spec(address=None, subnet_mask=None, prefix=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Ipv4Spec class contains IPV4 information used to configure a network interface. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • address (str) – IPV4 address to be used to configure the interface. This attribute was added in vSphere API 6.7.1.

  • subnet_mask (str or None) – The subnet mask for the interface. This attribute was added in vSphere API 6.7.1. If None and the prefix attribute is None, then an error will be reported. If None and the prefix attribute is set, then the prefix attribute will be used to create a subnet mask whose first prefix bits are 1 and the remaining bits 0. If both the subnetMask attribute and the prefix attribute are set and they do not represent the same value, then an error will be reported.

  • prefix (long or None) – The CIDR prefix for the interface. This attribute was added in vSphere API 6.7.1. If None and the subnetMask attribute is None, this an error will be reported. If None and the subnetMask attribute is set, then the subnetMask attribute will be used. If both the subnetMask attribute and the prefix attribute are set and they do not represent the same value, then an error will be reported.

class com.vmware.vcenter.vcha_client.Ipv6Spec(address=None, prefix=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Ipv6Spec class contains IPV6 information used to configure a network interface. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • address (str) – IPv6 address to be used to configure the interface. This attribute was added in vSphere API 6.7.1.

  • prefix (long) – The CIDR prefix for the interface. This attribute was added in vSphere API 6.7.1.

class com.vmware.vcenter.vcha_client.NetworkType(string)

Bases: vmware.vapi.bindings.enum.Enum

The NetworkType class defines the type of a vCenter Server network. This enumeration was added in vSphere API 6.7.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 the NetworkType instance.

DISTRIBUTED_PORTGROUP = NetworkType(string='DISTRIBUTED_PORTGROUP')

Distributed virtual switch. This class attribute was added in vSphere API 6.7.1.

STANDARD_PORTGROUP = NetworkType(string='STANDARD_PORTGROUP')

vSphere standard portgroup network. This class attribute was added in vSphere API 6.7.1.

class com.vmware.vcenter.vcha_client.Operations(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Operations class provides methods to figure out the currently active operations and currently disabled operations in a vCenter High Availability (VCHA) cluster. This class was added in vSphere API 6.7.1.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

CLUSTER_DEPLOY_OP = 'com.vmware.vcenter.vcha.cluster.deploy'

Identifier of the cluster deploy operation. This class attribute was added in vSphere API 6.7.1.

CLUSTER_FAILOVER_OP = 'com.vmware.vcenter.vcha.cluster.failover'

Identifier of the cluster failover operation. This class attribute was added in vSphere API 6.7.1.

CLUSTER_GET_OP = 'com.vmware.vcenter.vcha.cluster.get'

Identifier of the cluster get operation. This class attribute was added in vSphere API 6.7.1.

CLUSTER_UNDEPLOY_OP = 'com.vmware.vcenter.vcha.cluster.undeploy'

Identifier of the cluster undeploy operation. This class attribute was added in vSphere API 6.7.1.

class Info(disabled=None, active=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Operations.Info class contains information about which the VCHA operations cannot be invoked in the current state of the system and the list of currently active VCHA operations. This class was added in vSphere API 6.7.1.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters