com.vmware.vcenter package

Subpackages

Submodules

com.vmware.vcenter.certificate_management_client module

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

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

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

Parameters

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

com.vmware.vcenter.compute_client module

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

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

Bases: vmware.vapi.bindings.stub.VapiInterface

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

Parameters

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

create(spec)

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

Parameters

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

Return type

str

Returns

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

Raise

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

Raise

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

Raise

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

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user doesn’t have the required privileges, or when used beyond VMware Cloud on AWS.

Raise

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

  • Method execution requires ComputePolicy.Manage.

delete(policy)

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

Parameters

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

Raise

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

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user doesn’t have the required privileges, or when used beyond VMware Cloud on AWS.

Raise

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

  • Method execution requires ComputePolicy.Manage.

get(policy)

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

Parameters

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

Return type

vmware.vapi.struct.VapiStruct

Returns

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

Raise

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

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user doesn’t have the required privileges, or when used beyond VMware Cloud on AWS.

Raise

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

  • Method execution requires System.Read.

list()

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

Return type

list of Policies.Summary

Returns

The list of compute policies available on this vCenter server.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user doesn’t have the required privileges, or when used beyond VMware Cloud on AWS.

Raise

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

  • Method execution requires System.Read.

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

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

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

com.vmware.vcenter.datastore_client module

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

Bases: vmware.vapi.bindings.stub.VapiInterface

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

Parameters

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

get(datastore)

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

Parameters

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

Return type

str or None

Returns

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

Raise

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

Raise

com.vmware.vapi.std.errors_client.NotFound if the specified datastore does not exist.

Raise

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

Raise

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

Raise

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

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

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

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

com.vmware.vcenter.deployment_client module

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

Bases: vmware.vapi.bindings.enum.Enum

The ApplianceSize class defines the vCenter Server Appliance sizes. This enumeration was added in vSphere API 7.0.0.0.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the ApplianceSize instance.

LARGE = ApplianceSize(string='LARGE')

Appliance size of ‘large’. This class attribute was added in vSphere API 7.0.0.0.

MEDIUM = ApplianceSize(string='MEDIUM')

Appliance size of ‘medium’. This class attribute was added in vSphere API 7.0.0.0.

SMALL = ApplianceSize(string='SMALL')

Appliance size of ‘small’. This class attribute was added in vSphere API 7.0.0.0.

TINY = ApplianceSize(string='TINY')

Appliance size of ‘tiny’. This class attribute was added in vSphere API 7.0.0.0.

XLARGE = ApplianceSize(string='XLARGE')

Appliance size of ‘extra large’. This class attribute was added in vSphere API 7.0.0.0.

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

Bases: vmware.vapi.bindings.enum.Enum

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

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the ApplianceState instance.

CONFIGURED = ApplianceState(string='CONFIGURED')

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

CONFIG_IN_PROGRESS = ApplianceState(string='CONFIG_IN_PROGRESS')

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

FAILED = ApplianceState(string='FAILED')

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

INITIALIZED = ApplianceState(string='INITIALIZED')

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

NOT_INITIALIZED = ApplianceState(string='NOT_INITIALIZED')

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

QUESTION_RAISED = ApplianceState(string='QUESTION_RAISED')

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

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

Bases: vmware.vapi.bindings.enum.Enum

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

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the ApplianceType instance.

PSC_EXTERNAL = ApplianceType(string='PSC_EXTERNAL')

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

VCSA_EMBEDDED = ApplianceType(string='VCSA_EMBEDDED')

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

VCSA_EXTERNAL = ApplianceType(string='VCSA_EXTERNAL')

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

  • source_info (SourceInfo or None) – Information collected from the source machine. This attribute was added in vSphere API 7.0.0.0. This attribute is used only for upgrade and migrate.

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

Bases: vmware.vapi.bindings.enum.Enum

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

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the CheckStatus instance.

FAILED = CheckStatus(string='FAILED')

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

SUCCESS = CheckStatus(string='SUCCESS')

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

