com.vmware.vcenter package

Submodules

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

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

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.

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.

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.

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.

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.

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.

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

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.

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.

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 null 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 null 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

class InstallSpec(vcsa_embedded=None, psc=None, vcsa_external=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.

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

Bases: vmware.vapi.bindings.struct.VapiStruct

The Install.PscSpec class contains information used to configure a standalone or replicated PSC. This class was added in vSphere API 6.7

Tip

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

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.

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.

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.

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.

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.

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

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

Bases: vmware.vapi.bindings.stub.StubFactoryBase

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

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.

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.

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.

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.

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.

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.hvc_client module

The com.vmware.vcenter.hvc_client module provides classes to manage hybrid links between a local and remote Platform Service Controller.

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). Warning: This class is available as technical preview. It may be changed in a future release.

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 technical preview. It may be changed in a future release.

Tip

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

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 technical preview. It may be changed in a future release.

Tip

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

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 technical preview. It may be changed in a future release.

Tip

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

create(spec)

Creates a new hybrid link between the local and foreign PSC. Warning: This method is available as technical preview. It may be changed in a future release.

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 spec is 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.InvalidRequest 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 InvalidRequest#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. Warning: This method is available as technical preview. It may be changed in a future release.

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. Warning: This method is available as technical preview. It may be changed in a future release.

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

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.

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.

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.

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.

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

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.

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

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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().
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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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 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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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

Bases: vmware.vapi.bindings.stub.StubFactoryBase

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.

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.

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.

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

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.

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.

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.

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.

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.

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

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

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.

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.

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.

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.

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

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

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.

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.

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 form 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

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.

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

com.vmware.vcenter.vm_client module

The com.vmware.vcenter.vm_client module provides classes for managing virtual machines.

class com.vmware.vcenter.vm_client.GuestOS(string)

Bases: vmware.vapi.bindings.enum.Enum

The GuestOS class defines the valid guest operating system types used for configuring a virtual machine.

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.

ASIANUX_3 = GuestOS(string='ASIANUX_3')

Asianux Server 3

ASIANUX_3_64 = GuestOS(string='ASIANUX_3_64')

Asianux Server 3 (64 bit)

ASIANUX_4 = GuestOS(string='ASIANUX_4')

Asianux Server 4

ASIANUX_4_64 = GuestOS(string='ASIANUX_4_64')

Asianux Server 4 (64 bit)

ASIANUX_5_64 = GuestOS(string='ASIANUX_5_64')

Asianux Server 5 (64 bit)

ASIANUX_7_64 = GuestOS(string='ASIANUX_7_64')

Asianux Server 7 (64 bit)

ASIANUX_8_64 = GuestOS(string='ASIANUX_8_64')

Asianux Server 8 (64 bit). This class attribute was added in vSphere API 6.7

CENTOS = GuestOS(string='CENTOS')

CentOS 4/5

CENTOS_6 = GuestOS(string='CENTOS_6')

CentOS 6

CENTOS_64 = GuestOS(string='CENTOS_64')

CentOS 4/5 (64-bit)

CENTOS_6_64 = GuestOS(string='CENTOS_6_64')

CentOS 6 (64-bit)

CENTOS_7 = GuestOS(string='CENTOS_7')

CentOS 7

CENTOS_7_64 = GuestOS(string='CENTOS_7_64')

CentOS 7 (64-bit)

CENTOS_8_64 = GuestOS(string='CENTOS_8_64')

CentOS 8 (64-bit). This class attribute was added in vSphere API 6.7

COREOS_64 = GuestOS(string='COREOS_64')

CoreOS Linux (64 bit)

DARWIN = GuestOS(string='DARWIN')

Mac OS 10.5

DARWIN_10 = GuestOS(string='DARWIN_10')

Mac OS 10.6

DARWIN_10_64 = GuestOS(string='DARWIN_10_64')

Mac OS 10.6 (64 bit)

DARWIN_11 = GuestOS(string='DARWIN_11')

Mac OS 10.7

DARWIN_11_64 = GuestOS(string='DARWIN_11_64')

Mac OS 10.7 (64 bit)

DARWIN_12_64 = GuestOS(string='DARWIN_12_64')

Mac OS 10.8 (64 bit)

DARWIN_13_64 = GuestOS(string='DARWIN_13_64')

Mac OS 10.9 (64 bit)

DARWIN_14_64 = GuestOS(string='DARWIN_14_64')

Mac OS 10.10 (64 bit)

DARWIN_15_64 = GuestOS(string='DARWIN_15_64')

Mac OS 10.11 (64 bit)

DARWIN_16_64 = GuestOS(string='DARWIN_16_64')

Mac OS 10.12 (64 bit)

DARWIN_17_64 = GuestOS(string='DARWIN_17_64')

Mac OS 10.13 (64 bit). This class attribute was added in vSphere API 6.7

DARWIN_18_64 = GuestOS(string='DARWIN_18_64')

Mac OS 10.14 (64 bit). This class attribute was added in vSphere API 6.7

DARWIN_64 = GuestOS(string='DARWIN_64')

Mac OS 10.5 (64 bit)

DEBIAN_10 = GuestOS(string='DEBIAN_10')

Debian GNU/Linux 10

DEBIAN_10_64 = GuestOS(string='DEBIAN_10_64')

Debian GNU/Linux 10 (64 bit)

DEBIAN_4 = GuestOS(string='DEBIAN_4')

Debian GNU/Linux 4

DEBIAN_4_64 = GuestOS(string='DEBIAN_4_64')

Debian GNU/Linux 4 (64 bit)

DEBIAN_5 = GuestOS(string='DEBIAN_5')

Debian GNU/Linux 5

DEBIAN_5_64 = GuestOS(string='DEBIAN_5_64')

Debian GNU/Linux 5 (64 bit)