class com.vmware.vcenter.deployment_client.DataMigrationEstimate(estimated_export_time=None, estimated_import_time=None, required_free_disk_space_on_source=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The DataMigrationEstimate {class contains estimated time and disk space required for the vCenter Server database migration. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • estimated_export_time (long) – The time estimated to export data from the source vCenter Server. This attribute was added in vSphere API 7.0.0.0.

  • estimated_import_time (long) – The time estimated to import data to the upgraded vCenter Server. This attribute was added in vSphere API 7.0.0.0.

  • required_free_disk_space_on_source (float) – The extra free space required on source vCenter Server. This attribute was added in vSphere API 7.0.0.0.

class com.vmware.vcenter.deployment_client.DataMigrationInfo(core=None, core_events_tasks=None, all=None, core_events_tasks_with_deferred=None, all_with_deferred=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The DataMigrationInfo {class contains the disk space requirements and time estimates for the different choices available to migrate the vCenter Server data. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • core (DataMigrationEstimate) – Migrate only core data and configuration from vCenter Server. Events, tasks, and stats will not be migrated. This attribute was added in vSphere API 7.0.0.0.

  • core_events_tasks (DataMigrationEstimate) – Migrate core, events, and tasks from vCenter Server. Stats will not be migrated. This attribute was added in vSphere API 7.0.0.0.

  • all (DataMigrationEstimate) – Migrate all data from vCenter Server. This attribute was added in vSphere API 7.0.0.0.

  • core_events_tasks_with_deferred (DataMigrationEstimate or None) – Migrate core, events, and tasks from vCenter Server. Events and tasks will be migrated after the upgrade. Stats will not be migrated. This attribute was added in vSphere API 7.0.0.0. This attribute will be available only if the source database is using an external database.

  • all_with_deferred (DataMigrationEstimate or None) – Migrate all data from vCenter Server. Events, tasks, and stats will be migrated after the upgrade. This attribute was added in vSphere API 7.0.0.0. This attribute will be available only if the source database is using an external database.

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

Bases: vmware.vapi.bindings.enum.Enum

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

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the HistoryMigrationOption instance.

ALL = HistoryMigrationOption(string='ALL')

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

EVENTS_TASKS = HistoryMigrationOption(string='EVENTS_TASKS')

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

  • Statistics

  • Events

  • Tasks

. This class was added in vSphere API 6.7.

Tip

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

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

  • defer_import (bool or None) – Defines how vCenter history will be migrated. If set to true, vCenter history will be migrated separately after successful upgrade(supported scenarios are upgrade from 6.0 or 6.5 to 6.7) or migration, otherwise it will be migrated along with core data during the upgrade or migration process. vCSA upgrade with deferred import is no longer supported for target version 7.0 and later. This attribute was added in vSphere API 6.7. If None, vCenter historical data won’t be deferred and will be migrated along with core data.

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

Bases: vmware.vapi.bindings.stub.VapiInterface

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

Parameters

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

class CreateSpec(name=None, description=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

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

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

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

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

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

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

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

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

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

cancel()

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

Raise

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

Raise

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

Raise

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

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

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

Raise

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

Raise

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

get()

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

Return type

ImportHistory.Info

Returns

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

Raise

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

Raise

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

Raise

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

pause()

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

Raise

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

Raise

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

Raise

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

Raise

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

Raise

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

resume()

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

Raise

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

Raise

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

Raise

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

Raise

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

Raise

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

start(spec=None)

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

Parameters

spec (ImportHistory.CreateSpec or None) –

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

  • name : vcenter.deployment.history.import

  • description : vCenter Server history import

Raise

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

Raise

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

Raise

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

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

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

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

Raise

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

Raise

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

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

Bases: vmware.vapi.bindings.stub.VapiInterface

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

Parameters

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

class InstallSpec(vcsa_embedded=None, auto_answer=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

cancel()

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

Raise

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

Raise

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

check(spec)

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

Parameters

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

Return type

CheckInfo

Returns

CheckInfo containing the check results.

Raise

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

Raise

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

Raise

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

Raise

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

Raise

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

get()

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

Return type

Install.InstallSpec

Returns

InstallSpec parameters being used to configure appliance install.

Raise

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

Raise

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

start(spec)

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

Parameters

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

Raise

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

Raise

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

Raise

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

Raise

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

Raise

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

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

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

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

Bases: vmware.vapi.bindings.stub.VapiInterface

The Migrate class provides methods to configure the migration of this appliance from an existing vCenter for Windows. This class was added in vSphere API 7.0.0.0.

Parameters

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

class MigrateSpec(source_vc_windows=None, existing_migration_assistant=None, history=None, vcsa_embedded=None, psc=None, active_directory=None, auto_answer=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Migrate.MigrateSpec class contains the fields to migrate an existing vCenter Server for Windows to an appliance. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • source_vc_windows (Migrate.SourceVcWindows) – Information specific to the Windows vCenter Server. This attribute was added in vSphere API 7.0.0.0.

  • existing_migration_assistant (Migrate.MigrationAssistantSpec) – Information specific to the Migration Assistant that is running on the Windows vCenter Server. This attribute was added in vSphere API 7.0.0.0.

  • history (HistoryMigrationSpec or None) –

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

    • Statistics

    • Events

    • Tasks

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

  • vcsa_embedded (Migrate.VcsaEmbeddedSpec or None) – Information specific to an embedded vCenter Server. This attribute was added in vSphere API 7.0.0.0. Only required if the vCenter Server that is going to be migrated is an embedded vCenter Server.

  • psc (Migrate.PscSpec or None) – Information specific to a Platform Services Controller. This attribute was added in vSphere API 7.0.0.0. Only required if the vCenter Server that is going to be migrated is a Platform Services Controller.

  • active_directory (com.vmware.vcenter.deployment.migrate_client.ActiveDirectorySpec or None) – Information specific to the Active Directory server to which the source windows vCenter Server is joined. This attribute was added in vSphere API 7.0.0.0. If None, existing appliance will not be joined to an Active Directory.

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

class MigrationAssistantSpec(https_port=None, ssl_thumbprint=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Migrate.MigrationAssistantSpec class contains the information needed to connect to the Migration Assistant that is running on the source windows vCenter Server machine. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • https_port (long or None) – The HTTPS port being used by Migration Assistant. This attribute was added in vSphere API 7.0.0.0. If None, port 9123 will be used.

  • ssl_thumbprint (str) – SHA1 thumbprint of the Migration Assistant SSL certificate that will be used for verification. This attribute was added in vSphere API 7.0.0.0.

class PscSpec(ceip_enabled=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Migrate.PscSpec class contains information used to migrate a windows Platform Service Controller to Platform Service Controller appliance. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters

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

class SourceVcWindows(hostname=None, username=None, password=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Migrate.SourceVcWindows class contains information about the windows vCenter Server that is going to be migrated. This class was added in vSphere API 7.0.0.0.

Tip

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

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

  • username (str) – The SSO account with administrative privilege to perform the migration operation. This attribute was added in vSphere API 7.0.0.0.

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

class VcsaEmbeddedSpec(ceip_enabled=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Migrate.VcsaEmbeddedSpec class contains information used to migrate an embedded vCenter Server for Windows to embedded vCenter Server appliance. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters

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

cancel()

Cancel the appliance migration that is in progress. This method was added in vSphere API 7.0.0.0.

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 MigrateSpec parameters passed. This method was added in vSphere API 7.0.0.0.

Parameters

spec (Migrate.MigrateSpec) – MigrateSpec 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 migration assistant 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 MigrateSpec parameters used to configure the ongoing appliance migration. This method was added in vSphere API 7.0.0.0.

Return type

Migrate.MigrateSpec

Returns

MigrateSpec parameters being used to configure appliance migration.

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

start(spec)

Start the appliance migration. This method was added in vSphere API 7.0.0.0.

Parameters

spec (Migrate.MigrateSpec) – MigrateSpec parameters to configure the appliance migration.

Raise

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

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if migration assistant 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.Notification(id=None, time=None, message=None, resolution=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

Bases: vmware.vapi.bindings.enum.Enum

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

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Operation instance.

INSTALL = Operation(string='INSTALL')

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

MIGRATE = Operation(string='MIGRATE')

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

RESTORE = Operation(string='RESTORE')

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

ROLLBACK = Operation(string='ROLLBACK')

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

UPGRADE = Operation(string='UPGRADE')

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

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

Bases: vmware.vapi.bindings.stub.VapiInterface

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

Parameters

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

class AnswerSpec(question_id=None, answer_val=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

class Info(questions=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

Parameters

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

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

class QuestionType(string)

Bases: vmware.vapi.bindings.enum.Enum

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

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the QuestionType instance.

ABORT_RETRY_IGNORE = QuestionType(string='ABORT_RETRY_IGNORE')

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

OK_CANCEL = QuestionType(string='OK_CANCEL')

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

YES_NO = QuestionType(string='YES_NO')

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

answer(spec)

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

Parameters

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

Raise

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

Raise

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

Raise

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

Raise

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

get()

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

Return type

Question.Info

Returns

Info structure containing the question.

Raise

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

Raise

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

Raise

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

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

class com.vmware.vcenter.deployment_client.SourceInfo(hostname=None, version=None, deployment_type=None, deployment_size=None, sso_domain_name=None, active_directory_domain=None, dns_servers=None, data_migration_info=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The SourceInfo {class contains information about the source vCenter Server system and the database migration options. This class was added in vSphere API 7.0.0.0.

Tip

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

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

  • version (str) – Source vCenter Server version. This attribute was added in vSphere API 7.0.0.0.

  • deployment_type (ApplianceType) – Deployment type of the source vCenter Server. This attribute was added in vSphere API 7.0.0.0.

  • deployment_size (ApplianceSize) – Deployment size of the source vCenter Server. This attribute was added in vSphere API 7.0.0.0.

  • sso_domain_name (str) – The SSO domain name of the source vCenter Server. This attribute was added in vSphere API 7.0.0.0.

  • active_directory_domain (str) – The domain name of the Active Directory server to which the source vCenter Server is joined. This attribute was added in vSphere API 7.0.0.0.

  • dns_servers (list of str) – IP addresses of the DNS servers of the Active Directory server. This attribute was added in vSphere API 7.0.0.0.

  • data_migration_info (DataMigrationInfo or None) – Contains all the available migrate options, estimated export and import time and the space required to migrate the data. This attribute was added in vSphere API 7.0.0.0. This attribute will be available if estimate data is available for the appliance.

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

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

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

Bases: vmware.vapi.bindings.stub.VapiInterface

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

Parameters

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

class PscSpec(ceip_enabled=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

Parameters

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

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

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

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

  • history (HistoryMigrationSpec or None) –

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

    • Statistics

    • Events

    • Tasks

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

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

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

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

class VcsaEmbeddedSpec(ceip_enabled=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

Parameters

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

cancel()

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

Raise

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

Raise

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

check(spec)

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

Parameters

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

Return type

CheckInfo

Returns

CheckInfo containing the check results.

Raise

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

Raise

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

Raise

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

Raise

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

Raise

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

get()

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

Return type

Upgrade.UpgradeSpec

Returns

UpgradeSpec parameters being used to configure appliance upgrade.

Raise

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

Raise

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

start(spec)

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

Parameters

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

Raise

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

Raise

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

Raise

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

Raise

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

Raise

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

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

Bases: vmware.vapi.bindings.enum.Enum

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

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the VerificationMode instance.

NONE = VerificationMode(string='NONE')

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

THUMBPRINT = VerificationMode(string='THUMBPRINT')

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

com.vmware.vcenter.guest_client module

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

Bases: vmware.vapi.bindings.stub.VapiInterface

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

Parameters

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

class FilterSpec(names=None, os_type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

class Format(string)

Bases: vmware.vapi.bindings.enum.Enum

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

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Format instance.

JSON = Format(string='JSON')

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

XML = Format(string='XML')

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

class Info(last_modified=None, spec=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

class Metadata(description=None, name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

class OsType(string)

Bases: vmware.vapi.bindings.enum.Enum

The CustomizationSpecs.OsType class defines the types of guest operating systems for which guest customization is supported. This enumeration was added in vSphere API 6.7.1.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the OsType instance.

LINUX = OsType(string='LINUX')

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

WINDOWS = OsType(string='WINDOWS')

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

Parameters
  • name (str) – Name of the guest customization specification. This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.guest.CustomizationSpec. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.guest.CustomizationSpec.

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

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

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

create(spec)

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

Parameters

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

Return type

str

Returns

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

Raise

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

Raise

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

Raise

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

Raise

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

Raise

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

delete(name)

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

Parameters

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

Raise

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

Raise

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

Raise

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

Raise

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

export(name, format)

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

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

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

Return type

str

Returns

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

Raise

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

Raise

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

Raise

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

Raise

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

Raise

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

get(name)

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

Parameters

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

Return type

CustomizationSpecs.Info

Returns

A customization spec with the specified identifier.

Raise

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

Raise

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

Raise

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

Raise

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

import_specification(customization_spec)

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

Parameters

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

Return type

CustomizationSpecs.CreateSpec

Returns

A proper specification of type CustomizationSpecs.CreateSpec

Raise

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

Raise

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

Raise

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

Raise

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

list(filter=None)

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

Parameters

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

Return type

list of CustomizationSpecs.Summary

Returns

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

Raise

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

Raise

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

Raise

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

Raise

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

Raise

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

set(name, spec)

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

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

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

Raise

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

Raise

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

Raise

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

Raise

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

Raise

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

Raise

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

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

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

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

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Type instance.

DOMAIN = Type(string='DOMAIN')

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

WORKGROUP = Type(string='WORKGROUP')

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

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

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Type instance.

FIXED = Type(string='FIXED')

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

PREFIX = Type(string='PREFIX')

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

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

USER_INPUT_REQUIRED = Type(string='USER_INPUT_REQUIRED')

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

VIRTUAL_MACHINE = Type(string='VIRTUAL_MACHINE')

Specifies that the VirtualCenter should generate a virtual machine name.

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

  • ip_address (str) – The static IPv4 address. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of type is Ipv4.Type.STATIC.

  • prefix (long) – The IPv4 CIDR prefix, for example, 24. See http://www.oav.net/mirrors/cidr.html for netmask-to-prefix conversion. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of type is Ipv4.Type.STATIC.

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

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

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

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Type instance.

DHCP = Type(string='DHCP')

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

STATIC = Type(string='STATIC')

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

USER_INPUT_REQUIRED = Type(string='USER_INPUT_REQUIRED')

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

class Type(string)

Bases: vmware.vapi.bindings.enum.Enum

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

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Type instance.

DHCP = Type(string='DHCP')

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

STATIC = Type(string='STATIC')

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

USER_INPUT_REQUIRED = Type(string='USER_INPUT_REQUIRED')

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

Guest customization Settings to customize a Linux guest operating system.

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

Tip

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

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

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

  • time_zone (str or None) –

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

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

  • script_text (str or None) –

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

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

    A Linux shell script example:

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

    If None, no script will be executed.

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

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

Parameters
  • reboot (WindowsConfiguration.RebootOption or None) – A value specifying the action that should be taken after customization. This attribute was added in vSphere API 7.0.0.0. If None, the WindowsConfiguration.RebootOption.REBOOT option will be chosen.

  • sysprep (WindowsSysprep or None) – Customization settings like user details, administrator details, etc for the windows guest operating system. Exactly one of sysprep or sysprepXml must be specified. This attribute was added in vSphere API 7.0.0.0. If None, sysprep settings will not be applied to the windows guest operating system.

  • sysprep_xml (str or None) – All settings specified in a XML format. This is the content of a typical answer.xml file that is used by System administrators during the Windows image customization. Check https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/update-windows-settings-and-scripts-create-your-own-answer-file-sxs Exactly one of sysprep or sysprepXml must be specified. This attribute was added in vSphere API 7.0.0.0. If None, sysprep settings will not be applied to the windows guest operating system.

class RebootOption(string)

Bases: vmware.vapi.bindings.enum.Enum

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

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the RebootOption instance.

NO_REBOOT = RebootOption(string='NO_REBOOT')

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

REBOOT = RebootOption(string='REBOOT')

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

SHUTDOWN = RebootOption(string='SHUTDOWN')

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

Parameters
  • dns_servers (list of str or None) –

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

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

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

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

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

class NetBIOSMode(string)

Bases: vmware.vapi.bindings.enum.Enum

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

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the NetBIOSMode instance.

DISABLE = NetBIOSMode(string='DISABLE')

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

ENABLE = NetBIOSMode(string='ENABLE')

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

USE_DHCP = NetBIOSMode(string='USE_DHCP')

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

com.vmware.vcenter.hvc_client module

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

Bases: vmware.vapi.bindings.stub.VapiInterface

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

Parameters

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

class CertificateInfo(ssl_thumbprint=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

Parameters

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

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

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

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

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

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

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

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

class Credentials(user_name=None, password=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

class Summary(link=None, display_name=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

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

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

create(spec)

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

Parameters

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

Return type

str

Returns

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

Raise

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

Raise

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

Raise

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

Raise

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

Raise

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

Raise

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

delete(link)

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

Parameters

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

Raise

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

Raise

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

Raise

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

list()

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

Return type

list of Links.Summary

Returns

The list of hybrid link information.

Raise

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

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

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

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

com.vmware.vcenter.identity_client module

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

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

Bases: vmware.vapi.bindings.stub.VapiInterface

The Providers interface provides methods to list, read and modify vCenter Server identity providers. This class was added in vSphere API 7.0.0.0.

Parameters

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

class ActiveDirectoryOverLdap(user_name=None, password=None, users_base_dn=None, groups_base_dn=None, server_endpoints=None, cert_chain=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.ActiveDirectoryOverLdap class contains the information about to how to use an Active Directory over LDAP connection to allow searching for users and groups if the identity provider is an On-Prem service. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • user_name (str) – User name to connect to the active directory server. This attribute was added in vSphere API 7.0.0.0.

  • password (str) – Password to connect to the active directory server. This attribute was added in vSphere API 7.0.0.0.

  • users_base_dn (str) – Base distinguished name for users. This attribute was added in vSphere API 7.0.0.0.

  • groups_base_dn (str) – Base distinguished name for groups. This attribute was added in vSphere API 7.0.0.0.

  • server_endpoints (list of str) – Active directory server endpoints. At least one active directory server endpoint must be set. This attribute was added in vSphere API 7.0.0.0.

  • cert_chain (com.vmware.vcenter.certificate_management_client.X509CertChain or None) – SSL certificate chain in base64 encoding. This attribute was added in vSphere API 7.0.0.0. This attribute can be None only, if all the active directory server endpoints use the LDAP (not LDAPS) protocol.

class ConfigType(string)

Bases: vmware.vapi.bindings.enum.Enum

The Providers.ConfigType class contains the possible types of vCenter Server identity providers. This enumeration was added in vSphere API 7.0.0.0.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the ConfigType instance.

Oauth2 = ConfigType(string='Oauth2')

Config for OAuth2. This class attribute was added in vSphere API 7.0.0.0.

Oidc = ConfigType(string='Oidc')

Config for OIDC. This class attribute was added in vSphere API 7.0.0.0.

class CreateSpec(config_tag=None, oauth2=None, oidc=None, org_ids=None, is_default=None, name=None, domain_names=None, auth_query_params=None, idm_protocol=None, idm_endpoints=None, active_directory_over_ldap=None, upn_claim=None, groups_claim=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.CreateSpec class contains the information used to create an identity provider. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • config_tag (Providers.ConfigType) – The config type of the identity provider. This attribute was added in vSphere API 7.0.0.0.

  • oauth2 (Providers.Oauth2CreateSpec) – OAuth2 CreateSpec. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oauth2.

  • oidc (Providers.OidcCreateSpec) – OIDC CreateSpec. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oidc.

  • org_ids (set of str or None) – The set of orgIds as part of SDDC creation which provides the basis for tenancy. This attribute was added in vSphere API 7.0.0.0. If None, the set will be empty.

  • is_default (bool or None) – Specifies whether the provider is the default provider. Setting isDefault of current provider to True makes all other providers non-default. If no other providers created in this vCenter Server before, this parameter will be disregarded, and the provider will always be set to the default. This attribute was added in vSphere API 7.0.0.0. If None the provider will be the default provider if it is the first provider that is created, and will not be the default provider otherwise.

  • name (str or None) – The user friendly name for the provider. This name can be used for human-readable identification purposes, but it does not have to be unique, as the system will use internal UUIDs to differentiate providers. This attribute was added in vSphere API 7.0.0.0. If None, the name will be the empty string

  • domain_names (set of str or None) – Set of fully qualified domain names to trust when federating with this identity provider. Tokens from this identity provider will only be validated if the user belongs to one of these domains, and any domain-qualified groups in the tokens will be filtered to include only those groups that belong to one of these domains. This attribute was added in vSphere API 7.0.0.0. If None, domainNames will be the empty set and the domain validation behavior at login with this identity provider will be as follows: the user’s domain will be parsed from the User Principal Name (UPN) value that is found in the tokens returned by the identity provider. This domain will then be implicitly trusted and used to filter any groups that are also provided in the tokens.

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

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

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

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

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

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

    . This attribute was added in vSphere API 7.0.0.0. If None, the map will be empty.

  • idm_protocol (Providers.IdmProtocol or None) – Communication protocol to the identity management endpoints. This attribute was added in vSphere API 7.0.0.0. If None, no communication protocol will be configured for the identity provider.

  • idm_endpoints (list of str) – Identity management endpoints. When specified, at least one endpoint must be provided. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of idmProtocol is one of Providers.IdmProtocol.REST, Providers.IdmProtocol.SCIM, or Providers.IdmProtocol.SCIM2_0.

  • active_directory_over_ldap (Providers.ActiveDirectoryOverLdap) – Identity management configuration. If the protocol is LDAP, the configuration must be set, else InvalidArgument is thrown. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of idmProtocol is Providers.IdmProtocol.LDAP.

  • upn_claim (str or None) – Specifies which claim provides the user principal name (UPN) for the user. This attribute was added in vSphere API 7.0.0.0. If None, the claim named ‘acct’ will be used to provide backwards compatibility with CSP.

  • groups_claim (str or None) – Specifies which claim provides the group membership for the token subject. These groups will be used for mapping to local groups per the claim map. This attribute was added in vSphere API 7.0.0.0. If None, the default behavior will be CSP backwards compatiblility. The groups for the subject will be comprised of the groups in ‘group_names’ and ‘group_ids’ claims.

class IdmProtocol(string)

Bases: vmware.vapi.bindings.enum.Enum

The Providers.IdmProtocol class contains the possible types of communication protocols to the identity management endpoints. This enumeration was added in vSphere API 7.0.0.0.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the IdmProtocol instance.

LDAP = IdmProtocol(string='LDAP')

LDAP protocol based identity management endpoints. This class attribute was added in vSphere API 7.0.0.0.

REST = IdmProtocol(string='REST')

REST protocol based identity management endpoints. This class attribute was added in vSphere API 7.0.0.0.

SCIM = IdmProtocol(string='SCIM')

SCIM V1.1 protocol based identity management endpoints. This class attribute was added in vSphere API 7.0.0.0.

SCIM2_0 = IdmProtocol(string='SCIM2_0')

SCIM V2.0 protocol based identity management endpoints. This class attribute was added in vSphere API 7.0.0.0.

class Info(name=None, org_ids=None, config_tag=None, oauth2=None, oidc=None, is_default=None, domain_names=None, auth_query_params=None, idm_protocol=None, idm_endpoints=None, active_directory_over_ldap=None, upn_claim=None, groups_claim=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.Info class contains the information about an identity provider. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • name (str) – The user friendly name for the provider. This attribute was added in vSphere API 7.0.0.0. This attribute is optional because it was added in a newer version than its parent node.

  • org_ids (set of str) – The set of orgIds as part of SDDC creation which provides the basis for tenancy. This attribute was added in vSphere API 7.0.0.0.

  • config_tag (Providers.ConfigType) – The config type of the identity provider. This attribute was added in vSphere API 7.0.0.0.

  • oauth2 (Providers.Oauth2Info) – OAuth2 Info. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oauth2.

  • oidc (Providers.OidcInfo) – OIDC Info. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oidc.

  • is_default (bool) – Specifies whether the provider is the default provider. This attribute was added in vSphere API 7.0.0.0.

  • domain_names (set of str) – Set of fully qualified domain names to trust when federating with this identity provider. Tokens from this identity provider will only be validated if the user belongs to one of these domains, and any domain-qualified groups in the tokens will be filtered to include only those groups that belong to one of these domains. If domainNames is an empty set, domain validation behavior at login with this identity provider will be as follows: the user’s domain will be parsed from the User Principal Name (UPN) value that is found in the tokens returned by the identity provider. This domain will then be implicitly trusted and used to filter any groups that are also provided in the tokens. This attribute was added in vSphere API 7.0.0.0. This attribute is optional because it was added in a newer version than its parent node.

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

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

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

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

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

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

    . This attribute was added in vSphere API 7.0.0.0. This attribute is optional because it was added in a newer version than its parent node.

  • idm_protocol (Providers.IdmProtocol or None) – Communication protocol to the identity management endpoints. This attribute was added in vSphere API 7.0.0.0. This attribute is optional because it was added in a newer version than its parent node.

  • idm_endpoints (list of str) – Identity management endpoints. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of idmProtocol is one of Providers.IdmProtocol.REST, Providers.IdmProtocol.SCIM, or Providers.IdmProtocol.SCIM2_0.

  • active_directory_over_ldap (Providers.ActiveDirectoryOverLdap) – Identity management configuration. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of idmProtocol is Providers.IdmProtocol.LDAP.

  • upn_claim (str) – Specifies which claim provides the user principal name (UPN) for the user. This attribute was added in vSphere API 7.0.0.0. This attribute is optional because it was added in a newer version than its parent node.

  • groups_claim (str) – Specifies which claim provides the group membership for the token subject. If empty, the default behavior for CSP is used. In this case, the groups for the subject will be comprised of the groups in ‘group_names’ and ‘group_ids’ claims. This attribute was added in vSphere API 7.0.0.0. This attribute is optional because it was added in a newer version than its parent node.

class Oauth2AuthenticationMethod(string)

Bases: vmware.vapi.bindings.enum.Enum

The Providers.Oauth2AuthenticationMethod class contains the possible types of OAuth2 authentication methods. This enumeration was added in vSphere API 7.0.0.0.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Oauth2AuthenticationMethod instance.

CLIENT_SECRET_BASIC = Oauth2AuthenticationMethod(string='CLIENT_SECRET_BASIC')

Clients that have received a client_secret value from the Authorization Server, authenticate with the Authorization Server in accordance with Section 3.2.1 of OAuth 2.0 [RFC6749] using the HTTP Basic authentication scheme. This class attribute was added in vSphere API 7.0.0.0.

CLIENT_SECRET_JWT = Oauth2AuthenticationMethod(string='CLIENT_SECRET_JWT')

Clients that have received a client_secret value from the Authorization Server, create a JWT using an HMAC SHA algorithm, such as HMAC SHA-256. The HMAC (Hash-based Message Authentication Code) is calculated using the octets of the UTF-8 representation of the client_secret as the shared key. This class attribute was added in vSphere API 7.0.0.0.

CLIENT_SECRET_POST = Oauth2AuthenticationMethod(string='CLIENT_SECRET_POST')

Clients that have received a client_secret value from the Authorization Server, authenticate with the Authorization Server in accordance with Section 3.2.1 of OAuth 2.0 [RFC6749] by including the Client Credentials in the request body. This class attribute was added in vSphere API 7.0.0.0.

PRIVATE_KEY_JWT = Oauth2AuthenticationMethod(string='PRIVATE_KEY_JWT')

Clients that have registered a public key sign a JWT using that key. The client authenticates in accordance with JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [OAuth.JWT] and Assertion Framework for OAuth 2.0 Client Authentication and Authorization Grants [OAuth.Assertions]. This class attribute was added in vSphere API 7.0.0.0.

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

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.Oauth2CreateSpec class contains the information used to create an OAuth2 identity provider. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • auth_endpoint (str) – Authentication/authorization endpoint of the provider. This attribute was added in vSphere API 7.0.0.0.

  • token_endpoint (str) – Token endpoint of the provider. This attribute was added in vSphere API 7.0.0.0.

  • public_key_uri (str) – Endpoint to retrieve the provider public key for validation. This attribute was added in vSphere API 7.0.0.0.

  • client_id (str) – Client identifier to connect to the provider. This attribute was added in vSphere API 7.0.0.0.

  • client_secret (str) – The secret shared between the client and the provider. This attribute was added in vSphere API 7.0.0.0.

  • claim_map (dict of str and (dict of str and list of str)) – The map used to transform an OAuth2 claim to a corresponding claim that vCenter Server understands. Currently only the key “perms” is supported. The key “perms” is used for mapping the “perms” claim of incoming JWT. The value is another map with an external group as the key and a vCenter Server group as value. This attribute was added in vSphere API 7.0.0.0.

  • issuer (str) – The identity provider namespace. It is used to validate the issuer in the acquired OAuth2 token. This attribute was added in vSphere API 7.0.0.0.

  • authentication_method (Providers.Oauth2AuthenticationMethod) – Authentication method used by the provider. This attribute was added in vSphere API 7.0.0.0.

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

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

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

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

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

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

    . This attribute was added in vSphere API 7.0.0.0. If None, the map will be empty.

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

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.Oauth2Info class contains the information about an OAuth2 identity provider. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • auth_endpoint (str) – Authentication/authorization endpoint of the provider. This attribute was added in vSphere API 7.0.0.0.

  • token_endpoint (str) – Token endpoint of the provider. This attribute was added in vSphere API 7.0.0.0.

  • public_key_uri (str) – Endpoint to retrieve the provider public key for validation. This attribute was added in vSphere API 7.0.0.0.

  • client_id (str) – Client identifier to connect to the provider. This attribute was added in vSphere API 7.0.0.0.

  • client_secret (str) – The secret shared between the client and the provider. This attribute was added in vSphere API 7.0.0.0.

  • claim_map (dict of str and (dict of str and list of str)) – The map used to transform an OAuth2 claim to a corresponding claim that vCenter Server understands. Currently only the key “perms” is supported. The key “perms” is used for mapping the “perms” claim of incoming JWT. The value is another map with an external group as the key and a vCenter Server group as value. This attribute was added in vSphere API 7.0.0.0.

  • issuer (str) – The identity provider namespace. It is used to validate the issuer in the acquired OAuth2 token. This attribute was added in vSphere API 7.0.0.0.

  • authentication_method (Providers.Oauth2AuthenticationMethod) – Authentication method used by the provider. This attribute was added in vSphere API 7.0.0.0.

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

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

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

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

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

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

    . This attribute was added in vSphere API 7.0.0.0.

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

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.Oauth2Summary class contains commonly used information about an OAuth2 identity provider. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • auth_endpoint (str) – Authentication/authorization endpoint of the provider. This attribute was added in vSphere API 7.0.0.0.

  • token_endpoint (str) – Token endpoint of the provider. This attribute was added in vSphere API 7.0.0.0.

  • client_id (str) – Client identifier to connect to the provider. This attribute was added in vSphere API 7.0.0.0.

  • authentication_header (str) – The authentication data used as part of request header to acquire or refresh an OAuth2 token. The data format depends on the authentication method used. Example of basic authentication format: Authorization: Basic [base64Encode(clientId + “:” + secret)]. This attribute was added in vSphere API 7.0.0.0.

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

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

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

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

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

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

    . This attribute was added in vSphere API 7.0.0.0.

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

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.Oauth2UpdateSpec class contains the information used to update the OAuth2 identity provider. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • auth_endpoint (str or None) – Authentication/authorization endpoint of the provider. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • token_endpoint (str or None) – Token endpoint of the provider. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • public_key_uri (str or None) – Endpoint to retrieve the provider public key for validation. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • client_id (str or None) – Client identifier to connect to the provider. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • client_secret (str or None) – Shared secret between identity provider and client. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • claim_map ((dict of str and (dict of str and list of str)) or None) – The map used to transform an OAuth2 claim to a corresponding claim that vCenter Server understands. Currently only the key “perms” is supported. The key “perms” is used for mapping the “perms” claim of incoming JWT. The value is another map with an external group as the key and a vCenter Server group as value. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • issuer (str or None) – The identity provider namespace. It is used to validate the issuer in the acquired OAuth2 token. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • authentication_method (Providers.Oauth2AuthenticationMethod or None) – Authentication method used by the provider. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • auth_query_params ((dict of str and list of str) or None) – key/value pairs that are to be appended to the authEndpoint request. How to append to authEndpoint request: If the map is not empty, a “?” is added to the endpoint URL, and combination of each k and each string in the v is added with an “&” delimiter. Details: If the value contains only one string, then the key is added with “k=v”. If the value is an empty list, then the key is added without a “=v”. If the value contains multiple strings, then the key is repeated in the query-string for each string in the value. If the map is empty, deletes all params. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

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

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.OidcCreateSpec class contains the information used to create an OIDC identity provider. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • discovery_endpoint (str) – Endpoint to retrieve the provider metadata. This attribute was added in vSphere API 7.0.0.0.

  • client_id (str) – Client identifier to connect to the provider. This attribute was added in vSphere API 7.0.0.0.

  • client_secret (str) – The secret shared between the client and the provider. This attribute was added in vSphere API 7.0.0.0.

  • claim_map (dict of str and (dict of str and list of str)) – The map used to transform an OAuth2 claim to a corresponding claim that vCenter Server understands. Currently only the key “perms” is supported. The key “perms” is used for mapping the “perms” claim of incoming JWT. The value is another map with an external group as the key and a vCenter Server group as value. This attribute was added in vSphere API 7.0.0.0.

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

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.OidcInfo class contains information about an OIDC identity provider. OIDC is a discovery protocol for OAuth2 configuration metadata, so Providers.OidcInfo contains additional discovered OAuth2 metadata. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • discovery_endpoint (str) – Endpoint to retrieve the provider metadata. This attribute was added in vSphere API 7.0.0.0.

  • logout_endpoint (str) – The endpoint to use for terminating the user’s session at the identity provider. This value is automatically derived from the metadata information provided by the OIDC discovery endpoint. This attribute was added in vSphere API 7.0.0.0. This attribute is optional because it was added in a newer version than its parent node.

  • auth_endpoint (str) – Authentication/authorization endpoint of the provider. This attribute was added in vSphere API 7.0.0.0.

  • token_endpoint (str) – Token endpoint of the provider. This attribute was added in vSphere API 7.0.0.0.

  • public_key_uri (str) – Endpoint to retrieve the provider public key for validation. This attribute was added in vSphere API 7.0.0.0.

  • client_id (str) – Client identifier to connect to the provider. This attribute was added in vSphere API 7.0.0.0.

  • client_secret (str) – The secret shared between the client and the provider. This attribute was added in vSphere API 7.0.0.0.

  • claim_map (dict of str and (dict of str and list of str)) – The map used to transform an OAuth2 claim to a corresponding claim that vCenter Server understands. Currently only the key “perms” is supported. The key “perms” is used for mapping the “perms” claim of incoming JWT. The value is another map with an external group as the key and a vCenter Server group as value. This attribute was added in vSphere API 7.0.0.0.

  • issuer (str) – The identity provider namespace. It is used to validate the issuer in the acquired OAuth2 token. This attribute was added in vSphere API 7.0.0.0.

  • authentication_method (Providers.Oauth2AuthenticationMethod) – Authentication method used by the provider. This attribute was added in vSphere API 7.0.0.0.

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

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

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

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

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

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

    . This attribute was added in vSphere API 7.0.0.0.

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

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.OidcSummary class contains commonly used information about an OIDC identity provider. OIDC is a discovery protocol for OAuth2 configuration metadata, so Providers.OidcSummary contains discovered OAuth2 metadata. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • discovery_endpoint (str) – Endpoint to retrieve the provider metadata. This attribute was added in vSphere API 7.0.0.0. This attribute is optional because it was added in a newer version than its parent node.

  • logout_endpoint (str) – The endpoint to use for terminating the user’s session at the identity provider. This value is automatically derived from the metadata information provided by the OIDC discovery endpoint. This attribute was added in vSphere API 7.0.0.0. This attribute is optional because it was added in a newer version than its parent node.

  • auth_endpoint (str) – Authentication/authorization endpoint of the provider. This attribute was added in vSphere API 7.0.0.0.

  • token_endpoint (str) – Token endpoint of the provider. This attribute was added in vSphere API 7.0.0.0.

  • client_id (str) – Client identifier to connect to the provider. This attribute was added in vSphere API 7.0.0.0.

  • authentication_header (str) – The authentication data used as part of request header to acquire or refresh an OAuth2 token. The data format depends on the authentication method used. Example of basic authentication format: Authorization: Basic [base64Encode(clientId + “:” + secret)]. This attribute was added in vSphere API 7.0.0.0.

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

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

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

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

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

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

    . This attribute was added in vSphere API 7.0.0.0.

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

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.OidcUpdateSpec class contains the information used to update the OIDC identity provider. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • discovery_endpoint (str or None) – Endpoint to retrieve the provider metadata. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • client_id (str or None) – Client identifier to connect to the provider. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • client_secret (str or None) – The secret shared between the client and the provider. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • claim_map ((dict of str and (dict of str and list of str)) or None) – The map used to transform an OAuth2 claim to a corresponding claim that vCenter Server understands. Currently only the key “perms” is supported. The key “perms” is used for mapping the “perms” claim of incoming JWT. The value is another map with an external group as the key and a vCenter Server group as value. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

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

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.Summary class contains commonly used information about an identity provider. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • provider (str) – The identifier of the provider. This attribute was added in vSphere API 7.0.0.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.identity.Providers. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.identity.Providers.

  • name (str) – The user friendly name for the provider. This attribute was added in vSphere API 7.0.0.0. This attribute is optional because it was added in a newer version than its parent node.

  • config_tag (Providers.ConfigType) – The config type of the identity provider. This attribute was added in vSphere API 7.0.0.0.

  • oauth2 (Providers.Oauth2Summary) – OAuth2 Summary. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oauth2.

  • oidc (Providers.OidcSummary) – OIDC Summary. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oidc.

  • is_default (bool) – Specifies whether the provider is the default provider. This attribute was added in vSphere API 7.0.0.0.

  • domain_names (set of str) – Set of fully qualified domain names to trust when federating with this identity provider. Tokens from this identity provider will only be validated if the user belongs to one of these domains, and any domain-qualified groups in the tokens will be filtered to include only those groups that belong to one of these domains. If domainNames is an empty set, domain validation behavior at login with this identity provider will be as follows: the user’s domain will be parsed from the User Principal Name (UPN) value that is found in the tokens returned by the identity provider. This domain will then be implicitly trusted and used to filter any groups that are also provided in the tokens. This attribute was added in vSphere API 7.0.0.0. This attribute is optional because it was added in a newer version than its parent node.

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

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

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

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

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

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

    . This attribute was added in vSphere API 7.0.0.0. This attribute is optional because it was added in a newer version than its parent node.

class UpdateSpec(config_tag=None, oauth2=None, oidc=None, org_ids=None, make_default=None, name=None, domain_names=None, auth_query_params=None, idm_protocol=None, idm_endpoints=None, active_directory_over_ldap=None, upn_claim=None, reset_upn_claim=None, groups_claim=None, reset_groups_claim=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Providers.UpdateSpec class contains the information used to update the identity provider. This class was added in vSphere API 7.0.0.0.

Tip

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

Parameters
  • config_tag (Providers.ConfigType) – The config type of the identity provider. This attribute was added in vSphere API 7.0.0.0.

  • oauth2 (Providers.Oauth2UpdateSpec) – OAuth2 UpdateSpec. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oauth2.

  • oidc (Providers.OidcUpdateSpec) – OIDC UpdateSpec. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of configTag is Providers.ConfigType.Oidc.

  • org_ids (set of str or None) – The set orgIds as part of SDDC creation which provides the basis for tenancy. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • make_default (bool or None) – Specifies whether to make this the default provider. If makeDefault is set to true, this provider will be flagged as the default provider and any other providers that had previously been flagged as the default will be made non-default. If makeDefault is set to false, this provider’s default flag will not be modified. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • name (str or None) – The user friendly name for the provider. This name can be used for human-readable identification purposes, but it does not have to be unique, as the system will use internal UUIDs to differentiate providers. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • domain_names (set of str or None) – Set of fully qualified domain names to trust when federating with this identity provider. Tokens from this identity provider will only be validated if the user belongs to one of these domains, and any domain-qualified groups in the tokens will be filtered to include only those groups that belong to one of these domains. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged. If domainNames is an empty set, domain validation behavior at login with this identity provider will be as follows: the user’s domain will be parsed from the User Principal Name (UPN) value that is found in the tokens returned by the identity provider. This domain will then be implicitly trusted and used to filter any groups that are also provided in the tokens.

  • auth_query_params ((dict of str and list of str) or None) – key/value pairs that are to be appended to the authEndpoint request. How to append to authEndpoint request: If the map is not empty, a “?” is added to the endpoint URL, and combination of each k and each string in the v is added with an “&” delimiter. Details: If the value contains only one string, then the key is added with “k=v”. If the value is an empty list, then the key is added without a “=v”. If the value contains multiple strings, then the key is repeated in the query-string for each string in the value. If the map is empty, deletes all params. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • idm_protocol (Providers.IdmProtocol or None) – The protocol to communicate to the identity management endpoints. This attribute was added in vSphere API 7.0.0.0. If None, leave value unchanged.

  • idm_endpoints (list of str) – Identity management endpoints. When specified, at least one endpoint must be provided. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of idmProtocol is one of Providers.IdmProtocol.REST, Providers.IdmProtocol.SCIM, or Providers.IdmProtocol.SCIM2_0.

  • active_directory_over_ldap (Providers.ActiveDirectoryOverLdap) – Identity management configuration. If the protocol is LDAP, the configuration must be set, else InvalidArgument is thrown. This attribute was added in vSphere API 7.0.0.0. This attribute is optional and it is only relevant when the value of idmProtocol is Providers.IdmProtocol.LDAP.

  • upn_claim (str or None) – Specifies which claim provides the user principal name (UPN) for the subject of the token. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • reset_upn_claim (bool or None) – Flag indicating whether the user principal name (UPN) claim should be set back to its default value. If this field is set to true, the user principal name (UPN) claim will be set to ‘acct’, which is used for backwards compatibility with CSP. If this field is set to false, the existing user principal name (UPN) claim will be changed to the value specified in Providers.UpdateSpec.upn_claim, if any. This attribute was added in vSphere API 7.0.0.0. If None, the existing user principal name (UPN) claim will be changed to the value specified in Providers.UpdateSpec.upn_claim, if any.

  • groups_claim (str or None) – Specifies which claim provides the group membership for the token subject. This attribute was added in vSphere API 7.0.0.0. If None, leaves value unchanged.

  • reset_groups_claim (bool or None) – Flag indicating whether any existing groups claim value should be removed. If this field is set to true, the existing groups claim value is removed which defaults to backwards compatibility with CSP. In this case, the groups for the subject will be comprised of the groups in ‘group_names’ and ‘group_ids’ claims. If this field is set to false, the existing groups claim will be changed to the value specified in Providers.UpdateSpec.groups_claim, if any. This attribute was added in vSphere API 7.0.0.0. If None, the existing groups claim will be changed to the value specified in Providers.UpdateSpec.groups_claim, if any.

create(spec)

Create a vCenter Server identity provider. This method was added in vSphere API 7.0.0.0.

Parameters

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

Return type

str

Returns

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

Raise

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

Raise

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

Raise

com.vmware.vapi.std.errors_client.AlreadyExists if provider exists for provider ID in given spec.

Raise

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

  • Method execution requires VcIdentityProviders.Create and VcIdentityProviders.Manage.

delete(provider)

Delete a vCenter Server identity provider. This method was added in vSphere API 7.0.0.0.

Parameters

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

Raise

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

Raise

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

Raise

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

  • Method execution requires VcIdentityProviders.Manage.

get(provider)

Retrieve detailed information of the specified identity provider. This method was added in vSphere API 7.0.0.0.

Parameters

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

Return type

Providers.Info

Returns

Detailed information of the specified identity provider.

Raise

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

Raise

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

Raise

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

  • Method execution requires VcIdentityProviders.Read and VcIdentityProviders.Manage.

list()

Retrieve all identity providers. This method was added in vSphere API 7.0.0.0.

Return type

list of Providers.Summary

Returns

Commonly used information about the identity providers.

Raise

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

Raise

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

  • Method execution requires VcIdentityProviders.Read and VcIdentityProviders.Manage.

update(provider, spec)

Update a vCenter Server identity provider. This method was added in vSphere API 7.0.0.0.

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

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

Raise

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

Raise

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

Raise

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

Raise

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

  • Method execution requires VcIdentityProviders.Manage.

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

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

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

com.vmware.vcenter.inventory_client module

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

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

Bases: vmware.vapi.bindings.stub.VapiInterface

The Datastore class provides methods to retrieve information about datastores.

Parameters

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

class Info(type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Datastore.Info class contains information about a datastore.

Tip

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

Parameters

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

find(datastores)

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

Parameters

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

Return type

dict of str and (Datastore.Info or None)

Returns

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

Raise

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

Raise

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

  • Method execution requires System.Read.

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

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

Bases: vmware.vapi.bindings.stub.VapiInterface

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

Parameters

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

class Info(type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

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

Tip

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

Parameters

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

find(networks)

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

Parameters

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

Return type

dict of str and (Network.Info or None)

Returns

Network information for the specified vCenter Server networks. The key in the return value dict is the network identifier and the value in the dict is the network information. The key in the return value dict will be an identifier for the resource type: Network.

Raise

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

Raise

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

  • Method execution requires System.Read.

  • The resource Network referenced by the parameter networks requires System.Read.

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

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

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

com.vmware.vcenter.iso_client module

The com.vmware.vcenter.iso_client module provides classes and classes that will let its client mount or unmount an ISO image on a virtual machine as a CD-ROM.

class com.vmware.vcenter.iso_client.Image(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

Provides an interface to mount and unmount an ISO image on a virtual machine.

This is an API that will let its client mount or unmount an ISO image on a virtual machine as a CD-ROM.

Parameters

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

mount(library_item, vm)

Mounts an ISO image from a content library on a virtual machine.

Parameters
  • library_item (str) – The identifier of the library item having the ISO image to mount on the virtual machine. The parameter must be an identifier for the resource type: com.vmware.content.library.Item.

  • vm (str) – The identifier of the virtual machine where the specified ISO image will be mounted. The parameter must be an identifier for the resource type: VirtualMachine.

Return type

str

Returns

The identifier of the newly created virtual CD-ROM backed by the specified ISO image. The return value will be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Cdrom.

Raise

com.vmware.vapi.std.errors_client.NotFound If either vm or the library_item is not found.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument If no .iso file is present on the library item.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState When the operation is not allowed on the virtual machine in its current state.

Raise

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

  • Method execution requires System.Read.

  • The resource VirtualMachine referenced by the parameter vm requires VirtualMachine.Config.AddRemoveDevice.

  • The resource com.vmware.content.library.Item referenced by the parameter library_item requires ContentLibrary.DownloadSession.

unmount(vm, cdrom)

Unmounts a previously mounted CD-ROM using an ISO image as a backing.

Parameters
  • vm (str) – The identifier of the virtual machine from which to unmount the virtual CD-ROM. The parameter must be an identifier for the resource type: VirtualMachine.

  • cdrom (str) – The device identifier of the CD-ROM. The parameter must be an identifier for the resource type: com.vmware.vcenter.vm.hardware.Cdrom.

Raise

com.vmware.vapi.std.errors_client.NotFound If the virtual machine identified by vm is not found or the cdrom does not identify a virtual CD-ROM in the virtual machine.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState When the operation is not allowed on the virtual machine in its current state.

Raise

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

  • Method execution requires System.Read.

  • The resource VirtualMachine referenced by the parameter vm requires VirtualMachine.Config.AddRemoveDevice.

  • The resource com.vmware.vcenter.vm.hardware.Cdrom referenced by the parameter cdrom requires System.Read.

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

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

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

com.vmware.vcenter.lcm_client module

The com.vmware.vcenter.lcm_client module provides classes for managing the vCenter Server lifecycle.

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

Bases: vmware.vapi.bindings.struct.VapiStruct

The Notification class describes a notification that can be reported by the appliance task, which can be of type info, warning or errors.

Tip

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

Parameters
class com.vmware.vcenter.lcm_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 appliance task.

Tip

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

Parameters
  • info (list of Notification or None) – Info notification messages reported. Only set if an info was reported by the appliance task.

  • warnings (list of Notification or None) – Warning notification messages reported. Only set if an warning was reported by the appliance task.

  • errors (list of Notification or None) – Error notification messages reported. Only set if an error was reported by the appliance task.

class com.vmware.vcenter.lcm_client.Reports(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Report class provides an method to download the report generated by the interop and precheck operations. To download a report, you must use the get method. A Report.Location class represents the location of the file which has Report.Token class which represents the token ID (\@name String) and the expiration time of the token Report.Token.expiry DateTime. Report.Location class also has the URI for the file which needs to be downloaded.

Parameters

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

class Location(uri=None, download_file_token=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Reports.Location class contains the URI location to download the report from, as well as a token required (as a header on the HTTP request) to get the bundle. The validity of the token is 5 minutes as best attempt. After the token expires, any attempt to call the URI with said token will fail.

Tip

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

Parameters
  • uri (str) – Report Download URI.

  • download_file_token (Reports.Token) – Information about the token required in the HTTP GET request to retrieve the report

class Token(token=None, expiry=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Reports.Token class contains information about the token required in the HTTP GET request to generate the report.

Tip

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

Parameters
  • token (str) – A one-time, short-lived token required in the HTTP header of the request to the url. This token needs to be passed in as a header with the name “session-id”.

  • expiry (datetime.datetime) – Expiry time of the token

get(report)

Returns the location Reports.Location information for downloading the report for the specified file name.

Retrieving a report involves two steps:

  • Step 1: Invoke the Reports.get() method to provision a token and a URI.

  • Step 2: Make an HTTP GET request by using the URI and the token returned in step 1 to retrieve the report.

The HTTP GET request will:

  • Return 401 (Not Authorized) if the download URI is recognized, but the token is invalid, 404 if the URL is not recognized otherwise return 200 (OK)

  • Provide the CSV contents as the output of the request. The API accepts the file name as input, reads the contents of that CSV file, and returns this text as the result of the API.

Parameters

report (str) – The parameter must be an identifier for the resource type: com.vmware.vcenter.lcm.report.

Return type

Reports.Location

Returns

Raise

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

Raise

com.vmware.vapi.std.errors_client.NotFound If there is no file associated with report in the system.

Raise

com.vmware.vapi.std.errors_client.Error If there is some unknown internal error. The accompanying error message will give more details about the failure.

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

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

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

com.vmware.vcenter.namespace_management_client module

The com.vmware.vcenter.namespace_management_client module provides classes for managing Namespaces.

class com.vmware.vcenter.namespace_management_client.ClusterAvailableVersions(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The {\@name cluster-available-versions} class provides methods to retrieve available upgrade versions of WCP and detailed information about each upgrade.

Parameters

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

class Summary(version=None, name=None, description=None, release_date=None, release_notes=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ClusterAvailableVersions.Summary class contains the information about each available upgrade version.

Tip

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

Parameters
  • version (str) – Version of the upgrade.

  • name (str) – Name of the upgrade.

  • description (str) – Description of the upgrade.

  • release_date (datetime.datetime) – Release date of the upgrade.

  • release_notes (str) – Release details of the upgrade.

list()

Get information about each available upgrade.

Return type

list of ClusterAvailableVersions.Summary

Returns

Information for each upgrade.

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.Unauthenticated if the user can not be authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user does not have System.Read privilege.

class com.vmware.vcenter.namespace_management_client.ClusterCompatibility(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The ClusterCompatibility class provides methods to get Namespace-related compatibility information for clusters in this vCenter.

Parameters

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

class FilterSpec(compatible=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ClusterCompatibility.FilterSpec class contains attributes used to filter the results when listing clusters (see ClusterCompatibility.list()) and their compatibility information.

Tip

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

Parameters

compatible (bool or None) – Compatibility criteria for matching the filter. If true, only clusters which are compatible for Namespaces match the filter. If false, all clusters match the filter. If None, both compatible and incompatible clusters match the filter.

class Summary(cluster=None, compatible=None, incompatibility_reasons=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ClusterCompatibility.Summary class contains the information about the compatibility of a cluster.

Tip

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

Parameters
  • cluster (str) – Identifier of the cluster. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: ClusterComputeResource. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: ClusterComputeResource.

  • compatible (bool) – Compatibility of this cluster.

  • incompatibility_reasons (list of com.vmware.vapi.std_client.LocalizableMessage) – Reasons for incompatibility.

list(filter=None)

Returns Namespaces compatibility information for all clusters in vCenter matching the ClusterCompatibility.FilterSpec. The result contains only visible (subject to permission checks) clusters.

Parameters

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

Return type

list of ClusterCompatibility.Summary

Returns

Namespaces compatibility information for the clusters matching the the ClusterCompatibility.FilterSpec.

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.InternalServerError if the server reports an unknown internal error.

Raise

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

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user does not have System.Read privilege.

class com.vmware.vcenter.namespace_management_client.ClusterSizeInfo(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The {\@name cluster-size-info} class provides methods to retrieve various sizes available for enabling Namespaces and information about each size.

Parameters

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

class Info(num_supported_pods=None, num_supported_services=None, default_service_cidr=None, default_pod_cidr=None, master_vm_info=None, worker_vm_info=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ClusterSizeInfo.Info class contains the information about limits associated with a SizingHint.

Tip

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

Parameters
  • num_supported_pods (long) – The maximum number of supported pods.

  • num_supported_services (long) – The maximum number of supported services.

  • default_service_cidr (Ipv4Cidr) – Default CIDR range from which Kubernetes allocates service cluster IP addresses.

  • default_pod_cidr (Ipv4Cidr) – Default CIDR range from which Kubernetes allocates pod IP addresses.

  • master_vm_info (ClusterSizeInfo.VmInfo) – Information about Kubernetes API server virtual machine configuration.

  • worker_vm_info (ClusterSizeInfo.VmInfo or None) – Information about worker virtual machine configuration. If None, the configuration of the worker VM is not fixed.

class VmInfo(count=None, cores_per_socket=None, memory=None, capacity=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ClusterSizeInfo.VmInfo class contains the information about the configuration of the virtual machines which would be created for Namespaces.

Tip

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

Parameters
  • count (long) – Number of CPU cores.

  • cores_per_socket (long) – Number of CPU cores per socket.

  • memory (long) – Memory size, in mebibytes.

  • capacity (long) – Overall capacity of the disks in the virtual machine, in mebibytes.

get()

Get information about the default values associated with various sizes.

Return type

dict of SizingHint and ClusterSizeInfo.Info

Returns

Information for each size.

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.Unauthenticated if the user can not be authenticated.

class com.vmware.vcenter.namespace_management_client.Clusters(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Clusters class provides methods to enable and disable vSphere Namespaces on a vSphere cluster.

Parameters

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

class ConfigStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

The Clusters.ConfigStatus class describes the status of reaching the desired state configuration for the cluster.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the ConfigStatus instance.

CONFIGURING = ConfigStatus(string='CONFIGURING')

The Namespace configuration is being applied to the cluster.

ERROR = ConfigStatus(string='ERROR')

Failed to apply the Namespace configuration to the cluster, user intervention needed.

REMOVING = ConfigStatus(string='REMOVING')

The Namespace configuration is being removed from the cluster.

RUNNING = ConfigStatus(string='RUNNING')

The cluster is configured correctly with the Namespace configuration.

class EnableSpec(size_hint=None, service_cidr=None, network_provider=None, ncp_cluster_network_spec=None, workload_networks_spec=None, workload_ntp_servers=None, load_balancer_config_spec=None, master_management_network=None, master_dns=None, worker_dns=None, master_dns_search_domains=None, master_ntp_servers=None, master_storage_policy=None, ephemeral_storage_policy=None, login_banner=None, master_dns_names=None, image_storage=None, default_image_registry=None, default_image_repository=None, default_kubernetes_service_content_library=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.EnableSpec class contains the specification required to enable vSphere Namespaces on a cluster.

Tip

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

Parameters
  • size_hint (SizingHint) – This affects the size and resources allocated to the Kubernetes API server and the worker nodes. It also affects the suggested default serviceCidr and podCidrs.

  • service_cidr (Ipv4Cidr) – CIDR block from which Kubernetes allocates service cluster IP addresses. This range should not overlap with those in com.vmware.vcenter.namespace_management.NCPClusterNetworkEnableSpec#podCidrs, com.vmware.vcenter.namespace_management.NCPClusterNetworkEnableSpec#ingressCidrs, com.vmware.vcenter.namespace_management.NCPClusterNetworkEnableSpec#egressCidrs, or other services running in the datacenter.

  • network_provider (Clusters.NetworkProvider) – The provider of cluster networking for this vSphere Namespaces cluster.

  • ncp_cluster_network_spec (Clusters.NCPClusterNetworkEnableSpec) – Specification for the NSX Container Plugin cluster network. This attribute is optional and it is only relevant when the value of networkProvider is Clusters.NetworkProvider.NSXT_CONTAINER_PLUGIN.

  • workload_networks_spec (Clusters.WorkloadNetworksEnableSpec) – Specification for the workload networks to be associated with the cluster. This attribute was added in vSphere API 7.0.1.0. This attribute is optional and it is only relevant when the value of networkProvider is Clusters.NetworkProvider.VSPHERE_NETWORK.

  • workload_ntp_servers (list of str or None) – List of NTP server DNS names or IP addresses to use for workloads such as Tanzu Kubernetes Grid VMs, specified in order of preference. This attribute was added in vSphere API 7.0.1.0. If None, NTP server for Kubernetes API servers will be used.

  • load_balancer_config_spec (LoadBalancers.ConfigSpec) – A LoadBalancer dictates configuration derived from a user-provisioned load balancer that will be used to operate a load balancer that fronts vSphere Namespaces cluster servers, Tanzu Kubernetes Grid API servers, and other servers upon request. This configuration is required for network providers that do not have a default load balancer included. This attribute was added in vSphere API 7.0.1.0. This attribute is optional and it is only relevant when the value of networkProvider is Clusters.NetworkProvider.VSPHERE_NETWORK.

  • master_management_network (Clusters.NetworkSpec) – Specification for the management network on Kubernetes API server. Clusters.NetworkSpec.mode must be STATICRANGE as we require Kubernetes API server to have a stable address.

  • master_dns (list of str or None) – List of DNS server IP addresses to use on Kubernetes API server, specified in order of preference. If None, no default DNS servers are set.

  • worker_dns (list of str or None) – List of DNS server IP addresses to use on the worker nodes, specified in order of preference. If None, no default DNS servers are set.

  • master_dns_search_domains (list of str or None) – List of domains (for example “vmware.com”) to be searched when trying to lookup a host name on Kubernetes API server, specified in order of preference. If None, no default DNS search domains are set.

  • master_ntp_servers (list of str or None) – List of NTP server DNS names or IP addresses to use on Kubernetes API server, specified in order of preference. If None, VMware Tools based time synchronization is enabled.

  • master_storage_policy (str) – Identifier of storage policy associated with Kubernetes API server. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: SpsStorageProfile. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: SpsStorageProfile.

  • ephemeral_storage_policy (str) – Identifier of storage policy associated with ephemeral disks of all the Kubernetes Pods in the cluster. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: SpsStorageProfile. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: SpsStorageProfile.

  • login_banner (str or None) – Disclaimer to be displayed prior to login via the Kubectl plugin. If None, just skip it.

  • master_dns_names (list of str or None) – List of additional DNS names to associate with the Kubernetes API server. These DNS names are embedded in the TLS certificate presented by the API server. If None, no additional DNS names are embedded in the TLS certificate.

  • image_storage (Clusters.ImageStorageSpec) – Specification for storage to be used for container images.

  • default_image_registry (Clusters.ImageRegistry or None) – Default image registry to use when Kubernetes Pod container specification does not specify it as part of the container image name. If None, defaults to Docker Hub.

  • default_image_repository (str or None) – Default image repository to use when Kubernetes Pod container specification does not specify it as part of the container image name. If None, defaults to Docker Hub official repository in case of Docker Hub image registry, otherwise defaults to empty string.

  • default_kubernetes_service_content_library (str or None) – Identifier of the Content Library which holds the VM Images for vSphere Kubernetes Service. This Content Library should be subscribed to VMware’s hosted vSphere Kubernetes Service Repository. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.content.Library. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.content.Library. If None, the Content Library identifier will not be set.

class ImageRegistry(hostname=None, port=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.ImageRegistry class contains the specification required to configure container image registry endpoint.

Tip

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

Parameters
  • hostname (str) – IP address or the hostname of container image registry.

  • port (long or None) – Port number of the container image registry. If None, defaults to 443.

class ImageStorageSpec(storage_policy=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.ImageStorageSpec class contains the specification required to configure storage used for container images.

Tip

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

Parameters

storage_policy (str) – Identifier of the storage policy. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: SpsStorageProfile. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: SpsStorageProfile.

class Info(size_hint=None, stat_summary=None, config_status=None, messages=None, kubernetes_status=None, kubernetes_status_messages=None, api_server_management_endpoint=None, api_server_cluster_endpoint=None, api_servers=None, tls_management_endpoint_certificate=None, tls_endpoint_certificate=None, network_provider=None, ncp_cluster_network_info=None, workload_networks=None, workload_ntp_servers=None, load_balancers=None, service_cidr=None, master_management_network=None, master_dns=None, worker_dns=None, master_storage_policy=None, ephemeral_storage_policy=None, login_banner=None, master_dns_names=None, image_storage=None, default_image_registry=None, default_image_repository=None, master_dns_search_domains=None, master_ntp_servers=None, default_kubernetes_service_content_library=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.Info class contains detailed information about the cluster statistics and status related to vSphere Namespaces.

Tip

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

Parameters
  • size_hint (SizingHint) – Current setting for SizingHint. This affects the size and resources allocated to the Kubernetes API server. This attribute was added in vSphere API 7.0.1.0. This attribute is optional because it was added in a newer version than its parent node.

  • stat_summary (Clusters.Stats) – Basic runtime statistics for the cluster.

  • config_status (Clusters.ConfigStatus) – Current setting for Clusters.ConfigStatus.

  • messages (list of Clusters.Message) – Current set of messages associated with the object.

  • kubernetes_status (Clusters.KubernetesStatus) – Current setting for Clusters.KubernetesStatus.

  • kubernetes_status_messages (list of Clusters.Message) – Current set of messages associated with the object.

  • api_server_management_endpoint (str) – Kubernetes API Server IP address on the management network. This is a floating IP and assigned to one of the control plane VMs on the management network. This endpoint is used by vSphere components.

  • api_server_cluster_endpoint (str) – Kubernetes API Server IP address via cluster network. This is the IP address of the Kubernetes LoadBalancer type service fronting the apiservers. This endpoint is the one configured in kubeconfig after login, and used for most human and application interaction with Kubernetes.

  • api_servers (set of str) – Identifier of the Kubernetes API servers. These are the IP addresses of the VM instances for the Kubernetes control plane on the management network.

  • tls_management_endpoint_certificate (str or None) – PEM-encoded x509 certificate used by TLS endpoint on Kubernetes API servers when accessed from the management network, e.g. from ESX servers or VCSA. This certificate is only valid for use with the apiServerManagementEndpoint.

  • tls_endpoint_certificate (str or None) – PEM-encoded x509 certificate used by TLS endpoint on Kubernetes API servers when accessed via the load balancer, e.g. devops user on corporate network. This certificate is only valid for use with the apiServerClusterEndpoint.

  • network_provider (Clusters.NetworkProvider) – The provider of cluster networking for this vSphere Namespaces cluster.

  • ncp_cluster_network_info (Clusters.NCPClusterNetworkInfo) – Specification for the NSX Container Plugin cluster network. This attribute is optional and it is only relevant when the value of networkProvider is Clusters.NetworkProvider.NSXT_CONTAINER_PLUGIN.

  • workload_networks (Clusters.WorkloadNetworksInfo) – Information about workload networks associated with the cluster. This attribute was added in vSphere API 7.0.1.0. This attribute is optional and it is only relevant when the value of networkProvider is Clusters.NetworkProvider.VSPHERE_NETWORK.

  • workload_ntp_servers (list of str or None) – Information about NTP server DNS names or IP addresses to use for workloads such as Tanzu Kubernetes Grid VMs, specified in order of preference. This attribute was added in vSphere API 7.0.1.0. This attribute is optional because it was added in a newer version than its parent node.

  • load_balancers (list of LoadBalancers.Info) – Information related to the Load balancer used for provisioning virtual servers in the namespace. This attribute was added in vSphere API 7.0.1.0. This attribute is optional and it is only relevant when the value of networkProvider is Clusters.NetworkProvider.VSPHERE_NETWORK.

  • service_cidr (Ipv4Cidr) – CIDR block from which Kubernetes allocates service cluster IP addresses.

  • master_management_network (Clusters.NetworkSpec) – Specification for the management network on Kubernetes API server. This attribute was added in vSphere API 7.0.1.0. This attribute is optional because it was added in a newer version than its parent node.

  • master_dns (list of str or None) – List of DNS server IP addresses to use on Kubernetes API server, specified in order of preference.

  • worker_dns (list of str or None) – List of DNS server IP addresses to use for pods that execute on the worker nodes (which are native pods on ESXi hosts in the vSphere Namespaces Supervisor).

  • master_storage_policy (str) – Identifier of storage policy associated with Kubernetes API server. This attribute was added in vSphere API 7.0.1.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: SpsStorageProfile. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: SpsStorageProfile. This attribute is optional because it was added in a newer version than its parent node.

  • ephemeral_storage_policy (str) – Identifier of storage policy associated with ephemeral disks of all the Kubernetes Pods in the cluster. This attribute was added in vSphere API 7.0.1.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: SpsStorageProfile. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: SpsStorageProfile. This attribute is optional because it was added in a newer version than its parent node.

  • login_banner (str or None) – Disclaimer to be displayed prior to login via the Kubectl plugin. This attribute was added in vSphere API 7.0.1.0. If None, just skip it.

  • master_dns_names (list of str or None) – List of additional DNS names to associate with the Kubernetes API server. These DNS names are embedded in the TLS certificate presented by the API server. This attribute was added in vSphere API 7.0.1.0. If None, no additional DNS names are embedded in the TLS certificate.

  • image_storage (Clusters.ImageStorageSpec) – Specification for storage to be used for container images. This attribute was added in vSphere API 7.0.1.0. This attribute is optional because it was added in a newer version than its parent node.

  • default_image_registry (Clusters.ImageRegistry or None) – Default image registry to use when Kubernetes Pod container specification does not specify it as part of the container image name. This attribute was added in vSphere API 7.0.1.0. If None, defaults to Docker Hub.

  • default_image_repository (str or None) – Default image repository to use when Kubernetes Pod container specification does not specify it as part of the container image name. This attribute was added in vSphere API 7.0.1.0. If None, defaults to Docker Hub official repository in case of Docker Hub image registry, otherwise defaults to empty string.

  • master_dns_search_domains (list of str or None) – List of domains (for example “vmware.com”) to be searched when trying to lookup a host name on Kubernetes API server, specified in order of preference.

  • master_ntp_servers (list of str or None) – List of NTP server DNS names or IP addresses to use on Kubernetes API server, specified in order of preference. This attribute was added in vSphere API 7.0.1.0. If None, VMware Tools based time synchronization is enabled.

  • default_kubernetes_service_content_library (str or None) – Identifier of the Content Library which holds the VM Images for vSphere Kubernetes Service. This Content Library should be subscribed to VMware’s hosted vSphere Kubernetes Service Repository. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.content.Library. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.content.Library.

class Ipv4Range(starting_address=None, address_count=None, subnet_mask=None, gateway=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.Ipv4Range contains specification to configure multiple interfaces in IPv4. The range of IPv4 addresses is derived by incrementing the startingAddress to the specified addressCount. To use the object for a single IPv4 address specification, set addressCount to 1.

Tip

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

Parameters
  • starting_address (str) – The IPv4 address denoting the start of the range.

  • address_count (long) – The number of IP addresses in the range. Addresses are derived by incrementing Clusters.Ipv4Range.starting_address.

  • subnet_mask (str) – Subnet mask to be set.

  • gateway (str) – The IPv4 address of the gateway associated with the range indicated by Clusters.Ipv4Range.starting_address and Clusters.Ipv4Range.address_count.

class KubernetesStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

The Clusters.KubernetesStatus class describes the cluster’s ability to deploy pods.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the KubernetesStatus instance.

ERROR = KubernetesStatus(string='ERROR')

The cluster may not be able to accept pods and has error messages.

READY = KubernetesStatus(string='READY')

The cluster is able to accept pods.

WARNING = KubernetesStatus(string='WARNING')

The cluster may be able to accept pods, but has warning messages.

class Message(severity=None, details=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.Message class contains the information about the object configuration.

Tip

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

Parameters
class Severity(string)

Bases: vmware.vapi.bindings.enum.Enum

The Clusters.Message.Severity class represents the severity of the message.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Severity instance.

ERROR = Severity(string='ERROR')

Error message. This is accompanied by vCenter event and/or alarm.

INFO = Severity(string='INFO')

Informational message. This may be accompanied by vCenter event.

WARNING = Severity(string='WARNING')

Warning message. This may be accompanied by vCenter event.

class NCPClusterNetworkEnableSpec(pod_cidrs=None, ingress_cidrs=None, egress_cidrs=None, cluster_distributed_switch=None, nsx_edge_cluster=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.NCPClusterNetworkEnableSpec class encapsulates the NSX Container Plugin-specific cluster networking configuration parameters for the vSphere Namespaces Cluster Enable operation.

Tip

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

Parameters
  • pod_cidrs (list of Ipv4Cidr) – CIDR blocks from which Kubernetes allocates pod IP addresses. This range should not overlap with those in com.vmware.vcenter.namespace_management.EnableSpec#serviceCidr, Clusters.NCPClusterNetworkEnableSpec.ingress_cidrs, Clusters.NCPClusterNetworkEnableSpec.egress_cidrs, or other services running in the datacenter. All Pod CIDR blocks must be of at least subnet size /23.

  • ingress_cidrs (list of Ipv4Cidr) – CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer. These ranges should not overlap with those in Clusters.NCPClusterNetworkEnableSpec.pod_cidrs, com.vmware.vcenter.namespace_management.EnableSpec#serviceCidr, Clusters.NCPClusterNetworkEnableSpec.egress_cidrs, or other services running in the datacenter.

  • egress_cidrs (list of Ipv4Cidr) – CIDR blocks from which NSX assigns IP addresses used for performing SNAT from container IPs to external IPs. These ranges should not overlap with those in Clusters.NCPClusterNetworkEnableSpec.pod_cidrs, com.vmware.vcenter.namespace_management.EnableSpec#serviceCidr, Clusters.NCPClusterNetworkEnableSpec.ingress_cidrs, or other services running in the datacenter.

  • cluster_distributed_switch (str or None) – vSphere Distributed Switch used to connect this cluster. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: vSphereDistributedSwitch. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: vSphereDistributedSwitch. This field is required when configuring a cluster that uses NSX-T. If None and using NSXe, the system will choose a suitable vSphere Distributed Switch.

  • nsx_edge_cluster (str or None) – NSX Edge Cluster to be used for Kubernetes Services of type LoadBalancer, Kubernetes Ingresses, and NSX SNAT. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: NSXEdgeCluster. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: NSXEdgeCluster. This field is required when configuring a cluster that uses NSX-T. If None and using NSXe, the system will choose a suitable NSX Edge Cluster.

class NCPClusterNetworkInfo(pod_cidrs=None, ingress_cidrs=None, egress_cidrs=None, cluster_distributed_switch=None, nsx_edge_cluster=None, default_ingress_tls_certificate=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.NCPClusterNetworkInfo class contains the NSX Container Plugin-specific cluster networking configuration.

Tip

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

Parameters
  • pod_cidrs (list of Ipv4Cidr) – CIDR blocks from which Kubernetes allocates pod IP addresses.

  • ingress_cidrs (list of Ipv4Cidr) – CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer.

  • egress_cidrs (list of Ipv4Cidr) – CIDR blocks from which NSX assigns IP addresses used for performing SNAT from container IPs to external IPs.

  • cluster_distributed_switch (str) – vSphere Distributed Switch used to connect this cluster. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: vSphereDistributedSwitch. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: vSphereDistributedSwitch.

  • nsx_edge_cluster (str) – NSX Edge Cluster to be used for Kubernetes Services of type LoadBalancer, Kubernetes Ingresses, and NSX SNAT. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: NSXEdgeCluster. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: NSXEdgeCluster.

  • default_ingress_tls_certificate (str) – PEM-encoded x509 certificate used by NSX as a default fallback certificate for Kubernetes Ingress services.

class NCPClusterNetworkSetSpec(pod_cidrs=None, ingress_cidrs=None, egress_cidrs=None, default_ingress_tls_certificate=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.NCPClusterNetworkSetSpec class encapsulates the NSX Container Plugin-specific cluster networking configuration parameters for the vSphere Namespaces Cluster Set operation.

Tip

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

Parameters
  • pod_cidrs (list of Ipv4Cidr) – CIDR blocks from which Kubernetes allocates pod IP addresses. This range should not overlap with those in com.vmware.vcenter.namespace_management.EnableSpec#serviceCidr, Clusters.NCPClusterNetworkSetSpec.ingress_cidrs, Clusters.NCPClusterNetworkSetSpec.egress_cidrs, or other services running in the datacenter. A set operation only allows for addition of new CIDR blocks to the existing list. All Pod CIDR blocks must be of at least subnet size /23.

  • ingress_cidrs (list of Ipv4Cidr) – CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer. These ranges should not overlap with those in Clusters.NCPClusterNetworkSetSpec.pod_cidrs, com.vmware.vcenter.namespace_management.EnableSpec#serviceCidr, Clusters.NCPClusterNetworkSetSpec.egress_cidrs, or other services running in the datacenter. A set operation only allows for addition of new CIDR blocks to the existing list.

  • egress_cidrs (list of Ipv4Cidr) – CIDR blocks from which NSX assigns IP addresses used for performing SNAT from container IPs to external IPs. These ranges should not overlap with those in Clusters.NCPClusterNetworkSetSpec.pod_cidrs, com.vmware.vcenter.namespace_management.EnableSpec#serviceCidr, Clusters.NCPClusterNetworkSetSpec.ingress_cidrs, or other services running in the datacenter. A set operation only allows for addition of new CIDR blocks to the existing list.

  • default_ingress_tls_certificate (str) – PEM-encoded x509 certificate used by NSX as a default fallback certificate for Kubernetes Ingress services.

class NCPClusterNetworkUpdateSpec(pod_cidrs=None, ingress_cidrs=None, egress_cidrs=None, default_ingress_tls_certificate=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.NCPClusterNetworkUpdateSpec class encapsulates the NSX Container Plugin-specific cluster networking configuration parameters for the vSphere Namespaces Cluster Update operation.

Tip

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

Parameters
  • pod_cidrs (list of Ipv4Cidr or None) – CIDR blocks from which Kubernetes allocates pod IP addresses. This range should not overlap with those in com.vmware.vcenter.namespace_management.EnableSpec#serviceCidr, Clusters.NCPClusterNetworkUpdateSpec.ingress_cidrs, Clusters.NCPClusterNetworkUpdateSpec.egress_cidrs, or other services running in the datacenter. An update operation only allows for addition of new CIDR blocks to the existing list. All Pod CIDR blocks must be of at least subnet size /23. If None, CIDRs from which Kubernetes allocates pod IP addresses will not be modified.

  • ingress_cidrs (list of Ipv4Cidr or None) – CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer. These ranges should not overlap with those in Clusters.NCPClusterNetworkUpdateSpec.pod_cidrs, com.vmware.vcenter.namespace_management.EnableSpec#serviceCidr, Clusters.NCPClusterNetworkUpdateSpec.egress_cidrs, or other services running in the datacenter. An update operation only allows for addition of new CIDR blocks to the existing list. If None, CIDRs from which Kubernetes allocates ingress IP addresses will not be modified.

  • egress_cidrs (list of Ipv4Cidr or None) – CIDR blocks from which NSX assigns IP addresses used for performing SNAT from container IPs to external IPs. These ranges should not overlap with those in Clusters.NCPClusterNetworkUpdateSpec.pod_cidrs, com.vmware.vcenter.namespace_management.EnableSpec#serviceCidr, Clusters.NCPClusterNetworkUpdateSpec.ingress_cidrs, or other services running in the datacenter. An update operation only allows for addition of new CIDR blocks to the existing list. If None, CIDR from which Kubernetes allocates egress IP addresses will not be modified.

  • default_ingress_tls_certificate (str or None) – PEM-encoded x509 certificate used by NSX as a default fallback certificate for Kubernetes Ingress services.

class NetworkProvider(string)

Bases: vmware.vapi.bindings.enum.Enum

Identifies the network plugin that cluster networking functionalities for this vSphere Namespaces Cluster.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the NetworkProvider instance.

NSXT_CONTAINER_PLUGIN = NetworkProvider(string='NSXT_CONTAINER_PLUGIN')

NSX-T Container Plugin.

VSPHERE_NETWORK = NetworkProvider(string='VSPHERE_NETWORK')

vSphere Networking. This class attribute was added in vSphere API 7.0.1.0.

class NetworkSpec(floating_ip=None, network=None, mode=None, address_range=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.NetworkSpec contains information related to network configuration for one or more interfaces.

Tip

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

Parameters
  • floating_ip (str or None) – Optionally specify the Floating IP used by the HA master cluster in the DHCP case. This attribute is optional and it is only relevant when the value of mode is Clusters.NetworkSpec.Ipv4Mode.DHCP.

  • network (str) – Identifier for the network. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: Network. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: Network.

  • mode (Clusters.NetworkSpec.Ipv4Mode) – The address assignment mode.

  • address_range (Clusters.Ipv4Range) – Settings for the interfaces on the network. This attribute is optional and it is only relevant when the value of mode is Clusters.NetworkSpec.Ipv4Mode.STATICRANGE.

class Ipv4Mode(string)

Bases: vmware.vapi.bindings.enum.Enum

The Clusters.NetworkSpec.Ipv4Mode class defines various IPv4 address assignment modes.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Ipv4Mode instance.

DHCP = Ipv4Mode(string='DHCP')

The address is automatically assigned by a DHCP server.

STATICRANGE = Ipv4Mode(string='STATICRANGE')

The address is static.

class SetSpec(size_hint=None, network_provider=None, ncp_cluster_network_spec=None, master_dns=None, worker_dns=None, master_dns_search_domains=None, master_ntp_servers=None, master_storage_policy=None, ephemeral_storage_policy=None, login_banner=None, image_storage=None, default_image_registry=None, default_image_repository=None, default_kubernetes_service_content_library=None, workload_ntp_servers=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.SetSpec class contains the specification required to set a new configuration on the Cluster. This class is applied in entirety, replacing the current specification fully.

Tip

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

Parameters
  • size_hint (SizingHint) – This affects the size and resources allocated to the Kubernetes API server.

  • network_provider (Clusters.NetworkProvider) – The provider of cluster networking for this vSphere Namespaces cluster.

  • ncp_cluster_network_spec (Clusters.NCPClusterNetworkSetSpec) – Specification for the NSX Container Plugin cluster network. This attribute is optional and it is only relevant when the value of networkProvider is Clusters.NetworkProvider.NSXT_CONTAINER_PLUGIN.

  • master_dns (list of str or None) – List of DNS server IP addresses to use on Kubernetes API server, specified in order of preference. If None, DNS servers set on Kubernetes API server will be cleared.

  • worker_dns (list of str or None) – List of DNS server IP addresses to use on the worker nodes, specified in order of preference. If None, DNS servers set on worker nodes will be cleared.

  • master_dns_search_domains (list of str or None) – List of domains (for example “vmware.com”) to be searched when trying to lookup a host name on Kubernetes API server, specified in order of preference. If None, DNS search domains set on Kubernetes API server will be cleared.

  • master_ntp_servers (list of str or None) – List of NTP server DNS names or IP addresses to use on Kubernetes API server, specified in order of preference. If None, VMware Tools based time synchronization is enabled and any set NTP servers are cleared.

  • master_storage_policy (str) – Identifier of storage policy associated with Kubernetes API server. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: SpsStorageProfile. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: SpsStorageProfile.

  • ephemeral_storage_policy (str) – Identifier of storage policy associated with ephemeral disks of all the Kubernetes Pods in the cluster. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: SpsStorageProfile. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: SpsStorageProfile.

  • login_banner (str or None) – Disclaimer to be displayed prior to login via the Kubectl plugin. If None, disclaimer to be displayed prior to login via the Kubectl plugin will be cleared.

  • image_storage (Clusters.ImageStorageSpec) – Specification for storage to be used for container images.

  • default_image_registry (Clusters.ImageRegistry or None) – Default image registry to use when Kubernetes Pod container specification does not specify it as part of the container image name. If None, default image registry will be set to Docker Hub.

  • default_image_repository (str or None) – Default image repository to use when Kubernetes Pod container specification does not specify it as part of the container image name. If None, default image repository will be set to Docker Hub official repository in case of Docker Hub image registry, otherwise will be set to empty string.

  • default_kubernetes_service_content_library (str or None) – Identifier of the Content Library which holds the VM Images for vSphere Kubernetes Service. This Content Library should be subscribed to VMware’s hosted vSphere Kubernetes Service Repository. Modifying or clearing the Content Library identifier will not affect existing vSphere Kubernetes Service clusters. However, upgrades or scale-out of existing clusters may be affected if the new Content Library doesn’t have the necessary VM Images. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.content.Library. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.content.Library. If None, the Content Library identifier will be cleared.

  • workload_ntp_servers (list of str or None) – List of NTP server DNS names or IP addresses to use for workloads such as Tanzu Kubernetes Grid VMs, specified in order of preference. This attribute was added in vSphere API 7.0.1.0. If None, NTP for Kubernetes API servers will be used.

class Stats(cpu_used=None, cpu_capacity=None, memory_used=None, memory_capacity=None, storage_used=None, storage_capacity=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.Stats class contains the basic runtime statistics about a vSphere Namespaces-enabled cluster.

Tip

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

Parameters
  • cpu_used (long) – Overall CPU usage of the cluster, in MHz. This is the sum of CPU usage across all worker nodes in the cluster.

  • cpu_capacity (long) – Total CPU capacity in the cluster available for vSphere Namespaces, in MHz. This is the sum of CPU capacities from all worker nodes in the cluster.

  • memory_used (long) – Overall memory usage of the cluster, in mebibytes. This is the sum of memory usage across all worker nodes in the cluster.

  • memory_capacity (long) – Total memory capacity of the cluster available for vSphere Namespaces, in mebibytes. This is the sum of memory capacities from all worker nodesin the cluster.

  • storage_used (long) – Overall storage used by the cluster, in mebibytes. This is the sum of storage used across all worker nodes in the cluster.

  • storage_capacity (long) – Overall storage capacity of the cluster available for vSphere Namespaces, in mebibytes. This is the sum of total storage available from all worker nodes in the cluster.

class Summary(cluster=None, cluster_name=None, stats=None, config_status=None, kubernetes_status=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.Summary class contains the basic information about the cluster statistics and status related to vSphere Namespaces.

Tip

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

Parameters
  • cluster (str) – Identifier for the cluster. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: ClusterComputeResource. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: ClusterComputeResource.

  • cluster_name (str) – Name of the cluster. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: ClusterComputeResource.name. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: ClusterComputeResource.name.

  • stats (Clusters.Stats) – Basic runtime statistics for the cluster.

  • config_status (Clusters.ConfigStatus) – Current setting for Clusters.ConfigStatus.

  • kubernetes_status (Clusters.KubernetesStatus) – Current setting for Clusters.KubernetesStatus.

class UpdateSpec(size_hint=None, network_provider=None, ncp_cluster_network_spec=None, master_dns=None, worker_dns=None, master_dns_search_domains=None, master_ntp_servers=None, master_storage_policy=None, ephemeral_storage_policy=None, login_banner=None, image_storage=None, default_image_registry=None, default_image_repository=None, tls_endpoint_certificate=None, default_kubernetes_service_content_library=None, workload_ntp_servers=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.UpdateSpec class contains the specification required to update the configuration on the Cluster. This class is applied partially, and only the specified fields will replace or modify their existing counterparts.

Tip

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

Parameters
  • size_hint (SizingHint or None) – This affects the size and resources allocated to the Kubernetes API server. If None, size and resources allocated to Kubernetes API server will not be modified.

  • network_provider (Clusters.NetworkProvider or None) – The provider of cluster networking for this vSphere Namespaces cluster. If None, the existing effective cluster network specification will not be modified.

  • ncp_cluster_network_spec (Clusters.NCPClusterNetworkUpdateSpec or None) – Updated specification for the cluster network configuration. If unset, existing effective value will not be modified If None, the existing effective cluster network specification will not be modified.

  • master_dns (list of str or None) – List of DNS server IP addresses to use on Kubernetes API server, specified in order of preference. If set, DNS servers set on Kubernetes API server will be replaced. Otherwise, they will not be modified.

  • worker_dns (list of str or None) – List of DNS server IP addresses to use on the worker nodes, specified in order of preference. If set, DNS servers set on worker nodes will be replaced. Otherwise, they will not be modified.

  • master_dns_search_domains (list of str or None) – List of domains (for example “vmware.com”) to be searched when trying to lookup a host name on Kubernetes API server, specified in order of preference. If set, DNS search domains on Kubernetes API server will be replaced. Otherwise, they will not be modified.

  • master_ntp_servers (list of str or None) – List of NTP server DNS names or IP addresses to use on Kubernetes API server, specified in order of preference. If set, NTP servers on Kubernetes API server will be replaced. Otherwise, they will not be modified.

  • master_storage_policy (str or None) – Identifier of storage policy associated with Kubernetes API server. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: SpsStorageProfile. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: SpsStorageProfile. If None, storage policy associated with Kubernetes API server will not be modified.

  • ephemeral_storage_policy (str or None) – Identifier of storage policy associated with ephemeral disks of all the Kubernetes Pods in the cluster. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: SpsStorageProfile. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: SpsStorageProfile. If None, storage policy associated with ephemeral disks of all the Kubernetes Pods will not be modified.

  • login_banner (str or None) – Disclaimer to be displayed prior to login via the Kubectl plugin. If None, disclaimer to be displayed prior to login via the Kubectl plugin will not be modified.

  • image_storage (Clusters.ImageStorageSpec or None) – Specification for storage to be used for container images. If None, configuration of storage used for container images is not modified.

  • default_image_registry (Clusters.ImageRegistry or None) – Default image registry to use when Kubernetes Pod container specification does not specify it as part of the container image name. If None, default image registry will not be modified.

  • default_image_repository (str or None) – Default image repository to use when Kubernetes Pod container specification does not specify it as part of the container image name. If None, default image repository will not be modified.

  • tls_endpoint_certificate (str or None) – Certificate issued for Kubernetes API Server. Certificate used must be created by signing the Certificate Signing Request obtained from com.vmware.vcenter.namespace_management.certificates.Request.create Because a CertificateSigningRequest is created on an existing Namespaces-enabled Cluster, you must use the Clusters.UpdateSpec to specify this tlsEndpointCertificate on an existing Cluster rather than during initially enabling Namespaces on a Cluster. If None, Kubernetes API Server certificate will not be modified.

  • default_kubernetes_service_content_library (str or None) – Identifier of the Content Library which holds the VM Images for vSphere Kubernetes Service. This Content Library should be subscribed to VMware’s hosted vSphere Kubernetes Service Repository. Modifying or clearing the Content Library identifier will not affect existing vSphere Kubernetes Service clusters. However, upgrades or scale-out of existing clusters may be affected if the new Content Library doesn’t have the necessary VM Images. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.content.Library. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.content.Library. If None, the Content Library identifier will not be modified.

  • workload_ntp_servers (list of str or None) – List of NTP server DNS names or IP addresses to use for workloads such as Tanzu Kubernetes Grid VMs, specified in order of preference. This attribute was added in vSphere API 7.0.1.0. If None, NTP servers for workloads will be unmodified.

class WorkloadNetworksEnableSpec(supervisor_primary_workload_network=None, network_list=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.WorkloadNetworksEnableSpec contains the specification required to configure workload networks for a vSphere Namespaces Cluster during Enable operation. These workload networks will be used as backing network for Tanzu Kubernetes Cluster VMs and Kubernetes control plane VMs. This class was added in vSphere API 7.0.1.0.

Tip

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

Parameters
  • supervisor_primary_workload_network (Networks.CreateSpec) – The CreateSpec of the vSphere Namespaces network that will be used by Kubernetes control plane VMs to expose Kubernetes API server to devops users and other workloads. It can also used as backing network for Tanzu Kubernetes Cluster VMs. This attribute was added in vSphere API 7.0.1.0.

  • network_list (list of Networks.CreateSpec or None) – CreateSpecs classes for additional list of vSphere Namespaces networks to be associated with this cluster. This attribute was added in vSphere API 7.0.1.0.

class WorkloadNetworksInfo(supervisor_primary_workload_network=None, network_list=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Clusters.WorkloadNetworksInfo contains information related to configuration of vSphere Namespaces Network objects. This class was added in vSphere API 7.0.1.0.

Tip

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

Parameters
  • supervisor_primary_workload_network (Networks.Info) – vSphere Namespaces network used by Kubernetes control plane VMs to access load-balanced services on the various workload networks. This attribute was added in vSphere API 7.0.1.0.

  • network_list (list of Networks.Info or None) – List of vSphere Namespaces networks associated with this cluster. This attribute was added in vSphere API 7.0.1.0.

disable(cluster)

Disable vSphere Namespaces on the cluster. This operation tears down the Kubernetes instance and the worker nodes associated with vSphere Namespaces enabled cluster.

Parameters

cluster (str) – Identifier for the cluster for which vSphere Namespaces will be disabled. The parameter must be an identifier for the resource type: ClusterComputeResource.

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 cluster could not be located.

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 does not have Namespaces.Manage privilege.

enable(cluster, spec)

Enable vSphere Namespaces on the cluster. This operation sets up Kubernetes instance for the cluster along with worker nodes.

Parameters
  • cluster (str) – Identifier for the cluster on which vSphere Namespaces will be enabled. The parameter must be an identifier for the resource type: ClusterComputeResource.

  • spec (Clusters.EnableSpec) – Specification for setting up the Kubernetes API server and the worker nodes.

Raise

com.vmware.vapi.std.errors_client.AlreadyExists if the cluster already has vSphere Namespaces enabled.

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 resources/objects could not be located.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument if spec contain any errors.

Raise

com.vmware.vapi.std.errors_client.UnableToAllocateResource if the specified cluster is not licensed.

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 does not have Namespaces.Manage privilege.

Raise

com.vmware.vapi.std.errors_client.Unsupported if the specified cluster is not supported for vSphere Namespaces, the cluster’s hosts do not have the required ESX version, or for any other incompatibilities.

get(cluster)

Returns information about a specific cluster.

Parameters

cluster (str) – Identifier for the cluster on which vSphere Namespaces are enabled. The parameter must be an identifier for the resource type: ClusterComputeResource.

Return type

Clusters.Info

Returns

Information about the desired state of the specified cluster.

Raise

com.vmware.vapi.std.errors_client.NotFound if cluster could not be located.

Raise

com.vmware.vapi.std.errors_client.Unsupported if the specified cluster does not have vSphere Namespaces enabled.

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.Unauthenticated if the user can not be authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user does not have System.Read privilege.

list()

Returns information about all clusters on which vSphere Namespaces are enabled on this vCenter.

Return type

list of Clusters.Summary

Returns

List of summary of all clusters with vSphere Namespaces enabled.

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.Unauthenticated if the user can not be authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user does not have System.Read privilege.

rotate_password(cluster)

Request a new root password for all control plane nodes in the cluster. This operation generates a new root password and configures every control plane node in the cluster to accept it for authentication.

Parameters

cluster (str) – Identifier for the cluster for which the password is being generated. The parameter must be an identifier for the resource type: ClusterComputeResource.

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 cluster could not be located.

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 does not have Namespaces.Manage privilege.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the cluster is in the process of password rotation.

set(cluster, spec)

Set a new configuration on the cluster object. The specified configuration is applied in entirety and will replace the current configuration fully.

Parameters
  • cluster (str) – Identifier for the cluster on which vSphere Namespaces is enabled. The parameter must be an identifier for the resource type: ClusterComputeResource.

  • spec (Clusters.SetSpec) – New specification for the cluster.

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 contain any errors.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if vSphere Namespaces is being disabled on this cluster.

Raise

com.vmware.vapi.std.errors_client.NotFound if cluster could not be located.

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 does not have Namespaces.Manage privilege.

update(cluster, spec)

Update configuration on the cluster object. The specified configuration is applied partially and None fields in spec will leave those parts of configuration as-is.

Parameters
  • cluster (str) – Identifier for the cluster on which vSphere Namespaces is enabled. The parameter must be an identifier for the resource type: ClusterComputeResource.

  • spec (Clusters.UpdateSpec) – New specification for the cluster.

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 contain any errors.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if vSphere Namespaces is being disabled on this cluster.

Raise

com.vmware.vapi.std.errors_client.NotFound if cluster could not be located.

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 does not have Namespaces.Manage privilege.

class com.vmware.vcenter.namespace_management_client.DistributedSwitchCompatibility(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The DistributedSwitchCompatibility class provides methods to get Namespaces compatibility information of Distributed Switches in this vCenter.

Parameters

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

class FilterSpec(compatible=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The DistributedSwitchCompatibility.FilterSpec class contains attributes used to filter the results when listing Distributed Switches (see DistributedSwitchCompatibility.list()) and their compatibility information.

Tip

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

Parameters

compatible (bool or None) – Compatibility criteria for matching the filter. If true, only Distributed Switches which are compatible with vSphere Namespaces match the filter. If false, only Distributed Switches which are incompatible with vSphere Namespaces match the filter. If None, both compatible and incompatible Distributed Switches match the filter.

class Summary(distributed_switch=None, compatible=None, incompatibility_reasons=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The DistributedSwitchCompatibility.Summary class contains information about the compatibility of a vSphere Distributed Switch with the Namespaces feature.

Tip

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

Parameters
  • distributed_switch (str) – Identifier of the switch. If networkProvider is either None or is set to NSXT_CONTAINER_PLUGIN, the value of this field will refer to the UUID of a vim.DistributedVirtualSwitch. Otherwise, the value of the field will refer to the ID of a vim.DistributedVirtualSwitch. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: vSphereDistributedSwitch. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: vSphereDistributedSwitch.

  • compatible (bool) – Compatibility of this switch with vSphere Namespaces.

  • incompatibility_reasons (list of com.vmware.vapi.std_client.LocalizableMessage or None) – List of reasons for incompatibility. If None, this Distributed Switch is compatible.

list(cluster, filter=None)

Returns Namespaces compatibility information of Distributed Switches in vCenter associated with the vCenter cluster, matching the DistributedSwitchCompatibility.FilterSpec.

Parameters
  • cluster (str) – Identifier of a vCenter Cluster. Only Distributed Switches associated with the vCenter Cluster will be considered by the filter. The parameter must be an identifier for the resource type: ClusterComputeResource.

  • filter (DistributedSwitchCompatibility.FilterSpec or None) – Specification of matching Distributed Switches for which information should be returned. If None, the behavior is equivalent to a DistributedSwitchCompatibility.FilterSpec with all attributes None which means all Distributed Switches match the filter.

Return type

list of DistributedSwitchCompatibility.Summary

Returns

Namespaces compatibility information for Distributed Switches matching the the DistributedSwitchCompatibility.FilterSpec.

class com.vmware.vcenter.namespace_management_client.EdgeClusterCompatibility(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The EdgeClusterCompatibility class provides methods to get Namespaces compatibility information of NSX Edge Clusters.

Parameters

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

class FilterSpec(compatible=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The EdgeClusterCompatibility.FilterSpec class contains attributes used to filter the results when listing Edge Clusters (see EdgeClusterCompatibility.list()) and their compatibility information.

Tip

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

Parameters

compatible (bool or None) – Compatibility criteria for matching the filter. If true, only Edge Clusters which are compatible with vSphere Namespaces match the filter. If false, only Edge Clusters which are incompatible with vSphere Namespaces match the filter. If None, both compatible and incompatible Edge Clusters match the filter.

class Summary(edge_cluster=None, display_name=None, compatible=None, incompatibility_reasons=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The EdgeClusterCompatibility.Summary class contains information about an NSX-T Edge Cluster, including its compatibility with the vCenter Namespaces feature.

Tip

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

Parameters
  • edge_cluster (str) – Identifier of the Edge Cluster. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: NSXEdgeCluster. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: NSXEdgeCluster.

  • display_name (str) – Display name of the Edge Cluster.

  • compatible (bool) – Compatibility of this Edge Cluster with Namespaces feature.

  • incompatibility_reasons (list of com.vmware.vapi.std_client.LocalizableMessage or None) – List of reasons for incompatibility. If None, this Edge Cluster is compatible.

list(cluster, distributed_switch, filter=None)

Returns Namespaces compatibility information of NSX-T Edge Clusters matching the EdgeClusterCompatibility.FilterSpec.

Parameters
  • cluster (str) – Identifier of a vCenter Cluster. Only Edge Clusters that are associated with the particular vCenter Cluster will be considered by the filter. The parameter must be an identifier for the resource type: ClusterComputeResource.

  • distributed_switch (str) – Identifier of a Distributed Switch. Only Edge Clusters that are associated with the particular Distributed Switch will be considered by the filter. The parameter must be an identifier for the resource type: vSphereDistributedSwitch.

  • filter (EdgeClusterCompatibility.FilterSpec or None) – Specification of matching Edge Clusters for which information should be returned. If None, the behavior is equivalent to a EdgeClusterCompatibility.FilterSpec with all attributes None which means all Edge Clusters match the filter.

Return type

list of EdgeClusterCompatibility.Summary

Returns

List of summaries of Edge Clusters associated with the given vCenter Cluster and Distributed Switch matching the EdgeClusterCompatibility.FilterSpec.

class com.vmware.vcenter.namespace_management_client.HostsConfig(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Compatibility class provides methods to retrieve information about vSphere Namespaces support and licensing.

Parameters

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

class Info(namespaces_supported=None, namespaces_licensed=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Compatibility class contains information about vSphere Namespaces support and licensing.

Tip

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

Parameters
  • namespaces_supported (bool) – True if vSphere Namespace feature is supported in this VC.

  • namespaces_licensed (bool) – True if vSphere Namespace feature is licensed on any hosts in this VC.

get()

Returns support and licensing information about hosts under a VC.

Return type

HostsConfig.Info

Returns

Compatibility structure containing information about vSphere Namespaces support and licensing.

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.Unauthenticated if the user can not be authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user does not have System.Read privilege.

class com.vmware.vcenter.namespace_management_client.IPRange(address=None, count=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The IPRange class is used to express a range of IP addresses. The formats supported by this structure will depend on the IP addressing scheme that is being used by vSphere Namespaces. Currently, vSphere Namespaces only supports IPv4. This class was added in vSphere API 7.0.1.0.

Tip

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

Parameters
  • address (str) – The starting address of the range. This attribute was added in vSphere API 7.0.1.0.

  • count (long) – The number of IP addresses in the range. This attribute was added in vSphere API 7.0.1.0.

class com.vmware.vcenter.namespace_management_client.Ipv4Cidr(address=None, prefix=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Ipv4Cidr class contains the specification for representing CIDR notation of IP range. For example, this can be used to represent 256 IP addresses using 10.10.10.0/24.

Tip

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

Parameters
  • address (str) – The IPv4 address.

  • prefix (long) – The CIDR prefix.

class com.vmware.vcenter.namespace_management_client.LoadBalancers(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

LoadBalancers represent the user provisioned load balancers. The load balancers provided may be used to front the API servers in both, vSphere Namespaces Cluster and Tanzu Kubernetes Grid clusters. Note: The lifecycle of these load balancers is not managed by vSphere. This class was added in vSphere API 7.0.1.0.

Parameters

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

class ConfigSpec(id=None, address_ranges=None, provider=None, ha_proxy_config_create_spec=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LoadBalancers.ConfigSpec encapsulates load balancer configuration on vSphere Namespaces. This class was added in vSphere API 7.0.1.0.

Tip

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

Parameters
  • id (str) – An identifier that identifies a load balancer and can be used to query or configure load balancer properties via these resources. The identifier has DNS_LABEL restrictions as specified in ` <https://tools.ietf.org/html/rfc1123>`_. This must be an alphanumeric (a-z and 0-9) string, with a maximum length of 63 characters and with the ‘-‘ character allowed anywhere except the first or last character. This name is unique across all Namespaces in this vCenter server. This attribute was added in vSphere API 7.0.1.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.namespace_management.LoadBalancerConfig. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.namespace_management.LoadBalancerConfig.

  • address_ranges (list of IPRange) – List of address ranges that will be used to derive frontend IP addresses for L4 virtual servers. At least one range must be provided. This attribute was added in vSphere API 7.0.1.0.

  • provider (LoadBalancers.Provider) – The provider selects a provider from the list of available providers to be used with vSphere Namespaces. This attribute was added in vSphere API 7.0.1.0.

  • ha_proxy_config_create_spec (LoadBalancers.HAProxyConfigCreateSpec) – The LoadBalancers.HAProxyConfigCreateSpec is a conditional configuration made available upon selecting the HA_PROXY load balancer provider. It is used to configure the load balancer at run time. This attribute was added in vSphere API 7.0.1.0. This attribute is optional and it is only relevant when the value of provider is LoadBalancers.Provider.HA_PROXY.

class HAProxyConfigCreateSpec(servers=None, username=None, password=None, certificate_authority_chain=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

LoadBalancers.HAProxyConfigCreateSpec captures the configuration data required for Supervisor Service Type:LoadBalancer to have an external load balancer be created via HAProxy. This class was added in vSphere API 7.0.1.0.

Tip

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

Parameters
  • servers (list of LoadBalancers.Server) – Servers is a list of the addresses for the data plane API servers used to configure Virtual Servers. This attribute was added in vSphere API 7.0.1.0.

  • username (str) – An administrator user name for accessing the HAProxy Data Plane API server. This attribute was added in vSphere API 7.0.1.0.

  • password (str) – The password for the administrator user. This attribute was added in vSphere API 7.0.1.0.

  • certificate_authority_chain (str) – CertificateAuthorityChain contains PEM-encoded CA chain which is used to verify x509 certificates received from the server. This attribute was added in vSphere API 7.0.1.0.

class HAProxyInfo(servers=None, username=None, certificate_authority_chain=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LoadBalancers.HAProxyInfo contains information related to the HAProxy load balancer in the namespace. This class was added in vSphere API 7.0.1.0.

Tip

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

Parameters
  • servers (list of LoadBalancers.Server) – A list of the addresses for the DataPlane API servers used to configure HAProxy. This attribute was added in vSphere API 7.0.1.0.

  • username (str) – An administrator user name for accessing the HAProxy Data Plane API server. This attribute was added in vSphere API 7.0.1.0.

  • certificate_authority_chain (str) – PEM-encoded CA certificate chain which is used to verify x509 certificates received from the server. This attribute was added in vSphere API 7.0.1.0.

class Info(id=None, address_ranges=None, provider=None, ha_proxy_info=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LoadBalancers.Info contains information related to the load balancer for provisioning virtual servers in the namespace. This class was added in vSphere API 7.0.1.0.

Tip

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

Parameters
  • id (str) – An DNS compliant identifier for a load balancer, which can be used to query or configure the load balancer properties. This attribute was added in vSphere API 7.0.1.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.namespace_management.LoadBalancerConfig. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.namespace_management.LoadBalancerConfig.

  • address_ranges (list of IPRange) – IP address range from which virtual servers are assigned their IPs. This attribute was added in vSphere API 7.0.1.0.

  • provider (LoadBalancers.Provider) – Load balancer provider for the namespace. This attribute was added in vSphere API 7.0.1.0.

  • ha_proxy_info (LoadBalancers.HAProxyInfo) – The LoadBalancers.HAProxyInfo is a conditional configuration made available upon selecting the HA_PROXY load balancer provider. It is used to configure the load balancer at run time. This attribute was added in vSphere API 7.0.1.0. This attribute is optional and it is only relevant when the value of provider is LoadBalancers.Provider.HA_PROXY.

class Provider(string)

Bases: vmware.vapi.bindings.enum.Enum

The LoadBalancers.Provider enumerates the kinds of load balancers supported by vSphere Namespaces. This enumeration was added in vSphere API 7.0.1.0.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Provider instance.

HA_PROXY = Provider(string='HA_PROXY')
class Server(host=None, port=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

A LoadBalancers.Server represents an endpoint used to configure load balancers. This class was added in vSphere API 7.0.1.0.

Tip

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

Parameters
  • host (str) – Load balancer hostname or IPv4 address. This attribute was added in vSphere API 7.0.1.0.

  • port (long) – Load balancer port. This attribute was added in vSphere API 7.0.1.0.

class Summary(id=None, provider=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The LoadBalancers.Summary contains contains basic information related to the load balancer for provisioning virtual servers in the namespace. This class was added in vSphere API 7.0.1.0.

Tip

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

Parameters
  • id (str) – An DNS compliant identifier for a load balancer, which can be used to query or configure the load balancer properties. This attribute was added in vSphere API 7.0.1.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.namespace_management.LoadBalancerConfig. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.namespace_management.LoadBalancerConfig.

  • provider (LoadBalancers.Provider) – Load balancer provider for the namespace. This attribute was added in vSphere API 7.0.1.0.

get(cluster, id)

Returns information LoadBalancers.Info about the load balancer associated with the given cluster. This method was added in vSphere API 7.0.1.0.

Parameters
  • cluster (str) – Identifier of the cluster the load balancer is associated with. The parameter must be an identifier for the resource type: ClusterComputeResource.

  • id (str) – Identifier of the load balancer LoadBalancers.ConfigSpec.id. The parameter must be an identifier for the resource type: com.vmware.vcenter.namespace_management.LoadBalancerConfig.

Return type

LoadBalancers.Info

Returns

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 cluster or id cannot be located.

Raise

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

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user does not have System.Read privilege.

Raise

com.vmware.vapi.std.errors_client.Unsupported if the specified cluster does not have vSphere Namespaces enabled.

list(cluster)

Returns information about all load balancers associated with the given cluster. This method was added in vSphere API 7.0.1.0.

Parameters

cluster (str) – Identifier of the cluster the load balancers are associated with. The parameter must be an identifier for the resource type: ClusterComputeResource.

Return type

list of LoadBalancers.Summary

Returns

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 cluster cannot be located.

Raise

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

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user does not have System.Read privilege.

Raise

com.vmware.vapi.std.errors_client.Unsupported if the specified cluster does not have vSphere Namespaces enabled.

class com.vmware.vcenter.namespace_management_client.NamespaceResourceOptions(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The NamespaceResourceOptions class provides methods to get the objects used to create and modify resource quotas on a namespace.

Parameters

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

class Info(create_resource_quota_type=None, update_resource_quota_type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The NamespaceResourceOptions.Info class contains the information about the objects used to set and update resource quota keys on a namespace.

Tip

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

Parameters
  • create_resource_quota_type (str) – Identifier of the class used to set resource quotas on the namespace. See com.vmware.vcenter.namespaces.Instances#create and com.vmware.vcenter.namespaces.Instances#set. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vapi.structure. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vapi.structure.

  • update_resource_quota_type (str) – Identifier of the class used to update resource quotas on the namespace. See com.vmware.vcenter.namespaces.Instances#update. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vapi.structure. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vapi.structure.

get(cluster)

Get the information about the objects used to set and update resource quota keys for version of Kubernetes running on {#link cluster}.

Parameters

cluster (str) – Identifier for the cluster hosting the namespace on which the resource quota needs to be set. The parameter must be an identifier for the resource type: ClusterComputeResource.

Return type

NamespaceResourceOptions.Info

Returns

Information about the structures representing the resource spec.

Raise

com.vmware.vapi.std.errors_client.NotFound if cluster could not be located.

Raise

com.vmware.vapi.std.errors_client.Unsupported if the specified cluster is not enabled for Namespaces.

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.Unauthenticated if the user can not be authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user does not have System.Read privilege.

class com.vmware.vcenter.namespace_management_client.Networks(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Networks class provides lifecycle methods on vSphere Namespaces networks associated with a vSphere cluster. This class was added in vSphere API 7.0.1.0.

Parameters

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

class CreateSpec(network=None, network_provider=None, vsphere_network=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Networks.CreateSpec class contains the specification required to create a vSphere Namespaces network object. This class was added in vSphere API 7.0.1.0.

Tip

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

Parameters
  • network (str) – Identifier of the network. This has DNS_LABEL restrictions as specified in ` <https://tools.ietf.org/html/rfc1123>`_. This must be an alphanumeric (a-z and 0-9) string and with maximum length of 63 characters and with the ‘-‘ character allowed anywhere except the first or last character. This name must be unique within a cluster. This attribute was added in vSphere API 7.0.1.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.namespace_management.Network. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.namespace_management.Network.

  • network_provider (Clusters.NetworkProvider) – The network provider that will manage the vSphere Namespaces network object. This attribute was added in vSphere API 7.0.1.0.

  • vsphere_network (Networks.VsphereDVPGNetworkCreateSpec) – The create spec for a DVPG-backed Namespaces network object, supported by VSPHERE_NETWORK network provider. This attribute was added in vSphere API 7.0.1.0. This attribute is optional and it is only relevant when the value of networkProvider is Clusters.NetworkProvider.VSPHERE_NETWORK.

class Info(network=None, network_provider=None, vsphere_network=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Tip

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

Parameters
  • network (str) – Identifier of the network. This attribute was added in vSphere API 7.0.1.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.namespace_management.Network. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.namespace_management.Network.

  • network_provider (Clusters.NetworkProvider) – The network provider that will manage the vSphere Namespaces network object. This attribute was added in vSphere API 7.0.1.0.

  • vsphere_network (Networks.VsphereDVPGNetworkInfo) – Updated configuration specification for a DVPG-backed Namespaces network object, supported by VSPHERE_NETWORK network provider. This attribute was added in vSphere API 7.0.1.0. This attribute is optional and it is only relevant when the value of networkProvider is Clusters.NetworkProvider.VSPHERE_NETWORK.

RESOURCE_TYPE = 'com.vmware.vcenter.namespace_management.Network'

The resource type for network. This class attribute was added in vSphere API 7.0.1.0.

class VsphereDVPGNetworkCreateSpec(portgroup=None, address_ranges=None, gateway=None, subnet_mask=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Networks.VsphereDVPGNetworkCreateSpec class describes the configuration specification of a vSphere DVPG-backed Namespaces Network object. This class was added in vSphere API 7.0.1.0.

Tip

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

Parameters
  • portgroup (str) – Identifier of the vSphere Distributed Portgroup backing the vSphere network object. This attribute was added in vSphere API 7.0.1.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: Network. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: Network.

  • address_ranges (list of IPRange) – Usable IP pools on this network. This attribute was added in vSphere API 7.0.1.0.

  • gateway (str) – Gateway for the network. This attribute was added in vSphere API 7.0.1.0.

  • subnet_mask (str) – Subnet mask of the network. This attribute was added in vSphere API 7.0.1.0.

class VsphereDVPGNetworkInfo(portgroup=None, address_ranges=None, gateway=None, subnet_mask=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Networks.VsphereDVPGNetworkInfo class describes the configuration specification of a vSphere DVPG-backed Namespaces Network object. This class was added in vSphere API 7.0.1.0.

Tip

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

Parameters
  • portgroup (str) – Identifier of the vSphere Distributed Portgroup backing the vSphere network object. This attribute was added in vSphere API 7.0.1.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: Network. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: Network.

  • address_ranges (list of IPRange) – Usable IP pools on this network. This attribute was added in vSphere API 7.0.1.0.

  • gateway (str) – Gateway for the network. This attribute was added in vSphere API 7.0.1.0.

  • subnet_mask (str) – Subnet mask of the network. This attribute was added in vSphere API 7.0.1.0.

get(cluster, network)

Return information about a specific vSphere Namespaces network. This method was added in vSphere API 7.0.1.0.

Parameters
  • cluster (str) – Identifier for the cluster. The parameter must be an identifier for the resource type: ClusterComputeResource.

  • network (str) – Identifier for the vSphere Namespaces network. The parameter must be an identifier for the resource type: com.vmware.vcenter.namespace_management.Network.

Return type

Networks.Info

Returns

List of information about all vSphere Namespaces networks in the cluster.

Raise

com.vmware.vapi.std.errors_client.NotFound if cluster or network could not be located.

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.Unauthenticated if the user can not be authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user does not have System.Read privilege.

list(cluster)

Return information about all vSphere Namespaces networks in the cluster. This method was added in vSphere API 7.0.1.0.

Parameters

cluster (str) – Identifier for the cluster. The parameter must be an identifier for the resource type: ClusterComputeResource.

Return type

list of Networks.Info

Returns

Information about the specified vSphere Namespaces network..

Raise

com.vmware.vapi.std.errors_client.NotFound if cluster or network could not be located.

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.Unauthenticated if the user can not be authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user does not have System.Read privilege.

class com.vmware.vcenter.namespace_management_client.SizingHint(string)

Bases: vmware.vapi.bindings.enum.Enum

The SizingHint class determines the configuration of Kubernetes API server and the worker nodes. It also determines the default values associated with the maximum number of pods and services. Use ClusterSizeInfo.get() to get information associated with a SizingHint.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the SizingHint instance.

LARGE = SizingHint(string='LARGE')

Cluster size of ‘large’.

MEDIUM = SizingHint(string='MEDIUM')

Cluster size of ‘medium’.

SMALL = SizingHint(string='SMALL')

Cluster size of ‘small’.

TINY = SizingHint(string='TINY')

Cluster size of ‘tiny’.

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

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

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

class com.vmware.vcenter.namespace_management_client.SupportBundle(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The SupportBundle class provides methods to retrieve the cluster’s Namespaces-related support bundle download location.

Parameters

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

class Location(url=None, wcp_support_bundle_token=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The SupportBundle.Location class contains the URI location to download the per-cluster support bundle from, as well as a token required (as a header on the HTTP request) to get the bundle. The validity of the token is 5 minutes. After the token expires, any attempt to call the URI with said token will fail.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • url (str) – Support Bundle Download URL.

  • wcp_support_bundle_token (SupportBundle.Token) – Information about the token required in the HTTP GET request to generate the support bundle.

class Token(token=None, expiry=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The SupportBundle.Token class contains information about the token required in the HTTP GET request to generate the support bundle.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • token (str) – A one-time, short-lived token required in the HTTP header of the request to the url. This token needs to be passed in as a header with the name “wcp-support-bundle-token”.

  • expiry (str) – Expiry time of the token

create(cluster)

Returns the location SupportBundle.Location information for downloading the Namespaces-related support bundle for the specified cluster.

Retrieving a support bundle involves two steps:

  • Step 1: Invoke method to provision a token and a URI.

  • Step 2: Make an HTTP GET request using URI and one time used token returned in step 1 to generate the support bundle and return it.

There can only be one valid token per cluster at any given time. If this method is invoked again for the same cluster identifier while a token still valid, the API will return the same SupportBundle.Location response.

The HTTP GET request will:

  • return 401 (Not Authorized) if the download URL is recognized, but the token is invalid.

  • otherwise return 200 (OK), mark the token used (invalidating it for any future use), open a application/tar download stream for the client, and start the bundle process. As part of its work, the API will orchestrate support bundling on the worker nodes of a cluster. If a failure occurs during the collection of support bundle from worker node, the API will not abort the request, but will log a warning and move on to processing other worker nodes’ bundles. The API will only abort its operation if the content of the stream has been corrupted. When the API has to abort its operation (and the response stream), it will not provide any indication of failures to the client. The client will need to verify validity of the resultant file based on the format specified in the response’s Content-Disposition header.

Parameters

cluster (str) – Identifier of cluster for which the Namespaces-related support bundle should be generated. The parameter must be an identifier for the resource type: ClusterComputeResource.

Return type

SupportBundle.Location

Returns

the download location of the support bundle for the cluster.

Raise

com.vmware.vapi.std.errors_client.NotFound if the specified cluster is not registered on this vCenter 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.Unauthenticated if the user can not be authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user does not have Global.Diagnostics privilege.

com.vmware.vcenter.namespaces_client module

The com.vmware.vcenter.namespaces_client module provides classes for managing namespaces related methods.

class com.vmware.vcenter.namespaces_client.Access(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Access class provides methods to manage access control of subjects on namespaces.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class CreateSpec(role=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Access.CreateSpec class contains the specification required to create access control on the namespace.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

role (Access.Role) – Role to be assigned.

class Info(role=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Access.Info class contains the information about the access control of the subject on given domain on the namespace.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

role (Access.Role) – Role of the subject on the namespace.

class Role(string)

Bases: vmware.vapi.bindings.enum.Enum

The Access.Role class lists the default roles which can be associated with a subject on a domain on the namespace.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the Role instance.

EDIT = Role(string='EDIT')

This role allows modification of the namespace.

VIEW = Role(string='VIEW')

This is a read-only role on the namespace.

class SetSpec(role=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Access.SetSpec class contains the specification required to set new access control on the namespace.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters

role (Access.Role) – Role to be assigned.

class SubjectType(string)

Bases: vmware.vapi.bindings.enum.Enum

The Access.SubjectType class lists the types of subjects who can be associated with a Access.Role on the namespace.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the SubjectType instance.

GROUP = SubjectType(string='GROUP')

Group of users.

USER = SubjectType(string='USER')

Single user.

create(namespace, domain, subject, type, spec)

Set up access control for the subject on given domain on the namespace.

Parameters
  • namespace (str) – Identifier for the namespace. The parameter must be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance.

  • domain (str) – The domain of the subject.

  • subject (str) – The principal for this operation.

  • type (Access.SubjectType) – The type of subject (user or group).

  • spec (Access.CreateSpec) – Information about the access control to be created.

Raise

com.vmware.vapi.std.errors_client.AlreadyExists if the specified principal on given domain is already associated with a role on the namespace.

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.NotAllowedInCurrentState if the namespace is marked for deletion or the associated cluster is being disabled.

Raise

com.vmware.vapi.std.errors_client.NotFound if namespace cannot be located.

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 does not have Namespaces.Configure privilege or the namespace identifier begins with “vmware-system” prefix.

delete(namespace, domain, subject, type)

Remove access control of the subject on given domain from the namespace.

Parameters
  • namespace (str) – Identifier for the namespace. The parameter must be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance.

  • domain (str) – The domain of the subject.

  • subject (str) – The principal for this operation.

  • type (Access.SubjectType) – The type of subject (user or group).

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.NotAllowedInCurrentState if the namespace is marked for deletion or the associated cluster is being disabled.

Raise

com.vmware.vapi.std.errors_client.NotFound if namespace cannot be located.

Raise

com.vmware.vapi.std.errors_client.Unsupported if the specified principal on given domain is not associated with the namespace.

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 does not have Namespaces.Configure privilege or the namespace identifier begins with “vmware-system” prefix.

get(namespace, domain, subject, type)

Get the information about the access control of the subject on given domain on the namespace.

Parameters
  • namespace (str) – Identifier for the namespace. The parameter must be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance.

  • domain (str) – The domain of the subject.

  • subject (str) – The principal for this operation.

  • type (Access.SubjectType) – The type of subject (user or group).

Return type

Access.Info

Returns

Information about the subject including the type and the role on the namespace.

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 namespace cannot be located.

Raise

com.vmware.vapi.std.errors_client.Unsupported if the specified principal on given domain is not associated with the namespace.

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 does not have System.Read privilege.

set(namespace, domain, subject, type, spec)

Set new access control on the namespace for the subject on given domain.

Parameters
  • namespace (str) – Identifier for the namespace. The parameter must be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance.

  • domain (str) – The domain of the subject.

  • subject (str) – The principal for this operation.

  • type (Access.SubjectType) – The type of subject (user or group).

  • spec (Access.SetSpec) – Information about the new access control to be assigned.

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.NotAllowedInCurrentState if the namespace is marked for deletion or the associated cluster is being disabled.

Raise

com.vmware.vapi.std.errors_client.NotFound if namespace cannot be located.

Raise

com.vmware.vapi.std.errors_client.Unsupported if the specified principal on given domain is not associated with the namespace.

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 does not have Namespaces.Configure privilege or the namespace identifier begins with “vmware-system” prefix.

class com.vmware.vcenter.namespaces_client.Container(name=None, image=None, status=None, started_at=None, finished_at=None, reason=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

A Container holds the data that describes a container within a pod. Note: This class is restricted for VMware internal use only.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • name (str) – The name of the container.

  • image (str) – The image the container is running.

  • status (str) – The container’s current condition.

  • started_at (str) – Time at which the container was last (re-)started.

  • finished_at (str) – Time at which the container last terminated.

  • reason (str) – Details about the container’s current condition, if any.

class com.vmware.vcenter.namespaces_client.EndpointAddress(service=None, ip=None, port=None, protocol=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

An EndpointAddress contains the data that describes an Endpoint’s address in Kubernetes. Note: This class is restricted for VMware internal use only.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • service (str) – The Kubernetes Service the Endpoint belongs to.

  • ip (str) – The IP address of the Endpoint.

  • port (long) – The port of the Endpoint.

  • protocol (str) – The protocol used by this Endpoint.

class com.vmware.vcenter.namespaces_client.IngressRuleValue(host=None, path=None, name=None, port=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

An IngressRuleValue contains the data that describes an Ingress rule in Kubernetes. Note: This class is restricted for VMware internal use only.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • host (str) – The Ingress’s host.

  • path (str) – The Ingress’s path filter.

  • name (str) – The Ingress’s name.

  • port (long) – The Ingress’s service port.

class com.vmware.vcenter.namespaces_client.Instances(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Instances class provides methods to create and delete a namespace object. In this version, an Instance is an abstraction around a Kubernetes namespace.

Parameters

config (vmware.vapi.bindings.stub.StubConfiguration) – Configuration to be used for creating the stub.

class Access(subject_type=None, subject=None, domain=None, role=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Instances.Access class contains the access control information for a subject on a namespace.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • subject_type (Access.SubjectType) – Type of the subject.

  • subject (str) – Name of the subject.

  • domain (str) – Domain of the subject.

  • role (Access.Role) – Role of the subject on the namespace instance.

class ConfigStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

The Instances.ConfigStatus class describes the status of reaching the desired state configuration for the namespace.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the ConfigStatus instance.

CONFIGURING = ConfigStatus(string='CONFIGURING')

The configuration is being applied to the namespace.

ERROR = ConfigStatus(string='ERROR')

Failed to apply the configuration to the namespace, user intervention needed.

REMOVING = ConfigStatus(string='REMOVING')

The configuration is being removed and namespace is being deleted.

RUNNING = ConfigStatus(string='RUNNING')

The namespace is configured correctly.

class CreateSpec(namespace=None, cluster=None, description=None, resource_spec=None, access_list=None, storage_specs=None, networks=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Instances.CreateSpec class contains the specification required to set up a namespace.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • namespace (str) – Identifier of the namespace. This has DNS_LABEL restrictions as specified in ` <https://tools.ietf.org/html/rfc1123>`_. This must be an alphanumeric (a-z and 0-9) string and with maximum length of 63 characters and with the ‘-‘ character allowed anywhere except the first or last character. This name is unique across all Namespaces in this vCenter server. In this version, this maps to the name of a Kubernetes namespace. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance.

  • cluster (str) – Identifier of the cluster on which the namespace is being created. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: ClusterComputeResource. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: ClusterComputeResource.

  • description (str or None) – Description for the namespace. If None, no description is added to the namespace.

  • resource_spec (vmware.vapi.struct.VapiStruct or None) – Resource quota on the namespace. Refer to com.vmware.vcenter.namespace_management.NamespaceResourceOptions.Info#createResourceQuotaType and use com.vmware.vcenter.namespace_management.NamespaceResourceOptions#get for retrieving the type for the value for this field. For an example of this, see ResourceQuotaOptionsV1. If None, no resource limits will be set on the namespace.

  • access_list (list of Instances.Access or None) – Access controls associated with the namespace. If None, only users with Administrator role can access the namespace.

  • storage_specs (list of Instances.StorageSpec or None) – Storage associated with the namespace. If None, storage policies will not be associated with the namespace which will prevent users from being able to provision pods with persistent storage on the namespace. Users will be able to provision pods which use local storage.

  • networks (list of str or None) – vSphere Namespaces network objects to be associated with the namespace. The values of this list need to reference names of pre-existing Networks.Info classs. This attribute was added in vSphere API 7.0.1.0. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: com.vmware.vcenter.namespaces.Instance. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: com.vmware.vcenter.namespaces.Instance. The field must be left None if the cluster hosting the namespace uses NSXT_CONTAINER_PLUGIN as the network provider, since the network(s) for this namespace will be managed by NSX-T Container Plugin. If field is None when the cluster hosting the namespace uses VSPHERE_NETWORK as its network provider, the namespace will automatically be associated with the cluster’s Supervisor Primary Workload Network. The field currently accepts at most only 1 vSphere Namespaces network object reference.

class Info(cluster=None, config_status=None, messages=None, stats=None, description=None, resource_spec=None, access_list=None, storage_specs=None, networks=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Instances.Info class contains detailed information about the namespace.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • cluster (str) – Identifier for the cluster hosting the namespace. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: ClusterComputeResource. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: ClusterComputeResource.

  • config_status (Instances.ConfigStatus) – Current setting for Instances.ConfigStatus.

  • messages (list of Instances.Message) – Current set of messages associated with the object.

  • stats (Instances.Stats) – Basic runtime statistics for the namespace.

  • description (str) – Description of the namespace.

  • resource_spec (vmware.vapi.struct.VapiStruct or None) – Quotas on the namespace resources. Refer to com.vmware.vcenter.namespace_management.NamespaceResourceOptions#get for the type of the value for this field. If None, no resource constraints are associated with the namespace.

  • access_list (list of Instances.Access) – Access controls associated with the namespace.

  • storage_specs (list of Instances.StorageSpec) – Storage associated with the namespace.

  • networks (list of str or None) – vSphere Networks associated with the namespace. This attribute was added in vSphere API 7.0.1.0. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type: com.vmware.vcenter.namespaces.Instance. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: com.vmware.vcenter.namespaces.Instance. This field is None if the cluster hosting this namespace uses NSXT_CONTAINER_PLUGIN as its network provider.

class Message(severity=None, details=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Instances.Message class contains the information about the object configuration.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
class MessageSeverity(string)

Bases: vmware.vapi.bindings.enum.Enum

The Instances.Message.MessageSeverity class represents the severity of the message.

Note

This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.

Parameters

string (str) – String value for the MessageSeverity instance.

ERROR = MessageSeverity(string='ERROR')

Error message. This is accompanied by vCenter event and/or alarm.

INFO = MessageSeverity(string='INFO')

Informational message. This may be accompanied by vCenter event.

WARNING = MessageSeverity(string='WARNING')

Warning message. This may be accompanied by vCenter event.

RESOURCE_TYPE = 'com.vmware.vcenter.namespaces.Instance'

The resource type for namespace.

class SetSpec(description=None, resource_spec=None, access_list=None, storage_specs=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Instances.SetSpec class contains the specification required to set a new configuration on the namespace. This class is applied in entirety, replacing the current specification fully.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • description (str or None) – Description for the namespace. If None, the description of the namespace will be cleared.

  • resource_spec (vmware.vapi.struct.VapiStruct or None) – Resource quota for the namespace. This will replace the existing resource constraints on the namespace in entirety. Refer to com.vmware.vcenter.namespace_management.NamespaceResourceOptions.Info#createResourceQuotaType and use com.vmware.vcenter.namespace_management.NamespaceResourceOptions#get for retrieving the type for the value for this field. For an example of this, see ResourceQuotaOptionsV1. If None, the resource constraints on the namespace will be cleared.

  • access_list (list of Instances.Access or None) – Access control associated with the namespace. If None, the existing access controls on the namespace will be removed and users will not be able to access this namespace to create new pods. Existing pods from users will continue to run.

  • storage_specs (list of Instances.StorageSpec or None) – Storage associated with the namespace. If None, the existing storage policies will be disassociated with the namespace and existing limits will be cleared. Pods which are already using persistent storage from the earlier version of storage policies will be able to access them till the datastores are attached to the worker nodes.

class Stats(cpu_used=None, memory_used=None, storage_used=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Instances.Stats class contains the basic runtime statistics about the namespace.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • cpu_used (long) – Overall CPU usage of the namespace, in MHz. This is the sum of CPU usage across all pods in the Kubernetes namespace.

  • memory_used (long) – Overall memory usage of the namespace (in mebibytes). This is the sum of memory usage across all pods.

  • storage_used (long) – Overall storage used by the namespace (in mebibytes). This is the sum of storage used by pods across all datastores in the cluster associated with storage policies configured for the namespace.

class StorageSpec(policy=None, limit=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Instances.StorageSpec class contains the specification required to configure storage associated with a namespace. Information in this class will result in storage quotas on the Kubernetes namespace.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • policy (str) – ID of the storage policy. A Kubernetes storage class is created for this storage policy if it does not exist already. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: SpsStorageProfile. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: SpsStorageProfile.

  • limit (long or None) – The maximum amount of storage (in mebibytes) which can be utilized by the namespace for this specification. If None, no limits are placed.

class Summary(namespace=None, description=None, cluster=None, config_status=None, stats=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Instances.Summary class contains basic information about the namespace.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • namespace (str) – Identifier of the namespace. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance.

  • description (str) – Description of the namespace.

  • cluster (str) – Identifier for the cluster hosting the namespace. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: ClusterComputeResource. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: ClusterComputeResource.

  • config_status (Instances.ConfigStatus) – Current setting for Instances.ConfigStatus.

  • stats (Instances.Stats) – Basic runtime statistics for the namespace.

class UpdateSpec(description=None, resource_spec=None, access_list=None, storage_specs=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Instances.UpdateSpec class contains the specification required to update the configuration on the namespace. This class is applied partially, and only the specified fields will replace or modify their existing counterparts.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • description (str or None) – Description for the namespace. If None, the description of the namespace will not be modified.

  • resource_spec (vmware.vapi.struct.VapiStruct or None) – Resource quota updates on the namespace. Refer to com.vmware.vcenter.namespace_management.NamespaceResourceOptions.Info#updateResourceQuotaType and use com.vmware.vcenter.namespace_management.NamespaceResourceOptions#get for retrieving the type for the value for this field. For an example of this, see ResourceQuotaOptionsV1Update. If None, the resource constraints on the namespace will not be modified.

  • access_list (list of Instances.Access or None) – Access control associated with the namespace. If None, access controls on the namespace will not be modified. Existing pods from users will continue to run.

  • storage_specs (list of Instances.StorageSpec or None) – Storage associated with the namespace. If None, storage policies and their limit will not be modified. Pods which are already using persistent storage from the earlier version of storage policies will be able to access them till the datastores are attached to the worker nodes.

create(spec)

Create namespace object in the cluster.

Parameters

spec (Instances.CreateSpec) – Specification for setting up the namespace.

Raise

com.vmware.vapi.std.errors_client.AlreadyExists if a namespace with the same name exists in vCenter 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.InvalidArgument if spec contain any errors or if an invalid name is specified.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the associated cluster is deing disabled.

Raise

com.vmware.vapi.std.errors_client.NotFound if Instances.CreateSpec.cluster is not registered on this vCenter server.

Raise

com.vmware.vapi.std.errors_client.Unsupported if Instances.CreateSpec.cluster is not enabled for Namespaces, or if the networks field is set when the Instances.CreateSpec.cluster hosting the namespace uses NSXT_CONTAINER_PLUGIN as its network provider.

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 does not have Namespaces.Configure privilege or the namespace identifier begins with “vmware-system” prefix.

delete(namespace)

Delete the namespace object in the cluster.

Parameters

namespace (str) – Identifier for the namespace. The parameter must be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance.

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 namespace could not be located.

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 does not have Namespaces.Configure privilege or the namespace identifier begins with “vmware-system” prefix.

get(namespace)

Returns information about a specific namespace.

Parameters

namespace (str) – Identifier for the namespace. The parameter must be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance.

Return type

Instances.Info

Returns

Information about the desired state of the specified namespace.

Raise

com.vmware.vapi.std.errors_client.NotFound if namespace could not be located.

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.Unauthenticated if the user can not be authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user does not have System.Read privilege.

list()

Returns the information about all namespaces on this vCenter.

Return type

list of Instances.Summary

Returns

The list of summary of all namespaces.

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.Unauthenticated if the user can not be authenticated.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user does not have System.Read privilege.

set(namespace, spec)

Set a new configuration on the namespace object. The specified configuration is applied in entirety and will replace the current configuration fully.

Parameters
  • namespace (str) – Identifier for the namespace. The parameter must be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance.

  • spec (Instances.SetSpec) – New specification for the namespace.

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 contain any errors.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the namespace is marked for deletion or the associated cluster is being disabled.

Raise

com.vmware.vapi.std.errors_client.NotFound if namespace with the name namespace could not be located.

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 does not have Namespaces.Configure privilege or the namespace identifier begins with “vmware-system” prefix.

update(namespace, spec)

Update the namespace object. The specified configuration is applied partially and None fields in spec will leave those parts of configuration as-is.

Parameters
  • namespace (str) – Identifier for the namespace. The parameter must be an identifier for the resource type: com.vmware.vcenter.namespaces.Instance.

  • spec (Instances.UpdateSpec) – Specification for updating the namespace.

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 contain any errors.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState if the namespace is marked for deletion or the associated cluster is being disabled.

Raise

com.vmware.vapi.std.errors_client.NotFound if namespace with the name namespace could not be located.

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 does not have Namespaces.Configure privilege or the namespace identifier begins with “vmware-system” prefix.

class com.vmware.vcenter.namespaces_client.ResourceQuotaOptionsV1(memory_limit=None, memory_limit_default=None, memory_request_default=None, cpu_limit=None, cpu_limit_default=None, cpu_request_default=None, storage_request_limit=None, pod_count=None, service_count=None, deployment_count=None, daemon_set_count=None, replica_set_count=None, replication_controller_count=None, stateful_set_count=None, config_map_count=None, secret_count=None, persistent_volume_claim_count=None, job_count=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ResourceQuotaOptionsV1 class represents the resource quota limits which can be applied on the namespace. Refer to ` <https://kubernetes.io/docs/concepts/policy/resource-quotas>`_ for information related to the properties of this object and what they map to.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • memory_limit (long or None) – This is equivalent to ‘limits.memory’ option which is the maximum memory limit (in mebibytes) across all pods which exist in a non-terminal state in the namespace. This value translates to the memory limit on the ResourcePool in vCenter Server created for the namespace. If None, no memory limits are set on the ResourcePool for the namespace.

  • memory_limit_default (long or None) – This represents the default memory limit (in mebibytes) for containers in the pod. This translates to default memory limit in a LimitRange object. Refer ` for information about LimitRange. <https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/>`_ If None, no default memory limits are set on containers in the pod.

  • memory_request_default (long or None) – This represents the default memory request (in mebibytes) for containers in the pod. This translates to default memory request in a LimitRange object. Refer ` for information about LimitRange. <https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/>`_ If None, no default memory requests are set on containers in the pod.

  • cpu_limit (long or None) – This is equivalent to ‘limits.cpu’ option which is the maximum CPU limit (in MHz) across all pods which exist in a non-terminal state in the namespace. If specified, this limit should be at least 10 MHz. This value translates to the CPU limit on the ResourcePool in vCenter Server created for the namespace. If None, no CPU limits are set on the ResourcePool for the namespace.

  • cpu_limit_default (long or None) – This represents the default cpu limit (in MHz) for containers in the pod. If None, no default CPU limits are set on containers in the pod. Refer ` for information about LimitRange. If specified, this limit should be at least 10 MHz. <https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/memory-default-namespace/>`_

  • cpu_request_default (long or None) – This represents the default CPU request (in MHz) for containers in the pod. If None, no default CPU requests are set on containers in the pod. Refer ` for information about LimitRange. If specified, this field should be at least 10 MHz. <https://kubernetes.io/docs/tasks/administer-cluster/manage-resources/cpu-default-namespace/>`_

  • storage_request_limit (long or None) – This represents ‘requests.storage’ option which is the maximum storage request (in mebibytes) across all persistent volume claims from pods which exist in a non-terminal state in the namespace. If None, no storage request limits are set on the namespace.

  • pod_count (long or None) – This represents ‘pods’ option which is the maximum number of pods which exist in a non-terminal state in the namespace. If None, no pod limits are set on the namespace.

  • service_count (long or None) – This represents ‘count/services’ option which is the maximum number of services in the namespace. If None, no service limits are set on the namespace.

  • deployment_count (long or None) – This represents ‘count/deployments.apps’ option which is the maximum number of deployments in the namespace. If None, no deployment limits are set on the namespace.

  • daemon_set_count (long or None) – This represents ‘count/daemonsets.apps’ option which is the maximum number of DaemonSets in the namespace. If None, no daemonset limits are set on the namespace.

  • replica_set_count (long or None) – This represents ‘count/replicasets.apps’ option which is the maximum number of ReplicaSets in the namespace. If None, no replicaset limits are set on the namespace.

  • replication_controller_count (long or None) – This represents ‘count/replicationcontrollers’ option which is the maximum number of ReplicationControllers in the namespace. If None, no replicationcontroller limits are set on the namespace.

  • stateful_set_count (long or None) – This represents ‘count/statefulsets.apps’ option which is the maximum number of StatefulSets in the namespace. If None, no statefulset limits are set on the namespace.

  • config_map_count (long or None) – This represents ‘count/configmaps’ option which is the maximum number of ConfigMaps in the namespace. If None, no configmap limits are set on the namespace.

  • secret_count (long or None) – This represents ‘count/secrets’ option which is the maximum number of secrets in the namespace. If None, no secret limits are set on the namespace.

  • persistent_volume_claim_count (long or None) – This represents ‘count/persistentvolumeclaims’ option which is the maximum number of PersistentVolumeClaims in the namespace. If None, no persistentvolumeclaim limits are set on the namespace.

  • job_count (long or None) – This represents ‘count/jobs.batch’ option which is the maximum number jobs in the namespace. If None, no job limits are set on the namespace.

class com.vmware.vcenter.namespaces_client.ResourceQuotaOptionsV1Update(memory_limit=None, memory_limit_unset=None, memory_limit_default=None, memory_limit_default_unset=None, memory_request_default=None, memory_request_default_unset=None, cpu_limit=None, cpu_limit_unset=None, cpu_limit_default=None, cpu_limit_default_unset=None, cpu_request_default=None, cpu_request_default_unset=None, storage_request_limit=None, storage_request_limit_unset=None, pod_count=None, pod_count_unset=None, service_count=None, service_count_unset=None, deployment_count=None, deployment_count_unset=None, daemon_set_count=None, daemon_set_count_unset=None, replica_set_count=None, replica_set_count_unset=None, replication_controller_count=None, replication_controller_count_unset=None, stateful_set_count=None, stateful_set_count_unset=None, config_map_count=None, config_map_count_unset=None, secret_count=None, secret_count_unset=None, persistent_volume_claim_count=None, persistent_volume_claim_count_unset=None, job_count=None, job_count_unset=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ResourceQuotaOptionsV1Update class represents the changes to resource quota limits which are set on the namespace. Refer to ` <> Kubernetes Resource Quota <https://kubernetes.io/docs/concepts/policy/resource-quotas>`_ for information related to the properties of this object and what they map to.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • memory_limit (long or None) – This represents the new value for ‘limits.memory’ option which is equivalent to the maximum memory limit (in mebibytes) across all pods in the namespace. This field is ignored if ResourceQuotaOptionsV1Update.memory_limit_unset is set to true. If None, the existing memory limit on the ResourcePool will be unchanged if ResourceQuotaOptionsV1Update.memory_limit_unset is None or set to false.

  • memory_limit_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.memory_limit. If this field is set to true, the existing memory limit on the ResourcePool is removed. If this field is set to false, the existing memory limit will be changed to the value specified in ResourceQuotaOptionsV1Update.memory_limit, if any. If None, the existing memory limit will be changed to the value specified in ResourceQuotaOptionsV1Update.memory_limit, if any.

  • memory_limit_default (long or None) – This represents the new value for the default memory limit (in mebibytes) for containers in the pod. This field is ignored if ResourceQuotaOptionsV1Update.memory_limit_default_unset is set to true. If None, the existing memory limit will be unchanged if ResourceQuotaOptionsV1Update.memory_limit_default_unset is None or set to false.

  • memory_limit_default_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.memory_limit_default. If this field is set to true, the existing default memory limit on containers in the pod is removed. If this field is set to false, the existing default memory limit will be changed to the value specified in ResourceQuotaOptionsV1Update.memory_limit_default, if any. If None, the existing default memory limit will be changed to the value specified in ResourceQuotaOptionsV1Update.memory_limit_default, if any.

  • memory_request_default (long or None) – This represents the new value for the default memory request (in mebibytes) for containers in the pod. This field is ignored if ResourceQuotaOptionsV1Update.memory_request_default_unset is set to true. If None, the existing memory request will be unchanged if ResourceQuotaOptionsV1Update.memory_request_default_unset is None or set to false.

  • memory_request_default_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.memory_request_default. If this field is set to true, the existing default memory request on containers in the pod will be removed. If this field is set to false, the existing default memory request will be changed to the value specified in ResourceQuotaOptionsV1Update.memory_request_default, if any. If None, the existing default memory request will be changed to the value specified in ResourceQuotaOptionsV1Update.memory_request_default, if any.

  • cpu_limit (long or None) – This represents the new value for ‘limits.cpu’ option which is equivalent to the maximum CPU limit (in MHz) across all pods in the namespace. This field is ignored if ResourceQuotaOptionsV1Update.cpu_limit_unset is set to true. If specified, this limit should be at least 10 MHz. If None, the existing CPU limit on the ResourcePool will be unchanged if ResourceQuotaOptionsV1Update.cpu_limit_unset is None or set to false.

  • cpu_limit_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.cpu_limit. If this field is set to true, the existing CPU limit on the ResourcePool is removed. If this field is set to false, the existing CPU limit will be changed to the value specified in ResourceQuotaOptionsV1Update.cpu_limit, if any. If None, the existing CPU limit will be changed to the value specified in ResourceQuotaOptionsV1Update.memory_limit, if any.

  • cpu_limit_default (long or None) – This represents the new value for the default CPU limit (in Mhz) for containers in the pod. This field is ignored if ResourceQuotaOptionsV1Update.cpu_limit_default_unset is set to true. If specified, this limit should be at least 10 MHz. If None, the existing default CPU limit will be unchanged if ResourceQuotaOptionsV1Update.cpu_limit_default_unset is None or set to false.

  • cpu_limit_default_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.cpu_limit_default. If this field is set to true, the existing default CPU limit on containers in the pod is removed. If this field is set to false, the existing default CPU limit will be changed to the value specified in ResourceQuotaOptionsV1Update.cpu_limit_default, if any. If None, the existing default CPU limit will be changed to the value specified in ResourceQuotaOptionsV1Update.cpu_limit_default, if any.

  • cpu_request_default (long or None) – This represents the new value for the default CPU request (in Mhz) for containers in the pod. This field is ignored if ResourceQuotaOptionsV1Update.cpu_request_default_unset is set to true. If specified, this field should be at least 10 MHz. If None, the existing default CPU request will be unchanged if ResourceQuotaOptionsV1Update.cpu_request_default_unset is None or set to false.

  • cpu_request_default_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.cpu_request_default. If this field is set to true, the existing default CPU request on containers in the pod is removed. If this field is set to false, the existing default CPU request will be changed to the value specified in ResourceQuotaOptionsV1Update.cpu_request_default, if any. If None, the existing default CPU request will be changed to the value specified in ResourceQuotaOptionsV1Update.cpu_request_default, if any.

  • storage_request_limit (long or None) – This represents the new value for ‘requests.storage’ which is the limit on storage requests (in mebibytes) across all persistent volume claims from pods in the namespace. This field is ignored if if ResourceQuotaOptionsV1Update.storage_request_limit_unset is set to true. If None, the existing storage request limit will be unchanged if ResourceQuotaOptionsV1Update.storage_request_limit_unset is None or set to false. the namespace.

  • storage_request_limit_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.storage_request_limit. If this field is set to true, the existing storage request limit will be reset. If this field is set to false, the existing storage request limit will be changed to the value specified in ResourceQuotaOptionsV1Update.storage_request_limit, if any. If None, the existing storage request limit will be changed to the value specified in ResourceQuotaOptionsV1Update.storage_request_limit, if any.

  • pod_count (long or None) – This represents the new value for ‘podCount’ option which is the maximum number of pods in the namespace. This field is ignored if ResourceQuotaOptionsV1Update.pod_count_unset is set to true. If None, the existing ‘podCount’ limit will be unchanged if ResourceQuotaOptionsV1Update.pod_count_unset is None or set to false.

  • pod_count_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.pod_count. If this field is set to true, the existing ‘podCount’ limit on the namespace will be reset. If this field is set to false, the existing CPU limit will be changed to the value specified in ResourceQuotaOptionsV1Update.pod_count, if any. If None, the existing ‘podCount’ limit will be changed to the value specified in ResourceQuotaOptionsV1Update.pod_count, if any.

  • service_count (long or None) – This represents the new value for ‘serviceCount’ option which is the maximum number of services in the namespace. This field is ignored if ResourceQuotaOptionsV1Update.service_count_unset is set to true. If None, the existing ‘serviceCount’ limit will be unchanged if ResourceQuotaOptionsV1Update.service_count_unset is None or set to false.

  • service_count_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.service_count. If this field is set to true, the existing ‘serviceCount’ limit on the namespace will be reset. If this field is set to false, the existing service count limit will be changed to the value specified in ResourceQuotaOptionsV1Update.service_count, if any. If None, the existing ‘serviceCount’ limit will be changed to the value specified in ResourceQuotaOptionsV1Update.service_count, if any.

  • deployment_count (long or None) – This represents the new value for ‘deploymentCount’ option which is the maximum number of deployments in the namespace. This field is ignored if ResourceQuotaOptionsV1Update.deployment_count_unset is set to true. If None, the existing ‘deploymentCount’ limit will be unchanged if ResourceQuotaOptionsV1Update.deployment_count_unset is None or set to false.

  • deployment_count_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.deployment_count. If this field is set to true, the existing ‘deploymentCount’ limit on the namespace will be reset. If this field is set to false, the existing deployment count limit will be changed to the value specified in ResourceQuotaOptionsV1Update.deployment_count, if any. If None, the existing ‘deploymentCount’ limit will be changed to the value specified in ResourceQuotaOptionsV1Update.deployment_count, if any.

  • daemon_set_count (long or None) – This represents the new value for ‘daemonSetCount’ option which is the maximum number of DaemonSets in the namespace. This field is ignored if ResourceQuotaOptionsV1Update.daemon_set_count_unset is set to true. If None, the existing ‘daemonSetCount’ limit will be unchanged if ResourceQuotaOptionsV1Update.daemon_set_count_unset is None or set to false.

  • daemon_set_count_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.daemon_set_count. If this field is set to true, the existing ‘daemonSetCount’ limit on the namespace will be reset. If this field is set to false, the existing daemonset count limit will be changed to the value specified in ResourceQuotaOptionsV1Update.daemon_set_count, if any. If None, the existing ‘daemonSetCount’ limit will be changed to the value specified in ResourceQuotaOptionsV1Update.daemon_set_count, if any.

  • replica_set_count (long or None) – This represents the new value for ‘replicaSetCount’ option which is the maximum number of ReplicaSets in the namespace. This field is ignored if ResourceQuotaOptionsV1Update.replica_set_count_unset is set to true. If None, the existing ‘replicaSetCount’ limit will be unchanged if ResourceQuotaOptionsV1Update.replica_set_count_unset is None or set to false.

  • replica_set_count_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.replica_set_count. If this field is set to true, the existing ‘replicaSetCount’ limit on the namespace will be reset. If this field is set to false, the existing replicaset count limit will be changed to the value specified in ResourceQuotaOptionsV1Update.replica_set_count, if any. If None, the existing ‘replicaSetCount’ limit will be changed to the value specified in ResourceQuotaOptionsV1Update.replica_set_count, if any.

  • replication_controller_count (long or None) – This represents the new value for ‘replicationControllerCount’ option which is the maximum number of ReplicationControllers in the namespace. This field is ignored if ResourceQuotaOptionsV1Update.replication_controller_count_unset is set to true. If None, the existing ‘replicationControllerCount’ limit will be unchanged if ResourceQuotaOptionsV1Update.replication_controller_count_unset is None or set to false.

  • replication_controller_count_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.replication_controller_count. If this field is set to true, the existing ‘replicationControllerCount’ limit on the namespace will be reset. If this field is set to false, the existing replicationcontroller count limit will be changed to the value specified in ResourceQuotaOptionsV1Update.replication_controller_count, if any. If None, the existing ‘replicationControllerCount’ limit will be changed to the value specified in ResourceQuotaOptionsV1Update.replication_controller_count, if any.

  • stateful_set_count (long or None) – This represents the new value for ‘statefulSetCount’ option which is the maximum number of StatefulSets in the namespace. This field is ignored if ResourceQuotaOptionsV1Update.stateful_set_count_unset is set to true. If None, the existing ‘statefulSetCount’ limit will be unchanged if ResourceQuotaOptionsV1Update.stateful_set_count_unset is None or set to false.

  • stateful_set_count_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.stateful_set_count. If this field is set to true, the existing ‘statefulSetCount’ limit on the namespace will be reset. If this field is set to false, the existing statefulset count limit will be changed to the value specified in ResourceQuotaOptionsV1Update.stateful_set_count, if any. If None, the existing ‘statefulSetCount’ limit will be changed to the value specified in ResourceQuotaOptionsV1Update.stateful_set_count, if any.

  • config_map_count (long or None) – This represents the new value for ‘configMapCount’ option which is the maximum number of ConfigMaps in the namespace. This field is ignored if ResourceQuotaOptionsV1Update.config_map_count_unset is set to true. If None, the existing ‘configMapCount’ limit will be unchanged if ResourceQuotaOptionsV1Update.config_map_count_unset is None or set to false.

  • config_map_count_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.config_map_count. If this field is set to true, the existing ‘configMapCount’ limit on the namespace will be reset. If this field is set to false, the existing configmap count limit will be changed to the value specified in ResourceQuotaOptionsV1Update.config_map_count, if any. If None, the existing ‘configMapCount’ limit will be changed to the value specified in ResourceQuotaOptionsV1Update.config_map_count, if any.

  • secret_count (long or None) – This represents the new value for ‘secretCount’ option which is the maximum number of secrets in the namespace. This field is ignored if ResourceQuotaOptionsV1Update.secret_count_unset is set to true. If None, the existing ‘secretCount’ limit will be unchanged if ResourceQuotaOptionsV1Update.secret_count_unset is None or set to false.

  • secret_count_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.secret_count. If this field is set to true, the existing ‘secretCount’ limit on the namespace will be reset. If this field is set to false, the existing secret count limit will be changed to the value specified in ResourceQuotaOptionsV1Update.secret_count, if any. If None, the existing ‘secretCount’ limit will be changed to the value specified in ResourceQuotaOptionsV1Update.secret_count, if any.

  • persistent_volume_claim_count (long or None) – This represents the new value for ‘persistentVolumeClaimCount’ option which is the maximum number of PersistentVolumeClaims in the namespace. This field is ignored if ResourceQuotaOptionsV1Update.persistent_volume_claim_count_unset is set to true. If None, the existing ‘persistentVolumeClaimCount’ limit will be unchanged if ResourceQuotaOptionsV1Update.persistent_volume_claim_count_unset is None or set to false.

  • persistent_volume_claim_count_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.persistent_volume_claim_count. If this field is set to true, the existing ‘persistentVolumeClaimCount’ limit on the namespace will be reset. If this field is set to false, the existing replicationcontroller count limit will be changed to the value specified in ResourceQuotaOptionsV1Update.persistent_volume_claim_count, if any. If None, the existing ‘persistentVolumeClaimCount’ limit will be changed to the value specified in ResourceQuotaOptionsV1Update.persistent_volume_claim_count, if any.

  • job_count (long or None) – This represents the new value for ‘jobCount’ option which is the maximum number of jobs in the namespace. This field is ignored if ResourceQuotaOptionsV1Update.job_count_unset is set to true. If None, the existing ‘jobCount’ limit will be unchanged if ResourceQuotaOptionsV1Update.job_count_unset is None or set to false.

  • job_count_unset (bool or None) – This represents the intent of the change to ResourceQuotaOptionsV1Update.job_count. If this field is set to true, the existing ‘jobCount’ limit on the namespace will be reset. If this field is set to false, the existing secret count limit will be changed to the value specified in ResourceQuotaOptionsV1Update.job_count, if any. If None, the existing ‘jobCount’ limit will be changed to the value specified in ResourceQuotaOptionsV1Update.job_count, if any.

class com.vmware.vcenter.namespaces_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

stub_config (vmware.vapi.bindings.stub.StubConfiguration) – Stub config instance

com.vmware.vcenter.ovf_client module

The com.vmware.vcenter.ovf_client module provides services to capture and deploy Open Virtualization Format (OVF) packages to and from the content library.

It provides the ability to deploy OVF packages from the content library with support for advanced network topologies, network services, creating virtual appliances and virtual machines in hosts, resource pools or clusters. It also provides the ability to export virtual appliances and virtual machines from hosts, resource pools or clusters as OVF packages to the content library.

class com.vmware.vcenter.ovf_client.CertificateParams(issuer=None, subject=None, is_valid=None, is_self_signed=None, x509=None, type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The CertificateParams class contains information about the public key certificate used to sign the OVF package. This class will only be returned if the OVF package is signed.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • issuer (str) – Certificate issuer. For example: /C=US/ST=California/L=Palo Alto/O=VMware, Inc. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • subject (str) – Certificate subject. For example: /C=US/ST=Massachusetts/L=Hopkinton/O=EMC Corporation/OU=EMC Avamar/CN=EMC Corporation. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • is_valid (bool) – Is the certificate chain validated. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • is_self_signed (bool) – Is the certificate self-signed. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • x509 (str) – The X509 representation of the certificate. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • type (str) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

class com.vmware.vcenter.ovf_client.DeploymentOption(key=None, label=None, description=None, default_choice=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The DeploymentOption class contains the information about a deployment option as defined in the OVF specification.

This corresponds to the ovf:Configuration element of the ovf:DeploymentOptionSection in the specification. The ovf:DeploymentOptionSection specifies a discrete set of intended resource allocation configurations. This class represents one item from that set.

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • key (str) – The key of the deployment option, corresponding to the ovf:id attribute in the OVF descriptor. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • label (str) – A localizable label for the deployment option. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • description (str) – A localizable description for the deployment option. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • default_choice (bool) – A bool flag indicates whether this deployment option is the default choice. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package. If None or false, it is not the default.

class com.vmware.vcenter.ovf_client.DeploymentOptionParams(deployment_options=None, selected_key=None, type=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The DeploymentOptionParams class describes the possible deployment options as well as the choice provided by the user.

This information based on the ovf:DeploymentOptionSection.

See LibraryItem.deploy() and LibraryItem.filter().

Tip

The arguments are used to initialize data attributes with the same names.

Parameters
  • deployment_options (list of DeploymentOption) – list of deployment options. This attribute corresponds to the ovf:Configuration elements of the ovf:DeploymentOptionSection in the specification. It is a discrete set of intended resource allocation configurations from which one can be selected. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

  • selected_key (str) – The selected deployment option. Identifies the DeploymentOption in the list in the deploymentOptions attribute with a matching value in the DeploymentOption.key attribute. This attribute is optional in the input parameters when deploying an OVF package. If None the server will use the default deployment configuration, usually it’s the first one in DeploymentOptionParams.deployment_options list. This attribute is optional in the result when retrieving information about an OVF package. The value will be set only if it is specified with the optional ovf:default attribute.

  • type (str) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.

class com.vmware.vcenter.ovf_client.DiskProvisioningType(string)

Bases: vmware.vapi.bindings.enum.Enum

The DiskProvisioningType class defines the virtual disk provisioning types that can be set for a disk on the target platform.

Note

This class represents an enumerated type in the interface language defini