DEBIAN_6 = GuestOS(string='DEBIAN_6')

Debian GNU/Linux 6

DEBIAN_6_64 = GuestOS(string='DEBIAN_6_64')

Debian GNU/Linux 6 (64 bit)

DEBIAN_7 = GuestOS(string='DEBIAN_7')

Debian GNU/Linux 7

DEBIAN_7_64 = GuestOS(string='DEBIAN_7_64')

Debian GNU/Linux 7 (64 bit)

DEBIAN_8 = GuestOS(string='DEBIAN_8')

Debian GNU/Linux 8

DEBIAN_8_64 = GuestOS(string='DEBIAN_8_64')

Debian GNU/Linux 8 (64 bit)

DEBIAN_9 = GuestOS(string='DEBIAN_9')

Debian GNU/Linux 9

DEBIAN_9_64 = GuestOS(string='DEBIAN_9_64')

Debian GNU/Linux 9 (64 bit)

DOS = GuestOS(string='DOS')

MS-DOS.

ECOMSTATION = GuestOS(string='ECOMSTATION')

eComStation 1.x

ECOMSTATION_2 = GuestOS(string='ECOMSTATION_2')

eComStation 2.0

FEDORA = GuestOS(string='FEDORA')

Fedora Linux

FEDORA_64 = GuestOS(string='FEDORA_64')

Fedora Linux (64 bit)

FREEBSD = GuestOS(string='FREEBSD')

FreeBSD 10 or earlier

FREEBSD_11 = GuestOS(string='FREEBSD_11')

FreeBSD 11. This class attribute was added in vSphere API 6.7

FREEBSD_11_64 = GuestOS(string='FREEBSD_11_64')

FreeBSD 11 x64. This class attribute was added in vSphere API 6.7

FREEBSD_12 = GuestOS(string='FREEBSD_12')

FreeBSD 12 or later. This class attribute was added in vSphere API 6.7

FREEBSD_12_64 = GuestOS(string='FREEBSD_12_64')

FreeBSD 12 x64 or later. This class attribute was added in vSphere API 6.7

FREEBSD_64 = GuestOS(string='FREEBSD_64')

FreeBSD 10 x64 or earlier

GENERIC_LINUX = GuestOS(string='GENERIC_LINUX')

Other Linux

MANDRAKE = GuestOS(string='MANDRAKE')

Mandrake Linux

MANDRIVA = GuestOS(string='MANDRIVA')

Mandriva Linux

MANDRIVA_64 = GuestOS(string='MANDRIVA_64')

Mandriva Linux (64 bit)

NETWARE_4 = GuestOS(string='NETWARE_4')

Novell NetWare 4

NETWARE_5 = GuestOS(string='NETWARE_5')

Novell NetWare 5.1

NETWARE_6 = GuestOS(string='NETWARE_6')

Novell NetWare 6.x

NLD_9 = GuestOS(string='NLD_9')

Novell Linux Desktop 9

OES = GuestOS(string='OES')

Open Enterprise Server

OPENSERVER_5 = GuestOS(string='OPENSERVER_5')

SCO OpenServer 5

OPENSERVER_6 = GuestOS(string='OPENSERVER_6')

SCO OpenServer 6

OPENSUSE = GuestOS(string='OPENSUSE')

OpenSUSE Linux

OPENSUSE_64 = GuestOS(string='OPENSUSE_64')

OpenSUSE Linux (64 bit)

ORACLE_LINUX = GuestOS(string='ORACLE_LINUX')

Oracle Linux 4/5

ORACLE_LINUX_6 = GuestOS(string='ORACLE_LINUX_6')

Oracle Linux 6

ORACLE_LINUX_64 = GuestOS(string='ORACLE_LINUX_64')

Oracle Linux 4/5 (64-bit)

ORACLE_LINUX_6_64 = GuestOS(string='ORACLE_LINUX_6_64')

Oracle Linux 6 (64-bit)

ORACLE_LINUX_7 = GuestOS(string='ORACLE_LINUX_7')

Oracle Linux 7

ORACLE_LINUX_7_64 = GuestOS(string='ORACLE_LINUX_7_64')

Oracle Linux 7 (64-bit)

ORACLE_LINUX_8_64 = GuestOS(string='ORACLE_LINUX_8_64')

Oracle Linux 8 (64-bit). This class attribute was added in vSphere API 6.7

OS2 = GuestOS(string='OS2')

OS/2

OTHER = GuestOS(string='OTHER')

Other Operating System

OTHER_24X_LINUX = GuestOS(string='OTHER_24X_LINUX')

Linux 2.4x Kernel

OTHER_24X_LINUX_64 = GuestOS(string='OTHER_24X_LINUX_64')

Linux 2.4x Kernel (64 bit) (experimental)

OTHER_26X_LINUX = GuestOS(string='OTHER_26X_LINUX')

Linux 2.6x Kernel

OTHER_26X_LINUX_64 = GuestOS(string='OTHER_26X_LINUX_64')

Linux 2.6x Kernel (64 bit) (experimental)

OTHER_3X_LINUX = GuestOS(string='OTHER_3X_LINUX')

Linux 3.x Kernel

OTHER_3X_LINUX_64 = GuestOS(string='OTHER_3X_LINUX_64')

Linux 3.x Kernel (64 bit)

OTHER_4X_LINUX = GuestOS(string='OTHER_4X_LINUX')

Linux 4.x Kernel. This class attribute was added in vSphere API 6.7

OTHER_4X_LINUX_64 = GuestOS(string='OTHER_4X_LINUX_64')

Linux 4.x Kernel (64 bit). This class attribute was added in vSphere API 6.7

OTHER_64 = GuestOS(string='OTHER_64')

Other Operating System (64 bit) (experimental)

OTHER_LINUX = GuestOS(string='OTHER_LINUX')

Linux 2.2x Kernel

OTHER_LINUX_64 = GuestOS(string='OTHER_LINUX_64')

Linux (64 bit) (experimental)

REDHAT = GuestOS(string='REDHAT')

Red Hat Linux 2.1

RHEL_2 = GuestOS(string='RHEL_2')

Red Hat Enterprise Linux 2

RHEL_3 = GuestOS(string='RHEL_3')

Red Hat Enterprise Linux 3

RHEL_3_64 = GuestOS(string='RHEL_3_64')

Red Hat Enterprise Linux 3 (64 bit)

RHEL_4 = GuestOS(string='RHEL_4')

Red Hat Enterprise Linux 4

RHEL_4_64 = GuestOS(string='RHEL_4_64')

Red Hat Enterprise Linux 4 (64 bit)

RHEL_5 = GuestOS(string='RHEL_5')

Red Hat Enterprise Linux 5

RHEL_5_64 = GuestOS(string='RHEL_5_64')

Red Hat Enterprise Linux 5 (64 bit) (experimental)

RHEL_6 = GuestOS(string='RHEL_6')

Red Hat Enterprise Linux 6

RHEL_6_64 = GuestOS(string='RHEL_6_64')

Red Hat Enterprise Linux 6 (64 bit)

RHEL_7 = GuestOS(string='RHEL_7')

Red Hat Enterprise Linux 7

RHEL_7_64 = GuestOS(string='RHEL_7_64')

Red Hat Enterprise Linux 7 (64 bit)

RHEL_8_64 = GuestOS(string='RHEL_8_64')

Red Hat Enterprise Linux 8 (64 bit). This class attribute was added in vSphere API 6.7

SJDS = GuestOS(string='SJDS')

Sun Java Desktop System

SLES = GuestOS(string='SLES')

Suse Linux Enterprise Server 9

SLES_10 = GuestOS(string='SLES_10')

Suse linux Enterprise Server 10

SLES_10_64 = GuestOS(string='SLES_10_64')

Suse Linux Enterprise Server 10 (64 bit) (experimental)

SLES_11 = GuestOS(string='SLES_11')

Suse linux Enterprise Server 11

SLES_11_64 = GuestOS(string='SLES_11_64')

Suse Linux Enterprise Server 11 (64 bit)

SLES_12 = GuestOS(string='SLES_12')

Suse linux Enterprise Server 12

SLES_12_64 = GuestOS(string='SLES_12_64')

Suse Linux Enterprise Server 12 (64 bit)

SLES_15_64 = GuestOS(string='SLES_15_64')

Suse Linux Enterprise Server 15 (64 bit). This class attribute was added in vSphere API 6.7

SLES_64 = GuestOS(string='SLES_64')

Suse Linux Enterprise Server 9 (64 bit)

SOLARIS_10 = GuestOS(string='SOLARIS_10')

Solaris 10 (32 bit) (experimental)

SOLARIS_10_64 = GuestOS(string='SOLARIS_10_64')

Solaris 10 (64 bit) (experimental)

SOLARIS_11_64 = GuestOS(string='SOLARIS_11_64')

Solaris 11 (64 bit)

SOLARIS_6 = GuestOS(string='SOLARIS_6')

Solaris 6

SOLARIS_7 = GuestOS(string='SOLARIS_7')

Solaris 7

SOLARIS_8 = GuestOS(string='SOLARIS_8')

Solaris 8

SOLARIS_9 = GuestOS(string='SOLARIS_9')

Solaris 9

SUSE = GuestOS(string='SUSE')

Suse Linux

SUSE_64 = GuestOS(string='SUSE_64')

Suse Linux (64 bit)

TURBO_LINUX = GuestOS(string='TURBO_LINUX')

Turbolinux

TURBO_LINUX_64 = GuestOS(string='TURBO_LINUX_64')

Turbolinux (64 bit)

UBUNTU = GuestOS(string='UBUNTU')

Ubuntu Linux

UBUNTU_64 = GuestOS(string='UBUNTU_64')

Ubuntu Linux (64 bit)

UNIXWARE_7 = GuestOS(string='UNIXWARE_7')

SCO UnixWare 7

VMKERNEL = GuestOS(string='VMKERNEL')

VMware ESX 4

VMKERNEL_5 = GuestOS(string='VMKERNEL_5')

VMware ESX 5

VMKERNEL_6 = GuestOS(string='VMKERNEL_6')

VMware ESX 6

VMKERNEL_65 = GuestOS(string='VMKERNEL_65')

VMware ESX 6.5

VMWARE_PHOTON_64 = GuestOS(string='VMWARE_PHOTON_64')

VMware Photon (64 bit)

WINDOWS_7 = GuestOS(string='WINDOWS_7')

Windows 7

WINDOWS_7_64 = GuestOS(string='WINDOWS_7_64')

Windows 7 (64 bit)

WINDOWS_7_SERVER_64 = GuestOS(string='WINDOWS_7_SERVER_64')

Windows Server 2008 R2 (64 bit)

WINDOWS_8 = GuestOS(string='WINDOWS_8')

Windows 8

WINDOWS_8_64 = GuestOS(string='WINDOWS_8_64')

Windows 8 (64 bit)

WINDOWS_8_SERVER_64 = GuestOS(string='WINDOWS_8_SERVER_64')

Windows 8 Server (64 bit)

WINDOWS_9 = GuestOS(string='WINDOWS_9')

Windows 10

WINDOWS_9_64 = GuestOS(string='WINDOWS_9_64')

Windows 10 (64 bit)

WINDOWS_9_SERVER_64 = GuestOS(string='WINDOWS_9_SERVER_64')

Windows 10 Server (64 bit)

WINDOWS_HYPERV = GuestOS(string='WINDOWS_HYPERV')

Windows Hyper-V

WIN_2000_ADV_SERV = GuestOS(string='WIN_2000_ADV_SERV')

Windows 2000 Advanced Server

WIN_2000_PRO = GuestOS(string='WIN_2000_PRO')

Windows 2000 Professional

WIN_2000_SERV = GuestOS(string='WIN_2000_SERV')

Windows 2000 Server

WIN_31 = GuestOS(string='WIN_31')

Windows 3.1

WIN_95 = GuestOS(string='WIN_95')

Windows 95

WIN_98 = GuestOS(string='WIN_98')

Windows 98

WIN_LONGHORN = GuestOS(string='WIN_LONGHORN')

Windows Longhorn (experimental)

WIN_LONGHORN_64 = GuestOS(string='WIN_LONGHORN_64')

Windows Longhorn (64 bit) (experimental)

WIN_ME = GuestOS(string='WIN_ME')

Windows Millennium Edition

WIN_NET_BUSINESS = GuestOS(string='WIN_NET_BUSINESS')

Windows Small Business Server 2003

WIN_NET_DATACENTER = GuestOS(string='WIN_NET_DATACENTER')

Windows Server 2003, Datacenter Edition

WIN_NET_DATACENTER_64 = GuestOS(string='WIN_NET_DATACENTER_64')

Windows Server 2003, Datacenter Edition (64 bit) (experimental)

WIN_NET_ENTERPRISE = GuestOS(string='WIN_NET_ENTERPRISE')

Windows Server 2003, Enterprise Edition

WIN_NET_ENTERPRISE_64 = GuestOS(string='WIN_NET_ENTERPRISE_64')

Windows Server 2003, Enterprise Edition (64 bit)

WIN_NET_STANDARD = GuestOS(string='WIN_NET_STANDARD')

Windows Server 2003, Standard Edition

WIN_NET_STANDARD_64 = GuestOS(string='WIN_NET_STANDARD_64')

Windows Server 2003, Standard Edition (64 bit)

WIN_NET_WEB = GuestOS(string='WIN_NET_WEB')

Windows Server 2003, Web Edition

WIN_NT = GuestOS(string='WIN_NT')

Windows NT 4

WIN_VISTA = GuestOS(string='WIN_VISTA')

Windows Vista

WIN_VISTA_64 = GuestOS(string='WIN_VISTA_64')

Windows Vista (64 bit)

WIN_XP_HOME = GuestOS(string='WIN_XP_HOME')

Windows XP Home Edition

WIN_XP_PRO = GuestOS(string='WIN_XP_PRO')

Windows XP Professional

WIN_XP_PRO_64 = GuestOS(string='WIN_XP_PRO_64')

Windows XP Professional Edition (64 bit)

class com.vmware.vcenter.vm_client.GuestOSFamily(string)

Bases: vmware.vapi.bindings.enum.Enum

The GuestOSFamily class defines the valid guest operating system family types reported by a virtual machine. 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.

DARWIN = GuestOSFamily(string='DARWIN')

Mac OS operating system. This class attribute was added in vSphere API 6.7

LINUX = GuestOSFamily(string='LINUX')

Linux operating system. This class attribute was added in vSphere API 6.7

NETWARE = GuestOSFamily(string='NETWARE')

Novell Netware. This class attribute was added in vSphere API 6.7

OTHER = GuestOSFamily(string='OTHER')

Other operating systems. This class attribute was added in vSphere API 6.7

SOLARIS = GuestOSFamily(string='SOLARIS')

Solaris operating system. This class attribute was added in vSphere API 6.7

WINDOWS = GuestOSFamily(string='WINDOWS')

Windows operating system. This class attribute was added in vSphere API 6.7

class com.vmware.vcenter.vm_client.Hardware(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Hardware class provides methods for configuring the virtual hardware of a virtual machine.

class Info(version=None, upgrade_policy=None, upgrade_version=None, upgrade_status=None, upgrade_error=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Hardware.Info class contains information related to the virtual hardware of a virtual machine.

Tip

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

class UpdateSpec(upgrade_policy=None, upgrade_version=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Hardware.UpdateSpec class describes the updates to virtual hardware settings of a virtual machine.

Tip

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

class UpgradePolicy(string)

Bases: vmware.vapi.bindings.enum.Enum

The Hardware.UpgradePolicy class defines the valid virtual hardware upgrade policies for a virtual machine.

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.

AFTER_CLEAN_SHUTDOWN = UpgradePolicy(string='AFTER_CLEAN_SHUTDOWN')

Run scheduled upgrade when the virtual machine is powered on after a clean shutdown of the guest operating system.

ALWAYS = UpgradePolicy(string='ALWAYS')

Run scheduled upgrade when the virtual machine is powered on.

NEVER = UpgradePolicy(string='NEVER')

Do not upgrade the virtual machine when it is powered on.

class UpgradeStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

The Hardware.UpgradeStatus class defines the valid virtual hardware upgrade statuses for a virtual machine.

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.

FAILED = UpgradeStatus(string='FAILED')

The most recent scheduled upgrade was not successful.

NONE = UpgradeStatus(string='NONE')

No scheduled upgrade has been attempted.

PENDING = UpgradeStatus(string='PENDING')

Upgrade is scheduled but has not yet been run.

SUCCESS = UpgradeStatus(string='SUCCESS')

The most recent scheduled upgrade was successful.

class Version(string)

Bases: vmware.vapi.bindings.enum.Enum

The Hardware.Version class defines the valid virtual hardware versions for a virtual machine.

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.

VMX_03 = Version(string='VMX_03')

Hardware version 3.

VMX_04 = Version(string='VMX_04')

Hardware version 4.

VMX_06 = Version(string='VMX_06')

Hardware version 6.

VMX_07 = Version(string='VMX_07')

Hardware version 7.

VMX_08 = Version(string='VMX_08')

Hardware version 8.

VMX_09 = Version(string='VMX_09')

Hardware version 9.

VMX_10 = Version(string='VMX_10')

Hardware version 10.

VMX_11 = Version(string='VMX_11')

Hardware version 11.

VMX_12 = Version(string='VMX_12')

Hardware version 12.

VMX_13 = Version(string='VMX_13')

Hardware version 13.

VMX_14 = Version(string='VMX_14')

Hardware version 14. This class attribute was added in vSphere API 6.7

get(vm)

Returns the virtual hardware settings of a virtual machine.

Parameters:vm (str) – Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
Return type:Hardware.Info
Returns:Virtual hardware settings of the virtual machine.
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 virtual machine is not found.
Raise:com.vmware.vapi.std.errors_client.ResourceInaccessible if the virtual machine’s configuration state cannot be accessed.
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.
update(vm, spec)

Updates the virtual hardware settings of a virtual machine.

Parameters:
  • vm (str) – Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
  • spec (Hardware.UpdateSpec) – Specification for updating the virtual hardware settings of the virtual machine.
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 virtual machine is not found.

Raise:

com.vmware.vapi.std.errors_client.AlreadyInDesiredState if the virtual machine is already configured for the desired hardware version.

Raise:

com.vmware.vapi.std.errors_client.InvalidArgument if the requested virtual hardware version is not newer than the current version.

Raise:

com.vmware.vapi.std.errors_client.Unsupported if the requested virtual hardware version is not supported by the server.

Raise:

com.vmware.vapi.std.errors_client.ResourceBusy if the virtual machine is busy performing another operation.

Raise:

com.vmware.vapi.std.errors_client.ResourceInaccessible if the virtual machine’s configuration state cannot be accessed.

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.

upgrade(vm, version=None)

Upgrades the virtual machine to a newer virtual hardware version.

Parameters:
  • vm (str) – Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
  • version (Hardware.Version or None) – New virtual machine version. If None, defaults to the most recent virtual hardware version supported by the server.
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 virtual machine is not found.

Raise:

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the virtual machine is not powered off.

Raise:

com.vmware.vapi.std.errors_client.AlreadyInDesiredState if the virtual machine is already configured for the desired hardware version.

Raise:

com.vmware.vapi.std.errors_client.InvalidArgument if version is older than the current virtual hardware version.

Raise:

com.vmware.vapi.std.errors_client.Unsupported if version is not supported by the server.

Raise:

com.vmware.vapi.std.errors_client.ResourceBusy if the virtual machine is busy performing another operation.

Raise:

com.vmware.vapi.std.errors_client.ResourceInaccessible if the virtual machine’s configuration state cannot be accessed.

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.vm_client.Power(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Power class provides methods for managing the power state of a virtual machine.

class Info(state=None, clean_power_off=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Power.Info class contains information about the power state of a virtual machine.

Tip

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

class State(string)

Bases: vmware.vapi.bindings.enum.Enum

The Power.State class defines the valid power states for a virtual machine.

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.

POWERED_OFF = State(string='POWERED_OFF')

The virtual machine is powered off.

POWERED_ON = State(string='POWERED_ON')

The virtual machine is powered on.

SUSPENDED = State(string='SUSPENDED')

The virtual machine is suspended.

get(vm)

Returns the power state information of a virtual machine.

Parameters:vm (str) – Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
Return type:Power.Info
Returns:Power state information for the specified virtual machine.
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 virtual machine is not found.
Raise:com.vmware.vapi.std.errors_client.ResourceInaccessible if the virtual machine’s configuration or execution state cannot be accessed.
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.
reset(vm)

Resets a powered-on virtual machine.

Parameters:vm (str) – Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
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 virtual machine is not found.
Raise:com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the virtual machine is powered off or suspended.
Raise:com.vmware.vapi.std.errors_client.ResourceBusy if the virtual machine is performing another operation
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.
start(vm)

Powers on a powered-off or suspended virtual machine.

Parameters:vm (str) – Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
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 virtual machine is not found.
Raise:com.vmware.vapi.std.errors_client.AlreadyInDesiredState if the virtual machine is already powered on.
Raise:com.vmware.vapi.std.errors_client.Unsupported if the virtual machine does not support being powered on (e.g. marked as a template, serving as a fault-tolerance secondary virtual machine).
Raise:com.vmware.vapi.std.errors_client.UnableToAllocateResource if resources cannot be allocated for the virtual machine (e.g. physical resource allocation policy cannot be satisfied, insufficient licenses are available to run the virtual machine).
Raise:com.vmware.vapi.std.errors_client.ResourceInaccessible if resources required by the virtual machine are not accessible (e.g. virtual machine configuration files or virtual disks are on inaccessible storage, no hosts are available to run the virtual machine).
Raise:com.vmware.vapi.std.errors_client.ResourceInUse if resources required by the virtual machine are in use (e.g. virtual machine configuration files or virtual disks are locked, host containing the virtual machine is an HA failover host).
Raise:com.vmware.vapi.std.errors_client.ResourceBusy if the virtual machine is performing another operation.
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.
stop(vm)

Powers off a powered-on or suspended virtual machine.

Parameters:vm (str) – Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
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 virtual machine is not found.
Raise:com.vmware.vapi.std.errors_client.AlreadyInDesiredState if the virtual machine is already powered off.
Raise:com.vmware.vapi.std.errors_client.ResourceBusy if the virtual machine is performing another operation.
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.
suspend(vm)

Suspends a powered-on virtual machine.

Parameters:vm (str) – Virtual machine identifier. The parameter must be an identifier for the resource type: VirtualMachine.
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 virtual machine is not found.
Raise:com.vmware.vapi.std.errors_client.AlreadyInDesiredState if the virtual machine is already suspended.
Raise:com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the virtual machine is powered off.
Raise:com.vmware.vapi.std.errors_client.ResourceBusy if the virtual machine is performing another operation.
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.vm_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

com.vmware.vcenter.vm_template_client module

The com.vmware.vcenter.vm_template_client module provides classes and classes that will let its client manage VMTX template in Content Library.

class com.vmware.vcenter.vm_template_client.LibraryItems(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The LibraryItems class provides methods to deploy virtual machines from library items containing virtual machine templates, as well as methods to create library items containing virtual machine templates. The LibraryItems class also provides an operation to retrieve information about the template contained in the library item. Warning: This class is available as technical preview. It may be changed in a future release.

class CpuInfo(count=None, cores_per_socket=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.CpuInfo class contains CPU related information about the virtual machine template. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class CpuUpdateSpec(num_cpus=None, num_cores_per_socket=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.CpuUpdateSpec class describes updates to the CPU configuration of the deployed virtual machine. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class CreatePlacementSpec(folder=None, resource_pool=None, host=None, cluster=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.CreatePlacementSpec class contains information used to place a virtual machine template onto resources within the vCenter inventory. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class CreateSpec(source_vm=None, name=None, description=None, library=None, vm_home_storage=None, disk_storage=None, disk_storage_overrides=None, placement=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.CreateSpec class defines the information required to create a library item containing a virtual machine template. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class CreateSpecDiskStorage(datastore=None, storage_policy=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.CreateSpecDiskStorage class defines the storage specification for a virtual machine template’s disks. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class CreateSpecDiskStoragePolicy(type=None, policy=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.CreateSpecDiskStoragePolicy class defines the storage policy specification for a virtual machine template’s disks. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

Policy type for a virtual machine template’s disk. Warning: This enumeration is available as technical preview. It may be changed in a future release.

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.

USE_SPECIFIED_POLICY = Type(string='USE_SPECIFIED_POLICY')

Use the specified policy. Warning: This class attribute is available as technical preview. It may be changed in a future release.

class CreateSpecVmHomeStorage(datastore=None, storage_policy=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.CreateSpecVmHomeStorage class defines the storage specification for a virtual machine template’s configuration and log files. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class CreateSpecVmHomeStoragePolicy(type=None, policy=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.CreateSpecVmHomeStoragePolicy class defines the storage policy specification for a virtual machine template’s configuration and log files. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

Policy type for the virtual machine template’s configuration and log files. Warning: This enumeration is available as technical preview. It may be changed in a future release.

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.

USE_SPECIFIED_POLICY = Type(string='USE_SPECIFIED_POLICY')

Use the specified policy. Warning: This class attribute is available as technical preview. It may be changed in a future release.

class DeployPlacementSpec(folder=None, resource_pool=None, host=None, cluster=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.DeployPlacementSpec class contains information used to place a virtual machine onto resources within the vCenter inventory. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class DeploySpec(name=None, description=None, vm_home_storage=None, disk_storage=None, disk_storage_overrides=None, placement=None, powered_on=None, guest_customization=None, hardware_customization=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.DeploySpec class defines the deployment parameters that can be specified for the deploy method. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class DeploySpecDiskStorage(datastore=None, storage_policy=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.DeploySpecDiskStorage class contains the storage specification for disks in the virtual machine. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class DeploySpecDiskStoragePolicy(type=None, policy=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.DeploySpecDiskStoragePolicy class describes the storage policy specification for the deployed virtual machine’s disks. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

Policy type for the deployed virtual machine’s disk. Warning: This enumeration is available as technical preview. It may be changed in a future release.

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.

USE_SOURCE_POLICY = Type(string='USE_SOURCE_POLICY')

Use the storage policy that is associated with the corresponding disk in the source virtual machine template. Warning: This class attribute is available as technical preview. It may be changed in a future release.

USE_SPECIFIED_POLICY = Type(string='USE_SPECIFIED_POLICY')

Use the specified policy. Warning: This class attribute is available as technical preview. It may be changed in a future release.

class DeploySpecVmHomeStorage(datastore=None, storage_policy=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.DeploySpecVmHomeStorage class defines the storage specification for a deployed virtual machine’s configuration and log files. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class DeploySpecVmHomeStoragePolicy(type=None, policy=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.DeploySpecVmHomeStoragePolicy class defines the storage policy specification for the deployed virtual machine’s configuration and log files. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

Policy type for the deployed virtual machine’s configuration and log files. Warning: This enumeration is available as technical preview. It may be changed in a future release.

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.

USE_SOURCE_POLICY = Type(string='USE_SOURCE_POLICY')

Use the storage policy that is associated with the source virtual machine template’s configuration and log files. Warning: This class attribute is available as technical preview. It may be changed in a future release.

USE_SPECIFIED_POLICY = Type(string='USE_SPECIFIED_POLICY')

Use the specified policy. Warning: This class attribute is available as technical preview. It may be changed in a future release.

class DiskInfo(capacity=None, disk_storage=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.DiskInfo class contains information about the virtual machine template’s virtual disk. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class DiskStorageInfo(datastore=None, storage_policy=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.DiskStorageInfo class contains storage related information about a virtual machine template’s virtual disk. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class DiskUpdateSpec(capacity=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.DiskUpdateSpec class describes updates to the configuration of a virtual disk in the deployed virtual machine. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class EthernetInfo(backing_type=None, mac_type=None, network=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.EthernetInfo class contains information about a virtual machine template’s virtual Ethernet adapter. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class MacAddressType(string)

Bases: vmware.vapi.bindings.enum.Enum

The LibraryItems.EthernetInfo.MacAddressType class defines the valid MAC address origins for a virtual Ethernet adapter. Warning: This enumeration is available as technical preview. It may be changed in a future release.

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.

ASSIGNED = MacAddressType(string='ASSIGNED')

MAC address is assigned by vCenter Server. Warning: This class attribute is available as technical preview. It may be changed in a future release.

GENERATED = MacAddressType(string='GENERATED')

MAC address is generated automatically. Warning: This class attribute is available as technical preview. It may be changed in a future release.

MANUAL = MacAddressType(string='MANUAL')

MAC address is assigned statically. Warning: This class attribute is available as technical preview. It may be changed in a future release.

class NetworkBackingType(string)

Bases: vmware.vapi.bindings.enum.Enum

The LibraryItems.EthernetInfo.NetworkBackingType class defines valid network backing types for a virtual Ethernet adapter. Warning: This enumeration is available as technical preview. It may be changed in a future release.

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.

DISTRIBUTED_PORTGROUP = NetworkBackingType(string='DISTRIBUTED_PORTGROUP')

Distributed virtual switch backing. Warning: This class attribute is available as technical preview. It may be changed in a future release.

HOST_DEVICE = NetworkBackingType(string='HOST_DEVICE')

Legacy host device network backing. Imported VMs may have virtual Ethernet adapters with this type of backing, but this type of backing cannot be used to create or to update a virtual Ethernet adapter. Warning: This class attribute is available as technical preview. It may be changed in a future release.

OPAQUE_NETWORK = NetworkBackingType(string='OPAQUE_NETWORK')

Opaque network backing. Warning: This class attribute is available as technical preview. It may be changed in a future release.

STANDARD_PORTGROUP = NetworkBackingType(string='STANDARD_PORTGROUP')

vSphere standard portgroup network backing. Warning: This class attribute is available as technical preview. It may be changed in a future release.

class EthernetUpdateSpec(network=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.EthernetUpdateSpec class describes the network that the ethernet adapter of the deployed virtual machine should be connected to. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class GuestCustomizationSpec(name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.GuestCustomizationSpec class contains information required to customize the deployed virtual machine. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class HardwareCustomizationSpec(nics=None, disks_to_remove=None, disks_to_update=None, cpu_update=None, memory_update=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.HardwareCustomizationSpec class defines the hardware customization options that are applied to the deployed virtual machine. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class Info(guest_os=None, cpu=None, memory=None, vm_home_storage=None, disks=None, nics=None, vm_template=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.Info class contains information about a virtual machine template item in content library. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class MemoryInfo(size_mib=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.MemoryInfo class contains memory related information about the virtual machine template. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class MemoryUpdateSpec(memory=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.MemoryUpdateSpec class describes updates to the memory configuration of the deployed virtual machine. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

class VmHomeStorageInfo(datastore=None, storage_policy=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LibraryItems.VmHomeStorageInfo class contains storage information about the virtual machine template’s configuration and log files. Warning: This class is available as technical preview. It may be changed in a future release.

Tip

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

create(spec)

Creates a library item in content library from a virtual machine. This method creates a library item in content library whose content is a virtual machine template created from the source virtual machine, using the supplied create specification. The virtual machine template is stored in a newly created library item. Warning: This method is available as technical preview. It may be changed in a future release.

Parameters:

spec (LibraryItems.CreateSpec) – information used to create the library item from the source virtual machine.

Return type:

str

Returns:

Identifier of the newly created library item. The return value will be an identifier for the resource type: com.vmware.content.library.Item.

Raise:

com.vmware.vapi.std.errors_client.AlreadyExists if an entity with the name specified by LibraryItems.CreateSpec.name already exists in the folder specified by LibraryItems.CreatePlacementSpec.folder.

Raise:

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

Raise:

com.vmware.vapi.std.errors_client.InvalidArgument if LibraryItems.CreateSpec contains invalid arguments.

Raise:

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the operation cannot be performed because of the source virtual machine’s current state.

Raise:

com.vmware.vapi.std.errors_client.NotFound if the source virtual machine specified by LibraryItems.CreateSpec.source_vm does not exist.

Raise:

com.vmware.vapi.std.errors_client.NotFound if the library specified by LibraryItems.CreateSpec.library does not exist.

Raise:

com.vmware.vapi.std.errors_client.ResourceInaccessible if there was an error accessing a file from the source virtual machine.

Raise:

com.vmware.vapi.std.errors_client.ResourceInUse if the source virtual machine is busy.

Raise:

com.vmware.vapi.std.errors_client.ServiceUnavailable if any of the services involved in the method are unavailable.

Raise:

com.vmware.vapi.std.errors_client.UnableToAllocateResource if any of the resources needed to create the virtual machine template could not be allocated.

Raise:

com.vmware.vapi.std.errors_client.Unauthenticated if the user that requested the method cannot be authenticated.

Raise:

com.vmware.vapi.std.errors_client.Unauthorized if the user that requested the method is not authorized to perform the method.

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 referenced by the attribute LibraryItems.CreateSpec.library requires ContentLibrary.AddLibraryItem.
  • The resource VirtualMachine referenced by the attribute LibraryItems.CreateSpec.source_vm requires System.Read.
  • The resource Datastore referenced by the attribute LibraryItems.CreateSpecVmHomeStorage.datastore requires System.Read.
  • The resource com.vmware.spbm.StorageProfile referenced by the attribute LibraryItems.CreateSpecVmHomeStoragePolicy.policy requires System.Read.
  • The resource Datastore referenced by the attribute LibraryItems.CreateSpecDiskStorage.datastore requires System.Read.
  • The resource com.vmware.spbm.StorageProfile referenced by the attribute LibraryItems.CreateSpecDiskStoragePolicy.policy requires System.Read.
  • The resource com.vmware.vcenter.vm.hardware.Disk referenced by the dict key of attribute LibraryItems.CreateSpec.disk_storage_overrides requires System.Read.
  • The resource Folder referenced by the attribute LibraryItems.CreatePlacementSpec.folder requires System.Read.
  • The resource ResourcePool referenced by the attribute LibraryItems.CreatePlacementSpec.resource_pool requires System.Read.
  • The resource HostSystem referenced by the attribute LibraryItems.CreatePlacementSpec.host requires System.Read.
  • The resource ClusterComputeResource referenced by the attribute LibraryItems.CreatePlacementSpec.cluster requires System.Read.
deploy(template_library_item, spec)

Deploys a virtual machine as a copy of the source virtual machine template contained in the library item specified by template_library_item. It uses the deployment specification in spec. If LibraryItems.DeploySpec.powered_on and/or LibraryItems.DeploySpec.guest_customization are specified, the server triggers the power on and/or guest customization operations, which are executed asynchronously. Warning: This method is available as technical preview. It may be changed in a future release.

Parameters:
  • template_library_item (str) – identifier of the content library item containing the source virtual machine template to be deployed. The parameter must be an identifier for the resource type: com.vmware.content.library.Item.
  • spec (LibraryItems.DeploySpec) – specification of how the virtual machine should be deployed.
Return type:

str

Returns:

Identifier of the deployed virtual machine. The return value will be an identifier for the resource type: VirtualMachine.

Raise:

com.vmware.vapi.std.errors_client.AlreadyExists if a virtual machine with the name specified by LibraryItems.DeploySpec.name already exists.

Raise:

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

Raise:

com.vmware.vapi.std.errors_client.InvalidArgument if spec contains invalid arguments.

Raise:

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if either a specified host or a specified datastore is in an invalid state for the deployment, such as maintenance mode.

Raise:

com.vmware.vapi.std.errors_client.NotFound if the library item specified by template_library_item cannot be found.

Raise:

com.vmware.vapi.std.errors_client.NotFound if any resource specified by a attribute of the LibraryItems.DeploySpec class, specified by spec cannot be found.

Raise:

com.vmware.vapi.std.errors_client.ResourceInaccessible if there was an error accessing the source virtual machine template contained in the library item specified by template_library_item.

Raise:

com.vmware.vapi.std.errors_client.ResourceInaccessible if there an error accessing any of the resources specified in the spec.

Raise:

com.vmware.vapi.std.errors_client.ServiceUnavailable if any of the services involved in the method are unavailable.

Raise:

com.vmware.vapi.std.errors_client.UnableToAllocateResource if there was an error in allocating any of the resources required by the method.

Raise:

com.vmware.vapi.std.errors_client.Unauthenticated if the user that requested the method cannot be authenticated.

Raise:

com.vmware.vapi.std.errors_client.Unauthorized if the user that requested the method is not authorized to perform the method.

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 template_library_item requires VirtualMachine.Provisioning.DeployTemplate.
  • The resource Datastore referenced by the attribute LibraryItems.DeploySpecVmHomeStorage.datastore requires System.Read.
  • The resource com.vmware.spbm.StorageProfile referenced by the attribute LibraryItems.DeploySpecVmHomeStoragePolicy.policy requires System.Read.
  • The resource Datastore referenced by the attribute LibraryItems.DeploySpecDiskStorage.datastore requires System.Read.
  • The resource com.vmware.spbm.StorageProfile referenced by the attribute LibraryItems.DeploySpecDiskStoragePolicy.policy requires System.Read.
  • The resource com.vmware.vcenter.vm.hardware.Disk referenced by the dict key of attribute LibraryItems.DeploySpec.disk_storage_overrides requires System.Read.
  • The resource Folder referenced by the attribute LibraryItems.DeployPlacementSpec.folder requires System.Read.
  • The resource ResourcePool referenced by the attribute LibraryItems.DeployPlacementSpec.resource_pool requires System.Read.
  • The resource HostSystem referenced by the attribute LibraryItems.DeployPlacementSpec.host requires System.Read.
  • The resource ClusterComputeResource referenced by the attribute LibraryItems.DeployPlacementSpec.cluster requires System.Read.
  • The resource com.vmware.vcenter.vm.hardware.Ethernet referenced by the dict key of attribute LibraryItems.HardwareCustomizationSpec.nics requires System.Read.
  • The resource Network referenced by the attribute LibraryItems.EthernetUpdateSpec.network requires System.Read.
  • The resource com.vmware.vcenter.vm.hardware.Disk referenced by the attribute LibraryItems.HardwareCustomizationSpec.disks_to_remove requires System.Read.
  • The resource com.vmware.vcenter.vm.hardware.Disk referenced by the dict key of attribute LibraryItems.HardwareCustomizationSpec.disks_to_update requires System.Read.
get(template_library_item)

Returns information about a virtual machine template contained in the library item specified by template_library_item. Warning: This method is available as technical preview. It may be changed in a future release.

Parameters:

template_library_item (str) – identifier of the library item containing the virtual machine template. The parameter must be an identifier for the resource type: com.vmware.content.library.Item.

Return type:

LibraryItems.Info or None

Returns:

Information about the virtual machine template item contained in the library item. If None, the library item specified by template_library_item does not contain a virtual machine template.

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 library item could not be found.

Raise:

com.vmware.vapi.std.errors_client.ResourceInaccessible if the virtual machine template’s configuration state cannot be accessed.

Raise:

com.vmware.vapi.std.errors_client.ServiceUnavailable if any of the services involved in the method are unavailable.

Raise:

com.vmware.vapi.std.errors_client.Unauthenticated if the user that requested the method cannot be authenticated.

Raise:

com.vmware.vapi.std.errors_client.Unauthorized if the user that requested the method is not authorized to perform the method.

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 template_library_item requires System.Read.
class com.vmware.vcenter.vm_template_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase