com.vmware.vcenter package¶
Subpackages¶
- com.vmware.vcenter.certificate_management package
- com.vmware.vcenter.compute package
- Subpackages
- com.vmware.vcenter.compute.policies package
- Subpackages
- com.vmware.vcenter.compute.policies.capabilities package
- Subpackages
- Submodules
- com.vmware.vcenter.compute.policies.capabilities.cluster_scale_in_ignore_vm_capabilities_client module
- com.vmware.vcenter.compute.policies.capabilities.disable_drs_vmotion_client module
- com.vmware.vcenter.compute.policies.capabilities.vm_host_affinity_client module
- com.vmware.vcenter.compute.policies.capabilities.vm_host_anti_affinity_client module
- com.vmware.vcenter.compute.policies.capabilities.vm_vm_affinity_client module
- com.vmware.vcenter.compute.policies.capabilities.vm_vm_anti_affinity_client module
- com.vmware.vcenter.compute.policies.capabilities package
- Submodules
- com.vmware.vcenter.compute.policies.capabilities_client module
- Subpackages
- com.vmware.vcenter.compute.policies package
- Submodules
- com.vmware.vcenter.compute.policies_client module
- Subpackages
- com.vmware.vcenter.content package
- com.vmware.vcenter.crypto_manager package
- com.vmware.vcenter.deployment package
- com.vmware.vcenter.hvc package
- com.vmware.vcenter.lcm package
- com.vmware.vcenter.namespace_management package
- com.vmware.vcenter.namespaces package
- com.vmware.vcenter.storage package
- com.vmware.vcenter.system_config package
- com.vmware.vcenter.trusted_infrastructure package
- Subpackages
- com.vmware.vcenter.trusted_infrastructure.trust_authority_clusters package
- Subpackages
- com.vmware.vcenter.trusted_infrastructure.trust_authority_clusters.attestation package
- com.vmware.vcenter.trusted_infrastructure.trust_authority_clusters.kms package
- Submodules
- com.vmware.vcenter.trusted_infrastructure.trust_authority_clusters.attestation_client module
- com.vmware.vcenter.trusted_infrastructure.trust_authority_clusters.kms_client module
- Subpackages
- com.vmware.vcenter.trusted_infrastructure.trusted_clusters package
- com.vmware.vcenter.trusted_infrastructure.trust_authority_clusters package
- Submodules
- com.vmware.vcenter.trusted_infrastructure.attestation_client module
- com.vmware.vcenter.trusted_infrastructure.kms_client module
- com.vmware.vcenter.trusted_infrastructure.trust_authority_clusters_client module
- com.vmware.vcenter.trusted_infrastructure.trust_authority_hosts_client module
- com.vmware.vcenter.trusted_infrastructure.trusted_clusters_client module
- Subpackages
- com.vmware.vcenter.vcha package
- com.vmware.vcenter.vm package
- Subpackages
- Submodules
- com.vmware.vcenter.vm.compute_client module
- com.vmware.vcenter.vm.console_client module
- com.vmware.vcenter.vm.guest_client module
- com.vmware.vcenter.vm.hardware_client module
- com.vmware.vcenter.vm.storage_client module
- com.vmware.vcenter.vm.tools_client module
- com.vmware.vcenter.vm_template package
Submodules¶
com.vmware.vcenter.authentication_client module¶
The com.vmware.vcenter.authentication_client
module provides authentication
classes specific to the com.vmware.vcenter module. The
com.vmware.vcenter.authentication_client
module is available starting in
vSphere 7.0 U2.
-
class
com.vmware.vcenter.authentication_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.authentication_client.
Token
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
Token
interface provides operations for obtaining an access token.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
IssueSpec
(grant_type=None, resource=None, audience=None, scope=None, requested_token_type=None, subject_token=None, subject_token_type=None, actor_token=None, actor_token_type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Token.IssueSpec
class contains arguments required for token exchange.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
grant_type (
str
) – The value ofurn:ietf:params:oauth:grant-type:token-exchange
indicates that a token exchange is being performed. When clients pass a value of this class as a parameter, the attribute must be one ofurn:ietf:params:oauth:grant-type:token-exchange
. When methods return a value of this class as a return value, the attribute will be one ofurn:ietf:params:oauth:grant-type:token-exchange
.resource (
str
orNone
) – Indicates the location of the target service or resource where the client intends to use the requested security token. If None, it is inferred from other arguments.audience (
str
orNone
) – The logical name of the target service where the client intends to use the requested security token. This serves a purpose similar to theToken.IssueSpec.resource
attribute, but with the client providing a logical name rather than a location. If None, it is inferred from other arguments.scope (
str
orNone
) – A list of space-delimited, case-sensitive strings, that allow the client to specify the desired scope of the requested security token in the context of the service or resource where the token will be used. If None, it is inferred from other arguments.requested_token_type (
str
orNone
) – An identifier for the type of the requested security token. If the requested type is unspecified, the issued token type is at the discretion of the server and may be dictated by knowledge of the requirements of the service or resource indicated by theToken.IssueSpec.resource
orToken.IssueSpec.audience
attribute. If None, it is inferred from other arguments.subject_token (
str
orNone
) –A security token that represents the identity of the party on behalf of whom exchange is being made. Typically, the subject of this token will be the subject of the security token issued. Token is base64-encoded.
The attribute is required when the value of the
Token.IssueSpec.grant_type
attribute isurn:ietf:params:oauth:grant-type:token-exchange
. This attribute is currently required. In the future, the class may support grant-types other thanurn:ietf:params:oauth:grant-type:token-exchange
for which the value may be None.subject_token_type (
str
orNone
) –An identifier, that indicates the type of the security token in the
Token.IssueSpec.subject_token
attribute.The attribute is required when the value of the
Token.IssueSpec.grant_type
attribute isurn:ietf:params:oauth:grant-type:token-exchange
. This attribute is currently required. In the future, the class may support grant-types other thanurn:ietf:params:oauth:grant-type:token-exchange
for which the value may be None.actor_token (
str
orNone
) – A security token that represents the identity of the acting party. Typically, this will be the party that is authorized to use the requested security token and act on behalf of the subject. None if not needed for the specific case of exchange.actor_token_type (
str
orNone
) – An identifier, that indicates the type of the security token in theToken.IssueSpec.actor_token
attribute. None ifToken.IssueSpec.actor_token
attribute is not present.
-
issue
(spec)¶ Provides a token endpoint as defined in RFC 6749.
Supported grant types:
` urn:ietf:params:oauth:grant-type:token-exchange <https://tools.ietf.org/html/rfc8693#section-2.1>`_ - Exchanges incoming token based on the spec and current client authorization data.
This method supercedes
com.vmware.vcenter.tokenservice.TokenExchange#exchange
. The REST rendering of the newer operation matches RFC8693’s definition for both input and output of the method.- Parameters
spec (
Token.IssueSpec
) –Token.IssueSpec
class containing arguments that define the exchange process.- Return type
- Returns
com.vmware.oauth2_client.TokenInfo
class that contains a newly issued token.- Raise
com.vmware.oauth2.errors_client.InvalidRequest
ifToken.IssueSpec
is missing a required attribute, includes an unsupported attribute value (other thanToken.IssueSpec.grant_type
).- Raise
com.vmware.oauth2.errors_client.InvalidGrant
provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.- Raise
com.vmware.oauth2.errors_client.InvalidScope
If the server is unwilling or unable to issue a token for all the target services indicated by theToken.IssueSpec.resource
orToken.IssueSpec.audience
attributes.
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
ofstr
) – 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.
-
class
com.vmware.vcenter.compute_client.
Policies
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
Policies
class provides methods to manage compute policies. 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. Seecom.vmware.vcenter.compute.policies_client.Capabilities.Info.create_spec_type
.- 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.
-
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.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
policy (
str
) – Identifier of the policy. 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.description (
str
) – Description of the policy.capability (
str
) – Identifier of the capability this policy is based on. 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.
- 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 (seecom.vmware.vcenter.compute.policies_client.Capabilities.Info.create_spec_type
) equal to the type of the specified value (seespec
). The parameter must contain all the attributes defined incom.vmware.vcenter.compute.policies_client.CreateSpec
.- Return type
str
- Returns
The identifier of the newly created policy. Use this identifier to get or destroy the policy. The return value will be an identifier for the resource type:
com.vmware.vcenter.compute.Policy
.- Raise
com.vmware.vapi.std.errors_client.AlreadyExists
if a policy with the same name is already present on this vCenter server.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
if a parameter passed in the spec is invalid.- Raise
com.vmware.vapi.std.errors_client.UnableToAllocateResource
if more than 100 policies are created.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
ComputePolicy.Manage
.
-
delete
(policy)¶ Deletes a specific compute policy.
- Parameters
policy (
str
) – Identifier of the policy to be deleted. The parameter must be an identifier for the resource type:com.vmware.vcenter.compute.Policy
.- Raise
com.vmware.vapi.std.errors_client.NotFound
if a policy with this identifier does not exist.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
ComputePolicy.Manage
.
-
get
(policy)¶ Returns information about a specific compute policy.
- 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 incom.vmware.vcenter.compute.policies_client.Info
.- Raise
com.vmware.vapi.std.errors_client.NotFound
if a policy with this identifier does not exist.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
System.Read
.
-
list
()¶ Returns information about the compute policies available in this vCenter server.
- Return type
- Returns
The list of compute policies available on this vCenter server.
- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
System.Read
.
-
class
com.vmware.vcenter.compute_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
Initialize StubFactoryBase
- Parameters
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance
com.vmware.vcenter.crypto_manager_client module¶
The com.vmware.vcenter.crypto_manager_client
module provides classes for
managing key providers and cryptographic keys.
-
class
com.vmware.vcenter.crypto_manager_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. TheDefaultPolicy.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
orNone
- 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 theApplianceSize
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 theApplianceState
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 theApplianceType
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
orNone
) – 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
orNone
) – 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 theCheckStatus
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
orNone
) – 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
orNone
) – 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 theHistoryMigrationOption
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 includesStatistics
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
orNone
) – 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 ofCommonInfo#status
is one ofcom.vmware.cis.task_client.Status.RUNNING
,com.vmware.cis.task_client.Status.FAILED
,com.vmware.cis.task_client.Status.BLOCKED
, orcom.vmware.cis.task_client.Status.SUCCEEDED
.result (
Notifications
orNone
) – Result of the operation. If an operation reports partial results before it completes, this attribute could beset
before thecom.vmware.cis.task_client.CommonInfo.status
has the valuecom.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
orNone
) – 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
orNone
) – 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
orNone
) – 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 (seecom.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 ofstatus
is one ofcom.vmware.cis.task_client.Status.RUNNING
,com.vmware.cis.task_client.Status.BLOCKED
,com.vmware.cis.task_client.Status.SUCCEEDED
, orcom.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 ofstatus
is one ofcom.vmware.cis.task_client.Status.SUCCEEDED
orcom.vmware.cis.task_client.Status.FAILED
.user (
str
orNone
) – 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
- 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 incom.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 incom.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
orNone
) –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
orNone
) – 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
orNone
) – 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
orNone
) – 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
- 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
- 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
orNone
) – 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
orNone
) – 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 ifsslVerify
is None or has the value true.ssl_verify (
bool
orNone
) – SSL verification should be enabled or disabled. IfsslVerify
is true and andsslThumbprint
is None, the CA certificate will be used for verification. IfsslVerify
is true andsslThumbprint
is set then the thumbprint will be used for verification. No verification will be performed ifsslVerify
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
orNone
) –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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
- 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
- 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
orNone
) – The time the notification was raised/found. This attribute was added in vSphere API 6.7. Onlyset
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
orNone
) – The resolution message, if any. This attribute was added in vSphere API 6.7. Onlyset
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
ofNotification
orNone
) – Info notification messages reported. This attribute was added in vSphere API 6.7. Onlyset
if an info was reported by the task.warnings (
list
ofNotification
orNone
) – Warning notification messages reported. This attribute was added in vSphere API 6.7. Onlyset
if an warning was reported by the task.errors (
list
ofNotification
orNone
) – Error notification messages reported. This attribute was added in vSphere API 6.7. Onlyset
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 theOperation
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
ofQuestion.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
ofstr
) – 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 theQuestionType
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
- 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
orNone
) – 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
orNone
) – 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 ifsslVerify
is None or has the value true.ssl_verify (
bool
orNone
) – SSL verification should be enabled or disabled. IfsslVerify
is true and andsslThumbprint
is None, the CA certificate will be used for verification. IfsslVerify
is true andsslThumbprint
is set then the thumbprint will be used for verification. No verification will be performed ifsslVerify
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
orNone
) – 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
orNone
) – 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
orNone
) – 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 ifsslVerify
is None or has the value true.ssl_verify (
bool
orNone
) – 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
orNone
) – 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
orNone
) – 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 ifsslVerify
is None or has the value true.ssl_verify (
bool
orNone
) – 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
ofstr
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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 ifsslVerify
is None or has the value true.ssl_verify (
bool
orNone
) – 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
orNone
) – 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
orNone
) – 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 ifsshVerify
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
orNone
) –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
orNone
) – 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
orNone
) – 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
orNone
) – 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
- 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
- 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 theVerificationMode
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
orNone
) – 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 theCustomizationSpec.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.
CloudConfiguration
(type=None, cloudinit=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
Guest customization settings to customize a guest operating system with cloud configuration.
The
CloudConfiguration
class contains the type of cloud configuration and the settings of that cloud configuration.. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
type (
CloudConfiguration.Type
) – The type of the cloud configuration. This attribute was added in vSphere API 7.0.3.0.cloudinit (
CloudinitConfiguration
) – cloud-init configuration. This attribute was added in vSphere API 7.0.3.0. This attribute is optional and it is only relevant when the value oftype
isCloudConfiguration.Type.CLOUDINIT
.
-
class
Type
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
CloudConfiguration.Type
class specifies different types of the cloud configuration. This enumeration was added in vSphere API 7.0.3.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 theType
instance.
-
CLOUDINIT
= Type(string='CLOUDINIT')¶ cloud-init configuration. This class attribute was added in vSphere API 7.0.3.0.
-
class
com.vmware.vcenter.guest_client.
CloudinitConfiguration
(metadata=None, userdata=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
Guest customization settings to customize a Linux guest operating system with raw cloud-init data.
The
CloudinitConfiguration
class contains settings that configure a Linux machine with raw cloud-init data. See https://cloudinit.readthedocs.io/en/latest about cloud-init.. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
metadata (
str
) – Metadata includes the network, instance id and hostname that cloud-init processes to configure the virtual machine. It is in json or yaml format. The max size of the metadata is 524288 bytes. See https://cloudinit.readthedocs.io/en/latest/topics/datasources/ovf.html about supported meta data formats. This attribute was added in vSphere API 7.0.3.0.userdata (
str
orNone
) – Userdata is the user customized content that cloud-init processes to configure the virtual machine. See https://cloudinit.readthedocs.io/en/latest/topics/format.html about user data formats. See https://cloudinit.readthedocs.io/en/latest/topics/modules.html# about user data modules. The max size of the userdata is 524288 bytes. This attribute was added in vSphere API 7.0.3.0. If None, no cloud-init user data will be used as part of the cloud-init configuration.
-
class
com.vmware.vcenter.guest_client.
ConfigurationSpec
(windows_config=None, linux_config=None, cloud_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
orNone
) – 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
orConfigurationSpec.cloud_config
must be set. Otherwise, an appropriate fault will be thrown.linux_config (
LinuxConfiguration
orNone
) – 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
orConfigurationSpec.cloud_config
must be set. Otherwise, an appropriate fault will be thrown.cloud_config (
CloudConfiguration
orNone
) – Guest customization specification with cloud configuration. This attribute was added in vSphere API 7.0.3.0. If None,ConfigurationSpec.windows_config
orConfigurationSpec.linux_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
ofAdapterMapping
) – IP settings that are specific to a particular virtual network adapter. TheAdapterMapping
class maps a network adapter’s MAC address to itsIPSettings
. 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 theCustomizationSpecs.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 (seeCustomizationSpecs.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
ofstr
orNone
) – Names that guest customization specifications must have to match the filter (seeCustomizationSpecs.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
orNone
) – Guest operating system type that guest customization specifications must have to match the filter (seeCustomizationSpecs.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 theFormat
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 theCustomizationSpecs.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 theOsType
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 theCustomizationSpecs.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.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
VirtualMachine.Provisioning.ModifyCustSpecs
.
-
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.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
VirtualMachine.Provisioning.ModifyCustSpecs
.
-
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 offormat
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.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
VirtualMachine.Provisioning.ReadCustSpecs
.
-
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
- 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.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
VirtualMachine.Provisioning.ReadCustSpecs
.
-
import_specification
(customization_spec)¶ Converts a well formatted string to a
CustomizationSpecs.CreateSpec
. The resulting object can be passed toCustomizationSpecs.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
- 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 validCustomizationSpecs.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.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
VirtualMachine.Provisioning.ModifyCustSpecs
.
-
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
orNone
) – Specification of matching guest customization specifications for which information should be returned. If None, the behavior is equivalent to aCustomizationSpecs.FilterSpec
with all attributes None which means all guest customization specifications match the filter.- Return type
- Returns
Commonly used information about the guest customization specifications matching the
CustomizationSpecs.FilterSpec
.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
if theCustomizationSpecs.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 theCustomizationSpecs.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.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
VirtualMachine.Provisioning.ReadCustSpecs
.
-
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 inspec
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.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
VirtualMachine.Provisioning.ModifyCustSpecs
.
-
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 oftype
isDomain.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 oftype
isDomain.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 oftype
isDomain.Type.DOMAIN
.domain_password (
str
) – The domain user password that has permission to join theDomain.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 oftype
isDomain.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 theType
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
ofstr
orNone
) – 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
ofstr
orNone
) – 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 theGuiUnattended.password
property. IfGuiUnattended.auto_logon
flag is set, thenGuiUnattended.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 theGuiUnattended.auto_logon
flag isset
, 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
orNone
) – 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 oftype
isHostnameGenerator.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 oftype
isHostnameGenerator.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 theType
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
orNone
) – 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
orNone
) – 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
orNone
) – 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 oftype
isIpv4.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 oftype
isIpv4.Type.STATIC
.gateways (
list
ofstr
orNone
) – 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 theType
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
ofIpv6Address
) – 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 oftype
isIpv6.Type.STATIC
.gateways (
list
ofstr
orNone
) – 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 theType
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 theWindowsConfiguration
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
orNone
) –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
orNone
) –The script to run before and after Linux guest customization. The max size of the script is 65536 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. CheckHostnameGenerator
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
orNone
) – A value specifying the action that should be taken after customization. This attribute was added in vSphere API 7.0.0.0. If None, theWindowsConfiguration.RebootOption.REBOOT
option will be chosen.sysprep (
WindowsSysprep
orNone
) – Customization settings like user details, administrator details, etc for the windows guest operating system. Exactly one ofsysprep
orsysprepXml
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
orNone
) – 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 ofsysprep
orsysprepXml
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 theRebootOption
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
ofstr
orNone
) –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
orNone
) – 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
ofstr
orNone
) – 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
orNone
) – 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 theNetBIOSMode
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
ofstr
orNone
) – 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 byGuiUnattended.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
orNone
) – 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.
-
class
com.vmware.vcenter.hvc_client.
Links
(config)¶ 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
orNone
) – 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
orNone
) – 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
ofstr
orNone
) – 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 thespec
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 inLinks.CreateSpec.ssl_thumbprint
or ifLinks.CreateSpec.ssl_thumbprint
is None. The value of the {\@link UnverifiedPeer#data) attribute will be a class that contains all the attributes defined inLinks.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 withlink
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
- 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
ofstr
) – 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
orNone
) – 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 theConfigType
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 ofconfigTag
isProviders.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 ofconfigTag
isProviders.ConfigType.Oidc
.org_ids (
set
ofstr
orNone
) – 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
orNone
) – Specifies whether the provider is the default provider. SettingisDefault
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
orNone
) – 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 stringdomain_names (
set
ofstr
orNone
) – 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
ofstr
andlist
ofstr
) orNone
) –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
orNone
) – 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
ofstr
) – 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 ofidmProtocol
is one ofProviders.IdmProtocol.REST
,Providers.IdmProtocol.SCIM
, orProviders.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 ofidmProtocol
isProviders.IdmProtocol.LDAP
.upn_claim (
str
orNone
) – 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
orNone
) – 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 theIdmProtocol
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
ofstr
) – 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 ofconfigTag
isProviders.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 ofconfigTag
isProviders.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
ofstr
) – 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
ofstr
andlist
ofstr
) –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
orNone
) – 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
ofstr
) – 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 ofidmProtocol
is one ofProviders.IdmProtocol.REST
,Providers.IdmProtocol.SCIM
, orProviders.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 ofidmProtocol
isProviders.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 theOauth2AuthenticationMethod
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
ofstr
and (dict
ofstr
andlist
ofstr
)) – 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
ofstr
andlist
ofstr
) orNone
) –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
ofstr
and (dict
ofstr
andlist
ofstr
)) – 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
ofstr
andlist
ofstr
) –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
ofstr
andlist
ofstr
) –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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
ofstr
and (dict
ofstr
andlist
ofstr
)) orNone
) – 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
orNone
) – 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
orNone
) – 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
ofstr
andlist
ofstr
) orNone
) – 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
ofstr
and (dict
ofstr
andlist
ofstr
)) – 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, soProviders.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
ofstr
and (dict
ofstr
andlist
ofstr
)) – 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
ofstr
andlist
ofstr
) –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, soProviders.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
ofstr
andlist
ofstr
) –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
orNone
) – 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
orNone
) – 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
orNone
) – 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
ofstr
and (dict
ofstr
andlist
ofstr
)) orNone
) – 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 ofconfigTag
isProviders.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 ofconfigTag
isProviders.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
ofstr
) – 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
ofstr
andlist
ofstr
) –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 ofconfigTag
isProviders.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 ofconfigTag
isProviders.ConfigType.Oidc
.org_ids (
set
ofstr
orNone
) – 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
orNone
) – Specifies whether to make this the default provider. IfmakeDefault
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. IfmakeDefault
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
orNone
) – 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
ofstr
orNone
) – 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
ofstr
andlist
ofstr
) orNone
) – 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
orNone
) – 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
ofstr
) – 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 ofidmProtocol
is one ofProviders.IdmProtocol.REST
,Providers.IdmProtocol.SCIM
, orProviders.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 ofidmProtocol
isProviders.IdmProtocol.LDAP
.upn_claim (
str
orNone
) – 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
orNone
) – Flag indicating whether the user principal name (UPN) claim should be set back to its default value. If this field is set totrue
, the user principal name (UPN) claim will be set to ‘acct’, which is used for backwards compatibility with CSP. If this field is set tofalse
, the existing user principal name (UPN) claim will be changed to the value specified inProviders.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 inProviders.UpdateSpec.upn_claim
, if any.groups_claim (
str
orNone
) – 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
orNone
) – Flag indicating whether any existing groups claim value should be removed. If this field is set totrue
, 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 tofalse
, the existing groups claim will be changed to the value specified inProviders.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 inProviders.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
andVcIdentityProviders.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
- 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
andVcIdentityProviders.Manage
.
-
list
()¶ Retrieve all identity providers. This method was added in vSphere API 7.0.0.0.
- Return type
- 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
andVcIdentityProviders.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 ofDatastore
orStoragePod
. When methods return a value of this class as a return value, the attribute will be one ofDatastore
orStoragePod
.
-
find
(datastores)¶ Returns datastore information for the specified datastores. The key in the return value
dict
is the datastore identifier and the value in thedict
is the datastore information.- Parameters
datastores (
list
ofstr
) – Identifiers of the datastores for which information will be returned. The parameter must contain identifiers for the resource type:Datastore
.- Return type
dict
ofstr
and (Datastore.Info
orNone
)- Returns
Datastore information for the specified datastores. The key in the return value
dict
is the datastore identifier and the value in thedict
is the datastore information. The key in the return valuedict
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 indatastores
- 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 parameterdatastores
requiresSystem.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 ofNetwork
,DistributedVirtualPortgroup
, orOpaqueNetwork
. When methods return a value of this class as a return value, the attribute will be one ofNetwork
,DistributedVirtualPortgroup
, orOpaqueNetwork
.
-
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 thedict
is the network information.- Parameters
networks (
list
ofstr
) – 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
ofstr
and (Network.Info
orNone
)- Returns
Network information for the specified vCenter Server networks. The key in the return value
dict
is the network identifier and the value in thedict
is the network information. The key in the return valuedict
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 innetworks
- 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 parameternetworks
requiresSystem.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 eithervm
or thelibrary_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 parametervm
requiresVirtualMachine.Config.AddRemoveDevice
.The resource
com.vmware.content.library.Item
referenced by the parameterlibrary_item
requiresContentLibrary.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 byvm
is not found or thecdrom
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 parametervm
requiresVirtualMachine.Config.AddRemoveDevice
.The resource
com.vmware.vcenter.vm.hardware.Cdrom
referenced by the parametercdrom
requiresSystem.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. Copyright 2021 VMware, Inc. All rights reserved. –
VMware Confidential
-
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
id (
str
) – The notification id.time (
datetime.datetime
orNone
) – The time the notification was raised/found. Only if the time information is available.message (
com.vmware.vapi.std_client.LocalizableMessage
) – The notification message.resolution (
com.vmware.vapi.std_client.LocalizableMessage
orNone
) – The resolution message, if any. Onlyset
for warnings and errors.
-
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
ofNotification
orNone
) – Info notification messages reported. Onlyset
if an info was reported by the appliance task.warnings (
list
ofNotification
orNone
) – Warning notification messages reported. Onlyset
if an warning was reported by the appliance task.errors (
list
ofNotification
orNone
) – Error notification messages reported. Onlyset
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 theget
method. AReport.Location
class represents the location of the file which hasReport.Token
class which represents the token ID (\@name String) and the expiration time of the tokenReport.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
- 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 withreport
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.
CNSFileConfig
(vsan_clusters=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
CNSFileConfig
class contains the specification required to set the configuration for Cloud Native Storage file volume support on Supervisor.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
vsan_clusters (
list
ofstr
) –CNSFileConfig.vsan_clusters
is a list of clusters to be used for provisioning file volumes. As a prerequisite these clusters must have vSAN and vSAN file services enabled, and must be in the same vCenter as the Supervisor. Currently this list must have a single entry which is the cluster identifier of the current cluster. This cluster must be a vSAN cluster and must have vSAN File Service enabled. If a cluster in the list is not a vSAN cluster or does not have vSAN File Service enabled, an InvalidArgument error will be thrown fromClusters.enable()
,Clusters.update()
andClusters.set()
APIs. An empty list may be specified to disable file volume support on the Supervisor. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type:ClusterComputeResource
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:ClusterComputeResource
.
-
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
- 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, network_provider=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
ClusterCompatibility.FilterSpec
class contains attributes used to filter the results when listing clusters (seeClusterCompatibility.list()
) and their compatibility information.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
compatible (
bool
orNone
) – Set this flag to true to only list vSphere clusters that are currently compatible with the Namespaces feature. If set to false, both compatible and incompatible vSphere clusters will be listed. If None, both compatible and incompatible vSphere clusters will be listed.network_provider (
Clusters.NetworkProvider
orNone
) – The network provider whose networks will be considered. This attribute was added in vSphere API 7.0.1.0. If None, this will default toClusters.NetworkProvider.NSXT_CONTAINER_PLUGIN
.
-
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 vSphere cluster.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
cluster (
str
) – Identifier of the vSphere 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 vSphere cluster. If false, the list of incompatibility issues will be given in theincompatibilityReasons
field.incompatibility_reasons (
list
ofcom.vmware.vapi.std_client.LocalizableMessage
) – Reasons for incompatibility.
-
list
(filter=None)¶ Returns Namespaces compatibility information for all vSphere clusters in the vCenter Server matching the
ClusterCompatibility.FilterSpec
. The result contains only visible (subject to permission checks) clusters.- Parameters
filter (
ClusterCompatibility.FilterSpec
orNone
) – Specification of matching clusters for which information should be returned. If None, the behavior is equivalent to aClusterCompatibility.FilterSpec
with all attributes None which means all NSX-T clusters the user is authorized to view will be returned.- Return type
- 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.InvalidArgument
iffilter
contains any 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 on the vSphere clusters.
-
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 aSizingHint
.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
orNone
) – 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
ofSizingHint
andClusterSizeInfo.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 theConfigStatus
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, cns_file_config=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, cluster_proxy_config=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. 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 inClusters.NCPClusterNetworkEnableSpec.pod_cidrs
,Clusters.NCPClusterNetworkEnableSpec.ingress_cidrs
,Clusters.NCPClusterNetworkEnableSpec.egress_cidrs
, 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 ofnetworkProvider
isClusters.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 ofnetworkProvider
isClusters.NetworkProvider.VSPHERE_NETWORK
.workload_ntp_servers (
list
ofstr
orNone
) – 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
) – The load balancer configuration is derived from the 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 ofnetworkProvider
isClusters.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
ofstr
orNone
) – 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
ofstr
orNone
) – 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
ofstr
orNone
) – 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
ofstr
orNone
) – 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
.cns_file_config (
CNSFileConfig
orNone
) – Specification for configuring Cloud Native Storage file volume support on Supervisor. This feature provides support for provisioning ReadWriteMany persistent volumes on this cluster and/or external clusters. This attribute was added in vSphere API 7.0.3.0. If None, file volume support will not be enabled on this Supervisor.login_banner (
str
orNone
) – Disclaimer to be displayed prior to login via the Kubectl plugin. If None, just skip it.master_dns_names (
list
ofstr
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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 will be automatically generated and configured to the cluster.cluster_proxy_config (
ProxyConfiguration
orNone
) – Proxy configuration that will be applied to the Supervisor. The proxy should be reachable from the management network and will be used for image pulling and container traffic exiting out of the Supervisor. This attribute was added in vSphere API 7.0.3.00100. If None the settings will be inherited from the vCenter settings if available.
-
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
orNone
) – 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, cns_file_config=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, cluster_proxy_config=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 forSizingHint
. 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 forClusters.ConfigStatus
.messages (
list
ofClusters.Message
) – Current set of messages associated with the object.kubernetes_status (
Clusters.KubernetesStatus
) – Current setting forClusters.KubernetesStatus
.kubernetes_status_messages (
list
ofClusters.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
ofstr
) – 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
orNone
) – 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.set
only whenClusters.Info.api_server_management_endpoint
is used.tls_endpoint_certificate (
str
orNone
) – 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.set
only whenClusters.Info.api_server_management_endpoint
is used.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 ofnetworkProvider
isClusters.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 ofnetworkProvider
isClusters.NetworkProvider.VSPHERE_NETWORK
.workload_ntp_servers (
list
ofstr
orNone
) – 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. None when NTP server for Kubernetes API servers is used.load_balancers (
list
ofLoadBalancers.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 ofnetworkProvider
isClusters.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
ofstr
orNone
) – 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
ofstr
orNone
) – 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). If None, no default DNS servers are set.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.cns_file_config (
CNSFileConfig
orNone
) – Specification for configuring Cloud Native Storage file volume support on Supervisor. This feature provides support for provisioning ReadWriteMany persistent volumes on this cluster and/or external clusters. This attribute was added in vSphere API 7.0.3.0. If None, it means the file volume support is not enabled on this Supervisor.login_banner (
str
orNone
) – 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
ofstr
orNone
) – 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
orNone
) – 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
orNone
) – 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
ofstr
orNone
) – 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
ofstr
orNone
) – 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
orNone
) – 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, a default subscribed Content Library will be created. It will sync VMware-supplied images for Tanzu Kubernetes Grid over the internet.cluster_proxy_config (
ProxyConfiguration
) – Proxy configuration that is applied to the Supervisor. The proxy should be reachable from the management network and is used for image pulling and container traffic exiting out of the Supervisor. Note that the proxy password will be removed from the URLs as per Section 3.2.1 of RFC3986 security recommendation. This attribute was added in vSphere API 7.0.3.00100. This attribute is optional because it was added in a newer version than its parent node.
-
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 incrementingClusters.Ipv4Range.starting_address
.subnet_mask (
str
) – Subnet mask to be set.gateway (
str
) – The IPv4 address of the gateway associated with the range indicated byClusters.Ipv4Range.starting_address
andClusters.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 theKubernetesStatus
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
severity (
Clusters.Message.Severity
) – Type of the message.details (
com.vmware.vapi.std_client.LocalizableMessage
orNone
) – Details about the message. If None, message details are not required for taking actions.
-
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 theSeverity
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, nsx_tier0_gateway=None, namespace_subnet_prefix=None, routed_mode=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
ofIpv4Cidr
) – CIDR blocks from which Kubernetes allocates pod IP addresses. This range should not overlap with those inClusters.EnableSpec.service_cidr
,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
ofIpv4Cidr
) – CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer. These ranges should not overlap with those inClusters.NCPClusterNetworkEnableSpec.pod_cidrs
,Clusters.EnableSpec.service_cidr
,Clusters.NCPClusterNetworkEnableSpec.egress_cidrs
, or other services running in the datacenter.egress_cidrs (
list
ofIpv4Cidr
) – 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 inClusters.NCPClusterNetworkEnableSpec.pod_cidrs
,Clusters.EnableSpec.service_cidr
,Clusters.NCPClusterNetworkEnableSpec.ingress_cidrs
, or other services running in the datacenter.cluster_distributed_switch (
str
orNone
) – 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
orNone
) – 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.nsx_tier0_gateway (
str
orNone
) – NSX Tier0 Gateway used for this cluster. This attribute was added in vSphere API 7.0.2.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:NSXTier0Gateway
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:NSXTier0Gateway
. This field is required when configuring a cluster that uses NSX-T.namespace_subnet_prefix (
long
orNone
) – Size of the subnet reserved for namespaces segments. This attribute was added in vSphere API 7.0.2.0. If None, defaults to 28.routed_mode (
bool
orNone
) – Routed mode for this cluster. When set to True, the traffic in the cluster is not NATed. When this field is set to True,Clusters.NCPClusterNetworkEnableSpec.egress_cidrs
is not allowed. This attribute was added in vSphere API 7.0.2.0. If None, defaults to False.
-
class
NCPClusterNetworkInfo
(pod_cidrs=None, ingress_cidrs=None, egress_cidrs=None, cluster_distributed_switch=None, nsx_edge_cluster=None, default_ingress_tls_certificate=None, nsx_tier0_gateway=None, namespace_subnet_prefix=None, routed_mode=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
ofIpv4Cidr
) – CIDR blocks from which Kubernetes allocates pod IP addresses.ingress_cidrs (
list
ofIpv4Cidr
) – CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer.egress_cidrs (
list
ofIpv4Cidr
) – 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.nsx_tier0_gateway (
str
orNone
) – NSX Tier0 Gateway used for this cluster. This attribute was added in vSphere API 7.0.2.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:NSXTier0Gateway
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:NSXTier0Gateway
. This isset
when the cluster uses NSX-T.namespace_subnet_prefix (
long
orNone
) – Size of the subnet reserved for namespaces segments. This attribute was added in vSphere API 7.0.2.0. If None, defaults to 28.routed_mode (
bool
orNone
) – Routed mode for this cluster. This attribute was added in vSphere API 7.0.2.0. If None, defaults to False.
-
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
ofIpv4Cidr
) – CIDR blocks from which Kubernetes allocates pod IP addresses. This range should not overlap with those inClusters.EnableSpec.service_cidr
,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
ofIpv4Cidr
) – CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer. These ranges should not overlap with those inClusters.NCPClusterNetworkSetSpec.pod_cidrs
,Clusters.EnableSpec.service_cidr
,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
ofIpv4Cidr
) – 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 inClusters.NCPClusterNetworkSetSpec.pod_cidrs
,Clusters.EnableSpec.service_cidr
,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
ofIpv4Cidr
orNone
) – CIDR blocks from which Kubernetes allocates pod IP addresses. This range should not overlap with those inClusters.EnableSpec.service_cidr
,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
ofIpv4Cidr
orNone
) – CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer. These ranges should not overlap with those inClusters.NCPClusterNetworkUpdateSpec.pod_cidrs
,Clusters.EnableSpec.service_cidr
,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
ofIpv4Cidr
orNone
) – 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 inClusters.NCPClusterNetworkUpdateSpec.pod_cidrs
,Clusters.EnableSpec.service_cidr
,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
orNone
) – PEM-encoded x509 certificate used by NSX as a default fallback certificate for Kubernetes Ingress services. If None, the Kubernetes Ingress services certificate will not be modified.
-
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 theNetworkProvider
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
orNone
) – Optionally specify the Floating IP used by the cluster control plane in case of DHCP. If None, the existing effective management network floating IP will be used.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 ofmode
isClusters.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 theIpv4Mode
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, floating_ip=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, cns_file_config=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, cluster_proxy_config=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.floating_ip (
str
orNone
) – Optionally, you can edit the floating IP address that is assigned to the Supervisor in case the DHCP server fails during the Supervisor enablement process. The field is only relevant when the DHCP mode of the Supervisor management network is set withClusters.EnableSpec.master_management_network
. Set this floating IP parameter to remediate a supervisor enablement failure in the case where it was detected that the DHCP server does not support DHCP client identifiers. This attribute was added in vSphere API 7.0.3.0. If None, the existing effective management network floating IP will not be modified.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 ofnetworkProvider
isClusters.NetworkProvider.NSXT_CONTAINER_PLUGIN
.master_dns (
list
ofstr
orNone
) – 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
ofstr
orNone
) – 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
ofstr
orNone
) – 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
ofstr
orNone
) – 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
.cns_file_config (
CNSFileConfig
orNone
) – Specification for configuring Cloud Native Storage file volume support on Supervisor. This feature provides support for provisioning ReadWriteMany persistent volumes on this cluster and/or external clusters. This attribute was added in vSphere API 7.0.3.0. If None, file volume support will not be enabled on this Supervisor.login_banner (
str
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
ofstr
orNone
) – 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.cluster_proxy_config (
ProxyConfiguration
orNone
) – Proxy configuration that will be applied to the Supervisor. The proxy should be reachable from the management network and will be used for image pulling and container traffic exiting out of the Supervisor. Modifying these settings will result in a restart of the container runtime. Workloads might fail to pull their images for a short period of time. There will be no effect on the currently running containers. This attribute was added in vSphere API 7.0.3.00100. If None the settings will be inherited from the vCenter settings if available.
-
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 forClusters.ConfigStatus
.kubernetes_status (
Clusters.KubernetesStatus
) – Current setting forClusters.KubernetesStatus
.
-
class
UpdateSpec
(size_hint=None, floating_ip=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, cns_file_config=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, cluster_proxy_config=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
orNone
) – 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.floating_ip (
str
orNone
) – Optionally, you can edit the floating IP address that is assigned to the Supervisor in case the DHCP server fails during the Supervisor enablement process. The field is only relevant when the DHCP mode of the Supervisor management network is set withClusters.EnableSpec.master_management_network
. Set this floating IP parameter to remediate a supervisor enablement failure in the case where it was detected that the DHCP server does not support DHCP client identifiers. This attribute was added in vSphere API 7.0.3.0. If None, the existing effective management network floating IP will not be modified.network_provider (
Clusters.NetworkProvider
orNone
) – 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
orNone
) – Updated specification for the cluster network configuration. If None, the existing effective cluster network specification will not be modified.master_dns (
list
ofstr
orNone
) – List of DNS server IP addresses to use on Kubernetes API server, specified in order of preference. Ifset
, DNS servers set on Kubernetes API server will be replaced. Otherwise, they will not be modified.worker_dns (
list
ofstr
orNone
) – List of DNS server IP addresses to use on the worker nodes, specified in order of preference. Ifset
, DNS servers set on worker nodes will be replaced. Otherwise, they will not be modified.master_dns_search_domains (
list
ofstr
orNone
) – 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. Ifset
, DNS search domains on Kubernetes API server will be replaced. Otherwise, they will not be modified.master_ntp_servers (
list
ofstr
orNone
) – List of NTP server DNS names or IP addresses to use on Kubernetes API server, specified in order of preference. Ifset
, NTP servers on Kubernetes API server will be replaced. Otherwise, they will not be modified.master_storage_policy (
str
orNone
) – 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
orNone
) – 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.cns_file_config (
CNSFileConfig
orNone
) – Specification for configuring Cloud Native Storage file volume support on Supervisor. This feature provides support for provisioning ReadWriteMany persistent volumes on this cluster and/or external clusters. This attribute was added in vSphere API 7.0.3.0. If None, configuration for file volumes will remain unchanged.login_banner (
str
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – Certificate issued for Kubernetes API Server. Certificate used must be created by signing the Certificate Signing Request obtained from the Namespace Certificate Management API. Because a Kubernetes CertificateSigningRequest is created on an existing Namespaces-enabled cluster, you must use theClusters.UpdateSpec
to specify thisClusters.UpdateSpec.tls_endpoint_certificate
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
orNone
) – 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 will will not be modified.workload_ntp_servers (
list
ofstr
orNone
) – 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.cluster_proxy_config (
ProxyConfiguration
orNone
) – Proxy configuration that will be applied to the Supervisor. The proxy should be reachable from the management network and will be used for image pulling and container traffic exiting out of the Supervisor. Modifying these settings will result in a restart of the container runtime. Workloads might fail to pull their images for a short period of time. There will be no effect on the currently running containers. This attribute was added in vSphere API 7.0.3.00100. If None no change will be made to the cluster.
-
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 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
ofNetworks.CreateSpec
orNone
) – 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. If None no additional networks will be associated with the cluster.
-
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
ofNetworks.Info
orNone
) – List of vSphere Namespaces networks associated with this cluster. This attribute was added in vSphere API 7.0.1.0. If None no additional networks are associated with the cluster.
-
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
ifspec
contain any errors.- Raise
com.vmware.vapi.std.errors_client.UnableToAllocateResource
if the specified cluster is not licensed or resource pool reservation for control plane VMs fails.- 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
- 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
- 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
ifspec
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.- Raise
com.vmware.vapi.std.errors_client.Unsupported
if the cluster’s hosts are not configured with sufficient resources for the new Kubernetes API Server size.
-
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
ifspec
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.- Raise
com.vmware.vapi.std.errors_client.Unsupported
if the cluster’s hosts are not configured with sufficient resources for the new Kubernetes API Server size.
-
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, network_provider=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
DistributedSwitchCompatibility.FilterSpec
class contains attributes used to filter the results when listing Distributed Switches (seeDistributedSwitchCompatibility.list()
) and their compatibility information.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
compatible (
bool
orNone
) – 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.network_provider (
Clusters.NetworkProvider
orNone
) – The network provider whose networks will be considered. If unset, this will default to NSXT_CONTAINER_PLUGIN. 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.
-
class
Summary
(distributed_switch=None, compatible=None, incompatibility_reasons=None, network_provider=None, compatible_networks=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. IfDistributedSwitchCompatibility.Summary.network_provider
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
ofcom.vmware.vapi.std_client.LocalizableMessage
orNone
) – List of reasons for incompatibility. If None, this Distributed Switch is compatible.network_provider (
Clusters.NetworkProvider
orNone
) – The network provider whose networks were considered. This attribute was added in vSphere API 7.0.1.0. If None, clients clients should assume the value to be NSXT_CONTAINER_PLUGIN.compatible_networks (
list
ofstr
orNone
) – List of compatible (PortGroup) Networks under the distributed switch. 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:Network
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:Network
. This attribute is optional because it was added in a newer version than its parent node.
-
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
orNone
) – Specification of matching Distributed Switches for which information should be returned. If None, the behavior is equivalent to aDistributedSwitchCompatibility.FilterSpec
with all attributes None which means all Distributed Switches match the filter.
- Return type
- Returns
Namespaces compatibility information for Distributed Switches matching the the
DistributedSwitchCompatibility.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.NotFound
if no cluster with the givencluster
ID can be found- 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.
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 (seeEdgeClusterCompatibility.list()
) and their compatibility information.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
compatible (
bool
orNone
) – 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
ofcom.vmware.vapi.std_client.LocalizableMessage
orNone
) – 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
orNone
) – Specification of matching Edge Clusters for which information should be returned. If None, the behavior is equivalent to aEdgeClusterCompatibility.FilterSpec
with all attributes None which means all Edge Clusters match the filter.
- Return type
- Returns
List of summaries of Edge Clusters associated with the given vCenter Cluster and Distributed Switch matching the
EdgeClusterCompatibility.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.NotFound
if no cluster with the givencluster
ID can be found- 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.
HostsConfig
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
HostsConfig
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
HostsConfig.Info
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
- Returns
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
AviConfigCreateSpec
(server=None, username=None, password=None, certificate_authority_chain=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
LoadBalancers.AviConfigCreateSpec
captures the configuration data required for integration with the Avi Software Load Balancer. This class was added in vSphere API 7.0.2.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
server (
LoadBalancers.Server
) – Server is the address for the Avi Controller, used to configure Virtual Servers. This attribute was added in vSphere API 7.0.2.0.username (
str
) – An administrator user name for accessing the Avi Controller. This attribute was added in vSphere API 7.0.2.0.password (
str
) – The password for the administrator user. This attribute was added in vSphere API 7.0.2.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.2.0.
-
class
AviConfigSetSpec
(server=None, username=None, password=None, certificate_authority_chain=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
LoadBalancers.AviConfigSetSpec
captures the configuration data required for integration with the Avi Software Load Balancer. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
server (
LoadBalancers.Server
) – Server is the address for the Avi Controller, used to configure Virtual Servers. Note: This field cannot be updated and should match existing value. This attribute was added in vSphere API 7.0.3.0.username (
str
) – An administrator user name for accessing the Avi Controller. This attribute was added in vSphere API 7.0.3.0.password (
str
) – The password for the administrator user. This attribute was added in vSphere API 7.0.3.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.3.0.
-
class
AviConfigUpdateSpec
(username=None, password=None, certificate_authority_chain=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
LoadBalancers.AviConfigUpdateSpec
captures the configuration data required for integration with the Avi Software Load Balancer. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
username (
str
orNone
) – An administrator user name for accessing the Avi Controller. This attribute was added in vSphere API 7.0.3.0. If None, the existing username will not be modified.password (
str
orNone
) – The password for the administrator user. This attribute was added in vSphere API 7.0.3.0. If None, the existing password will not be modified.certificate_authority_chain (
str
orNone
) – 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.3.0. If None, the existing PEM-encoded CA chain will not be modified.
-
class
AviInfo
(server=None, username=None, certificate_authority_chain=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LoadBalancers.AviInfo
contains information related to the Avi software load balancer in the namespace. This class was added in vSphere API 7.0.2.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
server (
LoadBalancers.Server
) – Server is the address for the Avi Controller, used to configure Virtual Servers. This attribute was added in vSphere API 7.0.2.0.username (
str
) – An administrator user name for accessing the Avi Controller. This attribute was added in vSphere API 7.0.2.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.2.0.
-
class
ConfigSpec
(id=None, address_ranges=None, provider=None, ha_proxy_config_create_spec=None, avi_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
ofIPRange
) – 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
) – TheLoadBalancers.ConfigSpec.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
) – TheLoadBalancers.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 ofprovider
isLoadBalancers.Provider.HA_PROXY
.avi_config_create_spec (
LoadBalancers.AviConfigCreateSpec
) – TheLoadBalancers.AviConfigCreateSpec
is a conditional configuration made available upon selecting the AVI load balancer provider. It is used to configure the load balancer at run time. This attribute was added in vSphere API 7.0.2.0. This attribute is optional and it is only relevant when the value ofprovider
isLoadBalancers.Provider.AVI
.
-
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
ofLoadBalancers.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
HAProxyConfigSetSpec
(servers=None, username=None, password=None, certificate_authority_chain=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
LoadBalancers.HAProxyConfigSetSpec
captures the configuration data required for Supervisor Service Type:LoadBalancer to have an external load balancer be created via HA Proxy. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
servers (
list
ofLoadBalancers.Server
) – Servers is a list of the addresses for the data plane API servers used to configure HAProxy. Note: This field cannot be updated and should match existing list of servers. This attribute was added in vSphere API 7.0.3.0.username (
str
) – An administrator user name for accessing the HAProxy Data Plane API server. This attribute was added in vSphere API 7.0.3.0.password (
str
) – The password for the administrator user. This attribute was added in vSphere API 7.0.3.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.3.0.
-
class
HAProxyConfigUpdateSpec
(username=None, password=None, certificate_authority_chain=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
LoadBalancers.HAProxyConfigUpdateSpec
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.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
username (
str
orNone
) – An administrator user name for accessing the HAProxy Data Plane API server. This attribute was added in vSphere API 7.0.3.0. If None, the existing username will not be modified.password (
str
orNone
) – The password for the administrator user. This attribute was added in vSphere API 7.0.3.0. If None, the existing password will not be modified.certificate_authority_chain (
str
orNone
) – 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.3.0. If None, the existing PEM-encoded CA chain will not be modified.
-
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
ofLoadBalancers.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, avi_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
ofIPRange
) – 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
) – TheLoadBalancers.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 ofprovider
isLoadBalancers.Provider.HA_PROXY
.avi_info (
LoadBalancers.AviInfo
) – TheLoadBalancers.AviInfo
is a conditional configuration made available upon selecting the AVI load balancer provider. It is used to configure the load balancer at run time. This attribute was added in vSphere API 7.0.2.0. This attribute is optional and it is only relevant when the value ofprovider
isLoadBalancers.Provider.AVI
.
-
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 theProvider
instance.
-
AVI
= Provider(string='AVI')¶ NSX Advanced Load Balancer. This class attribute was added in vSphere API 7.0.2.0.
-
HA_PROXY
= Provider(string='HA_PROXY')¶ HAProxy load balancer. This class attribute was added in vSphere API 7.0.1.0.
-
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
SetSpec
(address_ranges=None, provider=None, ha_proxy_config_set_spec=None, avi_config_set_spec=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LoadBalancers.SetSpec
encapsulates configuration allowed for setting a new configuration for a load balancer. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
address_ranges (
list
ofIPRange
) – List of address ranges that will be used to derive frontend IP addresses for L4 virtual servers. At least one range must be provided. A set operation only allows for addition of new IP ranges to the existing list of IP ranges. This attribute was added in vSphere API 7.0.3.0.provider (
LoadBalancers.Provider
) – TheLoadBalancers.SetSpec.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.3.0.ha_proxy_config_set_spec (
LoadBalancers.HAProxyConfigSetSpec
) – TheLoadBalancers.HAProxyConfigSetSpec
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.3.0. This attribute is optional and it is only relevant when the value ofprovider
isLoadBalancers.Provider.HA_PROXY
.avi_config_set_spec (
LoadBalancers.AviConfigSetSpec
) – TheLoadBalancers.AviConfigSetSpec
is a conditional configuration made available upon selecting the AVI load balancer provider. It is used to configure the load balancer at run time. This attribute was added in vSphere API 7.0.3.0. This attribute is optional and it is only relevant when the value ofprovider
isLoadBalancers.Provider.AVI
.
-
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.
-
class
UpdateSpec
(address_ranges=None, provider=None, ha_proxy_config_update_spec=None, avi_config_update_spec=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LoadBalancers.UpdateSpec
encapsulates configuration allowed for when updating configuration for load balancers. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
address_ranges (
list
ofIPRange
orNone
) – List of address ranges that will be used to derive frontend IP addresses for L4 virtual servers. At least one range must be provided. An update operation only allows for addition of new IP ranges to the existing list of IP ranges. This attribute was added in vSphere API 7.0.3.0. If None, the existing list of address ranges will not be modified.provider (
LoadBalancers.Provider
orNone
) – TheLoadBalancers.UpdateSpec.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.3.0. Ifset
, corresponding load balancer UpdateSpec will be used to update the configuration. Note: This field cannot be updated and can only be used a qualifer for the provider specific update spec.ha_proxy_config_update_spec (
LoadBalancers.HAProxyConfigUpdateSpec
orNone
) – TheLoadBalancers.HAProxyConfigUpdateSpec
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.3.0. If None, the HAProxy load balancer configuration will not be modified.avi_config_update_spec (
LoadBalancers.AviConfigUpdateSpec
orNone
) – TheLoadBalancers.AviConfigUpdateSpec
is a conditional configuration made available upon selecting the AVI load balancer provider. It is used to configure the load balancer at run time. This attribute was added in vSphere API 7.0.3.0. If None, the Avi load balancer configuration will not be modified.
-
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 balancerLoadBalancers.ConfigSpec.id
. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespace_management.LoadBalancerConfig
.
- Return type
- Returns
Information about load balancer associated with a 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.NotFound
ifcluster
orid
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
- Returns
List of summary of all load balancers associated with a clusters.
- 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
ifcluster
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.
-
set
(cluster, id, spec)¶ Applies the entire load balancer
spec
to an existing load balancer configuration. This method was added in vSphere API 7.0.3.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. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespace_management.LoadBalancerConfig
.spec (
LoadBalancers.SetSpec
) – Information about the load balancer object to be set.
- 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 ifspec
contain any errors.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the associated cluster is being disabled or if the load balancer config is already marked for delete.- Raise
com.vmware.vapi.std.errors_client.NotFound
ifcluster
orid
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 Namespaces.Manage privilege.- Raise
com.vmware.vapi.std.errors_client.Unsupported
if the specified cluster does not have vSphere Namespaces enabled.
-
update
(cluster, id, spec)¶ Updates the load balancer configuration. The specified configuration is applied partially and None fields in
spec
will leave those parts of configuration as-is. This method was added in vSphere API 7.0.3.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. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespace_management.LoadBalancerConfig
.spec (
LoadBalancers.UpdateSpec
) – Information about the load balancer object to be updated.
- 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
ifspec
contains any errors.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
if ifspec
contain any errors.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the associated cluster is being disabled or if the load balancer config is already marked for delete.- Raise
com.vmware.vapi.std.errors_client.NotFound
ifcluster
orid
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 Namespaces.Manage 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.
NSXTier0Gateway
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
NSXTier0Gateway
provides methods to get information of NSX Tier0 Gateways. This class was added in vSphere API 7.0.2.0.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
Summary
(tier0_gateway=None, display_name=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
NSXTier0Gateway.Summary
class contains information about an NSX-T Tier0 Gateway. This class was added in vSphere API 7.0.2.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
tier0_gateway (
str
) – Identifier of the Tier0 Gateway. This attribute was added in vSphere API 7.0.2.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:NSXTier0Gateway
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:NSXTier0Gateway
.display_name (
str
) – Display name of the Tier0 Gateway. This attribute was added in vSphere API 7.0.2.0.
-
list
(distributed_switch)¶ Returns information of NSX-T Tier0 Gateways associated with a Distributed Switch. This method was added in vSphere API 7.0.2.0.
- Parameters
distributed_switch (
str
) – Identifier of a Distributed Switch. Only CVDS type of distributed switches is supported. Only Tier0 Gateways that are associated with the particular Distributed Switch will be listed. The parameter must be an identifier for the resource type:vSphereDistributedSwitch
.- Return type
- Returns
List of summaries of Tier0 Gateways associated with the given Distributed Switch.
- 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.NotFound
if no existing Tier0 Gateways associated with the given Distributed Switch can be found.- 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.
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
- 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, nsx_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 byClusters.NetworkProvider.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 ofnetworkProvider
isClusters.NetworkProvider.VSPHERE_NETWORK
.nsx_network (
Networks.NsxNetworkCreateSpec
) – The create spec for a NSXT-backed Namespaces network configuration, supported byClusters.NetworkProvider.NSXT_CONTAINER_PLUGIN
network provider. This attribute was added in vSphere API 7.0.2.0. This attribute is optional and it is only relevant when the value ofnetworkProvider
isClusters.NetworkProvider.NSXT_CONTAINER_PLUGIN
.
-
class
IPAssignmentMode
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Networks.IPAssignmentMode
class defines various IP address assignment modes. This enumeration was added in vSphere API 7.0.3.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 theIPAssignmentMode
instance.
-
DHCP
= IPAssignmentMode(string='DHCP')¶ The address is automatically assigned by a DHCP server. This class attribute was added in vSphere API 7.0.3.0.
-
STATICRANGE
= IPAssignmentMode(string='STATICRANGE')¶ The address is assigned from a static range. This class attribute was added in vSphere API 7.0.3.0.
-
class
Info
(network=None, network_provider=None, vsphere_network=None, nsx_network=None, namespaces=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Networks.Info
class contains detailed information about a specific vSphere Namespaces network. 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 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 byClusters.NetworkProvider.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 ofnetworkProvider
isClusters.NetworkProvider.VSPHERE_NETWORK
.nsx_network (
Networks.NsxNetworkInfo
) – Configuration specification for a NSXT-backed Namespaces network configuration, supported byClusters.NetworkProvider.NSXT_CONTAINER_PLUGIN
network provider. This attribute was added in vSphere API 7.0.2.0. This attribute is optional and it is only relevant when the value ofnetworkProvider
isClusters.NetworkProvider.NSXT_CONTAINER_PLUGIN
.namespaces (
list
ofstr
orNone
) – A list of Supervisor Namespaces associated with this network. This attribute was added in vSphere API 7.0.2.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 attribute is optional because it was added in a newer version than its parent node.
-
class
LoadBalancerSize
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Networks.LoadBalancerSize
enumerates the kinds of load balancer sizes supported by NSX. Small load balancer can host 10 to 20 virtual servers depending on NSX-T version. Medium load balancer can host 100 virtual servers. Large load balancer can host 1000 virtual servers. This enumeration was added in vSphere API 7.0.2.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 theLoadBalancerSize
instance.
-
LARGE
= LoadBalancerSize(string='LARGE')¶ Load balancer size of ‘large’. This class attribute was added in vSphere API 7.0.2.0.
-
MEDIUM
= LoadBalancerSize(string='MEDIUM')¶ Load balancer size of ‘medium’. This class attribute was added in vSphere API 7.0.2.0.
-
SMALL
= LoadBalancerSize(string='SMALL')¶ Load balancer size of ‘small’. This class attribute was added in vSphere API 7.0.2.0.
-
class
NsxNetworkCreateSpec
(namespace_network_cidrs=None, ingress_cidrs=None, egress_cidrs=None, nsx_tier0_gateway=None, subnet_prefix_length=None, routed_mode=None, load_balancer_size=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Networks.NsxNetworkCreateSpec
class describes the configuration specification of a NSXT-backed Namespaces Network configuration. This class was added in vSphere API 7.0.2.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
namespace_network_cidrs (
list
ofIpv4Cidr
orNone
) – CIDR blocks from which Kubernetes allocates IP addresss for all workloads that attach to the namespace, including PodVMs, TKGS and VM Service VMs. This range should not overlap with those inNetworks.NsxNetworkCreateSpec.ingress_cidrs
,Networks.NsxNetworkCreateSpec.egress_cidrs
, or other services running in the datacenter. This attribute was added in vSphere API 7.0.2.0. This field is required whenNetworks.NsxNetworkCreateSpec.nsx_tier0_gateway
or any ofNetworks.NsxNetworkCreateSpec.ingress_cidrs
,Networks.NsxNetworkCreateSpec.egress_cidrs
are specified. An update operation only allows for addition of new CIDR blocks to the existing list.ingress_cidrs (
list
ofIpv4Cidr
orNone
) – CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer. These ranges should not overlap with those inNetworks.NsxNetworkCreateSpec.namespace_network_cidrs
,Networks.NsxNetworkCreateSpec.egress_cidrs
, or other services running in the datacenter. This attribute was added in vSphere API 7.0.2.0. This field is required whenNetworks.NsxNetworkCreateSpec.nsx_tier0_gateway
or any ofNetworks.NsxNetworkCreateSpec.namespace_network_cidrs
,Networks.NsxNetworkCreateSpec.egress_cidrs
is specified. An update operation only allows for addition of new CIDR blocks to the existing list.egress_cidrs (
list
ofIpv4Cidr
orNone
) – 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 inNetworks.NsxNetworkCreateSpec.namespace_network_cidrs
,Networks.NsxNetworkCreateSpec.ingress_cidrs
, or other services running in the datacenter. This attribute was added in vSphere API 7.0.2.0. This field is required whenNetworks.NsxNetworkCreateSpec.routed_mode
is set to False andNetworks.NsxNetworkCreateSpec.nsx_tier0_gateway
or any ofNetworks.NsxNetworkCreateSpec.namespace_network_cidrs
,Networks.NsxNetworkCreateSpec.ingress_cidrs
is specified. WhenNetworks.NsxNetworkCreateSpec.routed_mode
is set to True, this field is not allowed. An update operation only allows for addition of new CIDR blocks to the existing list.nsx_tier0_gateway (
str
orNone
) – NSX Tier0 Gateway used for the namespace. This field does not allow update once applied. This attribute was added in vSphere API 7.0.2.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:NSXTier0Gateway
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:NSXTier0Gateway
. This field is required when configuring a cluster that uses NSX-T.subnet_prefix_length (
long
orNone
) – Size of the subnet reserved for namespace segments. This attribute was added in vSphere API 7.0.2.0. If None, defaults to 28. This field does not allow update once applied.routed_mode (
bool
orNone
) – Routed mode for thw namespace. When set to True, the traffic in the namespace is not NATed. This attribute was added in vSphere API 7.0.2.0. If None, defaults to False. When this field is set to True,Networks.NsxNetworkCreateSpec.egress_cidrs
is not allowed. This field does not allow update once applied.load_balancer_size (
Networks.LoadBalancerSize
orNone
) – The size of the NSX Load Balancer used by the namespace. This field does not allow update once applied. This attribute was added in vSphere API 7.0.2.0. If None, defaults toNetworks.LoadBalancerSize.SMALL
.
-
class
NsxNetworkInfo
(namespace_network_cidrs=None, ingress_cidrs=None, egress_cidrs=None, nsx_tier0_gateway=None, subnet_prefix_length=None, routed_mode=None, load_balancer_size=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Networks.NsxNetworkInfo
class describes the configuration specification of a NSXT-backed Namespaces Network configuration. This class was added in vSphere API 7.0.2.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
namespace_network_cidrs (
list
ofIpv4Cidr
orNone
) – CIDR blocks from which Kubernetes allocates IP addresses for all workloads that attach to the namespace, including PodVMs, TKGS and VM Service VMs. This attribute was added in vSphere API 7.0.2.0. If None, cluster level settings specified inClusters.NCPClusterNetworkInfo.pod_cidrs
will be applied.ingress_cidrs (
list
ofIpv4Cidr
orNone
) – CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer. This attribute was added in vSphere API 7.0.2.0. If None, cluster level settings specified inClusters.NCPClusterNetworkInfo.ingress_cidrs
will be applied.egress_cidrs (
list
ofIpv4Cidr
orNone
) – CIDR blocks from which NSX assigns IP addresses used for performing SNAT from container IPs to external IPs. This attribute was added in vSphere API 7.0.2.0. If None, cluster level settings specified inClusters.NCPClusterNetworkInfo.egress_cidrs
will be applied.nsx_tier0_gateway (
str
orNone
) – NSX Tier0 Gateway used for this namespace. This attribute was added in vSphere API 7.0.2.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:NSXTier0Gateway
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:NSXTier0Gateway
. If None, cluster level settings specified inClusters.NCPClusterNetworkInfo.nsx_tier0_gateway
will be applied.subnet_prefix_length (
long
orNone
) – Size of the subnet reserved for namespace segments. This attribute was added in vSphere API 7.0.2.0. If None, cluster level settings specified inClusters.NCPClusterNetworkInfo.namespace_subnet_prefix
will be applied.routed_mode (
bool
orNone
) – Routed mode for this namespace. When set to True, the traffic in the namespace is not NATed. This attribute was added in vSphere API 7.0.2.0. If None, cluster level settings specified inClusters.NCPClusterNetworkInfo.routed_mode
will be applied.load_balancer_size (
Networks.LoadBalancerSize
orNone
) – The size of the NSX Load Balancer used by the namespace. This attribute was added in vSphere API 7.0.2.0. If None, thenNetworks.LoadBalancerSize.SMALL
is used.
-
class
NsxNetworkSetSpec
(namespace_network_cidrs=None, ingress_cidrs=None, egress_cidrs=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Networks.NsxNetworkSetSpec
class contains new configuration to set on an existing NSXT-backed Namespaces Network configuration. This class was added in vSphere API 7.0.2.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
namespace_network_cidrs (
list
ofIpv4Cidr
orNone
) – CIDR blocks from which Kubernetes allocates IP addresses for all workloads that attach to the namespace, including PodVMs, TKGS and VM Service VMs. Only appending additional Cidr is allowed. Modification to existing Cidr ranges will result in the operation failing with acom.vmware.vapi.std.errors_client.ResourceInUse
exception. Appending invalid Cidr e.g. overlapping or broadcast or reserved Cidr will result in the operation failing with acom.vmware.vapi.std.errors_client.InvalidArgument
exception. This attribute was added in vSphere API 7.0.2.0. If None, the current value will be retained.ingress_cidrs (
list
ofIpv4Cidr
orNone
) – CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer. Only appending additional Cidr is allowed. Modification to existing Cidr ranges will result in the operation failing with acom.vmware.vapi.std.errors_client.ResourceInUse
exception. Appending invalid Cidr e.g. overlapping or broadcast or reserved Cidr will result in the operation failing with acom.vmware.vapi.std.errors_client.InvalidArgument
exception. This attribute was added in vSphere API 7.0.2.0. If None, the current value will be retained.egress_cidrs (
list
ofIpv4Cidr
orNone
) – CIDR blocks from which NSX assigns IP addresses used for performing SNAT from container IPs to external IPs. Only appending additional Cidr is allowed. Modification to existing Cidr ranges will result in the operation failing with acom.vmware.vapi.std.errors_client.ResourceInUse
exception. Appending invalid Cidr e.g. overlapping or broadcast or reserved Cidr will result in the operation failing with acom.vmware.vapi.std.errors_client.InvalidArgument
exception. This attribute was added in vSphere API 7.0.2.0. If None, the current value will be retained.
-
class
NsxNetworkUpdateSpec
(namespace_network_cidrs=None, ingress_cidrs=None, egress_cidrs=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Networks.NsxNetworkUpdateSpec
class contains new configuration to update on an existing a NSXT-backed Namespaces Network configuration. This class was added in vSphere API 7.0.2.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
namespace_network_cidrs (
list
ofIpv4Cidr
orNone
) – CIDR blocks from which Kubernetes allocates IP addresses for all workloads that attach to the namespace, including PodVMs, TKGS and VM Service VMs. Only appending additional Cidr is allowed. Modification to existing Cidr ranges will result in the operation failing with acom.vmware.vapi.std.errors_client.ResourceInUse
exception. Appending invalid Cidr e.g. overlapping or broadcast or reserved Cidr will result in the operation failing with acom.vmware.vapi.std.errors_client.InvalidArgument
exception. This attribute was added in vSphere API 7.0.2.0. If None, the current value will be retained.ingress_cidrs (
list
ofIpv4Cidr
orNone
) – CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer. Only appending additional Cidr is allowed. Modification to existing Cidr ranges will result in the operation failing with acom.vmware.vapi.std.errors_client.ResourceInUse
exception. Appending invalid Cidr e.g. overlapping or broadcast or reserved Cidr will result in the operation failing with acom.vmware.vapi.std.errors_client.InvalidArgument
exception. This attribute was added in vSphere API 7.0.2.0. If None, the current value will be retained.egress_cidrs (
list
ofIpv4Cidr
orNone
) – CIDR blocks from which NSX assigns IP addresses used for performing SNAT from container IPs to external IPs. Only appending additional Cidr is allowed. Modification to existing Cidr ranges will result in the operation failing with acom.vmware.vapi.std.errors_client.ResourceInUse
exception. Appending invalid Cidr e.g. overlapping or broadcast or reserved Cidr will result in the operation failing with acom.vmware.vapi.std.errors_client.InvalidArgument
exception. This attribute was added in vSphere API 7.0.2.0. If None, the current value will be retained.
-
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
SetSpec
(network_provider=None, vsphere_network=None, nsx_network=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Networks.SetSpec
class contains the specification required to set a new configuration of a vSphere Namespaces network object. This class is applied in entirety, replacing the current specification fully. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
network_provider (
Clusters.NetworkProvider
) – The network provider that will manage the vSphere Namespaces network object. This attribute was added in vSphere API 7.0.3.0.vsphere_network (
Networks.VsphereDVPGNetworkSetSpec
) – Modified configuration specification for a DVPG-backed Namespaces network object, supported byClusters.NetworkProvider.VSPHERE_NETWORK
network provider. This attribute was added in vSphere API 7.0.3.0. This attribute is optional and it is only relevant when the value ofnetworkProvider
isClusters.NetworkProvider.VSPHERE_NETWORK
.nsx_network (
Networks.NsxNetworkSetSpec
) – Modified configuration specification for a NSXT-backed Namespaces network configuration, supported byClusters.NetworkProvider.NSXT_CONTAINER_PLUGIN
network provider. This attribute was added in vSphere API 7.0.2.0. This attribute is optional and it is only relevant when the value ofnetworkProvider
isClusters.NetworkProvider.NSXT_CONTAINER_PLUGIN
.
-
class
UpdateSpec
(network_provider=None, vsphere_network=None, nsx_network=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Networks.UpdateSpec
class contains the specification required to update the configuration of a vSphere Namespaces network object. This class is applied partially, and only the specified fields will replace or modify their existing counterparts. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
network_provider (
Clusters.NetworkProvider
) – The network provider that will manage the vSphere Namespaces network object. This attribute was added in vSphere API 7.0.3.0.vsphere_network (
Networks.VsphereDVPGNetworkUpdateSpec
) – Updated configuration specification for a DVPG-backed Namespaces network object, supported byClusters.NetworkProvider.VSPHERE_NETWORK
network provider. This attribute was added in vSphere API 7.0.3.0. This attribute is optional and it is only relevant when the value ofnetworkProvider
isClusters.NetworkProvider.VSPHERE_NETWORK
.nsx_network (
Networks.NsxNetworkUpdateSpec
) – Updated configuration specification for a NSXT-backed Namespaces network configuration, supported byClusters.NetworkProvider.NSXT_CONTAINER_PLUGIN
network provider. This attribute was added in vSphere API 7.0.2.0. This attribute is optional and it is only relevant when the value ofnetworkProvider
isClusters.NetworkProvider.NSXT_CONTAINER_PLUGIN
.
-
class
VsphereDVPGNetworkCreateSpec
(portgroup=None, ip_assignment_mode=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
.ip_assignment_mode (
Networks.IPAssignmentMode
orNone
) – IP address assignment mode. If set to DHCP, then fieldNetworks.VsphereDVPGNetworkCreateSpec.address_ranges
must be set to an empty list and fieldsNetworks.VsphereDVPGNetworkCreateSpec.gateway
andNetworks.VsphereDVPGNetworkCreateSpec.subnet_mask
must be set to empty strings. This attribute was added in vSphere API 7.0.3.0. If None, defaults to STATICRANGE.address_ranges (
list
ofIPRange
) – 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, ip_assignment_mode=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
.ip_assignment_mode (
Networks.IPAssignmentMode
orNone
) – IP address assignment mode. This attribute was added in vSphere API 7.0.3.0. This attribute is optional because it was added in a newer version than its parent node.address_ranges (
list
ofIPRange
) – 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
VsphereDVPGNetworkSetSpec
(portgroup=None, address_ranges=None, gateway=None, subnet_mask=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Networks.VsphereDVPGNetworkSetSpec
class contains new configuration to set on an existing a vSphere DVPG-backed Namespaces Network object. This class was added in vSphere API 7.0.3.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. If the network object is associated with a Namespace or isClusters.WorkloadNetworksEnableSpec.supervisor_primary_workload_network
, modification to existing portgroup will result in the operation failing with acom.vmware.vapi.std.errors_client.ResourceInUse
exception. This attribute was added in vSphere API 7.0.3.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
ofIPRange
) – Usable IP pools on this network. If the network object is associated with a Namespace or isClusters.WorkloadNetworksEnableSpec.supervisor_primary_workload_network
, then replacement of or modification to any existing range in this list will result in operation failing with acom.vmware.vapi.std.errors_client.ResourceInUse
exception. To add new address ranges to the list, existing address ranges have to be passed in without modifications. This attribute was added in vSphere API 7.0.3.0.gateway (
str
) – Gateway for the network. If the network object is associated with a Namespace or isClusters.WorkloadNetworksEnableSpec.supervisor_primary_workload_network
, then modification to existing gateway will result in the operation failing with acom.vmware.vapi.std.errors_client.ResourceInUse
exception. This attribute was added in vSphere API 7.0.3.0.subnet_mask (
str
) – Subnet mask of the network. If the network object is associated with a Namespace or isClusters.WorkloadNetworksEnableSpec.supervisor_primary_workload_network
, then modification to existing subnet mask will result in the operation failing with acom.vmware.vapi.std.errors_client.ResourceInUse
exception. This attribute was added in vSphere API 7.0.3.0.
-
class
VsphereDVPGNetworkUpdateSpec
(portgroup=None, address_ranges=None, gateway=None, subnet_mask=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Networks.VsphereDVPGNetworkUpdateSpec
class contains new configuration to update on an existing a vSphere DVPG-backed Namespaces Network object. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
portgroup (
str
orNone
) – Identifier of the vSphere Distributed Portgroup backing the vSphere network object. If the network object is associated with a Namespace or isClusters.WorkloadNetworksEnableSpec.supervisor_primary_workload_network
, then modification to existing portgroup will result in the operation failing with acom.vmware.vapi.std.errors_client.ResourceInUse
exception. This attribute was added in vSphere API 7.0.3.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
. If None, the current value will be retained.address_ranges (
list
ofIPRange
orNone
) – Usable IP pools on this network. If the network object is associated with a Namespace or isClusters.WorkloadNetworksEnableSpec.supervisor_primary_workload_network
, then replacement of or modification to any existing range in this list will result in operation failing with acom.vmware.vapi.std.errors_client.ResourceInUse
exception. To add new address ranges to the list, existing address ranges have to be passed in without modifications. This attribute was added in vSphere API 7.0.3.0. If None, the current value will be retained.gateway (
str
orNone
) – Gateway for the network. If the network object is associated with a Namespace or isClusters.WorkloadNetworksEnableSpec.supervisor_primary_workload_network
, then modification to existing gateway will result in the operation failing with acom.vmware.vapi.std.errors_client.ResourceInUse
exception. This attribute was added in vSphere API 7.0.3.0. If None, the current value will be retained.subnet_mask (
str
orNone
) – Subnet mask of the network. If the network object is associated with a Namespace or isClusters.WorkloadNetworksEnableSpec.supervisor_primary_workload_network
, then modification to existing subnet mask will result in the operation failing with acom.vmware.vapi.std.errors_client.ResourceInUse
exception. This attribute was added in vSphere API 7.0.3.0. If None, the current value will be retained.
-
create
(cluster, spec)¶ Create a vSphere Namespaces network object associated with the given cluster. This method was added in vSphere API 7.0.3.0.
- Parameters
cluster (
str
) – Identifier for the cluster. The parameter must be an identifier for the resource type:ClusterComputeResource
.spec (
Networks.CreateSpec
) – Information about the network object to be created.
- Raise
com.vmware.vapi.std.errors_client.AlreadyExists
if a network by the name as specified in theNetworks.CreateSpec
already exists.- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
ifspec
contains any errors.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the associated cluster is being disabled.- Raise
com.vmware.vapi.std.errors_client.NotFound
ifcluster
cannot be located.- Raise
com.vmware.vapi.std.errors_client.Unsupported
ifspec
contains NsxNetworkCreateSpec which is unsupported via create API.- 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.
-
delete
(cluster, network)¶ Delete the vSphere Namespaces object in the cluster. This method was added in vSphere API 7.0.3.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
.
- 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 network could not be located.- Raise
com.vmware.vapi.std.errors_client.ResourceInUse
if the network is associated with a 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.Manage privilege.
-
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
- 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
- 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.
-
set
(cluster, network, spec)¶ Set a new configuration for the vSphere Namespaces network object associated with the given cluster. This method was added in vSphere API 7.0.3.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
.spec (
Networks.SetSpec
) – Information about the network object to be set.
- 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
ifspec
contains any errors.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the associated cluster is being disabled.- Raise
com.vmware.vapi.std.errors_client.NotFound
ifcluster
or thenetwork
cannot be located.- Raise
com.vmware.vapi.std.errors_client.ResourceInUse
if the network is in use and thespec
contains field values that are un-settable in such a case.- 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, network, spec)¶ Update the configuration of the vSphere Namespaces network object associated with the given cluster. This method was added in vSphere API 7.0.3.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
.spec (
Networks.UpdateSpec
) – Information about the network object to be updated.
- 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
ifspec
contains any errors.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the associated cluster is being disabled.- Raise
com.vmware.vapi.std.errors_client.NotFound
ifcluster
or thenetwork
cannot be located.- Raise
com.vmware.vapi.std.errors_client.ResourceInUse
if the network is in use and thespec
contains field values that are un-updatable in such a case.- 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.
ProxyConfiguration
(proxy_settings_source=None, https_proxy_config=None, http_proxy_config=None, no_proxy_config=None, tls_root_ca_bundle=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
ProxyConfiguration
class defines proxy configuration to be used by the Supervisor. This class was added in vSphere API 7.0.3.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
proxy_settings_source (
ProxySettingsSource
) – The source of the proxy settings. IfProxySettingsSource.VC_INHERITED
orProxySettingsSource.NONE
is specified, then the other configuration inProxyConfiguration
will be ignored. This attribute was added in vSphere API 7.0.3.00100.https_proxy_config (
str
orNone
) –HTTPS proxy configuration. Examples:
http://username:password\@proxy.vmware.com:8080
This will be used if
ProxySettingsSource.CLUSTER_CONFIGURED
is used for the source, otherwise this will be ignored. This attribute was added in vSphere API 7.0.3.00100. If None no HTTPS proxy will be used.http_proxy_config (
str
orNone
) –HTTP proxy configuration. Examples:
http://username:password\@proxy.vmware.com:8080
This will be used if
ProxySettingsSource.CLUSTER_CONFIGURED
is used for the source, otherwise this will be ignored. This attribute was added in vSphere API 7.0.3.00100. If None no HTTP proxy will be used.no_proxy_config (
list
ofstr
orNone
) – List of addresses that should be accessed directly. This will be used ifProxySettingsSource.CLUSTER_CONFIGURED
is used for the source, otherwise this will be ignored. This attribute was added in vSphere API 7.0.3.00100. If None there won’t be any excluded addresses.tls_root_ca_bundle (
str
orNone
) – Proxy TLS root CA bundle which will be used to verify the proxies certificates. Every certificate in the bundle is expected to be in PEM format. This will be used ifProxySettingsSource.CLUSTER_CONFIGURED
is used for the source, otherwise this will be ignored. This attribute was added in vSphere API 7.0.3.00100. If None only the vCenter certificates applied in VECS (VMware Endpoint Certificate Store) will be used.
-
class
com.vmware.vcenter.namespace_management_client.
ProxySettingsSource
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The settings can be inherited from the vCenter settings, so the cluster settings will be synced. The settings can be applied directly on the cluster level, or the cluster can be configured not to use a proxy. This enumeration was added in vSphere API 7.0.3.00100.
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 theProxySettingsSource
instance.
-
CLUSTER_CONFIGURED
= ProxySettingsSource(string='CLUSTER_CONFIGURED')¶ Proxy settings will be configured at the cluster level. This class attribute was added in vSphere API 7.0.3.00100.
-
NONE
= ProxySettingsSource(string='NONE')¶ No proxy settings will be applied to the cluster. This class attribute was added in vSphere API 7.0.3.00100.
-
VC_INHERITED
= ProxySettingsSource(string='VC_INHERITED')¶ Proxy settings will be inherited from the vCenter settings. vCenter and cluster settings will be kept in sync. This class attribute was added in vSphere API 7.0.3.00100.
-
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. UseClusterSizeInfo.get()
to get information associated with aSizingHint
.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 theSizingHint
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.
SupervisorServices
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
SupervisorServices
class provides methods to manage a Supervisor Service object. Supervisor services can be extensions to the vSphere Supervisor and provide services to applications running in vSphere Supervisor. They are often provided by 3rd party vendors. This class was added in vSphere API 7.0.3.0.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
CheckResult
(status=None, content_type=None, vsphere_apps_check_result=None, warning_messages=None, error_messages=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
SupervisorServices.CheckResult
class defines the result of the validation checks on the content of a Supervisor Service version. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
status (
SupervisorServices.ValidationStatus
) – Indicates if the provided content is valid. This attribute was added in vSphere API 7.0.3.0.content_type (
com.vmware.vcenter.namespace_management.supervisor_services_client.Versions.ContentType
orNone
) – The type of the provided content. When thiscontentType
iscom.vmware.vcenter.namespace_management.supervisor_services_client.Versions.ContentType.CUSTOM_YAML
, thestatus
is alwaysVALID
because a custom format is not validated. This attribute was added in vSphere API 7.0.3.0. If None, the content type cannot be determined from the provided content.vsphere_apps_check_result (
SupervisorServices.VsphereAppsCheckResult
orNone
) – The information about the Supervisor Service version retrieved from the provided content as a result of validation checks if the content is in the vSphere application format. This attribute was added in vSphere API 7.0.3.0. If None, the content is not in the vSphere application service format, or thestatus
isINVALID
.warning_messages (
list
ofcom.vmware.vapi.std_client.LocalizableMessage
) – A list of messages indicating why the content was considered valid but contains information that should be reviewed closely. This attribute was added in vSphere API 7.0.3.0. This attribute is optional and it is only relevant when the value ofstatus
isSupervisorServices.ValidationStatus.VALID_WITH_WARNINGS
.error_messages (
list
ofcom.vmware.vapi.std_client.LocalizableMessage
) – A list of messages indicating why the content was considered invalid. This attribute was added in vSphere API 7.0.3.0. This attribute is optional and it is only relevant when the value ofstatus
isSupervisorServices.ValidationStatus.INVALID
.
-
class
ContentCheckSpec
(content=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
SupervisorServices.ContentCheckSpec
class provides a specification required for validation checks on the content of a Supervisor Service version. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
content (
str
orNone
) – The content of a Supervisor Service version, which shall be base64 encoded. This attribute was added in vSphere API 7.0.3.0. If None, the content shall be provided separately. In the current release, this field is required, otherwiseInvalidArgument
will be thrown.
-
class
CreateSpec
(custom_spec=None, vsphere_spec=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
SupervisorServices.CreateSpec
class provides a specification required to create a Supervisor Service. Exactly one ofSupervisorServices.CreateSpec.custom_spec
orSupervisorServices.CreateSpec.vsphere_spec
must beset
. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
custom_spec (
SupervisorServices.CustomCreateSpec
orNone
) –The specification required to create a Supervisor Service with a version from inline content that is based on a plain Kubernetes YAML format.
. This attribute was added in vSphere API 7.0.3.0. If
set
, the service will be created from a version based on a plain Kubernetes YAML format.vsphere_spec (
SupervisorServices.VsphereCreateSpec
orNone
) –The specification required to create a Supervisor Service with a version from inline content that is based on the vSphere application service format.
. This attribute was added in vSphere API 7.0.3.0. If
set
, the service will be created from a version based on the vSphere application service format.
-
class
CustomCreateSpec
(supervisor_service=None, display_name=None, description=None, version_spec=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
SupervisorServices.CustomCreateSpec
class provides a specification required to create a Supervisor Service with a version from a plain Kubernetes YAML format. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
supervisor_service (
str
) – The identifier of the Supervisor Service. 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 identifier must be unique across all Namespaces in this vCenter server. Additionally, the ID ‘namespaces’ is reserved and must not be used. This attribute was added in vSphere API 7.0.3.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.SupervisorService
. 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.SupervisorService
.display_name (
str
) – A human readable name of the Supervisor Service. This attribute was added in vSphere API 7.0.3.0.description (
str
orNone
) – A human readable description of the Supervisor Service. This attribute was added in vSphere API 7.0.3.0. If None, the Supervisor Service description will be empty.version_spec (
com.vmware.vcenter.namespace_management.supervisor_services_client.Versions.CustomCreateSpec
) – Supervisor service version specification that provides the service definition for one Supervisor Service version. This attribute was added in vSphere API 7.0.3.0.
-
class
Info
(display_name=None, state=None, description=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
SupervisorServices.Info
class contains detailed information about a Supervisor Service. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
display_name (
str
) – The human readable name of the Supervisor Service. This attribute was added in vSphere API 7.0.3.0.state (
SupervisorServices.State
) – The currentSupervisorServices.State
of the Supervisor Service. This attribute was added in vSphere API 7.0.3.0.description (
str
orNone
) – A human readable description of the Supervisor Service. This attribute was added in vSphere API 7.0.3.0. If None, no description is available for the Supervisor Service.
-
class
State
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
SupervisorServices.State
class defines the state of a Supervisor Service. This enumeration was added in vSphere API 7.0.3.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 theState
instance.
-
ACTIVATED
= State(string='ACTIVATED')¶ The is the default state of a Supervisor Service upon creation. In this state, at least one version of the Supervisor Service is activated. This class attribute was added in vSphere API 7.0.3.0.
-
DEACTIVATED
= State(string='DEACTIVATED')¶ The is the deactivated state of a Supervisor Service. In this state, all existing versions of the Supervisor Service will be deactivated, and cannot be activated. In addition to that, no new versions can be added to the Supervisor Service. This class attribute was added in vSphere API 7.0.3.0.
-
class
Summary
(supervisor_service=None, display_name=None, state=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
SupervisorServices.Summary
class contains the basic information about a Supervisor Service version. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
supervisor_service (
str
) – The identifier of the Supervisor Service. This attribute was added in vSphere API 7.0.3.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.SupervisorService
. 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.SupervisorService
.display_name (
str
) – The human readable name of the Supervisor Service. This attribute was added in vSphere API 7.0.3.0.state (
SupervisorServices.State
) – The currentSupervisorServices.State
of the Supervisor Service. This attribute was added in vSphere API 7.0.3.0.
-
class
UpdateSpec
(display_name=None, description=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
SupervisorServices.UpdateSpec
class provides a specification required to update a Supervisor Service. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
display_name (
str
orNone
) – A human readable name of the Supervisor Service. This attribute was added in vSphere API 7.0.3.0. If None, the display name of the service will not be modified.description (
str
orNone
) – A human readable description of the Supervisor Service. This attribute was added in vSphere API 7.0.3.0. If None, the description of the service will not be modified.
-
class
ValidationStatus
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
SupervisorServices.ValidationStatus
class defines the type of status for validating content of a Supervisor Service version. This enumeration was added in vSphere API 7.0.3.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 theValidationStatus
instance.
-
INVALID
= ValidationStatus(string='INVALID')¶ Indicates the content is invalid for a Supervisor Service version, in which case the reasons can be found in
errorMessages
. This class attribute was added in vSphere API 7.0.3.0.
-
VALID
= ValidationStatus(string='VALID')¶ Indicates the content is valid for a Supervisor Service version. This class attribute was added in vSphere API 7.0.3.0.
-
VALID_WITH_WARNINGS
= ValidationStatus(string='VALID_WITH_WARNINGS')¶ Indicates the content is valid for a Supervisor Service version, but the content may contain information that should be reviewed closely and could prevent the Supervisor Service version to be created successfully later, which is explained in
warningMessages
. For example, the content may specify a Supervisor Service version that already exists on this vCenter. This class attribute was added in vSphere API 7.0.3.0.
-
class
VsphereAppsCheckResult
(supervisor_service=None, version=None, display_name=None, description=None, eula=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
SupervisorServices.VsphereAppsCheckResult
class contains the information of a Supervisor Service version that is retrieved from the content in vSphere application service format as a result of theSupervisorServices.check_content()
method. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
supervisor_service (
str
) – The identifier of the Supervisor Service. This attribute was added in vSphere API 7.0.3.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.SupervisorService
. 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.SupervisorService
.version (
str
) – The identifier of the Supervisor Service version. This attribute was added in vSphere API 7.0.3.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.supervisor_services.Version
. 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.supervisor_services.Version
.display_name (
str
) – A human readable name of the Supervisor Service version. This attribute was added in vSphere API 7.0.3.0.description (
str
orNone
) – A human readable description of the Supervisor Service version. This attribute was added in vSphere API 7.0.3.0. If None, no description is available for the Supervisor Service version.eula (
str
orNone
) – The End User License Agreement (EULA) of the Supervisor Service version. This attribute was added in vSphere API 7.0.3.0. If None, no EULA is available for the Supervisor Service version.
-
class
VsphereCreateSpec
(version_spec=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
SupervisorServices.VsphereCreateSpec
class provides a specification required to create a Supervisor Service with a version from vSphere application service format, which shall contain the service identifier, display name and description information. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
version_spec (
com.vmware.vcenter.namespace_management.supervisor_services_client.Versions.VsphereCreateSpec
) – Supervisor service version specification that provides the service definitions for one Supervisor Service version. This attribute was added in vSphere API 7.0.3.0.
-
activate
(supervisor_service)¶ Activate a Supervisor Service. This method will change the
SupervisorServices.State
of the supervisor service to inACTIVATED
state, and activate all versions of the supervisor service. This method was added in vSphere API 7.0.3.0.- Parameters
supervisor_service (
str
) – Identifier for the Supervisor Service. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespace_management.SupervisorService
.- 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 Supervisor Service is already inACTIVATED
state.- Raise
com.vmware.vapi.std.errors_client.NotFound
if Supervisor Service with the IDsupervisor_service
could not 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 the SupervisorServices.Manage privilege.
-
check_content
(spec)¶ Perform validation checks on the content of a Supervisor Service version defined in the
spec
. The method returns the validation status and relevant Supervisor Service version information that are available in the content. A custom format will always return aVALID
status. Only vSphere and Carvel packages can return multiple validation statuses. This method was added in vSphere API 7.0.3.0.- Parameters
spec (
SupervisorServices.ContentCheckSpec
) – Specification for the content to be checked.- Return type
- Returns
A check result containing validation status and relevant Supervisor Service version information from the provided content, if the content is valid. In case of invalid content, it will return a list of error messages.
- 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 the providedspec
is invalid. For example, the providedSupervisorServices.ContentCheckSpec.content
is empty or not base64 encoded.- 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 the System.Read privilege.
-
create
(spec)¶ Create a Supervisor Service. If version specs are provided in the
spec
, new Supervisor Service versions will be created as part of the operation. This method was added in vSphere API 7.0.3.0.- Parameters
spec (
SupervisorServices.CreateSpec
) – Specification for the Supervisor Service with version definition.- Raise
com.vmware.vapi.std.errors_client.AlreadyExists
if a Supervisor Service with the same identifier already exists.- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
ifspec
contain any errors or if an invalid name is specified. For example, when the service is from a trusted provider, but no signature is provided or it is invalid.- 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 SupervisorServices.Manage privilege.
-
deactivate
(supervisor_service)¶ Deactivate a Supervisor Service. This method will change the
SupervisorServices.State
of the supervisor service toDEACTIVATED
state, and deactivate all versions of the supervisor service. Note that this method should be called before deleting the Supervisor Service. This method was added in vSphere API 7.0.3.0.- Parameters
supervisor_service (
str
) – Identifier for the Supervisor Service. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespace_management.SupervisorService
.- 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 Supervisor Service is already inDEACTIVATED
state.- Raise
com.vmware.vapi.std.errors_client.NotFound
if Supervisor Service with the IDsupervisor_service
could not 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 the SupervisorServices.Manage privilege.
-
delete
(supervisor_service)¶ Delete a Supervisor Service. This method only deletes the Supervisor Service from vCenter if the Supervisor Service is in
DEACTIVATED
state, and all versions of the Supervisor Service are removed from vCenter. Note that thedeactivate
method should be called to deactivate the Supervisor Service before the Supervisor Service can be deleted. This method was added in vSphere API 7.0.3.0.- Parameters
supervisor_service (
str
) – Identifier for the Supervisor Service. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespace_management.SupervisorService
.- 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 Supervisor Service cannot be deleted in the current state, e.g. a version of the Supervisor Service is not inDEACTIVATED
state.- Raise
com.vmware.vapi.std.errors_client.NotFound
if Supervisor Service with the IDsupervisor_service
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 doesn’t have the SupervisorServices.Manage privilege.
-
get
(supervisor_service)¶ Return the information for the specified Supervisor Service. This method was added in vSphere API 7.0.3.0.
- Parameters
supervisor_service (
str
) – Identifier for the Supervisor Service. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespace_management.SupervisorService
.- Return type
- Returns
Information for the specified Supervisor Service.
- 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 Supervisor Service with the IDsupervisor_service
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 doesn’t have the System.Read privilege.
-
list
()¶ Return the information about all Supervisor Services on this vCenter. This method was added in vSphere API 7.0.3.0.
- Return type
- Returns
The list of summary of all Supervisor Services.
- 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 doesn’t have the System.Read privilege.
-
update
(supervisor_service, spec)¶ Update a Supervisor Service. This method was added in vSphere API 7.0.3.0.
- Parameters
supervisor_service (
str
) – Identifier for the Supervisor Service. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespace_management.SupervisorService
.spec (
SupervisorServices.UpdateSpec
) – Specification for the Supervisor Service metadata to be updated.
- 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
ifspec
contain any errors or if an invalid name is specified.- Raise
com.vmware.vapi.std.errors_client.NotFound
if Supervisor Service with the IDsupervisor_service
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 doesn’t have the SupervisorServices.Manage privilege.
-
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
- 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.
-
class
com.vmware.vcenter.namespace_management_client.
VirtualMachineClasses
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
VirtualMachineClasses
class provides management methods for customizable virtual machine classes. A virtual machine class represents a policy and configuration resource which defines a set of attributes to be used in the configuration of a virtual machine instance. This class was added in vSphere API 7.0.2.00100.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
ConfigStatus
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
ConfigStatus represents the config status of the VM class. This enumeration was added in vSphere API 7.0.2.00100.
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 theConfigStatus
instance.
-
READY
= ConfigStatus(string='READY')¶ Indicates that the instance of the
VirtualMachineClasses
is ready to be used. This class attribute was added in vSphere API 7.0.2.00100.
-
REMOVING
= ConfigStatus(string='REMOVING')¶ Indicates that the instance of the
VirtualMachineClasses
is being deleted. At this state the VM class cannot be associated with new Namespace. This class attribute was added in vSphere API 7.0.2.00100.
-
class
CreateSpec
(id=None, cpu_count=None, cpu_reservation=None, memory_mb=None, memory_reservation=None, description=None, devices=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
VirtualMachineClasses.CreateSpec
class contains the specification required to create a VM class object. This class was added in vSphere API 7.0.2.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
id (
str
) – Identifier of the virtual machine class. 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 in this vCenter server. This attribute was added in vSphere API 7.0.2.00100. 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.VirtualMachineClass
. 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.VirtualMachineClass
.cpu_count (
long
) – The number of CPUs configured for virtual machine of this class. This attribute was added in vSphere API 7.0.2.00100.cpu_reservation (
long
orNone
) – The percentage of total available CPUs reserved for a virtual machine. We multiply this percentage by the minimum frequency amongst all the cluster nodes to get the CPU reservation that is specified to vSphere in MHz. This attribute was added in vSphere API 7.0.2.00100. If None, no CPU reservation is requested for the virtual machine.memory_mb (
long
) – The amount of memory in MB configured for virtual machine of this class. This attribute was added in vSphere API 7.0.2.00100.memory_reservation (
long
orNone
) – The percentage of available memory reserved for a virtual machine of this class. Memory reservation must be set to 100% for VM class with vGPU or Dynamic DirectPath I/O devices. This attribute was added in vSphere API 7.0.2.00100. If None, no memory reservation is requested for virtual machine.description (
str
orNone
) – Description for the VM class. This attribute was added in vSphere API 7.0.2.00100. If None, no description is added to the VM class.devices (
VirtualMachineClasses.VirtualDevices
orNone
) – Virtual devices that will be attached to the VMs created with this class. This attribute was added in vSphere API 7.0.3.0. If None, no Virtual device will be attached to the VMs created with this class.
-
class
DynamicDirectPathIODevice
(vendor_id=None, device_id=None, custom_label=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
VirtualMachineClasses.DynamicDirectPathIODevice
class contains the configuration corresponding to a Dynamic DirectPath I/O device. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
vendor_id (
long
) – The vendor ID of this device. This attribute was added in vSphere API 7.0.3.0.device_id (
long
) – The device ID of this device. This attribute was added in vSphere API 7.0.3.0.custom_label (
str
orNone
) – The custom label attached to this device. This attribute was added in vSphere API 7.0.3.0. If None, custom label is not used to identify the device.
-
class
Info
(id=None, cpu_count=None, cpu_reservation=None, memory_mb=None, memory_reservation=None, description=None, namespaces=None, vms=None, config_status=None, messages=None, devices=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
VirtualMachineClasses.Info
class contains detailed information about the virtual machine class. This class was added in vSphere API 7.0.2.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
id (
str
) – Identifier for the VM class. This attribute was added in vSphere API 7.0.2.00100. 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.VirtualMachineClass
. 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.VirtualMachineClass
.cpu_count (
long
) – The number of CPUs configured for virtual machine of this class. This attribute was added in vSphere API 7.0.2.00100.cpu_reservation (
long
orNone
) – The percentage of total available CPUs reserved for a virtual machine. We multiply this percentage by the minimum frequency amongst all the cluster nodes to get the CPU reservation that is specified to vSphere in MHz. This attribute was added in vSphere API 7.0.2.00100. If None, no CPU reservation is requested for the virtual machine.memory_mb (
long
) – The amount of memory in MB configured for virtual machine of this class. This attribute was added in vSphere API 7.0.2.00100.memory_reservation (
long
orNone
) – The percentage of available memory reserved for a virtual machine of this class. This attribute was added in vSphere API 7.0.2.00100. If None, no memory reservation is requested for virtual machine.description (
str
) – Description of the VM class. This attribute was added in vSphere API 7.0.2.00100.namespaces (
set
ofstr
) – Set of Namespaces associated with this VM class. This attribute was added in vSphere API 7.0.2.00100. 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
.vms (
set
ofstr
) – Set of virtual machines deployed for VM class. This attribute was added in vSphere API 7.0.2.00100. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type:VirtualMachine
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:VirtualMachine
.config_status (
VirtualMachineClasses.ConfigStatus
) – Configstatus of VM class. This attribute was added in vSphere API 7.0.2.00100.messages (
list
ofVirtualMachineClasses.Message
) – Current set of messages associated with the object. This attribute was added in vSphere API 7.0.2.00100.devices (
VirtualMachineClasses.VirtualDevices
) – Virtual devices corresponding to the VM class. This attribute was added in vSphere API 7.0.3.0. This attribute is optional because it was added in a newer version than its parent node.
-
class
Message
(severity=None, details=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
VirtualMachineClasses.Message
class contains the information about the object configuration. This class was added in vSphere API 7.0.2.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
severity (
VirtualMachineClasses.Message.MessageSeverity
) – Type of the message. This attribute was added in vSphere API 7.0.2.00100.details (
com.vmware.vapi.std_client.LocalizableMessage
orNone
) – Details about the message. This attribute was added in vSphere API 7.0.2.00100. If None, message details are not required for taking actions.
-
class
MessageSeverity
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
VirtualMachineClasses.Message.MessageSeverity
class represents the severity of the message. This enumeration was added in vSphere API 7.0.2.00100.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 theMessageSeverity
instance.
-
ERROR
= MessageSeverity(string='ERROR')¶ Error message. This is accompanied by vCenter event and/or alarm. This class attribute was added in vSphere API 7.0.2.00100.
-
INFO
= MessageSeverity(string='INFO')¶ Informational message. This may be accompanied by vCenter event. This class attribute was added in vSphere API 7.0.2.00100.
-
WARNING
= MessageSeverity(string='WARNING')¶ Warning message. This may be accompanied by vCenter event. This class attribute was added in vSphere API 7.0.2.00100.
-
RESOURCE_TYPE
= 'com.vmware.vcenter.namespace_management.VirtualMachineClass'¶ The resource type for VM class. This class attribute was added in vSphere API 7.0.2.00100.
-
class
UpdateSpec
(cpu_count=None, cpu_reservation=None, memory_mb=None, memory_reservation=None, description=None, devices=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
VirtualMachineClasses.UpdateSpec
class contains the specification required to update a VM class object. This class was added in vSphere API 7.0.2.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
cpu_count (
long
orNone
) – The number of CPUs configured for virtual machine of this class. This attribute was added in vSphere API 7.0.2.00100. If None the current value the will not be modified.cpu_reservation (
long
orNone
) – The percentage of total available CPUs reserved for a virtual machine. We multiply this percentage by the minimum frequency amongst all the cluster nodes to get the CPU reservation that is specified to vSphere in MHz. This attribute was added in vSphere API 7.0.2.00100. If None, no CPU reservation is requested for the virtual machine.memory_mb (
long
orNone
) – The amount of memory in MB configured for virtual machine of this class. This attribute was added in vSphere API 7.0.2.00100. If None the current value the will not be modified.memory_reservation (
long
orNone
) – The percentage of available memory reserved for a virtual machine of this class. Memory reservation must be set to 100% for VM class with vGPU or Dynamic DirectPath I/O devices. This attribute was added in vSphere API 7.0.2.00100. If None, no memory reservation is requested for virtual machine.description (
str
orNone
) – Description for the VM class. This attribute was added in vSphere API 7.0.2.00100. If None, description is not updated.devices (
VirtualMachineClasses.VirtualDevices
orNone
) – Virtual devices corresponding to the VM class. This attribute was added in vSphere API 7.0.3.0. If None, virtual devices will not be updated.
-
class
VGPUDevice
(profile_name=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
VirtualMachineClasses.VGPUDevice
class contains the configuration corresponding to a vGPU device. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
profile_name (
str
) – Profile name corresponding to the device. This attribute was added in vSphere API 7.0.3.0.
-
class
VirtualDevices
(vgpu_devices=None, dynamic_direct_path_io_devices=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
VirtualMachineClasses.VirtualDevices
class contains information about the virtual devices associated with a VM class. This class was added in vSphere API 7.0.3.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
vgpu_devices (
list
ofVirtualMachineClasses.VGPUDevice
orNone
) – List of vGPU devices. This attribute was added in vSphere API 7.0.3.0. If None, no vGPU devices are present.dynamic_direct_path_io_devices (
list
ofVirtualMachineClasses.DynamicDirectPathIODevice
orNone
) – List of Dynamic DirectPath I/O devices. This attribute was added in vSphere API 7.0.3.0. If None, no Dynamic DirectPath I/O devices are present.
-
create
(spec)¶ Create a VM class object. This method was added in vSphere API 7.0.2.00100.
- Parameters
spec (
VirtualMachineClasses.CreateSpec
) – Information about the VM class object to be created.- Raise
com.vmware.vapi.std.errors_client.AlreadyExists
if a VM class by the name as specified in thespec
already exists in the vCenter inventory.- 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 the input {\@param.spec.instanceStorage.policy} refers to an invalid storage policy or if the inputspec
includes settings that are out of acceptable bounds or a combination of settings that are not internally consistent with the inputspec
.- 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 VirtualMachineClasses.Manage privilege.
-
delete
(vm_class)¶ Delete the VM class object. This method was added in vSphere API 7.0.2.00100.
- Parameters
vm_class (
str
) – Identifier for the VM class. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespace_management.VirtualMachineClass
.- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
- Raise
com.vmware.vapi.std.errors_client.NotFound
VM class 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 VirtualMachineClasses.Manage privilege.
-
get
(vm_class)¶ Return information about a VM class. This method was added in vSphere API 7.0.2.00100.
- Parameters
vm_class (
str
) – Identifier for the VM class. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespace_management.VirtualMachineClass
.- Return type
- Returns
Information about the specified VM class.
- Raise
com.vmware.vapi.std.errors_client.NotFound
if VM class can not be found in the vCenter inventory.- 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
()¶ Return information about all VirtualMachine classes. This method was added in vSphere API 7.0.2.00100.
- Return type
- Returns
List of information about all VirtualMachine classes
- 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.
-
update
(vm_class, spec)¶ Update the configuration of the VM class object. This method was added in vSphere API 7.0.2.00100.
- Parameters
vm_class (
str
) – Identifier for the VM class. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespace_management.VirtualMachineClass
.spec (
VirtualMachineClasses.UpdateSpec
) – Information about the VM class object to be updated.
- Raise
com.vmware.vapi.std.errors_client.AlreadyExists
if a VM class by the name as specified in thespec
already exists in the vCenter inventory.- 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 the input {\@param.spec.instanceStorage.policy} refers to an invalid storage policy or if the inputspec
includes settings that are out of acceptable bounds or a combination of settings that are not internally consistent with the inputspec
.- Raise
com.vmware.vapi.std.errors_client.NotFound
if or thevm_class
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 VirtualMachineClasses.Manage 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, inherited=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.inherited (
bool
) – Flag to indicate if theAccess.Info.role
is direct or inherited. The value is set totrue
if theAccess.Info.role
is inherited from group membership. This attribute was added in vSphere API 7.0.2.00100. This attribute is optional because it was added in a newer version than its parent node.
-
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 theRole
instance.
-
EDIT
= Role(string='EDIT')¶ This role allows modification of the namespace.
-
OWNER
= Role(string='OWNER')¶ This role allows modification and deletion of the namespace. This class attribute was added in vSphere API 7.0.2.00100.
-
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 aAccess.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 theSubjectType
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
ifnamespace
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
ifnamespace
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
- 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
ifnamespace
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
ifnamespace
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.
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 theConfigStatus
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
(cluster=None, namespace=None, description=None, resource_spec=None, access_list=None, storage_specs=None, networks=None, vm_service_spec=None, creator=None, namespace_network=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Instances.CreateSpec
class contains the specification required to set up a namespace on a single vSphere cluster.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
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
.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
.description (
str
orNone
) – Description for the namespace. If None, no description is added to the namespace.resource_spec (
vmware.vapi.struct.VapiStruct
orNone
) – 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, seeResourceQuotaOptionsV1
. If None, no resource limits will be set on the namespace.access_list (
list
ofInstances.Access
orNone
) – Access controls associated with the namespace. If None, only users with Administrator role can access the namespace.storage_specs (
list
ofInstances.StorageSpec
orNone
) – 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
ofstr
orNone
) – vSphere Namespaces network objects to be associated with the namespace. The values of this list need to reference names of pre-existingcom.vmware.vcenter.namespace_management.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.namespace_management.Network
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:com.vmware.vcenter.namespace_management.Network
. 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.vm_service_spec (
Instances.VMServiceSpec
orNone
) – VM Service specification associated with the namespace. This attribute was added in vSphere API 7.0.2.00100. This attribute is optional because it was added in a newer version than its parent node.creator (
Instances.Principal
orNone
) – Creator of the namespace. Namespace self-service uses this field to populate the user who created this namespace. This attribute was added in vSphere API 7.0.2.00100. This attribute is optional because it was added in a newer version than its parent node.namespace_network (
Instances.NetworkCreateSpec
orNone
) – This field that accepts parameters to define a vSphere Namespace Network object that will automatically be associated with this Namespace. Networks created in this operation will be given an autogenerated ID and cannot be referenced by other Namespaces. This attribute was added in vSphere API 7.0.2.00100. This attribute is optional because it was added in a newer version than its parent node.
-
class
Info
(cluster=None, config_status=None, messages=None, stats=None, description=None, resource_spec=None, access_list=None, storage_specs=None, networks=None, vm_service_spec=None, creator=None, self_service_namespace=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Instances.Info
class contains the detailed information about the namespace on a single vSphere cluster.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
cluster (
str
) – Identifier for the vSphere 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 forInstances.ConfigStatus
.messages (
list
ofInstances.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
orNone
) – 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
ofInstances.Access
) – Access controls associated with the namespace.storage_specs (
list
ofInstances.StorageSpec
) – Storage associated with the namespace.networks (
list
ofstr
orNone
) – 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.namespace_management.Network
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:com.vmware.vcenter.namespace_management.Network
. This field is None if the cluster hosting this namespace uses NSXT_CONTAINER_PLUGIN as its network provider.vm_service_spec (
Instances.VMServiceSpec
) – VM Service specification associated with the namespace. This attribute was added in vSphere API 7.0.2.00100. This attribute is optional because it was added in a newer version than its parent node.creator (
Instances.Principal
orNone
) – Creator of the namespace. Namespace self-service uses this field to populate the user who created this namespace. This attribute was added in vSphere API 7.0.2.00100. This attribute is optional because it was added in a newer version than its parent node.self_service_namespace (
bool
orNone
) – Flag to indicate the self service namespace. This attribute was added in vSphere API 7.0.2.00100. If None, the namespace is not marked as self service namespace.
-
class
Ipv4Cidr
(address=None, prefix=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The specification for representing CIDR notation of IP range. This class was added in vSphere API 7.0.2.00100.
Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
address (
str
) – The IPv4 address. This attribute was added in vSphere API 7.0.2.00100.prefix (
long
) – The CIDR prefix. This attribute was added in vSphere API 7.0.2.00100.
-
class
LoadBalancerSize
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Instances.LoadBalancerSize
enumerates the kinds of load balancer sizes supported by NSX. Small load balancer can host 10 to 20 virtual servers depending on NSX-T version. Medium load balancer can host 100 virtual servers. Large load balancer can host 1000 virtual servers. This enumeration was added in vSphere API 7.0.2.00100.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 theLoadBalancerSize
instance.
-
LARGE
= LoadBalancerSize(string='LARGE')¶ Load balancer size of ‘large’. This class attribute was added in vSphere API 7.0.2.00100.
-
MEDIUM
= LoadBalancerSize(string='MEDIUM')¶ Load balancer size of ‘medium’. This class attribute was added in vSphere API 7.0.2.00100.
-
SMALL
= LoadBalancerSize(string='SMALL')¶ Load balancer size of ‘small’. This class attribute was added in vSphere API 7.0.2.00100.
-
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
severity (
Instances.Message.MessageSeverity
) – Type of the message.details (
com.vmware.vapi.std_client.LocalizableMessage
orNone
) – Details about the message. If None, message details are not required for taking actions.
-
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 theMessageSeverity
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.
-
class
NetworkCreateSpec
(network_provider=None, network=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Instances.NetworkCreateSpec
class contains the specification required to create a vSphere Namespaces network object. This class was added in vSphere API 7.0.2.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
network_provider (
Instances.NetworkProvider
) – The network provider that will manage the vSphere Namespaces network object. This attribute was added in vSphere API 7.0.2.00100.network (
Instances.NsxNetworkCreateSpec
) – The create spec for an NSXT-backed Namespaces network configuration, supported byInstances.NetworkProvider.NSXT_CONTAINER_PLUGIN
network provider. This attribute was added in vSphere API 7.0.2.00100. This attribute is optional and it is only relevant when the value ofnetworkProvider
isInstances.NetworkProvider.NSXT_CONTAINER_PLUGIN
.
-
class
NetworkProvider
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
Identifies the network plugin that networking functionalities for this vSphere Namespace. This enumeration was added in vSphere API 7.0.2.00100.
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 theNetworkProvider
instance.
-
NSXT_CONTAINER_PLUGIN
= NetworkProvider(string='NSXT_CONTAINER_PLUGIN')¶ NSX-T Container Plugin. This class attribute was added in vSphere API 7.0.2.00100.
-
VSPHERE_NETWORK
= NetworkProvider(string='VSPHERE_NETWORK')¶ vSphere Networking. This class attribute was added in vSphere API 7.0.2.00100.
-
class
NsxNetworkCreateSpec
(namespace_network_cidrs=None, ingress_cidrs=None, egress_cidrs=None, nsx_tier0_gateway=None, subnet_prefix_length=None, routed_mode=None, load_balancer_size=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Instances.NsxNetworkCreateSpec
class describes the configuration specification of a NSXT-backed Namespaces Network configuration. This class was added in vSphere API 7.0.2.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
namespace_network_cidrs (
list
ofInstances.Ipv4Cidr
orNone
) – CIDR blocks from which Kubernetes allocates IP addresss for all workloads that attach to the namespace, including PodVMs, TKGS and VM Service VMs. This range should not overlap with those inInstances.NsxNetworkCreateSpec.ingress_cidrs
,Instances.NsxNetworkCreateSpec.egress_cidrs
, or other services running in the datacenter. This attribute was added in vSphere API 7.0.2.00100. This field is required whenInstances.NsxNetworkCreateSpec.nsx_tier0_gateway
or any ofInstances.NsxNetworkCreateSpec.ingress_cidrs
,Instances.NsxNetworkCreateSpec.egress_cidrs
are specified. An update operation only allows for addition of new CIDR blocks to the existing list.ingress_cidrs (
list
ofInstances.Ipv4Cidr
orNone
) – CIDR blocks from which NSX assigns IP addresses for Kubernetes Ingresses and Kubernetes Services of type LoadBalancer. These ranges should not overlap with those inInstances.NsxNetworkCreateSpec.namespace_network_cidrs
,Instances.NsxNetworkCreateSpec.egress_cidrs
, or other services running in the datacenter. This attribute was added in vSphere API 7.0.2.00100. This field is required whenInstances.NsxNetworkCreateSpec.nsx_tier0_gateway
or any ofInstances.NsxNetworkCreateSpec.namespace_network_cidrs
,Instances.NsxNetworkCreateSpec.egress_cidrs
are specified. An update operation only allows for addition of new CIDR blocks to the existing list.egress_cidrs (
list
ofInstances.Ipv4Cidr
orNone
) – 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 inInstances.NsxNetworkCreateSpec.namespace_network_cidrs
,Instances.NsxNetworkCreateSpec.ingress_cidrs
, or other services running in the datacenter. This attribute was added in vSphere API 7.0.2.00100. This field is required whenInstances.NsxNetworkCreateSpec.routed_mode
is set to False andInstances.NsxNetworkCreateSpec.nsx_tier0_gateway
or any ofInstances.NsxNetworkCreateSpec.namespace_network_cidrs
,Instances.NsxNetworkCreateSpec.ingress_cidrs
is specified. WhenInstances.NsxNetworkCreateSpec.routed_mode
is set to True, this field is not allowed. An update operation only allows for addition of new CIDR blocks to the existing list.nsx_tier0_gateway (
str
orNone
) – NSX Tier0 Gateway used for this namespace. This field does not allow update once applied. This attribute was added in vSphere API 7.0.2.00100. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:NSXTier0Gateway
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:NSXTier0Gateway
. If None, cluster level settings specified in com.vmware.vcenter.namespace_management.Clusters.NCPClusterNetworkInfo#nsxTier0Gateway will be applied.subnet_prefix_length (
long
orNone
) – Size of the subnet reserved for namespace segments. This attribute was added in vSphere API 7.0.2.00100. If None, cluster level settings specified in com.vmware.vcenter.namespace_management.Clusters.NCPClusterNetworkInfo#namespaceSubnetPrefix will be applied.routed_mode (
bool
orNone
) – Routed mode for this namespace. When set to True, the traffic in the namespace is not NATed. This attribute was added in vSphere API 7.0.2.00100. If None, defaults to False. When this field is set to True,Instances.NsxNetworkCreateSpec.egress_cidrs
is not allowed. This field does not allow update once applied.load_balancer_size (
Instances.LoadBalancerSize
orNone
) – The size of the NSX Load Balancer used by the namespace. This field does not allow update once applied. This attribute was added in vSphere API 7.0.2.00100. If None, defaults toInstances.LoadBalancerSize.SMALL
.
-
class
Principal
(subject=None, domain=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Instances.Principal
class contains the information about the creator of namespace. This class was added in vSphere API 7.0.2.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
subject (
str
) – Name of the subject. This attribute was added in vSphere API 7.0.2.00100.domain (
str
) – Domain of the subject. This attribute was added in vSphere API 7.0.2.00100.
-
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, vm_service_spec=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
orNone
) – Description for the namespace. If None, the description of the namespace will be cleared.resource_spec (
vmware.vapi.struct.VapiStruct
orNone
) – 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, seeResourceQuotaOptionsV1
. If None, the resource constraints on the namespace will be cleared.access_list (
list
ofInstances.Access
orNone
) – 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
ofInstances.StorageSpec
orNone
) – 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.vm_service_spec (
Instances.VMServiceSpec
orNone
) – VM Service specification associated with the namespace. This attribute was added in vSphere API 7.0.2.00100. This attribute is optional because it was added in a newer version than its parent node.
-
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
orNone
) – 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
(cluster=None, namespace=None, description=None, config_status=None, stats=None, self_service_namespace=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Instances.Summary
class contains the basic information about the namespace on a single vSphere cluster.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
cluster (
str
) – Identifier for the vSphere 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
.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.config_status (
Instances.ConfigStatus
) – Current setting forInstances.ConfigStatus
.stats (
Instances.Stats
) – Basic runtime statistics for the namespace.self_service_namespace (
bool
orNone
) – Flag to indicate the self service namespace. This attribute was added in vSphere API 7.0.2.00100. If None, the namespace is not marked as self service namespace.
-
class
UpdateSpec
(description=None, resource_spec=None, access_list=None, storage_specs=None, vm_service_spec=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
orNone
) – Description for the namespace. If None, the description of the namespace will not be modified.resource_spec (
vmware.vapi.struct.VapiStruct
orNone
) – 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, seeResourceQuotaOptionsV1Update
. If None, the resource constraints on the namespace will not be modified.access_list (
list
ofInstances.Access
orNone
) – 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
ofInstances.StorageSpec
orNone
) – 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.vm_service_spec (
Instances.VMServiceSpec
orNone
) – VM Service specification associated with the namespace. This attribute was added in vSphere API 7.0.2.00100. This attribute is optional because it was added in a newer version than its parent node.
-
class
VMServiceSpec
(content_libraries=None, vm_classes=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Instances.VMServiceSpec
class contains the specification required to configure the VM Service specification associated with a namespace.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
content_libraries (
set
ofstr
orNone
) – Set of content libraries for use by the VM Service. The content libraries specified should exist in vSphere inventory. This attribute was added in vSphere API 7.0.2.00100. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type:com.vmware.content.Library
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:com.vmware.content.Library
. This attribute is optional because it was added in a newer version than its parent node.vm_classes (
set
ofstr
orNone
) –Set of VirtualMachineClasses for use by the VM Service. The class names specified here should exist in vSphere inventory. If this field is empty in an updated specification, all VirtualMachineClasses that are currently associated with the namespace will be disassociated from it.
NOTE: Any change in virtual machine classes associated with the namespace will not impact existing VMs.. This attribute was added in vSphere API 7.0.2.00100. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type:
com.vmware.vcenter.namespace_management.VirtualMachineClass
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:com.vmware.vcenter.namespace_management.VirtualMachineClass
. This attribute is optional because it was added in a newer version than its parent node.
-
create
(spec)¶ Create a namespace object on a single vSphere cluster.
- Parameters
spec (
Instances.CreateSpec
) – The 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
ifspec
contains any errors or if an invalid name is specified.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the associated cluster is being disabled.- Raise
com.vmware.vapi.std.errors_client.NotFound
ifInstances.CreateSpec.cluster
is not registered on this vCenter server.- Raise
com.vmware.vapi.std.errors_client.Unsupported
if:attr:Instances.CreateSpec.cluster is not enabled for Namespaces, or if the networks field is set when theInstances.CreateSpec.cluster
hosting the namespace uses NSXT_CONTAINER_PLUGIN as its network provider, or if the cluster does not support customizable VM classes.- 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 on a single vSphere cluster.
- Parameters
namespace (
str
) – Identifier for the namespace. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespaces.Instance
.- Return type
- 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 in this vCenter Server. The information is tied to a single vSphere cluster.
- Return type
- Returns
Information about all namespaces in 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 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
ifspec
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 namenamespace
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.- Raise
com.vmware.vapi.std.errors_client.Unsupported
if customizable VM classes are not suported for this cluster.
-
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
ifspec
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 namenamespace
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.- Raise
com.vmware.vapi.std.errors_client.Unsupported
if customizable VM classes are not suported for this cluster.
-
class
com.vmware.vcenter.namespaces_client.
NamespaceSelfService
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
NamespaceSelfService
class provides methods to activate and deactivate a namespace template that empowers users as self-service namespace users. If the service is activated on a cluster, users can create Supervisor Namespaces through kubectl create namespace command without the need of extra assistance. This class was added in vSphere API 7.0.2.00100.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
ActivateTemplateSpec
(template=None, permissions=None, resource_spec=None, storage_specs=None, networks=None, vm_service_spec=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
NamespaceSelfService.ActivateTemplateSpec
class contains the specification required to create or update namespace template. The create or update template operations are combined with service activation in a single operation. This class was added in vSphere API 7.0.2.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
template (
str
) – Identifier of the namespace template that is being activated. This attribute was added in vSphere API 7.0.2.00100. 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.NamespaceTemplate
. 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.NamespaceTemplate
.permissions (
list
ofNamespaceTemplates.Subject
) – Namespace Self Service permission to subjects. This attribute was added in vSphere API 7.0.2.00100.resource_spec (
vmware.vapi.struct.VapiStruct
) – Resource quotas that the template defines. 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, seeResourceQuotaOptionsV1
. This attribute was added in vSphere API 7.0.2.00100.storage_specs (
list
ofInstances.StorageSpec
) – Storage associated with the self service namespace. This attribute was added in vSphere API 7.0.2.00100.networks (
list
ofstr
orNone
) – vSphere Namespaces network objects to be associated with the namespace. The values of this list need to reference names of pre-existingcom.vmware.vcenter.namespace_management.Networks.Info
classs. This attribute was added in vSphere API 7.0.2.00100. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type:ClusterComputeResource
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:ClusterComputeResource
. 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.vm_service_spec (
Instances.VMServiceSpec
orNone
) – VM Service specification to be associated with the namespace template. Namespaces created using this template will have access to the virtual machine classes and Content Libraries specified in theNamespaceSelfService.ActivateTemplateSpec.vm_service_spec
by default. This attribute was added in vSphere API 7.0.3.2. If None, the namespaces created using this template will not have access to any virtual machine classes and Content Libraries by default.
-
class
Capability
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
NamespaceSelfService.Capability
class describes the self-service namespace capability of the cluster on which vSphere Namespaces enabled. This enumeration was added in vSphere API 7.0.2.00100.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 theCapability
instance.
-
NOTSUPPORTED
= Capability(string='NOTSUPPORTED')¶ The value that indicates the cluster doesn’t support the self-service namespace capability. The expected transition UNKNOWN –> NOTSUPPORTED. This class attribute was added in vSphere API 7.0.2.00100.
-
SUPPORTED
= Capability(string='SUPPORTED')¶ The value that indicates the cluster supports self-service namespace capability. The expected transition UNKNOWN –> SUPPORTED. This class attribute was added in vSphere API 7.0.2.00100.
-
UNKNOWN
= Capability(string='UNKNOWN')¶ The initial value that represents the in-progress activity of determining the cluster’s self-service namespace capability. This class attribute was added in vSphere API 7.0.2.00100.
-
class
Info
(cluster=None, capability=None, status=None, messages=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
NamespaceSelfService.Info
class contains detailed information about the namespace self service. This class was added in vSphere API 7.0.2.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
cluster (
str
) – Identifier for the cluster to which namespace service is associated. This attribute was added in vSphere API 7.0.2.00100. 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
.capability (
NamespaceSelfService.Capability
) – The self-service namespace capability of the cluster with vSphere Namespaces enabled. This attribute was added in vSphere API 7.0.2.00100.status (
NamespaceSelfService.Status
) – The current status of the namespace-self-service. This attribute was added in vSphere API 7.0.2.00100.messages (
list
ofInstances.Message
) – Current set of messages associated with the object. This attribute was added in vSphere API 7.0.2.00100.
-
class
Status
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The page describes the status of the namespace self-service on the cluster on which vSphere Namespaces enabled. This enumeration was added in vSphere API 7.0.2.00100.
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 theStatus
instance.
-
CONFIGURING
= Status(string='CONFIGURING')¶ The configuration is being applied to the service. This class attribute was added in vSphere API 7.0.2.00100.
-
DEACTIVATED
= Status(string='DEACTIVATED')¶ The namespace self service is deactivated. This status also represents the initial status of the service before activation. The expected transitions after the service is activated: 1. CONFIGURING –> RUNNING –> REMOVING –> DEACTIVATED 2. CONFIGURING –> REMOVING –> DEACTIVATED. This class attribute was added in vSphere API 7.0.2.00100.
-
ERROR
= Status(string='ERROR')¶ Failed to apply the configuration to the namespace self-service or unable to deactivate the namespace self-service, user intervention needed. The expected transitions: 1. CONFIGURING –> ERROR 2. CONFIGURING –> RUNNING –> ERROR 3. CONFIGURING –> RUNNING –> REMOVING –> ERROR 4. CONFIGURING –> REMOVING –> ERROR The
NamespaceSelfService.Info.messages
field captures the relevant error messages explaining this ERROR status. This class attribute was added in vSphere API 7.0.2.00100.
-
REMOVING
= Status(string='REMOVING')¶ The configuration is being removed and service is being deleted. The expected transitions: 1. CONFIGURING –> RUNNING –> REMOVING 2. CONFIGURING –> REMOVING. This class attribute was added in vSphere API 7.0.2.00100.
-
RUNNING
= Status(string='RUNNING')¶ The namespace self service is configured correctly. The expected transitions: 1. CONFIGURING –> RUNNING 2. RUNNING –> CONFIGURING. This transition occurs in the below scenarios: a. When different Dev Users/Groups are empowered with self-service namespace access. b. To reconcile the state of the cluster after the cluster upgrade. This class attribute was added in vSphere API 7.0.2.00100.
-
class
Summary
(cluster=None, capability=None, status=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
NamespaceSelfService.Summary
class contains basic information about the namespace service. This class was added in vSphere API 7.0.2.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
cluster (
str
) – Identifier for the cluster to which namespace service is associated. This attribute was added in vSphere API 7.0.2.00100. 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
.capability (
NamespaceSelfService.Capability
) – The self-service namespace capability of the cluster with vSphere Namespaces enabled. This attribute was added in vSphere API 7.0.2.00100.status (
NamespaceSelfService.Status
) – The current status of the namespace-self-service. This attribute was added in vSphere API 7.0.2.00100.
-
activate
(cluster)¶ Activate Namespace Self Service on the cluster on which vSphere Namespaces enabled. This operation empowers Dev Users/Groups as self-service namespace users to create Supervisor Namespaces through kubectl create namespace command. activate requires the availability of one or more templates in the system. This method was added in vSphere API 7.0.2.00100.
- 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
.- Raise
com.vmware.vapi.std.errors_client.AlreadyExists
if the cluster already has Namespace Self Service activated.- 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 with vSphere Namespaces enabled could not be located or no namespace templates exists.- 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.SelfServiceManage privilege.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the service is marked for deactivation or the associated cluster is being disabled or no namespace template exists in the system.
-
activate_with_template
(cluster, spec)¶ Activate Namespace Self Service on the cluster after configuring namespace template. This is another variant of activate except configures template before activation. The template configuration includes either creating a new template or updating the existing template, depending on the template’s existence. Here is supported the flow of actions using the activateWithTemplate call: 1. Activate with the new template using activateWithTemplate call. 2. Deactivate using deactivate call. 3. Active with updating the existing template using activateWithTemplate. This method was added in vSphere API 7.0.2.00100.
- 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 (
NamespaceSelfService.ActivateTemplateSpec
) – Specification for activating namespace self service on the cluster by granting users/groups to create Supervisor Namespaces.
- Raise
com.vmware.vapi.std.errors_client.AlreadyExists
if the cluster already has Namespace Self Service activated.- 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 with vSphere Namespaces enabled could not be located.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
ifspec
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.SelfServiceManage privilege.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the service is marked for deactivation or the associated cluster is being disabled.
-
deactivate
(cluster)¶ Deactivate Namespace Self Service on the cluster on which vSphere Namespaces enabled. This operation reverses Dev Users/Group’s self-service namespace capability on the cluster. This method was added in vSphere API 7.0.2.00100.
- 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 with vSphere Namespaced enabled is not found.- 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.SelfServiceManage privilege.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the service is not activated.
-
get
(cluster)¶ Returns information about Namespace Self Service of a specific cluster. This method was added in vSphere API 7.0.2.00100.
- 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
- Returns
Information about the namespace self service associated with the specified cluster.
- Raise
com.vmware.vapi.std.errors_client.NotFound
if cluster with vSphere Namespaced enabled 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 basic information about Namespace Self Service on all clusters on which vSphere Namespaces are enabled on this vCenter. This method was added in vSphere API 7.0.2.00100.
- Return type
- Returns
List of summary of Namespace Self Service associated with 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.
-
class
com.vmware.vcenter.namespaces_client.
NamespaceTemplates
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
NamespaceTemplates
class provides methods to create and update namespace templates on a cluster. The namespace templates are used if theNamespaceSelfService
is enabled on a Supervisor. This class was added in vSphere API 7.0.2.00100.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
CreateSpec
(template=None, resource_spec=None, storage_specs=None, networks=None, permissions=None, vm_service_spec=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
NamespaceTemplates.CreateSpec
class contains the specification required to create namespace template. This class was added in vSphere API 7.0.2.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
template (
str
) – Identifier of the namespace template. This has DNS_LABEL restrictions as specified in ` <https://tools.ietf.org/html/rfc1123>`_. This name is unique across all namespaces templates in this vCenter server. This attribute was added in vSphere API 7.0.2.00100. 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
.resource_spec (
vmware.vapi.struct.VapiStruct
) – Resource quotas that this template defines. 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, seeResourceQuotaOptionsV1
. This attribute was added in vSphere API 7.0.2.00100.storage_specs (
list
ofInstances.StorageSpec
) – Storage that this template defines and will be associated with a namespace after namespace realization. This field should not be empty and at least one policy should be supplied. The {link create} throws {term InvalidArgument} exception if this field is set empty. This attribute was added in vSphere API 7.0.2.00100.networks (
list
ofstr
orNone
) – vSphere Networks that this template captures and are associated with the namespace after namespace realization. vSphere Namespaces network objects to be associated with the namespace. The values of this list need to reference names of pre-existingcom.vmware.vcenter.namespace_management.Networks.Info
classs. This attribute was added in vSphere API 7.0.2.00100. When clients pass a value of this class as a parameter, the attribute must contain identifiers 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 contain identifiers for the resource type:com.vmware.vcenter.namespace_management.Network
. 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.permissions (
list
ofNamespaceTemplates.Subject
orNone
) – Permissions associated with namespace template. This attribute was added in vSphere API 7.0.2.00100. If None, only users with the Administrator role can use this template; for example, this template is applied to the namespace created by self-service-users with the Administrator role.vm_service_spec (
Instances.VMServiceSpec
orNone
) – VM Service specification to be associated with the namespace template. Namespaces created using this template will have access to the virtual machine classes and Content Libraries specified in theNamespaceTemplates.CreateSpec.vm_service_spec
by default. This attribute was added in vSphere API 7.0.3.2. If None, the namespaces created using this template will not have access to any virtual machine classes and Content Libraries by default.
-
class
Info
(cluster=None, template=None, resource_spec=None, storage_specs=None, networks=None, permissions=None, vm_service_spec=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
NamespaceTemplates.Info
class contains the detailed information about the namespace template. This class was added in vSphere API 7.0.2.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
cluster (
str
) – Identifier for the vSphere cluster associated with namespace template. This attribute was added in vSphere API 7.0.2.00100. 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
.template (
str
) – Name of the namespace template. This attribute was added in vSphere API 7.0.2.00100. 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.NamespaceTemplate
. 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.NamespaceTemplate
.resource_spec (
vmware.vapi.struct.VapiStruct
orNone
) – Resource quotas that this template defines. Quotas on the namespace resources. Refer to com.vmware.vcenter.namespace_management.NamespaceResourceOptions#get for the type of the value for this field. This attribute was added in vSphere API 7.0.2.00100. If None, no resource constraints are defined in the namespace template.storage_specs (
list
ofInstances.StorageSpec
) – Storage that this template defines and will be associated with a namespace after namespace realization. This attribute was added in vSphere API 7.0.2.00100.networks (
list
ofstr
orNone
) – vSphere Networks that this template captures and are associated with the namespace after namespace realization. This attribute was added in vSphere API 7.0.2.00100. When clients pass a value of this class as a parameter, the attribute must contain identifiers 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 contain identifiers for the resource type:com.vmware.vcenter.namespace_management.Network
. This field is None if the cluster hosting this namespace uses NSXT_CONTAINER_PLUGIN as its network provider.permissions (
list
ofNamespaceTemplates.Subject
orNone
) – Permissions associated with namespace template. This attribute was added in vSphere API 7.0.2.00100. If None, only users with the Administrator role can use this template; for example, this template is applied to the namespace created by self-service-users with the Administrator role.vm_service_spec (
Instances.VMServiceSpec
orNone
) – Current set of virtual machine classes and Content Libraries associated with the template. This attribute was added in vSphere API 7.0.3.2. This attribute is optional because it was added in a newer version than its parent node.
-
RESOURCE_TYPE
= 'com.vmware.vcenter.namespaces.NamespaceTemplate'¶ The resource type for namespace template. This class attribute was added in vSphere API 7.0.2.00100.
-
class
Subject
(subject_type=None, subject=None, domain=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
NamespaceTemplates.Subject
class contains the user or group information granted for namespace self service. This class was added in vSphere API 7.0.2.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
subject_type (
Access.SubjectType
) – Type of the subject. This attribute was added in vSphere API 7.0.2.00100.subject (
str
) – Name of the subject. This attribute was added in vSphere API 7.0.2.00100.domain (
str
) – Domain of the subject. This attribute was added in vSphere API 7.0.2.00100.
-
class
Summary
(cluster=None, template=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
NamespaceTemplates.Summary
class contains the basic information about the namespace template. This class was added in vSphere API 7.0.2.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
cluster (
str
) – Identifier for the vSphere cluster associated with namespace template. This attribute was added in vSphere API 7.0.2.00100. 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
.template (
str
) – Name of the namespace template. This attribute was added in vSphere API 7.0.2.00100. 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.NamespaceTemplate
. 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.NamespaceTemplate
.
-
class
UpdateSpec
(resource_spec=None, storage_specs=None, networks=None, permissions=None, vm_service_spec=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
NamespaceTemplates.UpdateSpec
class contains the specification required to update a namespace namespace template. This class was added in vSphere API 7.0.2.00100.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
resource_spec (
vmware.vapi.struct.VapiStruct
orNone
) – 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, seeResourceQuotaOptionsV1
. This attribute was added in vSphere API 7.0.2.00100. If None, no resource limits will be set on the namespace.storage_specs (
list
ofInstances.StorageSpec
orNone
) – Storage that this template defines and will be associated with a namespace after namespace realization. This attribute was added in vSphere API 7.0.2.00100. If None then no update will be made.networks (
list
ofstr
orNone
) – vSphere Namespaces network objects to be associated with the namespace. The values of this list need to reference names of pre-existingcom.vmware.vcenter.namespace_management.Networks.Info
classs. This attribute was added in vSphere API 7.0.2.00100. When clients pass a value of this class as a parameter, the attribute must contain identifiers 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 contain identifiers for the resource type:com.vmware.vcenter.namespace_management.Network
. 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.permissions (
list
ofNamespaceTemplates.Subject
orNone
) – Permissions associated with namespace template. This attribute was added in vSphere API 7.0.2.00100. If None, only users with the Administrator role can use this template; for example, this template is applied to the namespace created by self-service-users with the Administrator role.vm_service_spec (
Instances.VMServiceSpec
orNone
) – VM Service specification to be associated with the namespace template. The virtual machine classes and Content Library associations of the template will be updated according to theNamespaceTemplates.UpdateSpec.vm_service_spec
. This attribute was added in vSphere API 7.0.3.2. If None, the virtual machine classes and Content Library associations of the template will not be modified.
-
create
(cluster, spec)¶ Creates a namespace template on a cluster on which vSphere Namespaces are enabled in this vCenter Server. This release supports creating a single namespace template, and the call fails if there is a request to make another one. This method was added in vSphere API 7.0.2.00100.
- Parameters
cluster (
str
) – Identifier for the cluster on which vSphere Namespaces are enabled. The parameter must be an identifier for the resource type:ClusterComputeResource
.spec (
NamespaceTemplates.CreateSpec
) – Specification for setting up the namespace template.
- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.NotFound
ifcluster
doesn’t exist.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
ifspec
contain any errors, or if {link CreateSpec#storageSpecs} is empty, or if {link CreateSpec#resourceSpec} is not set with {term memory_limit}, {term cpu_limit}, {term storage_request_limit}, or if {link CreateSpec#networks} is not set with networks if the {term cluster} hosting the namespaces uses VSPHERE_NETWORK as its network provider, or if {link CreateSpec#networks} is not empty if the {term cluster} hosting the namespaces uses NSXT_CONTAINER_PLUGIN as its network provider.- Raise
com.vmware.vapi.std.errors_client.Unsupported
if a request arrives to create a second template.- 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.SelfServiceManage privilege.- Raise
com.vmware.vapi.std.errors_client.AlreadyExists
if the namespace template with given name already exists.
-
get
(cluster, template)¶ Get the information about a namespace template on given cluster. This method was added in vSphere API 7.0.2.00100.
- Parameters
cluster (
str
) – Identifier for the cluster on which vSphere Namespaces are enabled. The parameter must be an identifier for the resource type:ClusterComputeResource
.template (
str
) – Name of the namespace template. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespaces.NamespaceTemplate
.
- Return type
- Returns
Information about the namespace template.
- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.NotFound
ifcluster
doesn’t exist or iftemplate
doesn’t exist.- 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)¶ Returns information about all the namespace templates associated with a cluster on which vSphere Namespaces are enabled in this vCenter Server. This method was added in vSphere API 7.0.2.00100.
- 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
- Returns
List of summary of all namespace templates associated with
cluster
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.NotFound
ifcluster
doesn’t exist.- 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.
-
update
(cluster, template, spec)¶ Updates a namespace template associated with cluster on which vSphere Namespaces are enabled in this vCenter Server. The specified configuration is applied partially and None fields in
spec
will leave those parts of configuration as-is. This method was added in vSphere API 7.0.2.00100.- Parameters
cluster (
str
) – Identifier for cluster on which vSphere Namespaces are enabled. The parameter must be an identifier for the resource type:ClusterComputeResource
.template (
str
) – Name of the namespace template. The parameter must be an identifier for the resource type:com.vmware.vcenter.namespaces.NamespaceTemplate
.spec (
NamespaceTemplates.UpdateSpec
) – Specification for updating the namespace template.
- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.NotFound
ifcluster
doesn’t exist or iftemplate
doesn’t exist.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
ifspec
contain any errors.- 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.SelfServiceManage privilege.
-
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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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
orNone
) – 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 ifResourceQuotaOptionsV1Update.memory_limit_unset
is set totrue
. If None, the existing memory limit on the ResourcePool will be unchanged ifResourceQuotaOptionsV1Update.memory_limit_unset
is None or set tofalse
.memory_limit_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.memory_limit
. If this field is set totrue
, the existing memory limit on the ResourcePool is removed. If this field is set tofalse
, the existing memory limit will be changed to the value specified inResourceQuotaOptionsV1Update.memory_limit
, if any. If None, the existing memory limit will be changed to the value specified inResourceQuotaOptionsV1Update.memory_limit
, if any.memory_limit_default (
long
orNone
) – This represents the new value for the default memory limit (in mebibytes) for containers in the pod. This field is ignored ifResourceQuotaOptionsV1Update.memory_limit_default_unset
is set totrue
. If None, the existing memory limit will be unchanged ifResourceQuotaOptionsV1Update.memory_limit_default_unset
is None or set tofalse
.memory_limit_default_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.memory_limit_default
. If this field is set totrue
, the existing default memory limit on containers in the pod is removed. If this field is set tofalse
, the existing default memory limit will be changed to the value specified inResourceQuotaOptionsV1Update.memory_limit_default
, if any. If None, the existing default memory limit will be changed to the value specified inResourceQuotaOptionsV1Update.memory_limit_default
, if any.memory_request_default (
long
orNone
) – This represents the new value for the default memory request (in mebibytes) for containers in the pod. This field is ignored ifResourceQuotaOptionsV1Update.memory_request_default_unset
is set totrue
. If None, the existing memory request will be unchanged ifResourceQuotaOptionsV1Update.memory_request_default_unset
is None or set tofalse
.memory_request_default_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.memory_request_default
. If this field is set totrue
, the existing default memory request on containers in the pod will be removed. If this field is set tofalse
, the existing default memory request will be changed to the value specified inResourceQuotaOptionsV1Update.memory_request_default
, if any. If None, the existing default memory request will be changed to the value specified inResourceQuotaOptionsV1Update.memory_request_default
, if any.cpu_limit (
long
orNone
) – 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 ifResourceQuotaOptionsV1Update.cpu_limit_unset
is set totrue
. If specified, this limit should be at least 10 MHz. If None, the existing CPU limit on the ResourcePool will be unchanged ifResourceQuotaOptionsV1Update.cpu_limit_unset
is None or set tofalse
.cpu_limit_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.cpu_limit
. If this field is set totrue
, the existing CPU limit on the ResourcePool is removed. If this field is set tofalse
, the existing CPU limit will be changed to the value specified inResourceQuotaOptionsV1Update.cpu_limit
, if any. If None, the existing CPU limit will be changed to the value specified inResourceQuotaOptionsV1Update.memory_limit
, if any.cpu_limit_default (
long
orNone
) – This represents the new value for the default CPU limit (in Mhz) for containers in the pod. This field is ignored ifResourceQuotaOptionsV1Update.cpu_limit_default_unset
is set totrue
. If specified, this limit should be at least 10 MHz. If None, the existing default CPU limit will be unchanged ifResourceQuotaOptionsV1Update.cpu_limit_default_unset
is None or set tofalse
.cpu_limit_default_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.cpu_limit_default
. If this field is set totrue
, the existing default CPU limit on containers in the pod is removed. If this field is set tofalse
, the existing default CPU limit will be changed to the value specified inResourceQuotaOptionsV1Update.cpu_limit_default
, if any. If None, the existing default CPU limit will be changed to the value specified inResourceQuotaOptionsV1Update.cpu_limit_default
, if any.cpu_request_default (
long
orNone
) – This represents the new value for the default CPU request (in Mhz) for containers in the pod. This field is ignored ifResourceQuotaOptionsV1Update.cpu_request_default_unset
is set totrue
. If specified, this field should be at least 10 MHz. If None, the existing default CPU request will be unchanged ifResourceQuotaOptionsV1Update.cpu_request_default_unset
is None or set tofalse
.cpu_request_default_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.cpu_request_default
. If this field is set totrue
, the existing default CPU request on containers in the pod is removed. If this field is set tofalse
, the existing default CPU request will be changed to the value specified inResourceQuotaOptionsV1Update.cpu_request_default
, if any. If None, the existing default CPU request will be changed to the value specified inResourceQuotaOptionsV1Update.cpu_request_default
, if any.storage_request_limit (
long
orNone
) – 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 ifResourceQuotaOptionsV1Update.storage_request_limit_unset
is set totrue
. If None, the existing storage request limit will be unchanged ifResourceQuotaOptionsV1Update.storage_request_limit_unset
is None or set tofalse
. the namespace.storage_request_limit_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.storage_request_limit
. If this field is set totrue
, the existing storage request limit will be reset. If this field is set tofalse
, the existing storage request limit will be changed to the value specified inResourceQuotaOptionsV1Update.storage_request_limit
, if any. If None, the existing storage request limit will be changed to the value specified inResourceQuotaOptionsV1Update.storage_request_limit
, if any.pod_count (
long
orNone
) – This represents the new value for ‘podCount’ option which is the maximum number of pods in the namespace. This field is ignored ifResourceQuotaOptionsV1Update.pod_count_unset
is set totrue
. If None, the existing ‘podCount’ limit will be unchanged ifResourceQuotaOptionsV1Update.pod_count_unset
is None or set tofalse
.pod_count_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.pod_count
. If this field is set totrue
, the existing ‘podCount’ limit on the namespace will be reset. If this field is set tofalse
, the existing CPU limit will be changed to the value specified inResourceQuotaOptionsV1Update.pod_count
, if any. If None, the existing ‘podCount’ limit will be changed to the value specified inResourceQuotaOptionsV1Update.pod_count
, if any.service_count (
long
orNone
) – This represents the new value for ‘serviceCount’ option which is the maximum number of services in the namespace. This field is ignored ifResourceQuotaOptionsV1Update.service_count_unset
is set totrue
. If None, the existing ‘serviceCount’ limit will be unchanged ifResourceQuotaOptionsV1Update.service_count_unset
is None or set tofalse
.service_count_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.service_count
. If this field is set totrue
, the existing ‘serviceCount’ limit on the namespace will be reset. If this field is set tofalse
, the existing service count limit will be changed to the value specified inResourceQuotaOptionsV1Update.service_count
, if any. If None, the existing ‘serviceCount’ limit will be changed to the value specified inResourceQuotaOptionsV1Update.service_count
, if any.deployment_count (
long
orNone
) – This represents the new value for ‘deploymentCount’ option which is the maximum number of deployments in the namespace. This field is ignored ifResourceQuotaOptionsV1Update.deployment_count_unset
is set totrue
. If None, the existing ‘deploymentCount’ limit will be unchanged ifResourceQuotaOptionsV1Update.deployment_count_unset
is None or set tofalse
.deployment_count_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.deployment_count
. If this field is set totrue
, the existing ‘deploymentCount’ limit on the namespace will be reset. If this field is set tofalse
, the existing deployment count limit will be changed to the value specified inResourceQuotaOptionsV1Update.deployment_count
, if any. If None, the existing ‘deploymentCount’ limit will be changed to the value specified inResourceQuotaOptionsV1Update.deployment_count
, if any.daemon_set_count (
long
orNone
) – This represents the new value for ‘daemonSetCount’ option which is the maximum number of DaemonSets in the namespace. This field is ignored ifResourceQuotaOptionsV1Update.daemon_set_count_unset
is set totrue
. If None, the existing ‘daemonSetCount’ limit will be unchanged ifResourceQuotaOptionsV1Update.daemon_set_count_unset
is None or set tofalse
.daemon_set_count_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.daemon_set_count
. If this field is set totrue
, the existing ‘daemonSetCount’ limit on the namespace will be reset. If this field is set tofalse
, the existing daemonset count limit will be changed to the value specified inResourceQuotaOptionsV1Update.daemon_set_count
, if any. If None, the existing ‘daemonSetCount’ limit will be changed to the value specified inResourceQuotaOptionsV1Update.daemon_set_count
, if any.replica_set_count (
long
orNone
) – This represents the new value for ‘replicaSetCount’ option which is the maximum number of ReplicaSets in the namespace. This field is ignored ifResourceQuotaOptionsV1Update.replica_set_count_unset
is set totrue
. If None, the existing ‘replicaSetCount’ limit will be unchanged ifResourceQuotaOptionsV1Update.replica_set_count_unset
is None or set tofalse
.replica_set_count_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.replica_set_count
. If this field is set totrue
, the existing ‘replicaSetCount’ limit on the namespace will be reset. If this field is set tofalse
, the existing replicaset count limit will be changed to the value specified inResourceQuotaOptionsV1Update.replica_set_count
, if any. If None, the existing ‘replicaSetCount’ limit will be changed to the value specified inResourceQuotaOptionsV1Update.replica_set_count
, if any.replication_controller_count (
long
orNone
) – This represents the new value for ‘replicationControllerCount’ option which is the maximum number of ReplicationControllers in the namespace. This field is ignored ifResourceQuotaOptionsV1Update.replication_controller_count_unset
is set totrue
. If None, the existing ‘replicationControllerCount’ limit will be unchanged ifResourceQuotaOptionsV1Update.replication_controller_count_unset
is None or set tofalse
.replication_controller_count_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.replication_controller_count
. If this field is set totrue
, the existing ‘replicationControllerCount’ limit on the namespace will be reset. If this field is set tofalse
, the existing replicationcontroller count limit will be changed to the value specified inResourceQuotaOptionsV1Update.replication_controller_count
, if any. If None, the existing ‘replicationControllerCount’ limit will be changed to the value specified inResourceQuotaOptionsV1Update.replication_controller_count
, if any.stateful_set_count (
long
orNone
) – This represents the new value for ‘statefulSetCount’ option which is the maximum number of StatefulSets in the namespace. This field is ignored ifResourceQuotaOptionsV1Update.stateful_set_count_unset
is set totrue
. If None, the existing ‘statefulSetCount’ limit will be unchanged ifResourceQuotaOptionsV1Update.stateful_set_count_unset
is None or set tofalse
.stateful_set_count_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.stateful_set_count
. If this field is set totrue
, the existing ‘statefulSetCount’ limit on the namespace will be reset. If this field is set tofalse
, the existing statefulset count limit will be changed to the value specified inResourceQuotaOptionsV1Update.stateful_set_count
, if any. If None, the existing ‘statefulSetCount’ limit will be changed to the value specified inResourceQuotaOptionsV1Update.stateful_set_count
, if any.config_map_count (
long
orNone
) – This represents the new value for ‘configMapCount’ option which is the maximum number of ConfigMaps in the namespace. This field is ignored ifResourceQuotaOptionsV1Update.config_map_count_unset
is set totrue
. If None, the existing ‘configMapCount’ limit will be unchanged ifResourceQuotaOptionsV1Update.config_map_count_unset
is None or set tofalse
.config_map_count_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.config_map_count
. If this field is set totrue
, the existing ‘configMapCount’ limit on the namespace will be reset. If this field is set tofalse
, the existing configmap count limit will be changed to the value specified inResourceQuotaOptionsV1Update.config_map_count
, if any. If None, the existing ‘configMapCount’ limit will be changed to the value specified inResourceQuotaOptionsV1Update.config_map_count
, if any.secret_count (
long
orNone
) – This represents the new value for ‘secretCount’ option which is the maximum number of secrets in the namespace. This field is ignored ifResourceQuotaOptionsV1Update.secret_count_unset
is set totrue
. If None, the existing ‘secretCount’ limit will be unchanged ifResourceQuotaOptionsV1Update.secret_count_unset
is None or set tofalse
.secret_count_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.secret_count
. If this field is set totrue
, the existing ‘secretCount’ limit on the namespace will be reset. If this field is set tofalse
, the existing secret count limit will be changed to the value specified inResourceQuotaOptionsV1Update.secret_count
, if any. If None, the existing ‘secretCount’ limit will be changed to the value specified inResourceQuotaOptionsV1Update.secret_count
, if any.persistent_volume_claim_count (
long
orNone
) – This represents the new value for ‘persistentVolumeClaimCount’ option which is the maximum number of PersistentVolumeClaims in the namespace. This field is ignored ifResourceQuotaOptionsV1Update.persistent_volume_claim_count_unset
is set totrue
. If None, the existing ‘persistentVolumeClaimCount’ limit will be unchanged ifResourceQuotaOptionsV1Update.persistent_volume_claim_count_unset
is None or set tofalse
.persistent_volume_claim_count_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.persistent_volume_claim_count
. If this field is set totrue
, the existing ‘persistentVolumeClaimCount’ limit on the namespace will be reset. If this field is set tofalse
, the existing replicationcontroller count limit will be changed to the value specified inResourceQuotaOptionsV1Update.persistent_volume_claim_count
, if any. If None, the existing ‘persistentVolumeClaimCount’ limit will be changed to the value specified inResourceQuotaOptionsV1Update.persistent_volume_claim_count
, if any.job_count (
long
orNone
) – This represents the new value for ‘jobCount’ option which is the maximum number of jobs in the namespace. This field is ignored ifResourceQuotaOptionsV1Update.job_count_unset
is set totrue
. If None, the existing ‘jobCount’ limit will be unchanged ifResourceQuotaOptionsV1Update.job_count_unset
is None or set tofalse
.job_count_unset (
bool
orNone
) – This represents the intent of the change toResourceQuotaOptionsV1Update.job_count
. If this field is set totrue
, the existing ‘jobCount’ limit on the namespace will be reset. If this field is set tofalse
, the existing secret count limit will be changed to the value specified inResourceQuotaOptionsV1Update.job_count
, if any. If None, the existing ‘jobCount’ limit will be changed to the value specified inResourceQuotaOptionsV1Update.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, warnings=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.See
LibraryItem.deploy()
andLibraryItem.filter()
.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.warnings (
list
ofWarningInfo
) – The list of warnings raised for the OVF certificate used in this OVF package deployment. Any warning that is not ignored by the client will cause the OVF package deployment to fail. This attribute was added in vSphere API 7.0.2.0. This attribute is set only if the certificate has warnings when retrieving information about an OVF package byLibraryItem.filter()
. When the attribute is set, theWarningInfo.ignored
attribute can be updated before the OVF parameter is passed toLibraryItem.deploy()
to deploy the 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.
See
LibraryItem.deploy()
andLibraryItem.filter()
.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
) – Abool
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()
andLibraryItem.filter()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
deployment_options (
list
ofDeploymentOption
) –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 theDeploymentOption
in the list in thedeploymentOptions
attribute with a matching value in theDeploymentOption.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 inDeploymentOptionParams.deployment_options
list
. This attribute is optional in the result when retrieving information about an OVF package. The value will be set only if it is specified with the optional ovf:default attribute.type (
str
) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.
-
class
com.vmware.vcenter.ovf_client.
DiskProvisioningType
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
DiskProvisioningType
class defines the virtual disk provisioning types that can be set for a disk on the target platform.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theDiskProvisioningType
instance.
-
eagerZeroedThick
= DiskProvisioningType(string='eagerZeroedThick')¶ An eager zeroed thick provisioned virtual disk has all space allocated and wiped clean of any previous contents on the physical media at creation time.
Disks specified as eager zeroed thick may take longer time to create than disks specified with the other disk provisioning types.
-
thick
= DiskProvisioningType(string='thick')¶ A thick provisioned virtual disk has all space allocated at creation time and the space is zeroed on demand as the space is used.
-
thin
= DiskProvisioningType(string='thin')¶ A thin provisioned virtual disk has space allocated and zeroed on demand as the space is used.
-
class
com.vmware.vcenter.ovf_client.
ExportFlag
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
ExportFlag
class provides methods for retrieving information about the export flags supported by the server. Export flags can be specified in aLibraryItem.CreateSpec
to customize an OVF export.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
Info
(option=None, description=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
ExportFlag.Info
class describes an export flag supported by the server.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
option (
str
) – The name of the export flag that is supported by the server.description (
com.vmware.vapi.std_client.LocalizableMessage
) – Localizable description of the export flag.
-
list
()¶ Returns information about the supported export flags by the server.
The supported flags are:
- PRESERVE_MAC
Include MAC addresses for network adapters.
- EXTRA_CONFIG
Include extra configuration in OVF export.
Future server versions might support additional flags.
- Return type
- Returns
A
list
of supported export flags.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
System.Read
.
-
class
com.vmware.vcenter.ovf_client.
ExtraConfig
(key=None, value=None, virtual_system_id=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
ExtraConfig
class contains the information about a vmw:ExtraConfig element which can be used to specify configuration settings that are transferred directly to the.vmx
file. The behavior of the vmw:ExtraConfig element is similar to theextraConfig
property of theVirtualMachineConfigSpec
object in the VMware vSphere API. Thus, the same restrictions apply, such as you cannot set values that could otherwise be set with other properties in theVirtualMachineConfigSpec
object. See the VMware vSphere API reference for details on this.vmw:ExtraConfig elements may occur as direct child elements of a VirtualHardwareSection, or as child elements of individual virtual hardware items.
See
LibraryItem.deploy()
andLibraryItem.filter()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
key (
str
) – The key of the ExtraConfig element. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.value (
str
) – The value of the ExtraConfig element. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.virtual_system_id (
str
) – The identifier of the virtual system containing the vmw:ExtraConfig element. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.
-
class
com.vmware.vcenter.ovf_client.
ExtraConfigParams
(extra_configs=None, exclude_keys=None, include_keys=None, type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
ExtraConfigParams
class contains the parameters with information about the vmw:ExtraConfig elements in an OVF package.vmw:ExtraConfig elements can be used to specify configuration settings that are transferred directly to the
.vmx
file.The behavior of the vmw:ExtraConfig element is similar to the
extraConfig
property of theVirtualMachineConfigSpec
object in the VMware vSphere API. Thus, the same restrictions apply, such as you cannot set values that could otherwise be set with other properties in theVirtualMachineConfigSpec
object. See the VMware vSphere API reference for details on this.See
LibraryItem.deploy()
andLibraryItem.filter()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
extra_configs (
list
ofExtraConfig
) –list
of vmw:ExtraConfig elements in the OVF package. This attribute is optional in the input parameters when deploying an OVF package. If None there are no extra configuration elements to use for this OVF package deployment. This attribute will always be present in the result when retrieving information about an OVF package. It will be an emptylist
if there are no extra configuration elements in the OVF package.exclude_keys (
list
ofstr
) –Specifies which extra configuration items in the
list
in theextraConfigs
field
should be ignored during deployment.If set, the given keys for extra configurations will be ignored during deployment. The key is defined in the
ExtraConfig.key
attribute. This attribute is optional in the input parameters when deploying an OVF package. It is an error to set both this andExtraConfigParams.include_keys
. This attribute is optional in the result when retrieving information about an OVF package. It is an error to set both this andExtraConfigParams.include_keys
.include_keys (
list
ofstr
) –Specifies which extra configuration items in the
list
in theextraConfigs
field
should be included during deployment.If set, all but the given keys for extra configurations will be ignored during deployment. The key is defined in the
ExtraConfig.key
attribute. This attribute is optional in the input parameters when deploying an OVF package. It is an error to set both this andExtraConfigParams.exclude_keys
. This attribute is optional in the result when retrieving information about an OVF package. It is an error to set both this andExtraConfigParams.exclude_keys
.type (
str
) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.
-
class
com.vmware.vcenter.ovf_client.
ImportFlag
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
ImportFlag
class provides methods for retrieving information about the import flags supported by the deployment platform. Import flags can be specified in aLibraryItem.ResourcePoolDeploymentSpec
to customize an OVF deployment.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
Info
(option=None, description=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
ImportFlag.Info
class describes an import flag supported by the deployment platform.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
option (
str
) – The name of the import flag that is supported by the deployment platform.description (
com.vmware.vapi.std_client.LocalizableMessage
) – Localizable description of the import flag.
-
list
(rp)¶ Returns information about the import flags supported by the deployment platform.
The supported flags are:
- LAX
Lax mode parsing of the OVF descriptor.
Future server versions might support additional flags.
- Parameters
rp (
str
) – The identifier of resource pool target for retrieving the import flag(s). The parameter must be an identifier for the resource type:ResourcePool
.- Return type
- Returns
A
list
of supported import flags.- Raise
com.vmware.vapi.std.errors_client.NotFound
If the resource pool associated withrp
does not exist.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
System.Read
.The resource
ResourcePool
referenced by the parameterrp
requiresSystem.Read
.
-
class
com.vmware.vcenter.ovf_client.
IpAllocationParams
(supported_allocation_scheme=None, supported_ip_allocation_policy=None, ip_allocation_policy=None, supported_ip_protocol=None, ip_protocol=None, type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
IpAllocationParams
class specifies how IP addresses are allocated to OVF properties. In particular, it informs the deployment platform whether the guest supports IPv4, IPv6, or both. It also specifies whether the IP addresses can be obtained through DHCP or through the properties provided in the OVF environment.Ovf Property elements are exposed to the guest software through the OVF environment. Each Property element exposed in the OVF environment shall be constructed from the value of the ovf:key attribute. A Property element contains a key/value pair, it may optionally specify type qualifiers using the ovf:qualifiers attribute with multiple qualifiers separated by commas.
The settings in
IpAllocationParams
class are global to a deployment. Thus, if a virtual machine is part of a virtual appliance, then its settings are ignored and the settings for the virtual appliance is used.This information is based on the vmw:IpAssignmentSection in OVF package.
See
LibraryItem.deploy()
andLibraryItem.filter()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
supported_allocation_scheme (
list
ofIpAllocationParams.IpAllocationScheme
) – Specifies the IP allocation schemes supported by the guest software. This attribute defines the valid values for the IP allocation policy. This setting is often configured by the virtual appliance template author or OVF package author to reflect what the guest software supports, and the IP allocation policy is configured at deployment time. SeeIpAllocationParams.ip_allocation_policy
. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.supported_ip_allocation_policy (
list
ofIpAllocationParams.IpAllocationPolicy
) – Specifies the IP allocation policies supported. The set of valid options for the policy is based on the capabilities of the virtual appliance software, as specified by theIpAllocationParams.supported_allocation_scheme
attribute. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.ip_allocation_policy (
IpAllocationParams.IpAllocationPolicy
) – Specifies how IP allocation is done through an IP Pool. This is typically specified by the deployer. This attribute is optional in the input parameters when deploying an OVF package. If None there is no IP allocation policy. This attribute will always be present in the result when retrieving information about an OVF package.supported_ip_protocol (
list
ofIpAllocationParams.IpProtocol
) – Specifies the IP protocols supported by the guest. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.ip_protocol (
IpAllocationParams.IpProtocol
) – Specifies the chosen IP protocol for this deployment. This must be one of the IP protocols supported by the guest software. SeeIpAllocationParams.supported_ip_protocol
. This attribute is optional in the input parameters when deploying an OVF package. If None there is no IP protocol chosen. This attribute will always be present in the result when retrieving information about an OVF package.type (
str
) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.
-
class
IpAllocationPolicy
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
IpAllocationParams.IpAllocationPolicy
class defines the possible IP allocation policy for a deployment.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theIpAllocationPolicy
instance.
-
DHCP
= IpAllocationPolicy(string='DHCP')¶ Specifies that DHCP will be used to allocate IP addresses.
-
STATIC_IPPOOL
= IpAllocationPolicy(string='STATIC_IPPOOL')¶ Specifies that IP addresses are allocated from the range managed by an IP pool. The IP addresses are allocated at first power-on, and remain allocated at power-off. This ensures that a virtual appliance gets a consistent IP for its life-time.
-
STATIC_MANUAL
= IpAllocationPolicy(string='STATIC_MANUAL')¶ Specifies that IP addresses are configured manually upon deployment, and will be kept until reconfigured or the virtual appliance destroyed. This ensures that a property gets a consistent IP for its lifetime.
-
TRANSIENT_IPPOOL
= IpAllocationPolicy(string='TRANSIENT_IPPOOL')¶ Specifies that IP addresses are allocated from an IP pool. The IP addresses are allocated when needed, typically at power-on, and deallocated during power-off. There is no guarantee that a property will receive same IP address when restarted.
-
class
IpAllocationScheme
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
IpAllocationParams.IpAllocationScheme
class defines the possible IP allocation schemes that can be supported by the guest software.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theIpAllocationScheme
instance.
-
DHCP
= IpAllocationScheme(string='DHCP')¶ It supports DHCP to acquire IP configuration.
-
OVF_ENVIRONMENT
= IpAllocationScheme(string='OVF_ENVIRONMENT')¶ It supports setting the IP configuration through the properties provided in the OVF environment.
-
class
IpProtocol
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
IpAllocationParams.IpProtocol
class defines the IP protocols supported by the guest software.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theIpProtocol
instance.
-
IPV4
= IpProtocol(string='IPV4')¶ It supports the IPv4 protocol.
-
IPV6
= IpProtocol(string='IPV6')¶ It supports the IPv6 protocol.
-
class
com.vmware.vcenter.ovf_client.
LibraryItem
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
LibraryItem
class provides methods to deploy virtual machines and virtual appliances from library items containing Open Virtualization Format (OVF) packages in content library, as well as methods to create library items in content library from virtual machines and virtual appliances.To deploy a virtual machine or a virtual appliance from a library item:
Create a
LibraryItem.DeploymentTarget
to specify the target deployment type and target deployment designation.Create a
LibraryItem.ResourcePoolDeploymentSpec
to specify the parameters for the target deployment.Use the
deploy
method with the created target and parameter specifications, along with the identifier of the specified source content library item. SeeLibraryItem.deploy()
.
To create a library item in content library from a virtual machine or virtual appliance:
Create a
LibraryItem.DeployableIdentity
to specify the source virtual machine or virtual appliance to be used as the OVF template source.Create a
LibraryItem.CreateTarget
to specify the target library and library item.Create a
LibraryItem.CreateSpec
to specify the settings for the OVF package to be created.Use the
create
method with the created target and parameter specifications, along with the specified source entity. SeeLibraryItem.create()
.
- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
CreateResult
(succeeded=None, ovf_library_item_id=None, error=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItem.CreateResult
class defines the result of thecreate
method. SeeLibraryItem.create()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
succeeded (
bool
) – Whether thecreate
method completed successfully.ovf_library_item_id (
str
orNone
) – Identifier of the created or updated library item. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.content.library.Item
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.content.library.Item
. If None, thecreate
method failed andLibraryItem.CreateResult.error
will describe the error(s) that caused the failure.error (
LibraryItem.ResultInfo
orNone
) – Errors, warnings, and informational messages produced by thecreate
method. If None, no errors, warnings, or informational messages were reported by thecreate
method.
-
class
CreateSpec
(name=None, description=None, flags=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItem.CreateSpec
class defines the information used to create or update a library item containing an OVF package.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
name (
str
orNone
) – Name to use in the OVF descriptor stored in the library item. If None, the server will use source’s current name.description (
str
orNone
) – Description to use in the OVF descriptor stored in the library item. If None, the server will use source’s current annotation.flags (
list
ofstr
orNone
) – Flags to use for OVF package creation. The supported flags can be obtained usingExportFlag.list()
. If None, no flags will be used.
-
class
CreateTarget
(library_id=None, library_item_id=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItem.CreateTarget
class specifies the target library item when capturing a virtual machine or virtual appliance as an OVF package in a library item in a content library. The target can be an existing library item, which will be updated, creating a new version, or it can be a newly created library item in a specified library. SeeLibraryItem.create()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
library_id (
str
orNone
) –Identifier of the library in which a new library item should be created. This attribute is not used if the
libraryItemId
attribute is specified. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.content.Library
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.content.Library
. This attribute is currently required.In the future, if None, the
libraryItemId
attribute must be specified.library_item_id (
str
orNone
) – Identifier of the library item that should be should be updated. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.content.library.Item
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.content.library.Item
. If None, a new library item will be created. ThelibraryId
attribute must be specified if this attribute isset
.
-
DEPLOYABLE
= ['VirtualMachine', 'VirtualApp']¶ The types of resources that can be created by deploying an OVF package and can be captured to create a library item using the
LibraryItem
class.
-
class
DeployableIdentity
(type=None, id=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItem.DeployableIdentity
class describes the resource created by a deployment, or the source resource from which library item can be created, by specifying its resource type and resource identifier.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
type (
str
) – Type of the deployable resource. When clients pass a value of this class as a parameter, the attribute must be one ofVirtualMachine
orVirtualApp
. When methods return a value of this class as a return value, the attribute will be one ofVirtualMachine
orVirtualApp
.id (
str
) – Identifier of the deployable resource. When clients pass a value of this class as a parameter, the attribute must be an identifier for one of these resource types:null
ornull
. When methods return a value of this class as a return value, the attribute will be an identifier for one of these resource types:null
ornull
.
-
class
DeploymentResult
(succeeded=None, resource_id=None, error=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItem.DeploymentResult
class defines the result of thedeploy
method. SeeLibraryItem.deploy()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
succeeded (
bool
) – Whether thedeploy
method completed successfully.resource_id (
LibraryItem.DeployableIdentity
orNone
) – Identifier of the deployed resource entity. If None, thedeploy
method failed andLibraryItem.DeploymentResult.error
will describe the error(s) that caused the failure.error (
LibraryItem.ResultInfo
orNone
) – Errors, warnings, and informational messages produced by thedeploy
method. If None, no errors, warnings, or informational messages were reported by thedeploy
method.
-
class
DeploymentTarget
(resource_pool_id=None, host_id=None, folder_id=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItem.DeploymentTarget
class describes the location (target) where a virtual machine or virtual appliance should be deployed. It is used in thedeploy
andfilter
methods. SeeLibraryItem.deploy()
andLibraryItem.filter()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
resource_pool_id (
str
) – Identifier of the resource pool to which the virtual machine or virtual appliance should be attached. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:ResourcePool
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:ResourcePool
.host_id (
str
orNone
) – Identifier of the target host on which the virtual machine or virtual appliance will run. The target host must be a member of the cluster that contains the resource pool identified byLibraryItem.DeploymentTarget.resource_pool_id
. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:HostSystem
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:HostSystem
. If None, the server will automatically select a target host from the resource pool ifLibraryItem.DeploymentTarget.resource_pool_id
is a stand-alone host or a cluster with Distributed Resource Scheduling (DRS) enabled.folder_id (
str
orNone
) – Identifier of the vCenter folder that should contain the virtual machine or virtual appliance. The folder must be virtual machine folder. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:Folder
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Folder
. If None, the server will choose the deployment folder.
-
class
OvfSummary
(name=None, annotation=None, eulas=None, networks=None, storage_groups=None, additional_params=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItem.OvfSummary
class defines the result of thefilter
method. SeeLibraryItem.filter()
. The attributes in the class describe parameterizable information in the OVF descriptor, with respect to a deployment target, for thedeploy
method. SeeLibraryItem.deploy()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
name (
str
orNone
) – Default name for the virtual machine or virtual appliance. If None, the OVF descriptor did not specify a name.annotation (
str
orNone
) – Default annotation for the virtual machine or virtual appliance. If None, the OVF descriptor did not specify an annotation.eulas (
list
ofstr
) – End User License Agreements specified in the OVF descriptor. All end user license agreements must be accepted in order for thedeploy
method to succeed. SeeLibraryItem.ResourcePoolDeploymentSpec.accept_all_eula
.networks (
list
ofstr
orNone
) – Section identifiers for sections of type ovf:NetworkSection in the OVF descriptor. These identifiers can be used as keys inLibraryItem.ResourcePoolDeploymentSpec.network_mappings
. If None, the OVF descriptor did not specify any networks.storage_groups (
list
ofstr
orNone
) – Section identifiers for sections of type vmw:StorageGroupSection in the OVF descriptor. These identifiers can be used as keys inLibraryItem.ResourcePoolDeploymentSpec.storage_mappings
. If None, the OVF descriptor did not specify any storage groups.additional_params (
list
ofvmware.vapi.struct.VapiStruct
orNone
) – Additional OVF parameters which can be specified for the deployment target. These OVF parameters can be inspected, optionally modified, and used as values inLibraryItem.ResourcePoolDeploymentSpec.additional_parameters
for thedeploy
method. When clients pass a value of this class as a parameter, the attribute must contain all the attributes defined inOvfParams
. When methods return a value of this class as a return value, the attribute will contain all the attributes defined inOvfParams
. If None, the OVF descriptor does not require addtional parameters or does not have additional parameters suitable for the deployment target.
-
class
ResourcePoolDeploymentSpec
(name=None, annotation=None, accept_all_eula=None, network_mappings=None, storage_mappings=None, storage_provisioning=None, storage_profile_id=None, locale=None, flags=None, additional_parameters=None, default_datastore_id=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItem.ResourcePoolDeploymentSpec
class defines the deployment parameters that can be specified for thedeploy
method where the deployment target is a resource pool. SeeLibraryItem.deploy()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
name (
str
orNone
) – Name assigned to the deployed target virtual machine or virtual appliance. If None, the server will use the name from the OVF package.annotation (
str
orNone
) – Annotation assigned to the deployed target virtual machine or virtual appliance. If None, the server will use the annotation from the OVF package.accept_all_eula (
bool
) – Whether to accept all End User License Agreements. SeeLibraryItem.OvfSummary.eulas
.network_mappings ((
dict
ofstr
andstr
) orNone
) – Specification of the target network to use for sections of type ovf:NetworkSection in the OVF descriptor. The key in thedict
is the section identifier of the ovf:NetworkSection section in the OVF descriptor and the value is the target network to be used for deployment. When clients pass a value of this class as a parameter, the value in the attributedict
must be an identifier for the resource type:Network
. When methods return a value of this class as a return value, the value in the attributedict
will be an identifier for the resource type:Network
. If None, the server will choose a network mapping.storage_mappings ((
dict
ofstr
andLibraryItem.StorageGroupMapping
) orNone
) – Specification of the target storage to use for sections of type vmw:StorageGroupSection in the OVF descriptor. The key in thedict
is the section identifier of the ovf:StorageGroupSection section in the OVF descriptor and the value is the target storage specification to be used for deployment. SeeLibraryItem.StorageGroupMapping
. If None, the server will choose a storage mapping.storage_provisioning (
DiskProvisioningType
orNone
) – Default storage provisioning type to use for all sections of type vmw:StorageSection in the OVF descriptor. If None, the server will choose the provisioning type.storage_profile_id (
str
orNone
) – Default storage profile to use for all sections of type vmw:StorageSection in the OVF descriptor. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:StorageProfile
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:StorageProfile
. If None, the server will choose the default profile.locale (
str
orNone
) – The locale to use for parsing the OVF descriptor. If None, the server locale will be used.flags (
list
ofstr
orNone
) – Flags to be use for deployment. The supported flag values can be obtained usingImportFlag.list()
. If None, no flags will be used.additional_parameters (
list
ofvmware.vapi.struct.VapiStruct
orNone
) –Additional OVF parameters that may be needed for the deployment. Additional OVF parameters may be required by the OVF descriptor of the OVF package in the library item. Examples of OVF parameters that can be specified through this attribute include, but are not limited to:
When clients pass a value of this class as a parameter, the attribute must contain all the attributes defined in
OvfParams
. When methods return a value of this class as a return value, the attribute will contain all the attributes defined inOvfParams
. If None, the server will choose default settings for all parameters necessary for thedeploy
method. SeeLibraryItem.deploy()
.default_datastore_id (
str
orNone
) – Default datastore to use for all sections of type vmw:StorageSection in the OVF descriptor. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:Datastore
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Datastore
. If None, the server will choose the default datastore.
-
class
ResultInfo
(errors=None, warnings=None, information=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItem.ResultInfo
class defines the information returned along with the result of acreate
ordeploy
method to describe errors, warnings, and informational messages produced by the server.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
errors (
list
ofOvfError
) – Errors reported by thecreate
ordeploy
method. These errors would have prevented thecreate
ordeploy
method from completing successfully.warnings (
list
ofOvfWarning
) – Warnings reported by thecreate
ordeploy
method. These warnings would not have prevented thecreate
ordeploy
method from completing successfully, but there might be issues that warrant attention.information (
list
ofOvfInfo
) – Information messages reported by thecreate
ordeploy
method. For example, a non-required parameter was ignored.
-
class
StorageGroupMapping
(type=None, datastore_id=None, storage_profile_id=None, provisioning=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItem.StorageGroupMapping
class defines the storage deployment target and storage provisioning type for a section of type vmw:StorageGroupSection in the OVF descriptor.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
type (
LibraryItem.StorageGroupMapping.Type
) – Type of storage deployment target to use for the vmw:StorageGroupSection section. The specified value must beLibraryItem.StorageGroupMapping.Type.DATASTORE
orLibraryItem.StorageGroupMapping.Type.STORAGE_PROFILE
.datastore_id (
str
) – Target datastore to be used for the storage group. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:Datastore
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Datastore
. This attribute is optional and it is only relevant when the value oftype
isLibraryItem.StorageGroupMapping.Type.DATASTORE
.storage_profile_id (
str
) – Target storage profile to be used for the storage group. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:StorageProfile
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:StorageProfile
. This attribute is optional and it is only relevant when the value oftype
isLibraryItem.StorageGroupMapping.Type.STORAGE_PROFILE
.provisioning (
DiskProvisioningType
orNone
) – Target provisioning type to use for the storage group. If None,LibraryItem.ResourcePoolDeploymentSpec.storage_provisioning
will be used.
-
class
Type
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
LibraryItem.StorageGroupMapping.Type
class defines the supported types of storage targets for sections of type vmw:StorageGroupSection in the OVF descriptor.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theType
instance.
-
DATASTORE
= Type(string='DATASTORE')¶ Storage deployment target is a datastore.
-
STORAGE_PROFILE
= Type(string='STORAGE_PROFILE')¶ Storage deployment target is a storage profile.
-
create
(source, target, create_spec, client_token=None)¶ Creates a library item in content library from a virtual machine or virtual appliance.
This method creates a library item in content library whose content is an OVF package derived from a source virtual machine or virtual appliance, using the supplied create specification. The OVF package may be stored as in a newly created library item or in an in an existing library item. For an existing library item whose content is updated by this method, the original content is overwritten. Meta data such as name and description is not updated for the exisitng library item.
- Parameters
client_token (
str
orNone
) – Client-generated token used to retry a request if the client fails to get a response from the server. If the original request succeeded, the result of that request will be returned, otherwise the operation will be retried. If None, the server will create a token.source (
LibraryItem.DeployableIdentity
) – Identifier of the virtual machine or virtual appliance to use as the source.target (
LibraryItem.CreateTarget
) – Specification of the target content library and library item.create_spec (
LibraryItem.CreateSpec
) – Information used to create the OVF package from the source virtual machine or virtual appliance.
- Return type
- Returns
Information about the success or failure of the method, along with the details of the result or failure.
- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
ifcreate_spec
contains invalid arguments.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
ifsource
describes an unexpected resource type.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the virtual machine or virtual appliance specified bysource
does not exist.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the library or library item specified bytarget
does not exist.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the operation cannot be performed because of the specified virtual machine or virtual appliance’s current state. For example, if the virtual machine configuration information is not available, or if the virtual appliance is running.- Raise
com.vmware.vapi.std.errors_client.ResourceInaccessible
if there was an error accessing a file from the source virtual machine or virtual appliance.- Raise
com.vmware.vapi.std.errors_client.ResourceBusy
if the specified virtual machine or virtual appliance is busy.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
System.Read
.The resource
null
ornull
referenced by the attributeLibraryItem.DeployableIdentity.id
requiresVApp.Export
.The resource
com.vmware.content.Library
referenced by the attributeLibraryItem.CreateTarget.library_id
requiresContentLibrary.AddLibraryItem
.The resource
com.vmware.content.library.Item
referenced by the attributeLibraryItem.CreateTarget.library_item_id
requiresSystem.Read
.
-
deploy
(ovf_library_item_id, target, deployment_spec, client_token=None)¶ Deploys an OVF package stored in content library to a newly created virtual machine or virtual appliance.
This method deploys an OVF package which is stored in the library item specified by
ovf_library_item_id
. It uses the deployment specification indeployment_spec
to deploy the OVF package to the location specified bytarget
.- Parameters
client_token (
str
orNone
) – Client-generated token used to retry a request if the client fails to get a response from the server. If the original request succeeded, the result of that request will be returned, otherwise the operation will be retried. If None, the server will create a token.ovf_library_item_id (
str
) – Identifier of the content library item containing the OVF package to be deployed. The parameter must be an identifier for the resource type:com.vmware.content.library.Item
.target (
LibraryItem.DeploymentTarget
) – Specification of the deployment target.deployment_spec (
LibraryItem.ResourcePoolDeploymentSpec
) – Specification of how the OVF package should be deployed to the target.
- Return type
- Returns
Information about the success or failure of the method, along with the details of the result or failure.
- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
iftarget
contains invalid arguments.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
ifdeployment_spec
contains invalid arguments or has attributes that are inconsistent withtarget
.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the library item specified byovf_library_item_id
does not exist.- Raise
com.vmware.vapi.std.errors_client.NotFound
if any resource specified by a attribute of theLibraryItem.DeploymentTarget
class, specified bytarget
, does not exist.- Raise
com.vmware.vapi.std.errors_client.ResourceInaccessible
if there was an error accessing the OVF package stored in the library item specified byovf_library_item_id
.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows :
Method execution requires VirtualMachine.Config.AddNewDisk if the OVF descriptor has a disk drive (type 17) section.
Method execution requires VirtualMachine.Config.AdvancedConfig if the OVF descriptor has an ExtraConfig section.
Method execution requires Extension.Register for specified resource group if the OVF descriptor has a vServiceDependency section.
Method execution requires Network.Assign for target network if specified.
Method execution requires Datastore.AllocateSpace for target datastore if specified.
- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
System.Read
.The resource
com.vmware.content.library.Item
referenced by the parameterovf_library_item_id
requiresSystem.Read
.The resource
HostSystem
referenced by the attributeLibraryItem.DeploymentTarget.host_id
requiresSystem.Read
.The resource
Network
referenced by thedict
value of attributeLibraryItem.ResourcePoolDeploymentSpec.network_mappings
requiresSystem.Read
.The resource
StorageProfile
referenced by the attributeLibraryItem.ResourcePoolDeploymentSpec.storage_profile_id
requiresSystem.Read
.The resource
Datastore
referenced by the attributeLibraryItem.ResourcePoolDeploymentSpec.default_datastore_id
requiresSystem.Read
.The resource
ResourcePool
referenced by the attributeLibraryItem.DeploymentTarget.resource_pool_id
requiresVApp.Import
.The resource
Folder
referenced by the attributeLibraryItem.DeploymentTarget.folder_id
requiresVApp.Import
.
-
filter
(ovf_library_item_id, target)¶ Queries an OVF package stored in content library to retrieve information to use when deploying the package. See
LibraryItem.deploy()
.This method retrieves information from the descriptor of the OVF package stored in the library item specified by
ovf_library_item_id
. The information returned by the method can be used to populate the deployment specification (seeLibraryItem.ResourcePoolDeploymentSpec
when deploying the OVF package to the deployment target specified bytarget
.- Parameters
ovf_library_item_id (
str
) – Identifier of the content library item containing the OVF package to query. The parameter must be an identifier for the resource type:com.vmware.content.library.Item
.target (
LibraryItem.DeploymentTarget
) – Specification of the deployment target.
- Return type
- Returns
Information that can be used to populate the deployment specification (see
LibraryItem.ResourcePoolDeploymentSpec
) when deploying the OVF package to the deployment target specified bytarget
.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
iftarget
contains invalid arguments.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the library item specified byovf_library_item_id
does not exist.- Raise
com.vmware.vapi.std.errors_client.NotFound
if any resource specified by a attribute of theLibraryItem.DeploymentTarget
class, specified bytarget
, does not exist.- Raise
com.vmware.vapi.std.errors_client.ResourceInaccessible
if there was an error accessing the OVF package at the specifiedovf_library_item_id
.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
System.Read
.The resource
com.vmware.content.library.Item
referenced by the parameterovf_library_item_id
requiresSystem.Read
.The resource
ResourcePool
referenced by the attributeLibraryItem.DeploymentTarget.resource_pool_id
requiresSystem.Read
.The resource
HostSystem
referenced by the attributeLibraryItem.DeploymentTarget.host_id
requiresSystem.Read
.The resource
Folder
referenced by the attributeLibraryItem.DeploymentTarget.folder_id
requiresSystem.Read
.
-
class
com.vmware.vcenter.ovf_client.
OvfError
(category=None, issues=None, name=None, value=None, message=None, error=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
OvfError
class describes an error related to accessing, validating, deploying, or exporting an OVF package.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
category (
OvfMessage.Category
) – The message category.issues (
list
ofParseIssue
) –list
of parse issues (seeParseIssue
). This attribute is optional and it is only relevant when the value ofcategory
isOvfMessage.Category.VALIDATION
.name (
str
) – The name of input parameter. This attribute is optional and it is only relevant when the value ofcategory
isOvfMessage.Category.INPUT
.value (
str
) – The value of input parameter. This attribute is optional and it is only relevant when the value ofcategory
isOvfMessage.Category.INPUT
.message (
com.vmware.vapi.std_client.LocalizableMessage
) – A localizable message. This attribute is optional and it is only relevant when the value ofcategory
isOvfMessage.Category.INPUT
.error (
vmware.vapi.struct.VapiStruct
) – Represents a servercom.vmware.vapi.std.errors_client.Error
. When clients pass a value of this class as a parameter, the attribute must contain all the attributes defined incom.vmware.vapi.std.errors_client.Error
. When methods return a value of this class as a return value, the attribute will contain all the attributes defined incom.vmware.vapi.std.errors_client.Error
. This attribute is optional and it is only relevant when the value ofcategory
isOvfMessage.Category.SERVER
.
-
class
com.vmware.vcenter.ovf_client.
OvfInfo
(messages=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
OvfInfo
class contains informational messages related to accessing, validating, deploying, or exporting an OVF package.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
messages (
list
ofcom.vmware.vapi.std_client.LocalizableMessage
) – Alist
of localizable messages (seecom.vmware.vapi.std_client.LocalizableMessage
).
-
class
com.vmware.vcenter.ovf_client.
OvfMessage
(category=None, issues=None, name=None, value=None, message=None, error=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
OvfMessage
class describes a base OVF handling error message related to accessing, validating, deploying, or exporting an OVF package.These messages fall into different categories defined in
OvfMessage.Category
:Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
category (
OvfMessage.Category
) – The message category.issues (
list
ofParseIssue
) –list
of parse issues (seeParseIssue
). This attribute is optional and it is only relevant when the value ofcategory
isOvfMessage.Category.VALIDATION
.name (
str
) – The name of input parameter. This attribute is optional and it is only relevant when the value ofcategory
isOvfMessage.Category.INPUT
.value (
str
) – The value of input parameter. This attribute is optional and it is only relevant when the value ofcategory
isOvfMessage.Category.INPUT
.message (
com.vmware.vapi.std_client.LocalizableMessage
) – A localizable message. This attribute is optional and it is only relevant when the value ofcategory
isOvfMessage.Category.INPUT
.error (
vmware.vapi.struct.VapiStruct
) – Represents a servercom.vmware.vapi.std.errors_client.Error
. When clients pass a value of this class as a parameter, the attribute must contain all the attributes defined incom.vmware.vapi.std.errors_client.Error
. When methods return a value of this class as a return value, the attribute will contain all the attributes defined incom.vmware.vapi.std.errors_client.Error
. This attribute is optional and it is only relevant when the value ofcategory
isOvfMessage.Category.SERVER
.
-
class
Category
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
OvfMessage.Category
class defines the categories of messages (seeOvfMessage
).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 theCategory
instance.
-
INPUT
= Category(string='INPUT')¶ The user provided input parameters are invalid.
-
SERVER
= Category(string='SERVER')¶ Server error.
-
VALIDATION
= Category(string='VALIDATION')¶ The OVF descriptor is invalid, for example, syntax errors or schema errors.
-
class
com.vmware.vcenter.ovf_client.
OvfParams
(type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
OvfParams
class defines the common attributes for all OVF deployment parameters. OVF parameters serve several purposes:Describe information about a given OVF package.
Describe default deployment configuration.
Describe possible deployment values based on the deployment environment.
Provide deployment-specific configuration.
Each OVF parameters class specifies a particular configurable aspect of OVF deployment. An aspect has both a query-model and a deploy-model. The query-model is used when the OVF package is queried, and the deploy-model is used when deploying an OVF package.
Most OVF parameter classes provide both informational and deployment parameters. However, some are purely informational (for example, download size) and some are purely deployment parameters (for example, the flag to indicate whether registration as a vCenter extension is accepted).
See
LibraryItem.deploy()
andLibraryItem.filter()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
type (
str
) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.
-
class
com.vmware.vcenter.ovf_client.
OvfWarning
(category=None, issues=None, name=None, value=None, message=None, error=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
OvfWarning
class describes a warning related to accessing, validating, deploying, or exporting an OVF package.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
category (
OvfMessage.Category
) – The message category.issues (
list
ofParseIssue
) –list
of parse issues (seeParseIssue
). This attribute is optional and it is only relevant when the value ofcategory
isOvfMessage.Category.VALIDATION
.name (
str
) – The name of input parameter. This attribute is optional and it is only relevant when the value ofcategory
isOvfMessage.Category.INPUT
.value (
str
) – The value of input parameter. This attribute is optional and it is only relevant when the value ofcategory
isOvfMessage.Category.INPUT
.message (
com.vmware.vapi.std_client.LocalizableMessage
) – A localizable message. This attribute is optional and it is only relevant when the value ofcategory
isOvfMessage.Category.INPUT
.error (
vmware.vapi.struct.VapiStruct
) – Represents a servercom.vmware.vapi.std.errors_client.Error
. When clients pass a value of this class as a parameter, the attribute must contain all the attributes defined incom.vmware.vapi.std.errors_client.Error
. When methods return a value of this class as a return value, the attribute will contain all the attributes defined incom.vmware.vapi.std.errors_client.Error
. This attribute is optional and it is only relevant when the value ofcategory
isOvfMessage.Category.SERVER
.
-
class
com.vmware.vcenter.ovf_client.
ParseIssue
(category=None, file=None, line_number=None, column_number=None, message=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
ParseIssue
class contains the information about the issue found when parsing an OVF package during deployment or exporting an OVF package including:Parsing and validation error on OVF descriptor (which is an XML document), manifest and certificate files.
OVF descriptor generating and device error.
Unexpected server error.
Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
category (
ParseIssue.Category
) – The category of the parse issue.file (
str
) – The name of the file in which the parse issue was found.line_number (
long
) – The line number of the line in the file (seeParseIssue.file
) where the parse issue was found (or -1 if not applicable).column_number (
long
) – The position in the line (seeParseIssue.line_number
) (or -1 if not applicable).message (
com.vmware.vapi.std_client.LocalizableMessage
) – A localizable message describing the parse issue.
-
class
Category
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
ParseIssue.Category
class defines the categories of issues that can be found when parsing files inside an OVF package (seeParseIssue
) including OVF descriptor (which is an XML document), manifest and certificate files, or exporting an OVF package.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theCategory
instance.
-
ATTRIBUTE_ILLEGAL
= Category(string='ATTRIBUTE_ILLEGAL')¶ Illegal attribute error. It indicates that an illegal attribute is set for an element in the OVF descriptor. For example, empty disks do not use format, parentRef, and populatedSize attributes, if these attributes are present in an empty disk element then will get this pasrse issue.
-
ATTRIBUTE_REQUIRED
= Category(string='ATTRIBUTE_REQUIRED')¶ Required attribute error. It indicates that a required attribute is missing from an element in the OVF descriptor.
-
ELEMENT_ILLEGAL
= Category(string='ELEMENT_ILLEGAL')¶ Illegal element error. It indicates that an element is present in a location which is not allowed, or found multiple elements but only one is allowed at the location in the OVF descriptor.
-
ELEMENT_REQUIRED
= Category(string='ELEMENT_REQUIRED')¶ Required element error. It indicates that a required element is missing from the OVF descriptor.
-
ELEMENT_UNKNOWN
= Category(string='ELEMENT_UNKNOWN')¶ Unknown element error. It indicates that an element is unsupported when parsing an OVF descriptor.
-
EXPORT_ERROR
= Category(string='EXPORT_ERROR')¶ Issue during OVF export, for example, malformed deviceId, controller not found, or file backing for a device not found.
-
GENERATE_ERROR
= Category(string='GENERATE_ERROR')¶ OVF descriptor (which is an XML document) generating error, for example, well-formedness errors as well as unexpected processing conditions.
-
INTERNAL_ERROR
= Category(string='INTERNAL_ERROR')¶ Server encountered an unexpected error which prevented it from fulfilling the request.
-
PARSE_ERROR
= Category(string='PARSE_ERROR')¶ OVF package parsing error, including:
OVF descriptor parsing errors, for example, syntax errors or schema errors.
Manifest file parsing and verification errors.
Certificate file parsing and verification errors.
-
SECTION_RESTRICTION
= Category(string='SECTION_RESTRICTION')¶ Section restriction error. It indicates that a section appears in place in the OVF descriptor where it is not allowed, a section appears fewer times than is required, or a section appears more times than is allowed.
-
SECTION_UNKNOWN
= Category(string='SECTION_UNKNOWN')¶ Section unknown error. It indicates that a section is unsupported when parsing an OVF descriptor.
-
VALIDATION_ERROR
= Category(string='VALIDATION_ERROR')¶ An issue with the manifest and signing.
-
VALUE_ILLEGAL
= Category(string='VALUE_ILLEGAL')¶ Illegal value error. For example, the value is malformed, not a number, or outside of the given range, and so on.
-
class
com.vmware.vcenter.ovf_client.
Property
(class_id=None, id=None, instance_id=None, category=None, ui_optional=None, label=None, description=None, type=None, value=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Property
class contains the information about a property in an OVF package.A property is uniquely identified by its [classid.]id[.instanceid] fully-qualified name (see
Property.class_id
,Property.id
, andProperty.instance_id
). If multiple properties in an OVF package have the same fully-qualified name, then the property is excluded and cannot be set. We do warn about this during import.See
LibraryItem.deploy()
andLibraryItem.filter()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
class_id (
str
) – The classId of this OVF property. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.id (
str
) – The identifier of this OVF property. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.instance_id (
str
) – The instanceId of this OVF property. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.category (
str
) – If this is set to a non-empty string, this property starts a new category. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package. If None, the property is in the same category as the previous item, otherwise, it starts a new category.ui_optional (
bool
) –Whether a category is UI optional. This is only used if this property starts a new category (see
Property.category
).The value is stored in an optional attribute vmw:uioptional to the ovf:Category element. The default value is false. If this value is true, the properties within this category are optional. The UI renders this as a group with a check box, and the group is grayed out until the check box is selected. When the check box is selected, the input values are read and used in deployment. If properties within the same category specify conflicting values the default is used. Only implemented in vSphere Web Client 5.1 and later as of Nov 2012. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package.
label (
str
) – The display name of this OVF property. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.description (
str
) – A description of this OVF property. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package.type (
str
) – The type of this OVF property. Refer to the configuration of a virtual appliance/virtual machine for the valid values. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.value (
str
) – The OVF property value. This contains the default value from ovf:defaultValue if ovf:value is not present when read. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.
-
class
com.vmware.vcenter.ovf_client.
PropertyParams
(properties=None, type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
PropertyParams
class contains alist
of OVF properties that can be configured when the OVF package is deployed.This is based on the ovf:ProductSection.
See
LibraryItem.deploy()
andLibraryItem.filter()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
properties (
list
ofProperty
) –list
of OVF properties. This attribute is optional in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.type (
str
) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.
-
class
com.vmware.vcenter.ovf_client.
ScaleOutGroup
(id=None, description=None, instance_count=None, minimum_instance_count=None, maximum_instance_count=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
ScaleOutGroup
class contains information about a scale-out group.It allows a virtual system collection to contain a set of children that are homogeneous with respect to a prototypical virtual system or virtual system collection. It shall cause the deployment function to replicate the prototype a number of times, thus allowing the number of instantiated virtual systems to be configured dynamically at deployment time.
This is based on the ovf2:ScaleOutSection.
See
LibraryItem.deploy()
andLibraryItem.filter()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
id (
str
) – The identifier of the scale-out group. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.description (
str
) – The description of the scale-out group. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.instance_count (
long
) – The scaling factor to use. It defines the number of replicas of the prototypical virtual system or virtual system collection. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.minimum_instance_count (
long
) – The minimum scaling factor. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package. This will be 1 if there is no explicit limit.maximum_instance_count (
long
) – The maximum scaling factor. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package. This will be None if there is no explicit limit.
-
class
com.vmware.vcenter.ovf_client.
ScaleOutParams
(groups=None, type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
ScaleOutParams
class contains information about the scale-out groups described in the OVF package.When deploying an OVF package, a deployment specific instance count can be specified (see
ScaleOutGroup.instance_count
.This is based on the ovf2:ScaleOutSection.
See
LibraryItem.deploy()
andLibraryItem.filter()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
groups (
list
ofScaleOutGroup
) – Thelist
of scale-out groups. This attribute is optional in the input parameters when deploying an OVF package. If None there are no scale-out groups. This attribute will always be present in the result when retrieving information about an OVF package.type (
str
) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.
-
class
com.vmware.vcenter.ovf_client.
SizeParams
(approximate_download_size=None, approximate_flat_deployment_size=None, approximate_sparse_deployment_size=None, variable_disk_size=None, type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
SizeParams
class contains estimates of the download and deployment sizes.This information is based on the file references and the ovf:DiskSection in the OVF descriptor.
See
LibraryItem.deploy()
andLibraryItem.filter()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
approximate_download_size (
long
) –A best guess as to the total amount of data that must be transferred to download the OVF package.
This may be inaccurate due to disk compression etc.
This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package. It will be None if there is insufficient information to provide a proper estimate.
approximate_flat_deployment_size (
long
) – A best guess as to the total amount of space required to deploy the OVF package if using flat disks. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package. It will be None if there is insufficient information to provide a proper estimate.approximate_sparse_deployment_size (
long
) – A best guess as to the total amount of space required to deploy the OVF package using sparse disks. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package. It will be None if there is insufficient information to provide a proper estimate.variable_disk_size (
bool
) –Whether the OVF uses variable disk sizes.
For empty disks, rather than specifying a fixed virtual disk capacity, the capacity may be given using a reference to a ovf:Property element in a ovf:ProductSection element in OVF package. This attribute is not used in the input parameters when deploying an OVF package. This attribute is optional in the result when retrieving information about an OVF package. If None or false, the OVF does not use variable disk sizes.
type (
str
) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.
-
class
com.vmware.vcenter.ovf_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
Initialize StubFactoryBase
- Parameters
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance
-
class
com.vmware.vcenter.ovf_client.
UnknownSection
(tag=None, info=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
UnknownSection
class contains information about an unknown section in an OVF package.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
tag (
str
) – A namespace-qualified tag in the form{ns}tag
.info (
str
) – The description of the Info element.
-
class
com.vmware.vcenter.ovf_client.
UnknownSectionParams
(unknown_sections=None, type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
UnknownSectionParams
class contains alist
of unknown, non-required sections.See
LibraryItem.deploy()
andLibraryItem.filter()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
unknown_sections (
list
ofUnknownSection
) –list
of unknown, non-required sections. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.type (
str
) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.
-
class
com.vmware.vcenter.ovf_client.
VcenterExtensionParams
(required=None, registration_accepted=None, type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
VcenterExtensionParams
class specifies that the OVF package should be registered as a vCenter extension. The virtual machine or virtual appliance will gain unrestricted access to the vCenter Server APIs. It must be connected to a network with connectivity to the vCenter server.See
LibraryItem.deploy()
andLibraryItem.filter()
.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
required (
bool
) – Whether registration as a vCenter extension is required. This attribute is not used in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.registration_accepted (
bool
) –Whether registration as a vCenter extension is accepted.
If registration as a vCenter extension is required (see
VcenterExtensionParams.required
), this must be set to true during deployment. Defaults to false when returned from server. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.type (
str
) – Unique identifier describing the type of the OVF parameters. The value is the name of the OVF parameters class. This attribute must be provided in the input parameters when deploying an OVF package. This attribute will always be present in the result when retrieving information about an OVF package.
-
class
com.vmware.vcenter.ovf_client.
WarningInfo
(type=None, message=None, ignored=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
WarningInfo
class provides information about the warnings which are raised during the OVF package deployment. This class was added in vSphere API 7.0.2.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
type (
WarningType
) – The warning type raised during the OVF package deployment. This attribute was added in vSphere API 7.0.2.0.message (
com.vmware.vapi.std_client.LocalizableMessage
) – The message specifying more details about the warning. This attribute was added in vSphere API 7.0.2.0.ignored (
bool
) –Indicates if this warning will be ignored when deploying the OVF package.
The value is set to be
false
when it is returned fromLibraryItem.filter()
, it should be updated to betrue
when callingLibraryItem.deploy()
if the warning can be ignored, otherwise the OVF package deployment will fail.. This attribute was added in vSphere API 7.0.2.0.
-
class
com.vmware.vcenter.ovf_client.
WarningType
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
WarningType
class defines the warnings which can be raised during the OVF package deployment. This enumeration was added in vSphere API 7.0.2.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 theWarningType
instance.
-
EXPIRED_CERTIFICATE
= WarningType(string='EXPIRED_CERTIFICATE')¶ The certificate used for signing the OVF package content is expired. This class attribute was added in vSphere API 7.0.2.0.
-
NOT_YET_VALID_CERTIFICATE
= WarningType(string='NOT_YET_VALID_CERTIFICATE')¶ The certificate used for signing the OVF package content is not yet valid. This class attribute was added in vSphere API 7.0.2.0.
-
SELF_SIGNED_CERTIFICATE
= WarningType(string='SELF_SIGNED_CERTIFICATE')¶ The certificate used for signing the OVF package content is self-signed. This class attribute was added in vSphere API 7.0.2.0.
-
UNTRUSTED_CERTIFICATE
= WarningType(string='UNTRUSTED_CERTIFICATE')¶ The certificate used for signing the OVF package content is not trusted. This class attribute was added in vSphere API 7.0.2.0.
com.vmware.vcenter.services_client module¶
-
class
com.vmware.vcenter.services_client.
Service
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
Service
class provides methods to manage a single/set of vCenter Server services. This class was added in vSphere API 6.7.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
Health
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Service.Health
class defines the possible values for health of a service. This enumeration was added in vSphere API 6.7.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theHealth
instance.
-
DEGRADED
= Health(string='DEGRADED')¶ Service is in degraded state, it is not functional. This class attribute was added in vSphere API 6.7.
-
HEALTHY
= Health(string='HEALTHY')¶ Service is in a healthy state and is fully functional. This class attribute was added in vSphere API 6.7.
-
HEALTHY_WITH_WARNINGS
= Health(string='HEALTHY_WITH_WARNINGS')¶ Service is healthy with warnings. This class attribute was added in vSphere API 6.7.
-
class
Info
(name_key=None, description_key=None, startup_type=None, state=None, health=None, health_messages=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Service.Info
class contains information about a service. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
name_key (
str
) – Service name key. Can be used to lookup resource bundle. This attribute was added in vSphere API 6.7.description_key (
str
) – Service description key. Can be used to lookup resource bundle. This attribute was added in vSphere API 6.7.startup_type (
Service.StartupType
) – Startup Type. This attribute was added in vSphere API 6.7.state (
Service.State
) – Running State. This attribute was added in vSphere API 6.7.health (
Service.Health
) – Health of service. This attribute was added in vSphere API 6.7. This attribute is optional and it is only relevant when the value ofstate
isService.State.STARTED
.health_messages (
list
ofcom.vmware.vapi.std_client.LocalizableMessage
) – Localizable messages associated with the health of the service. This attribute was added in vSphere API 6.7. This attribute is optional and it is only relevant when the value ofstate
isService.State.STARTED
.
-
class
StartupType
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Service.StartupType
class defines valid Startup Type for vCenter Server services. This enumeration was added in vSphere API 6.7.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theStartupType
instance.
-
AUTOMATIC
= StartupType(string='AUTOMATIC')¶ Service Startup type is Automatic, thus during starting all services or issuing explicit start on the service will start it. This class attribute was added in vSphere API 6.7.
-
DISABLED
= StartupType(string='DISABLED')¶ Service Startup type is Disabled, thus it will not start unless the startup type changes to manual or automatic. This class attribute was added in vSphere API 6.7.
-
MANUAL
= StartupType(string='MANUAL')¶ Service Startup type is Manual, thus issuing an explicit start on the service will start it. This class attribute was added in vSphere API 6.7.
-
class
State
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Service.State
class defines valid Run State for services. This enumeration was added in vSphere API 6.7.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theState
instance.
-
STARTED
= State(string='STARTED')¶ Service Run State is Started, it is fully functional. This class attribute was added in vSphere API 6.7.
-
STARTING
= State(string='STARTING')¶ Service Run State is Starting, it is still not functional. This class attribute was added in vSphere API 6.7.
-
STOPPED
= State(string='STOPPED')¶ Service Run State is Stopped. This class attribute was added in vSphere API 6.7.
-
STOPPING
= State(string='STOPPING')¶ Service Run State is Stopping, it is not functional. This class attribute was added in vSphere API 6.7.
-
class
UpdateSpec
(startup_type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Service.UpdateSpec
class describes the changes to be made to the configuration of the service. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
startup_type (
Service.StartupType
orNone
) – Startup Type. This attribute was added in vSphere API 6.7. If unspecified, leaves value unchanged.
-
get
(service)¶ Returns the state of a service. This method was added in vSphere API 6.7.
- Parameters
service (
str
) – identifier of the service whose state is being queried. The parameter must be an identifier for the resource type:com.vmware.vcenter.services.Service
.- Return type
- Returns
Service Info structure.
- Raise
com.vmware.vapi.std.errors_client.NotFound
if the service associated withservice
does not exist.- Raise
com.vmware.vapi.std.errors_client.Error
if any other error occurs during the execution of the operation.
-
list_details
()¶ Lists details of vCenter services. This method was added in vSphere API 6.7.
- Return type
dict
ofstr
andService.Info
- Returns
Map of service identifiers to service Info structures. The key in the return value
dict
will be an identifier for the resource type:com.vmware.vcenter.services.Service
.- Raise
com.vmware.vapi.std.errors_client.Error
if any error occurs during the execution of the operation.
-
restart
(service)¶ Restarts a service. This method was added in vSphere API 6.7.
- Parameters
service (
str
) – identifier of the service to restart The parameter must be an identifier for the resource type:com.vmware.vcenter.services.Service
.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the service associated withservice
does not exist.- Raise
com.vmware.vapi.std.errors_client.TimedOut
if any timeout occurs during the execution of the restart operation.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the operation is denied in the current state of the service. If a stop or start operation is in progress, issuing a restart operation will lead to this error.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if a restart operation is issued on a service which has startup typeService.StartupType.DISABLED
- Raise
com.vmware.vapi.std.errors_client.Error
if any other error occurs during the execution of the operation.
-
start
(service)¶ Starts a service. This method was added in vSphere API 6.7.
- Parameters
service (
str
) – identifier of the service to start The parameter must be an identifier for the resource type:com.vmware.vcenter.services.Service
.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the service associated withservice
does not exist.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the operation is denied in the current state of the service. If a stop or restart operation is in progress, the start operation will not be allowed.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if start operation is issued on a service which has startup typeService.StartupType.DISABLED
.- Raise
com.vmware.vapi.std.errors_client.TimedOut
if any timeout occurs during the execution of the start operation. Timeout occurs when the service takes longer than StartTimeout to start.- Raise
com.vmware.vapi.std.errors_client.Error
if any other error occurs during the execution of the operation.
-
stop
(service)¶ Stops a service. This method was added in vSphere API 6.7.
- Parameters
service (
str
) – identifier of the service to stop The parameter must be an identifier for the resource type:com.vmware.vcenter.services.Service
.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the service associated withservice
does not exist.- Raise
com.vmware.vapi.std.errors_client.Error
if any other error occurs during the execution of the operation.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the operation is denied in the current state of the service. If a stop operation is in progress, issuing another stop operation will lead to this error.
-
update
(service, spec)¶ Updates the properties of a service. This method was added in vSphere API 6.7.
- Parameters
service (
str
) – identifier of the service whose properties are being updated. The parameter must be an identifier for the resource type:com.vmware.vcenter.services.Service
.spec (
Service.UpdateSpec
) – Service Update specification.
- Raise
com.vmware.vapi.std.errors_client.NotFound
if the service associated withservice
does not exist.- Raise
com.vmware.vapi.std.errors_client.Error
if any other error occurs during the execution of the operation.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the operation is denied in the current state of the service. If a start, stop or restart operation is in progress, update operation will fail with this error.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if a request to set theService.UpdateSpec.startup_type
attribute ofspec
toService.StartupType.DISABLED
comes in for a service that is not inService.State.STOPPED
state.
-
class
com.vmware.vcenter.services_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
Initialize StubFactoryBase
- Parameters
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance
com.vmware.vcenter.storage_client module¶
-
class
com.vmware.vcenter.storage_client.
Policies
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
Policies
class provides methods for managing the storage policies. This class was added in vSphere API 6.7.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
CompatibilityInfo
(compatible_datastores=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Policies.CompatibilityInfo
class contains info about a list of datastores compatible with a specific storage policy. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
compatible_datastores (
list
ofPolicies.CompatibleDatastoreInfo
) – Info about a list of datastores compatible with a specific storage policy. This attribute was added in vSphere API 6.7.
-
class
CompatibleDatastoreInfo
(datastore=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Policies.CompatibleDatastoreInfo
class contains compatible datastore’s information. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
datastore (
str
) – Identifier of the datastore. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:Datastore
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Datastore
.
-
class
FilterSpec
(policies=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Policies.FilterSpec
class contains attributes used to filter the results when listing the storage policies (seePolicies.list()
). This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
policies (
set
ofstr
orNone
) – Identifiers of storage policies that can match the filter. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type:com.vmware.vcenter.StoragePolicy
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:com.vmware.vcenter.StoragePolicy
. If None or empty, storage policies with any identifiers match the filter.
-
RESOURCE_TYPE
= 'com.vmware.vcenter.StoragePolicy'¶ Resource type for vAPI metadata policy. This class attribute was added in vSphere API 6.7.
-
class
Summary
(policy=None, name=None, description=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Policies.Summary
class contains commonly used information about a storage policy. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
policy (
str
) – Identifier of the storage policy. This attribute was added in vSphere API 6.7. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.vcenter.StoragePolicy
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.vcenter.StoragePolicy
.name (
str
) – Name of the storage policy. This attribute was added in vSphere API 6.7.description (
str
) – Description of the storage policy. This attribute was added in vSphere API 6.7.
-
check_compatibility
(policy, datastores)¶ Returns datastore compatibility summary about a specific storage policy. This method was added in vSphere API 6.7.
- Parameters
policy (
str
) – The storage policy identifier The parameter must be an identifier for the resource type:com.vmware.vcenter.StoragePolicy
.datastores (
set
ofstr
) – Datastores used to check compatibility against a storage policy. The number of datastores is limited to 1024. The parameter must contain identifiers for the resource type:Datastore
.
- Return type
- Returns
datastore compatibility summary about a specific storage policy.
- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the storage policy specified does not exist.- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailable
if the system is unable to communicate with a service to complete the request.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.- Raise
com.vmware.vapi.std.errors_client.UnableToAllocateResource
if input more than 1024 datastores.
-
list
(filter=None)¶ Returns information about at most 1024 visible (subject to permission checks) storage solicies availabe in vCenter. These storage policies can be used for provisioning virtual machines or disks. This method was added in vSphere API 6.7.
- Parameters
filter (
Policies.FilterSpec
orNone
) – Specification of matching storage policies for which information should be returned. If None, the behavior is equivalent to aPolicies.FilterSpec
with all attributes None which means all storage policies match the filter- Return type
- Returns
Commonly used Information about the storage policies.
- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
if thePolicies.FilterSpec
contains a value that is not supported by the server.- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailable
if the system is unable to communicate with a service to complete the request.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.- Raise
com.vmware.vapi.std.errors_client.UnableToAllocateResource
if more than 1024 storage policies exist.
-
class
com.vmware.vcenter.storage_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
Initialize StubFactoryBase
- Parameters
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance
com.vmware.vcenter.system_config_client module¶
-
class
com.vmware.vcenter.system_config_client.
DeploymentType
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
DeploymentType
class provides methods to get/set the type of the appliance. This class was added in vSphere API 6.7.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
Info
(type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
DeploymentType.Info
class contains the fields used to get the appliance type. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
type (
com.vmware.vcenter.deployment_client.ApplianceType
) – The type of the appliance. This attribute was added in vSphere API 6.7.
-
class
ReconfigureSpec
(type=None, remote_psc=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
DeploymentType.ReconfigureSpec
class contains the fields used to get and set the appliance type. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
type (
com.vmware.vcenter.deployment_client.ApplianceType
) – The type of the appliance. This attribute was added in vSphere API 6.7.remote_psc (
com.vmware.vcenter.deployment_client.RemotePscSpec
orNone
) – External PSC to register with when reconfiguring a VCSA_EMBEDDED appliance to a VCSA_EXTERNAL appliance. This attribute was added in vSphere API 6.7. Only required when reconfiguring an VCSA_EMBEDDED node to a VCSA_EXTERNAL.
-
get
()¶ Get the type of the vCenter appliance. This method was added in vSphere API 6.7.
- Return type
- Returns
The type of the vCenter appliance.
- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the caller is not authenticated.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if appliance is not in CONFIGURED state.
-
reconfigure
(spec)¶ Reconfigure the type of the vCenter appliance. This method was added in vSphere API 6.7.
- Parameters
spec (
DeploymentType.ReconfigureSpec
) – ReconfigureSpec to set the appliance type.- Raise
com.vmware.vapi.std.errors_client.Unsupported
if the appliance is in CONFIGURED state and if not changing the type from VCSA_EMBEDDED to VCSA_EXTERNAL.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
if passed arguments are invalid.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the caller is not authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if external PSC credentials are not valid.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the appliance is not in INITIALIZED or CONFIGURED state.
-
class
com.vmware.vcenter.system_config_client.
PscRegistration
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
PscRegistration
class provides methods to get and set the PSC_EXTERNAL appliance a VCSA_EXTERNAL appliance is registered with. This class was added in vSphere API 6.7.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
Info
(address=None, https_port=None, sso_domain=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
PscRegistration.Info
class has fields to specify information about the PSC node. This class was added in vSphere API 6.7.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
address (
str
) – The IP address or DNS resolvable name of the PSC this appliance is registered with. This attribute was added in vSphere API 6.7.https_port (
long
) – The HTTPs port used by the external PSC. This attribute was added in vSphere API 6.7.sso_domain (
str
) – The Single Sign-On domain name of the external PSC. This attribute was added in vSphere API 6.7.
-
get
()¶ Get information of the PSC that this appliance is registered with. This method was added in vSphere API 6.7.
- Return type
- Returns
Info structure containing information about the external PSC node this appliance is registered with.
- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the caller is not authenticated.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the appliance is in NOT_INITIALIZED state.
-
repoint
(spec)¶ Repoint this vCenter Server appliance to a different external PSC. This method was added in vSphere API 6.7.
- Parameters
spec (
com.vmware.vcenter.deployment_client.RemotePscSpec
) – RemotePscSpec structure containing information about the external PSC node to repoint this vCenter Server appliance to.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the caller is not authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the passed external PSC credentials is invalid.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
if the passed external PSC is not a replicating with the current PSC this appliance is registered with.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
if passed arguments are invalid.- Raise
com.vmware.vapi.std.errors_client.Unsupported
if the current appliance is not of the type VCSA_EXTERNAL.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the appliance is NOT in CONFIGURED state.
-
class
com.vmware.vcenter.system_config_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
Initialize StubFactoryBase
- Parameters
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance
com.vmware.vcenter.tagging_client module¶
The com.vmware.vcenter.tagging_client
module provides classes for managing
tags.
-
class
com.vmware.vcenter.tagging_client.
Associations
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
Associations
class provides methods to list tag associations. This class was added in vSphere API 7.0.0.0.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
IterationSpec
(marker=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Associations.IterationSpec
class contains attributes used to break results into pages when listing tags associated to objects seeAssociations.list()
). 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
marker (
str
orNone
) – Marker is an opaque token that allows the caller to request the next page of tag associations. This attribute was added in vSphere API 7.0.0.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.vcenter.tagging.associations.Marker
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.vcenter.tagging.associations.Marker
. If None or empty, first page of tag associations will be returned.
-
class
LastIterationStatus
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The last status for the iterator. A field of this type is returned as part of the result and indicates to the caller of the API whether it can continue to make requests for more data.
The last status only reports on the state of the iteration at the time data was last returned. As a result, it not does guarantee if the next call will succeed in getting more data or not.
Failures to retrieve results will be returned as Error responses. These last statuses are only returned when the iterator is operating as expected.. This enumeration was added in vSphere API 7.0.0.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 theLastIterationStatus
instance.
-
END_OF_DATA
= LastIterationStatus(string='END_OF_DATA')¶ Iterator has finished iterating through its inventory. There are currently no more entities to return and the caller can terminate iteration. If the iterator returned some data, the marker may be set to allow the iterator to continue from where it left off when additional data does become available. This value is used to indicate that all available data has been returned by the iterator. This class attribute was added in vSphere API 7.0.0.0.
-
READY
= LastIterationStatus(string='READY')¶ Iterator has more data pending and is ready to provide it. The caller can request the next page of data at any time.
The number of results returned may be less than the usual size. In other words, the iterator may not fill the page. The iterator has returned at least 1 result.. This class attribute was added in vSphere API 7.0.0.0.
-
class
ListResult
(associations=None, marker=None, status=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Associations.ListResult
class contains the list of tag associations in a page, as well as related metadata fields. This class was added in vSphere API 7.0.0.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
associations (
list
ofAssociations.Summary
) – List of tag associations. This attribute was added in vSphere API 7.0.0.0.marker (
str
orNone
) – Marker is an opaque data structure that allows the caller to request the next page of tag associations. This attribute was added in vSphere API 7.0.0.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.vcenter.tagging.associations.Marker
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.vcenter.tagging.associations.Marker
. If None or empty, there are no more tag associations to request.status (
Associations.LastIterationStatus
) – The last status for the iterator that indicates whether any more results can be expected if the caller continues to make requests for more data using the iterator. This attribute was added in vSphere API 7.0.0.0.
-
class
Summary
(tag=None, object=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Associations.Summary
describes a tag association. This class was added in vSphere API 7.0.0.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
tag (
str
) – The identifier of a tag. This attribute was added in vSphere API 7.0.0.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.cis.tagging.Tag
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.cis.tagging.Tag
.object (
com.vmware.vapi.std_client.DynamicID
) – The identifier of an associated object. This attribute was added in vSphere API 7.0.0.0.
-
list
(iterate=None)¶ Returns tag associations that match the specified iteration spec. This method was added in vSphere API 7.0.0.0.
- Parameters
iterate (
Associations.IterationSpec
orNone
) – The specification of a page to be retrieved. If None, the first page will be retrieved.- Return type
- Returns
A page of the tag associations matching the iteration spec.
- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
ifAssociations.IterationSpec.marker
is not a marker returned from an earlier invocation of this {\@term operation).- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.
-
class
com.vmware.vcenter.tagging_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
Initialize StubFactoryBase
- Parameters
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance
com.vmware.vcenter.tokenservice_client module¶
The com.vmware.vcenter.tokenservice_client
module provides Token classes.
-
exception
com.vmware.vcenter.tokenservice_client.
Error
(messages=None, data=None)¶ Bases:
vmware.vapi.bindings.error.VapiError
The
Error
exception describes theattributes common to all standard exceptions.This exception serves two purposes:
It is the exception that clients in many programming languages can catch to handle all standard exceptions. Typically those clients will display one or more of the localizable messages from
Error.messages
to a human.It is the exception that methods can report when they need to report some exception, but the exception doesn’t fit into any other standard exception, and in fact the only reasonable way for a client to react to the exception is to display the message(s) to a human.
Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
messages (
list
ofcom.vmware.vapi.std_client.LocalizableMessage
) –Stack of one or more localizable messages for human exception consumers.
The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.
data (
vmware.vapi.struct.VapiStruct
orNone
) –Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.
Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute.
com.vmware.vapi.std_client.DynamicID
may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.
-
exception
com.vmware.vcenter.tokenservice_client.
InvalidGrant
(messages=None, data=None)¶ Bases:
com.vmware.vcenter.tokenservice_client.Error
The
InvalidGrant
exception indicates that provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
messages (
list
ofcom.vmware.vapi.std_client.LocalizableMessage
) –Stack of one or more localizable messages for human exception consumers.
The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.
data (
vmware.vapi.struct.VapiStruct
orNone
) –Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.
Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute.
com.vmware.vapi.std_client.DynamicID
may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.
-
exception
com.vmware.vcenter.tokenservice_client.
InvalidRequest
(messages=None, data=None)¶ Bases:
com.vmware.vcenter.tokenservice_client.Error
The
InvalidRequest
exception indicates thatTokenExchange.ExchangeSpec
is missing a required parameter, includes an unsupported parameter value (other thanTokenExchange.ExchangeSpec.grant_type
)Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
messages (
list
ofcom.vmware.vapi.std_client.LocalizableMessage
) –Stack of one or more localizable messages for human exception consumers.
The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.
data (
vmware.vapi.struct.VapiStruct
orNone
) –Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.
Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute.
com.vmware.vapi.std_client.DynamicID
may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.
-
exception
com.vmware.vcenter.tokenservice_client.
InvalidScope
(messages=None, data=None)¶ Bases:
com.vmware.vcenter.tokenservice_client.Error
The
InvalidScope
exception indicates requested scope is invalid, unknown, malformed, or exceeds the scope granted by the resource owner.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
messages (
list
ofcom.vmware.vapi.std_client.LocalizableMessage
) –Stack of one or more localizable messages for human exception consumers.
The message at the top of the stack (first in the list) describes the exception from the perspective of the method the client invoked. Each subsequent message in the stack describes the “cause” of the prior message.
data (
vmware.vapi.struct.VapiStruct
orNone
) –Data to facilitate clients responding to the method reporting a standard exception to indicating that it was unable to complete successfully.
Methods may provide data that clients can use when responding to exceptions. Since the data that clients need may be specific to the context of the method reporting the exception, different methods that report the same exception may provide different data in the exception. The documentation for each each method will describe what, if any, data it provides for each exception it reports. The ArgumentLocations, FileLocations, and TransientIndication classes are intended as possible values for this attribute.
com.vmware.vapi.std_client.DynamicID
may also be useful as a value for this attribute (although that is not its primary purpose). Some classes may provide their own specific classes for use as the value of this attribute when reporting exceptions from their methods. Some methods will not set this attribute when reporting exceptions.
-
class
com.vmware.vcenter.tokenservice_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
Initialize StubFactoryBase
- Parameters
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance
-
class
com.vmware.vcenter.tokenservice_client.
TokenExchange
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
TokenExchange
interface provides possibility to exchange between different tokens types. Implementation of “OAuth 2.0 Token Exchange” standard (https://tools.ietf.org/html/draft-ietf-oauth-token-exchange-12).This interface has been deprecated in the vSphere 7.0 U2 release. Use
com.vmware.vcenter.authentication.Token
instead.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
ACCESS_TOKEN_TYPE
= 'urn:ietf:params:oauth:token-type:access_token'¶ Class attribute indicates OAuth 2.0 access token type.
-
BEARER_TOKEN_METHOD_TYPE
= 'Bearer'¶ Class attribute indicates that the security token is a bearer token.
-
class
ExchangeSpec
(grant_type=None, resource=None, audience=None, scope=None, requested_token_type=None, subject_token=None, subject_token_type=None, actor_token=None, actor_token_type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
TokenExchange.ExchangeSpec
class contains arguments required for token exchange.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
grant_type (
str
) – The value ofTokenExchange.TOKEN_EXCHANGE_GRANT
indicates that a token exchange is being performed.resource (
str
orNone
) – Indicates the location of the target service or resource where the client intends to use the requested security token. if can be inferred from other arguments or not needed for specific case of exchange.audience (
str
orNone
) – The logical name of the target service where the client intends to use the requested security token. This serves a purpose similar to theTokenExchange.ExchangeSpec.resource
parameter, but with the client providing a logical name rather than a location. if can be inferred from other arguments or not needed for specific case of exchange.scope (
str
orNone
) – A list of space-delimited, case-sensitive strings, that allow the client to specify the desired scope of the requested security token in the context of the service or resource where the token will be used. if can be inferred from other arguments or not needed for specific case of exchange.requested_token_type (
str
orNone
) – An identifier for the type of the requested security token. If the requested type is unspecified, the issued token type is at the discretion of the server and may be dictated by knowledge of the requirements of the service or resource indicated by theTokenExchange.ExchangeSpec.resource
orTokenExchange.ExchangeSpec.audience
parameter. if can be inferred from other arguments or not needed for specific case of exchange.subject_token (
str
) – A security token that represents the identity of the party on behalf of whom exchange is being made. Typically, the subject of this token will be the subject of the security token issued. Token is base64-encoded.subject_token_type (
str
) – An identifier, that indicates the type of the security token in theTokenExchange.ExchangeSpec.subject_token
parameter.actor_token (
str
orNone
) – A security token that represents the identity of the acting party. Typically, this will be the party that is authorized to use the requested security token and act on behalf of the subject. if not needed for specific case of exchange.actor_token_type (
str
orNone
) – An identifier, that indicates the type of the security token in theTokenExchange.ExchangeSpec.actor_token
parameter. ifTokenExchange.ExchangeSpec.actor_token
parameter is not present.
-
ID_TOKEN_TYPE
= 'urn:ietf:params:oauth:token-type:id_token'¶ Class attribute indicates OIDC ID token type.
-
class
Info
(access_token=None, issued_token_type=None, token_type=None, expires_in=None, scope=None, refresh_token=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
TokenExchange.Info
class contains data that represents successful token exchange response.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
access_token (
str
) – The security token issued by the server in response to the token exchange request. Token is base64-encoded.issued_token_type (
str
) – An identifier, that indicates the type of the security token in theTokenExchange.Info.access_token
parameter.token_type (
str
) – A case-insensitive value specifying the method of using the access token issued.expires_in (
long
orNone
) – The validity lifetime, in seconds, of the token issued by the server. if not applicable for issued token.scope (
str
orNone
) – Scope of the issued security token. if the scope of the issued security token is identical to the scope requested by the client.refresh_token (
str
orNone
) – A refresh token can be issued in cases where the client of the token exchange needs the ability to access a resource even when the original credential is no longer valid. if not needed for specific case of exchange.
-
N_A_TOKEN_METHOD_TYPE
= 'N_A'¶ Class attribute indicates
TokenExchange.Info.token_type
identifier is not applicable in that context.
-
REFRESH_TOKEN_TYPE
= 'urn:ietf:params:oauth:token-type:refresh_token'¶ Class attribute indicates OAuth 2.0 refresh token type.
-
SAML1_TOKEN_TYPE
= 'urn:ietf:params:oauth:token-type:saml1'¶ Class attribute indicates base64-encoded SAML 1.1 token type.
-
SAML2_TOKEN_TYPE
= 'urn:ietf:params:oauth:token-type:saml2'¶ Class attribute indicates base64-encoded SAML 2.0 token type.
-
TOKEN_EXCHANGE_GRANT
= 'urn:ietf:params:oauth:grant-type:token-exchange'¶ Class attribute indicates that token exchange grant type.
-
exchange
(spec)¶ Exchanges incoming token based on the spec and current client authorization data.
This method has been deprecated in the vSphere 7.0 U2 release. Use
com.vmware.vcenter.authentication.Token#issue
instead.- Parameters
spec (
TokenExchange.ExchangeSpec
) –TokenExchange.ExchangeSpec
class contains arguments that define exchange process.- Return type
- Returns
TokenExchange.Info
class that contains new token.- Raise
InvalidGrant
provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.- Raise
InvalidScope
If the server is unwilling or unable to issue a token for all the target services indicated by theTokenExchange.ExchangeSpec.resource
orTokenExchange.ExchangeSpec.audience
parameters.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if authorization is not given to a caller.
com.vmware.vcenter.topology_client module¶
The com.vmware.vcenter.topology_client
module provides classes to retrieve
all vCenter and Platform Services Controller nodes and replication status in
the topology.
-
class
com.vmware.vcenter.topology_client.
Nodes
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
Nodes
interface provides methods to retrieve vCenter and Platform Services Controller nodes information in the topology. This class was added in vSphere API 6.7.2.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
ApplianceType
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Nodes.ApplianceType
class defines values for valid appliance types for the vCenter and Platform Services Controller node. SeeNodes.Info
. This enumeration was added in vSphere API 6.7.2.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theApplianceType
instance.
-
PSC_EXTERNAL
= ApplianceType(string='PSC_EXTERNAL')¶ An external Platform Services Controller. This class attribute was added in vSphere API 6.7.2.
-
VCSA_EMBEDDED
= ApplianceType(string='VCSA_EMBEDDED')¶ vCenter Server Appliance with an embedded Platform Services Controller. This class attribute was added in vSphere API 6.7.2.
-
VCSA_EXTERNAL
= ApplianceType(string='VCSA_EXTERNAL')¶ vCenter Server Appliance with an external Platform Services Controller. This class attribute was added in vSphere API 6.7.2.
-
class
FilterSpec
(types=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Nodes.FilterSpec
class contains attribute used to filter the results when listing vCenter and Platform Services Controller nodes (seeNodes.list()
). This class was added in vSphere API 6.7.2.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
types (
set
ofNodes.ApplianceType
orNone
) – Types of the appliance that a vCenter and Platform Services Controller node must be to match the filter (seeNodes.ApplianceType
. This attribute was added in vSphere API 6.7.2. If None or empty, node of any ApplianceType match the filter.
-
class
Info
(domain=None, type=None, replication_partners=None, client_affinity=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Nodes.Info
class contains vCenter or Platform Services Controller node details. This class was added in vSphere API 6.7.2.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
domain (
str
) – Domain name of the node. This attribute was added in vSphere API 6.7.2.type (
Nodes.ApplianceType
) – Appliance type of the node. This attribute was added in vSphere API 6.7.2.replication_partners (
list
ofstr
) – List of replication partners’ node identifiers. Identifiers can be either IP address or DNS resolvable name of the partner node. This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type:com.vmware.vcenter.VCenter.name
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:com.vmware.vcenter.VCenter.name
. This attribute is optional and it is only relevant when the value oftype
is one ofNodes.ApplianceType.VCSA_EMBEDDED
orNodes.ApplianceType.PSC_EXTERNAL
.client_affinity (
str
) – Identifier of the affinitized Platform Services Controller node. Identifier can be either IP address or DNS resolvable name of the affinitized node. This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.vcenter.VCenter.name
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.vcenter.VCenter.name
. This attribute is optional and it is only relevant when the value oftype
isNodes.ApplianceType.VCSA_EXTERNAL
.
-
class
Summary
(node=None, type=None, replication_partners=None, client_affinity=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Nodes.Summary
class contains commonly used information of vCenter or Platform Services Controller node. This class was added in vSphere API 6.7.2.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
node (
str
) – Identifier for the vCenter or Platform Services Controller node. Identifier can be either IP address or DNS resolvable name of the node. This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.vcenter.VCenter.name
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.vcenter.VCenter.name
.type (
Nodes.ApplianceType
) – Appliance type of the node. This attribute was added in vSphere API 6.7.2.replication_partners (
list
ofstr
) – List of replication partners’ node identifiers. Identifiers can be either IP address or DNS resolvable name of the partner node. This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type:com.vmware.vcenter.VCenter.name
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:com.vmware.vcenter.VCenter.name
. This attribute is optional and it is only relevant when the value oftype
is one ofNodes.ApplianceType.VCSA_EMBEDDED
orNodes.ApplianceType.PSC_EXTERNAL
.client_affinity (
str
) – Identifier of the affinitized Platform Services Controller node. Identifier can be either IP address or DNS resolvable name of the affinitized node. This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.vcenter.VCenter.name
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.vcenter.VCenter.name
. This attribute is optional and it is only relevant when the value oftype
isNodes.ApplianceType.VCSA_EXTERNAL
.
-
get
(node)¶ Retrieve details for a given identifier of the vCenter or Platform Services Controller node. This method was added in vSphere API 6.7.2.
- Parameters
node (
str
) – Identifier of the vCenter or Platform Services Controller node. Identifier can be either IP address or DNS resolvable name of the node. The parameter must be an identifier for the resource type:com.vmware.vcenter.VCenter.name
.- Return type
- Returns
vCenter or Platform Services Controller node details with replication partners and client affinity information as applicable. See
Nodes.Info
.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.- Raise
com.vmware.vapi.std.errors_client.NotFound
if a node doesn’t exist for given node identifier.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
System.Read
.
-
list
(filter=None)¶ Returns information about all vCenter and Platform Services Controller nodes matching the
Nodes.FilterSpec
. This method was added in vSphere API 6.7.2.- Parameters
filter (
Nodes.FilterSpec
orNone
) – Specification of matching vCenter and Platform Services Controller nodes for which information should be returned. If None, the behavior is equivalent to aNodes.FilterSpec
with all attributes None which means all nodes match the filter.- Return type
- Returns
commonly used information for all vCenter and Platform Services Controller nodes matching the
Nodes.FilterSpec
.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
if theNodes.FilterSpec.types
attribute contains a value that is not supported.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
System.Read
.
-
class
com.vmware.vcenter.topology_client.
ReplicationStatus
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
ReplicationStatus
interface provides methods to retrieve replication status information of vCenter and Platform Services Controller nodes of type VCSA_EMBEDDED/PSC_EXTERNAL (seeNodes.Info.type
). This class was added in vSphere API 6.7.2.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
FilterSpec
(nodes=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
ReplicationStatus.FilterSpec
class contains attribute used to filter the results when listing replication status for the vCenter and Platform Services Controller nodes (seeReplicationStatus.list()
) of type VCSA_EMBEDDED/PSC_EXTERNAL (seeNodes.Info.type
). This class was added in vSphere API 6.7.2.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
nodes (
set
ofstr
orNone
) – Identifier that a vCenter and Platform Services Controller node must have to match the filter. (seeReplicationStatus.Summary.node
). This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type:com.vmware.vcenter.VCenter.name
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:com.vmware.vcenter.VCenter.name
. If None or empty, all vCenter and Platform Services Controller nodes of type VCSA_EMBEDDED/PSC_EXTERNAL match the filter.
-
class
Summary
(node=None, replication_partner=None, partner_available=None, status_available=None, replicating=None, change_lag=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
ReplicationStatus.Summary
class contains replication information of partner vCenter or Platform Services Controller node of type VCSA_EMBEDDED/PSC_EXTERNAL (seeNodes.Info.type
). This class was added in vSphere API 6.7.2.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
node (
str
) – Identifier for the vCenter or Platform Services Controller node. Identifier can be either IP address or DNS resolvable name of the node. This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.vcenter.VCenter.name
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.vcenter.VCenter.name
.replication_partner (
str
) – Identifier for the vCenter or Platform Services Controller replication partner. Identifier can be either IP address or DNS resolvable name of the replication partner. This attribute was added in vSphere API 6.7.2. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.vcenter.VCenter.name
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.vcenter.VCenter.name
.partner_available (
bool
) – Indicates if the VMware Directory Service on partner is reachable or not. This attribute was added in vSphere API 6.7.2.status_available (
bool
) – Indicates if the replication status for the node with respect to replication partner can be retrieved or not. This attribute was added in vSphere API 6.7.2.replicating (
bool
orNone
) – Indicates if node is processing replication changes from the replication partner. This attribute was added in vSphere API 6.7.2. This attribute will be None if the partner host or replication status is not available, i.e, ifReplicationStatus.Summary.partner_available
orReplicationStatus.Summary.status_available
is false.change_lag (
long
orNone
) – Number of replication changes node is behind the replication partner. This attribute was added in vSphere API 6.7.2. This attribute will be None if the partner host or replication status is not available, i.e, ifReplicationStatus.Summary.partner_available
orReplicationStatus.Summary.status_available
is false.
-
list
(filter=None)¶ Returns the replication information of vCenter and Platform Services Controller nodes of type VCSA_EMBEDDED/PSC_EXTERNAL (see
Nodes.Info.type
) matching theReplicationStatus.FilterSpec
. This method was added in vSphere API 6.7.2.- Parameters
filter (
ReplicationStatus.FilterSpec
orNone
) – Specification of matching vCenter and Platform Services Controller nodes for which information should be returned. If None, the behavior is equivalent to aReplicationStatus.FilterSpec
with all attributes None which means all vCenter and Platform Services Controller nodes of type VCSA_EMBEDDED/PSC_EXTERNAL match the filter.- Return type
- Returns
Commonly used replication information about vCenter and Platform Services Controller nodes matching the
ReplicationStatus.FilterSpec
.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
if theReplicationStatus.FilterSpec.nodes
attribute contains a invalid value.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
System.Read
.
-
class
com.vmware.vcenter.topology_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
Initialize StubFactoryBase
- Parameters
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance
com.vmware.vcenter.trusted_infrastructure_client module¶
The com.vmware.vcenter.trusted_infrastructure_client
module provides
classes that enable a Trusted Infrastructure. They are responsible for ensuring
that infrastructure nodes are running trusted software and for releasing
encryption keys only to trusted infrastructure nodes.
-
class
com.vmware.vcenter.trusted_infrastructure_client.
NetworkAddress
(hostname=None, port=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
NetworkAddress
class contains an IP address or DNS resolvable name and a port on which a connection can be established. This class was added in vSphere API 7.0.0.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
hostname (
str
) – The IP address or DNS resolvable name of the service. This attribute was added in vSphere API 7.0.0.0.port (
long
orNone
) – The port of the service. This attribute was added in vSphere API 7.0.0.0. If None, port 443 will be used.
-
class
com.vmware.vcenter.trusted_infrastructure_client.
Principal
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
Principal
class contains information about the certificates which sign the tokens used by vCenter for authentication. This class was added in vSphere API 7.0.0.0.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
Info
(certificates=None, issuer=None, principal=None, name=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Principal.Info
class contains the information about the principal and certificates used by this vCenter to retrieve tokens. This class was added in vSphere API 7.0.0.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
certificates (
list
ofX509CertChain
) – The certificates used by the STS to sign tokens for this vCenter. This attribute was added in vSphere API 7.0.0.0.issuer (
str
) – The service which created and signed the security token. This attribute was added in vSphere API 7.0.0.0.principal (
StsPrincipal
) – The principal used by this vCenter instance to retrieve tokens. Currently this is the vCenter solution user. This attribute was added in vSphere API 7.0.0.0.name (
str
) – The user-friednly name of the vCenter. This attribute was added in vSphere API 7.0.0.0.
-
get
()¶ Returns information about the STS used by this vCenter instance. This method was added in vSphere API 7.0.0.0.
- Return type
- Returns
\@{link Info} a summary containing the certificates used to sign tokens and the solution user used to retrieve them.
- Raise
com.vmware.vapi.std.errors_client.Error
if there is a generic error.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
TrustedAdmin.ReadStsInfo
.
-
class
com.vmware.vcenter.trusted_infrastructure_client.
StsPrincipal
(id=None, type=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
StsPrincipal
class contains a IDM principal. This class was added in vSphere API 7.0.0.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
id (
StsPrincipalId
) – The principal’s ID. This attribute was added in vSphere API 7.0.0.0.type (
StsPrincipalType
) – The type of the principal (user or group). This attribute was added in vSphere API 7.0.0.0.
-
class
com.vmware.vcenter.trusted_infrastructure_client.
StsPrincipalId
(name=None, domain=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
StsPrincipalId
class contains an IDM principal ID. This class was added in vSphere API 7.0.0.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
name (
str
) – The principal’s username. This attribute was added in vSphere API 7.0.0.0.domain (
str
) – The principal’s domain. This attribute was added in vSphere API 7.0.0.0.
-
class
com.vmware.vcenter.trusted_infrastructure_client.
StsPrincipalType
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
StsPrincipalType
enum can be either users or groups. This enumeration was added in vSphere API 7.0.0.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 theStsPrincipalType
instance.
-
STS_GROUP
= StsPrincipalType(string='STS_GROUP')¶ The principal is a group. This class attribute was added in vSphere API 7.0.0.0.
-
STS_USER
= StsPrincipalType(string='STS_USER')¶ The principal is a user. This class attribute was added in vSphere API 7.0.0.0.
-
class
com.vmware.vcenter.trusted_infrastructure_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
Initialize StubFactoryBase
- Parameters
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance
-
class
com.vmware.vcenter.trusted_infrastructure_client.
TrustAuthorityClusters
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
TrustAuthorityClusters
class manages all the Trust Authority Components on each Trust Authority Host in the cluster. TheTrustAuthorityClusters
class transforms a ClusterComputeResource into Trust Authority Cluster and vice versa. 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
FilterSpec
(cluster=None, state=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
TrustAuthorityClusters.FilterSpec
class contains the data necessary for identifying aTrustAuthorityClusters
. 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
cluster (
set
ofstr
orNone
) – Identifies the cluster. 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 contain identifiers for the resource type:ClusterComputeResource
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:ClusterComputeResource
. cluster If {\@term.unset} return all Trust Authority Clusters.state (
set
ofTrustAuthorityClusters.State
orNone
) – The state of theTrustAuthorityClusters
. This attribute was added in vSphere API 7.0.0.0. state If {\@term.unset} return all Trust Authority Clusters.
-
class
Info
(cluster=None, state=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
TrustAuthorityClusters.Info
class contains the data necessary for retrieving theTrustAuthorityClusters
info. 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
cluster (
str
) – Identifies the cluster. 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:ClusterComputeResource
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:ClusterComputeResource
.state (
TrustAuthorityClusters.State
) – The state of the cluster. This attribute was added in vSphere API 7.0.0.0.
-
class
State
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
TrustAuthorityClusters.State
class defines the states of theTrustAuthorityClusters
. 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 theState
instance.
-
DISABLE
= State(string='DISABLE')¶ The
TrustAuthorityClusters
is disabled. This class attribute was added in vSphere API 7.0.0.0.
-
ENABLE
= State(string='ENABLE')¶ The
TrustAuthorityClusters
is enabled. This class attribute was added in vSphere API 7.0.0.0.
-
class
Summary
(cluster=None, state=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
TrustAuthorityClusters.Summary
class contains information aboutTrustAuthorityClusters
id and state. 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
cluster (
str
) – Identifies the cluster. 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:ClusterComputeResource
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:ClusterComputeResource
.state (
TrustAuthorityClusters.State
) – The state of theTrustAuthorityClusters
. This attribute was added in vSphere API 7.0.0.0.
-
class
UpdateSpec
(state=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
TrustAuthorityClusters.UpdateSpec
class contains the data necessary for update of aTrustAuthorityClusters
. 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
state (
TrustAuthorityClusters.State
orNone
) – The state of theTrustAuthorityClusters
. This attribute was added in vSphere API 7.0.0.0. state If {\@term.unset} no operation is performed.
-
get
(cluster)¶ Get the result of the last Update operation which matches the cluster id. This method was added in vSphere API 7.0.0.0.
- Parameters
cluster (
str
) – Cluster id. The parameter must be an identifier for the resource type:ClusterComputeResource
.- Return type
- Returns
The
TrustAuthorityClusters.Info
instance which contains information about the state of the cluster.- Raise
com.vmware.vapi.std.errors_client.Error
if there is a generic error.- Raise
com.vmware.vapi.std.errors_client.NotFound
ifcluster
doesn’t match to any ClusterComputeResource.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
TrustedAdmin.ReadTrustedHosts
.The resource
ClusterComputeResource
referenced by the parametercluster
requiresSystem.View
.
-
list
(spec=None)¶ Returns a list of clusters for this vCenter instance which matches the
TrustAuthorityClusters.FilterSpec
. This method was added in vSphere API 7.0.0.0.- Parameters
spec (
TrustAuthorityClusters.FilterSpec
orNone
) – Return only clusters matching the specified filters. If {\@term.unset} return all clusters.- Return type
- Returns
List of
TrustAuthorityClusters.Summary
for aTrustAuthorityClusters
.- Raise
com.vmware.vapi.std.errors_client.Error
if there is a generic error.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
TrustedAdmin.ReadTrustedHosts
.The resource
ClusterComputeResource
referenced by the attributeTrustAuthorityClusters.FilterSpec.cluster
requiresSystem.View
.
-
update_task
(cluster, spec)¶ Updates the state of a cluster. This method was added in vSphere API 7.0.0.0.
- Parameters
cluster (
str
) – Cluster id. The parameter must be an identifier for the resource type:ClusterComputeResource
.spec (
TrustAuthorityClusters.UpdateSpec
) – The specification for update of a cluster.
- Raise
com.vmware.vapi.std.errors_client.Error
if there is a generic error.- Raise
com.vmware.vapi.std.errors_client.NotFound
ifspec
doesn’t match to any cluster compute resource.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.
-
class
com.vmware.vcenter.trusted_infrastructure_client.
X509CertChain
(cert_chain=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
X509CertChain
class contains x509 certificate chain. This class was added in vSphere API 7.0.0.0.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
cert_chain (
list
ofstr
) – Certificate chain in base64 format. This attribute was added in vSphere API 7.0.0.0.
com.vmware.vcenter.vcha_client module¶
The com.vmware.vcenter.vcha_client
module provides classes for deploying
and monitoring a vCenter High Availability (VCHA) Cluster.
-
class
com.vmware.vcenter.vcha_client.
CertificateInfo
(ssl_thumbprint=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
CertificateInfo
Class contains information about the SSL certificate for a management vCenter server. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
ssl_thumbprint (
str
) – The SHA-256 thumbprint of the SSL certificate for a management vCenter server. This attribute was added in vSphere API 6.7.1.
-
class
com.vmware.vcenter.vcha_client.
Cluster
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
Cluster
class provides methods to deploy and undeploy a vCenter High Availability (VCHA) cluster, failover from the active VCHA node to the passive VCHA node, and retrieve the status of the VCHA cluster. This class was added in vSphere API 6.7.1.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
ActiveSpec
(ha_network_type=None, ha_network=None, ha_ip=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Cluster.ActiveSpec
class contains the deploy specification for the Active Node of the VCHA cluster. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
ha_network_type (
NetworkType
orNone
) – The type of the Network object used by the HA network. If theCluster.ActiveSpec.ha_network
attribute is set, then theCluster.ActiveSpec.ha_network_type
field must be set. If theCluster.ActiveSpec.ha_network
attribute is None, then theCluster.ActiveSpec.ha_network_type
attribute is ignored. This attribute was added in vSphere API 6.7.1. If None and theCluster.ActiveSpec.ha_network
attribute is unset, then the second NIC is assumed to be already configured. If None and theCluster.ActiveSpec.ha_network
attribute is set, then an error is reported.ha_network (
str
orNone
) – The identifier of the Network object used for the HA network. If theCluster.ActiveSpec.ha_network
attribute is set, then theCluster.ActiveSpec.ha_network_type
attribute must be set. If theCluster.ActiveSpec.ha_network
attribute is None, then theCluster.ActiveSpec.ha_network_type
attribute is ignored. This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:Network:VCenter
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Network:VCenter
. If None and theCluster.ActiveSpec.ha_network_type
attribute is unset, then the second NIC is assumed to be already configured. If None and theCluster.ActiveSpec.ha_network
attribute is set, then an error is reported.ha_ip (
IpSpec
) – IP specification for the HA network. This attribute was added in vSphere API 6.7.1.
-
class
ClusterMode
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Cluster.ClusterMode
class defines the possible modes for a VCHA Cluster. This enumeration was added in vSphere API 6.7.1.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theClusterMode
instance.
-
DISABLED
= ClusterMode(string='DISABLED')¶ VCHA Cluster is disabled. State replication between the Active and Passive node is disabled and automatic failover is not allowed. This class attribute was added in vSphere API 6.7.1.
-
ENABLED
= ClusterMode(string='ENABLED')¶ VCHA Cluster is enabled. State replication between the Active and Passive node is enabled and automatic failover is allowed. This class attribute was added in vSphere API 6.7.1.
-
MAINTENANCE
= ClusterMode(string='MAINTENANCE')¶ VCHA Cluster is in maintenance mode. State replication between the Active and Passive node is enabled but automatic failover is not allowed. This class attribute was added in vSphere API 6.7.1.
-
class
ClusterState
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Cluster.ClusterState
class defines the possible for a VCHA Cluster. This enumeration was added in vSphere API 6.7.1.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theClusterState
instance.
-
DEGRADED
= ClusterState(string='DEGRADED')¶ A VCHA Cluster is said to be in a degraded state for either or all of the following reasons:
There is a node loss.
State replication between the Active and Passive node fails.
. This class attribute was added in vSphere API 6.7.1.
-
HEALTHY
= ClusterState(string='HEALTHY')¶ All three nodes in a VCHA Cluster are healthy and connected. State replication between Active and Passive node is working and both nodes are in sync. This class attribute was added in vSphere API 6.7.1.
-
ISOLATED
= ClusterState(string='ISOLATED')¶ All three nodes are isolated from each other. This class attribute was added in vSphere API 6.7.1.
-
class
ConfigState
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Cluster.ConfigState
class defines the VCHA configuration state. This enumeration was added in vSphere API 6.7.1.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theConfigState
instance.
-
CONFIGURED
= ConfigState(string='CONFIGURED')¶ VCHA cluster is configured. This class attribute was added in vSphere API 6.7.1.
-
INVALID
= ConfigState(string='INVALID')¶ VCHA cluster is in an invalid/dirty state. This class attribute was added in vSphere API 6.7.1.
-
NOTCONFIGURED
= ConfigState(string='NOTCONFIGURED')¶ VCHA cluster is not configured. This class attribute was added in vSphere API 6.7.1.
-
PREPARED
= ConfigState(string='PREPARED')¶ vCenter server appliance has been prepared for VCHA cluster configuration. This class attribute was added in vSphere API 6.7.1.
-
class
DeploySpec
(vc_spec=None, deployment=None, active=None, passive=None, witness=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Cluster.DeploySpec
class contains the deploy specification for the three nodes of a VCHA cluster. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
vc_spec (
CredentialsSpec
orNone
) – Contains the active node’s management vCenter server credentials. This attribute was added in vSphere API 6.7.1. If None, then the active vCenter Server instance is assumed to be either self-managed or else in enhanced linked mode and managed by a linked vCenter Server instance.deployment (
Cluster.Type
) – Contains the deployment type. This attribute was added in vSphere API 6.7.1.active (
Cluster.ActiveSpec
) – Contains the active node’s network configuration. This attribute was added in vSphere API 6.7.1.passive (
Cluster.PassiveSpec
) – Contains the passive node’s placement configuration. This attribute was added in vSphere API 6.7.1.witness (
Cluster.WitnessSpec
) – Contains the witness node’s placement configuration. This attribute was added in vSphere API 6.7.1.
-
class
ErrorCondition
(error=None, recommendation=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Cluster.ErrorCondition
class contains an error condition and a recommendation to handle the error condition. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
error (
com.vmware.vapi.std_client.LocalizableMessage
) – Contains an error condition. This attribute was added in vSphere API 6.7.1.recommendation (
com.vmware.vapi.std_client.LocalizableMessage
orNone
) – Contains a recommendation on handling the error condition. This attribute was added in vSphere API 6.7.1. If None, there is no tip for the error condition.
-
class
Info
(config_state=None, node1=None, node2=None, witness=None, mode=None, health_state=None, health_exception=None, health_warnings=None, manual_failover_allowed=None, auto_failover_allowed=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Cluster.Info
class contains the configuration and health information of the three nodes in a VCHA Cluster. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
config_state (
Cluster.ConfigState
orNone
) – Configuration state of the VCHA cluster. The active node’s management vCenter server credentials are not required to populate this attribute. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable.node1 (
Cluster.NodeInfo
orNone
) – Node configuration information for the VCHA cluster. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable.node2 (
Cluster.NodeInfo
orNone
) – Node configuration information for the VCHA cluster. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable or the node is not cloned yet.witness (
Cluster.WitnessInfo
orNone
) – Node configuration information for the VCHA cluster. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable or the node is not cloned yet.mode (
Cluster.ClusterMode
orNone
) – Operational mode of the VCHA Cluster. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable or the node is not cloned yet.health_state (
Cluster.ClusterState
orNone
) – Last known state of the VCHA Cluster. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable or the node is not cloned yet.health_exception (
list
ofcom.vmware.vapi.std_client.LocalizableMessage
orNone
) – Health warning messages if the health information is unavailable. This attribute was added in vSphere API 6.7.1. If None, then the cluster is in a healthy state.health_warnings (
list
ofCluster.ErrorCondition
orNone
) – A collection of messages describing the reason for a non-healthy Cluster. This attribute was added in vSphere API 6.7.1. If None, then the cluster is in a healthy state.manual_failover_allowed (
bool
orNone
) – Specifies if manual failover is allowed. This attribute was added in vSphere API 6.7.1. If None, then the cluster state healthy and manual failover allowance in accordance with the cluster mode.auto_failover_allowed (
bool
orNone
) – Specifies if automatic failover is allowed. This attribute was added in vSphere API 6.7.1. If None, then the cluster state healthy and automatic failover allowance in accordance with the cluster mode.
-
class
IpFamily
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Cluster.IpFamily
class defines the IP address family. This enumeration was added in vSphere API 6.7.1.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theIpFamily
instance.
-
IPV4
= IpFamily(string='IPV4')¶ IPV4 address family. This class attribute was added in vSphere API 6.7.1.
-
IPV6
= IpFamily(string='IPV6')¶ IPV6 address family. This class attribute was added in vSphere API 6.7.1.
-
class
IpInfo
(ip_family=None, ipv4=None, ipv6=None, gateway_ip=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Cluster.IpInfo
class contains attributes related to an ip. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
ip_family (
Cluster.IpFamily
) – Family of the ip. This attribute was added in vSphere API 6.7.1.ipv4 (
Cluster.Ipv4Info
) – If the type of the ip family is IPV4, then this will point to IPv4 address specification. This attribute was added in vSphere API 6.7.1. This attribute is optional and it is only relevant when the value ofipFamily
isCluster.IpFamily.IPV4
.ipv6 (
Cluster.Ipv6Info
) – If the type of the ip family is IPV6, then this will point to IPv6 address specification. This attribute was added in vSphere API 6.7.1. This attribute is optional and it is only relevant when the value ofipFamily
isCluster.IpFamily.IPV6
.gateway_ip (
str
orNone
) – Gateway IP address. This attribute was added in vSphere API 6.7.1. If None, no gateway is specified.
-
class
Ipv4Info
(address=None, subnet_mask=None, prefix=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Cluster.Ipv4Info
class contains attributes to describe IPV4 information of the configured network interface. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
address (
str
) – IP address of the configured network interface. This attribute was added in vSphere API 6.7.1.subnet_mask (
str
) – The subnet mask of the interface. This attribute was added in vSphere API 6.7.1.prefix (
long
orNone
) – The CIDR prefix of the interface. This attribute was added in vSphere API 6.7.1. If None , then the subnet mask is invalid.
-
class
Ipv6Info
(address=None, prefix=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Cluster.Ipv6Info
class contains attributes to describe IPV6 information of the configured network interface. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
address (
str
) – IP address of the configured network interface. This attribute was added in vSphere API 6.7.1.prefix (
long
) – The CIDR prefix of the interface. This attribute was added in vSphere API 6.7.1.
-
class
NodeInfo
(failover_ip=None, ha_ip=None, runtime=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Cluster.NodeInfo
class defines the configuration information for the active and passive nodes in the cluster. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
failover_ip (
Cluster.IpInfo
orNone
) – Failover IP address that this node will assume after the failover to serve client requests. Each failover node can have a different failover IP address. The active node’s management vCenter server credentials are not required to populateCluster.NodeInfo.failover_ip
. This attribute was added in vSphere API 6.7.1. If None, then it will assume the public IP address of the Active vCenter Server.ha_ip (
Cluster.IpInfo
) – VCHA Cluster network configuration of the node. All cluster communication (state replication, heartbeat, cluster messages) happens over this network. The active node’s management vCenter server credentials are not required to populate thisCluster.NodeInfo.ha_ip
. This attribute was added in vSphere API 6.7.1.runtime (
Cluster.NodeRuntimeInfo
orNone
) – Runtime information for the node in the VCHA Cluster. The active node’s management vCenter server credentials are required to populate some attributes ofCluster.NodeInfo.runtime
. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable or the specified Active vCenter server management credentials are invalid or the node is not cloned yet.
-
class
NodeRole
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Cluster.NodeRole
class defines the role node can be in a VCHA Cluster. This enumeration was added in vSphere API 6.7.1.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theNodeRole
instance.
-
ACTIVE
= NodeRole(string='ACTIVE')¶ Node is having a role of Active. In this role, node runs a vCenter Server that serves client requests. This class attribute was added in vSphere API 6.7.1.
-
PASSIVE
= NodeRole(string='PASSIVE')¶ Node is having a role of Passive. In this role node, runs as a standby for the Active vCenter Server and receives state updates. This node takes over the role of Active vCenter Server upon failover. This class attribute was added in vSphere API 6.7.1.
-
WITNESS
= NodeRole(string='WITNESS')¶ Node is having a role of Witness. In this role, node acts as a quorum node for avoiding the classic split-brain problem. This class attribute was added in vSphere API 6.7.1.
-
class
NodeRuntimeInfo
(state=None, role=None, placement=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Cluster.NodeRuntimeInfo
class describes a node’s runtime information in a VCHA Cluster. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
state (
Cluster.NodeState
orNone
) – Last known state of the node. The active node’s management vCenter server credentials are not required to populateCluster.NodeRuntimeInfo.state
. This attribute was added in vSphere API 6.7.1. If None, then information is unavailable or the passive and witness nodes are not cloned yet.role (
Cluster.NodeRole
orNone
) – Last known role of the node. The active node’s management vCenter server credentials are not required to populateCluster.NodeRuntimeInfo.role
. This attribute was added in vSphere API 6.7.1. If None, then information is unavailable or the passive and witness nodes are not cloned yet.placement (
PlacementInfo
orNone
) – Placement information of the node. The active node’s management vCenter server credentials are required to populate most attributes ofCluster.NodeRuntimeInfo.placement
. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable or the specified Active vCenter server management credentials are invalid or the node is not cloned yet or the VCHA cluster was deployed in a manual fashion.
-
class
NodeState
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Cluster.NodeState
class defines possible state a node can be in a VCHA Cluster. This enumeration was added in vSphere API 6.7.1.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theNodeState
instance.
-
DOWN
= NodeState(string='DOWN')¶ Node is down and has left the VCHA Cluster. This class attribute was added in vSphere API 6.7.1.
-
UP
= NodeState(string='UP')¶ Node is up and has joined the VCHA Cluster. This class attribute was added in vSphere API 6.7.1.
-
class
NodeVmInfo
(vm=None, bios_uuid=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Cluster.NodeVmInfo
class contains information to describe the Virtual Machine of a node of a VCHA cluster. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
vm (
str
) – The identifier of the virtual machine of the VCHA node. This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:VirtualMachine:VCenter
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:VirtualMachine:VCenter
.bios_uuid (
str
) – BIOS UUID for the node. This attribute was added in vSphere API 6.7.1.
-
class
PassiveSpec
(placement=None, ha_ip=None, failover_ip=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Cluster.PassiveSpec
class contains the deploy specification for the Passive Node of the VCHA cluster. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
placement (
PlacementSpec
orNone
) – Contains the placement configuration of the node. This attribute was added in vSphere API 6.7.1. If None, then the it is assumed that the clone will be done manually by the customer. In this case, the placement configuration for the witness node should also be omitted. Only the network configuration will be setup. Once the passive and witness nodes are cloned from the active node, the VCHA high availability is turned on.ha_ip (
IpSpec
) – IP specification for the HA network. This attribute was added in vSphere API 6.7.1.failover_ip (
IpSpec
orNone
) – IP specification for the management network. This attribute was added in vSphere API 6.7.1. If None, then it will assume the public IP address of the Active vCenter Server.
-
class
Type
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Cluster.Type
class defines the possible deployment types for a VCHA Cluster. This enumeration was added in vSphere API 6.7.1.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theType
instance.
-
AUTO
= Type(string='AUTO')¶ Passive and witness nodes are cloned automatically. This class attribute was added in vSphere API 6.7.1.
-
MANUAL
= Type(string='MANUAL')¶ Passive and witness nodes are not cloned automatically. After deployment, the customer should clone the passive and witness virtual machines. This class attribute was added in vSphere API 6.7.1.
-
class
UndeploySpec
(vc_spec=None, force_delete=None, vms=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Cluster.UndeploySpec
class contains the undeploy specification for a VCHA cluster. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
vc_spec (
CredentialsSpec
orNone
) – Contains the active node’s management vCenter server credentials. This attribute was added in vSphere API 6.7.1. If None, then the active vCenter Server instance is assumed to be either self-managed or else in enhanced linked mode and managed by a linked vCenter Server instance.force_delete (
bool
orNone
) –Flag controlling in what circumstances the virtual machines will be deleted. For this flag to take effect, the VCHA cluster should have been successfully configured using automatic deployment.
If true, the
Cluster.UndeploySpec.vms
attribute will be ignored, the VCHA cluster specific information is removed, and the passive and witness virtual machines will be deleted.If false, the
Cluster.UndeploySpec.vms
attribute contains the information identifying the passive and witness virtual machines.If the
Cluster.UndeploySpec.vms
attribute is set, then it will be validated prior to deleting the passive and witness virtual machines and VCHA cluster specific information is removed.If the
Cluster.UndeploySpec.vms
attribute is None, then the passive and witness virtual machines will not be deleted. The customer should delete them in order to cleanup completely. VCHA cluster specific information is removed.
. This attribute was added in vSphere API 6.7.1. If None, the
Cluster.UndeploySpec.vms
attribute contains the information identifying the passive and witness virtual machines.If the
Cluster.UndeploySpec.vms
attribute is set, then it will be validated prior to deleting the passive and witness virtual machines. VCHA cluster specific information is removed.If the
Cluster.UndeploySpec.vms
attribute is None, then the passive and witness virtual machines will not be deleted. The customer should delete them in order to cleanup completely. VCHA cluster specific information is removed.
vms (
Cluster.VmInfo
orNone
) –Contains virtual machine information for the passive and witness virtual machines. For this flag to take effect, the VCHA cluster should have been successfully configured using automatic deployment.
If set, the
Cluster.UndeploySpec.force_delete
attribute controls whether this information is validated.If the
Cluster.UndeploySpec.force_delete
attribute is true, then this information is ignored, VCHA cluster specific information is removed and the passive and witness virtual machines will be deleted.If the
Cluster.UndeploySpec.force_delete
attribute is None or false, then this information is validated prior to deleting the passive and witness virtual machines. VCHA cluster specific information is removed.
. This attribute was added in vSphere API 6.7.1. If None, the
Cluster.UndeploySpec.force_delete
attribute controls the deletion of the passive and witness virtual machines.If the
Cluster.UndeploySpec.force_delete
attribute is true, then the passive and witness virtual machines will be deleted. VCHA cluster specific information is removed.If the
Cluster.UndeploySpec.force_delete
attribute is None or false, then the passive and witness virtual machines will not be deleted. The customer should delete them in order to cleanup completely. VCHA cluster specific information is removed.
-
class
VmInfo
(passive=None, witness=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Cluster.VmInfo
class contains information to describe the Virtual Machines of passive and witness nodes of a VCHA cluster. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
passive (
Cluster.NodeVmInfo
) – The virtual machine information of the passive node. This attribute was added in vSphere API 6.7.1.witness (
Cluster.NodeVmInfo
) – The virtual machine information of the witness node. This attribute was added in vSphere API 6.7.1.
-
class
WitnessInfo
(ha_ip=None, runtime=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Cluster.WitnessInfo
class defines the configuration and runtime information for the witness node in the cluster. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
ha_ip (
Cluster.IpInfo
) – VCHA Cluster network configuration of the node. All cluster communication (state replication, heartbeat, cluster messages) happens over this network. The active node’s management vCenter server credentials are not required to populateCluster.WitnessInfo.ha_ip
. This attribute was added in vSphere API 6.7.1.runtime (
Cluster.NodeRuntimeInfo
orNone
) – Runtime information for the node in the VCHA Cluster. The active node’s management vCenter server credentials are required to populate some attributes ofCluster.WitnessInfo.runtime
. This attribute was added in vSphere API 6.7.1. If None, then the information is unavailable or the node is not cloned yet.
-
class
WitnessSpec
(placement=None, ha_ip=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Cluster.WitnessSpec
class contains the deploy specification for the Witness Node of the VCHA cluster. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
placement (
PlacementSpec
orNone
) – Contains the placement configuration of the node. This attribute was added in vSphere API 6.7.1. If None, then it is assumed that the clone will be done manually by the customer. In this case, the placement configuration for the witness node should also be omitted. Only the network configuration will be setup. Once the passive and witness nodes are cloned from the active node, the VCHA high availability is turned on.ha_ip (
IpSpec
) – IP specification for the HA network. This attribute was added in vSphere API 6.7.1.
-
deploy_task
(spec)¶ Prepares, clones, and configures a VCHA cluster. This method was added in vSphere API 6.7.1.
- Parameters
spec (
Cluster.DeploySpec
) – Contains the deploy specification for all three nodes of a VCHA cluster.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
If the credentials provided for authenticating with the active node’s management vCenter server are invalid.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
If the user has insufficient privilege to perform the operation. Operation execution requires the Global.VCServer privilege.- Raise
com.vmware.vapi.std.errors_client.UnverifiedPeer
If the SSL certificate of the management vCenter server cannot be validated. The value of the data attribute ofcom.vmware.vapi.std.errors_client.Error
will be a class that contains all the attributes defined inCertificateInfo
.- Raise
com.vmware.vapi.std.errors_client.Error
If any other error occurs.
-
failover_task
(planned)¶ Initiates failover from the active vCenter node to the passive node.
For forced failover, Active node immediately initiates a failover. This may result into a data loss after failover.
For planned failover, Active node flushes all the state to the Passive node, waits for the flush to complete before causing a failover. After the failover, Passive node starts without any data loss.
A failover is allowed only in the following cases:
Cluster’s mode is enabled and all cluster members are present.
Cluster’s mode is maintenance and all cluster members are present.
. This method was added in vSphere API 6.7.1.
- Parameters
planned (
bool
) – If false, a failover is initiated immediately and may result in data loss. If true, a failover is initated after the Active node flushes its state to Passive and there is no data loss.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
If the user has insufficient privilege to perform the operation. Operation execution requires the Global.VCServer privilege.- Raise
com.vmware.vapi.std.errors_client.Error
If any other error occurs.
-
get
(vc_spec=None, partial=None)¶ Retrieves the status of a VCHA cluster. This method was added in vSphere API 6.7.1.
- Parameters
vc_spec (
CredentialsSpec
orNone
) – Contains active node’s management vCenter server credentials. If None, then the active vCenter Server instance is assumed to be either self-managed or else in enhanced linked mode and managed by a linked vCenter Server instance.partial (
bool
orNone
) –If true, then return only the information that does not require connecting to the Active vCenter Server.
If false or unset, then return all the information.
If None, then return all the information.
- Return type
- Returns
Info structure containing the VCHA configuration and health information.
- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
If the credentials provided for authenticating with the active node’s management vCenter server are invalid.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
If the user has insufficient privilege to perform the operation.If
partial
is false or unset, then the operation execution requires the Global.VCServer privilege.If
partial
is true, then the operation execution requires the System.Read privilege.
- Raise
com.vmware.vapi.std.errors_client.UnverifiedPeer
If the SSL certificate of the management vCenter server cannot be validated. The value of the data attribute ofcom.vmware.vapi.std.errors_client.Error
will be a class that contains all the attributes defined inCertificateInfo
.- Raise
com.vmware.vapi.std.errors_client.Error
If any other error occurs.
-
undeploy_task
(spec)¶ Destroys the VCHA cluster and removes all VCHA specific information from the VCVA appliance. Optionally, the passive and witness node virtual machines will be deleted only if VCHA was deployed using automatic deployment. The active node in the cluster continues to run as a standalone VCVA appliance after the destroy operation has been performed.
If the VCHA cluster is in a transition state and not configured, then the VCHA cluster specific information is removed.. This method was added in vSphere API 6.7.1.
- Parameters
spec (
Cluster.UndeploySpec
) – Contains the undeploy specification for a VCHA cluster.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
If the credentials provided for authenticating with the active node’s management vCenter server are invalid.- Raise
com.vmware.vapi.std.errors_client.NotFound
If the passive virtual machine is not managed by the specified vCenter server.- Raise
com.vmware.vapi.std.errors_client.NotFound
If the witness virtual machine is not managed by the specified vCenter server.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
If the user has insufficient privilege to perform the operation. Operation execution requires the Global.VCServer privilege.- Raise
com.vmware.vapi.std.errors_client.UnverifiedPeer
If the SSL certificate of the management vCenter server cannot be validated. The value of the data attribute ofcom.vmware.vapi.std.errors_client.Error
will be a class that contains all the attributes defined inCertificateInfo
.- Raise
com.vmware.vapi.std.errors_client.Error
If any other error occurs.
-
class
com.vmware.vcenter.vcha_client.
ConnectionSpec
(hostname=None, port=None, ssl_thumbprint=None, username=None, password=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
ConnectionSpec
class contains information required to connect to a vCenter server. The connection to the vCenter server always uses the HTTPS protocol. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
hostname (
str
) – IP Address or DNS of the vCenter. This attribute was added in vSphere API 6.7.1.port (
long
orNone
) – Port number. This attribute was added in vSphere API 6.7.1. If None, port 443 will be used.ssl_thumbprint (
str
orNone
) – SHA1 hash of the server SSL certificate. This attribute was added in vSphere API 6.7.1. If None, empty ssl thumbprint is assumed.username (
str
orNone
) – Username to access the server. This attribute was added in vSphere API 6.7.1. This attribute is currently required. If None, an error is returned. In the future, if this attribute is None, the system will attempt to identify the user. If a user cannot be identified, then the requested operation will fail.password (
str
orNone
) – Password for the specified user. This attribute was added in vSphere API 6.7.1. This attribute is currently required. If None, an empty password is assumed. In the future, if this attribute is None, the system will attempt to authenticate the user. If a user cannot be identified, then the requested operation will fail.
-
class
com.vmware.vcenter.vcha_client.
CredentialsSpec
(active_location=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
CredentialsSpec
class contains information to connect to the vCenter server managing the VCHA nodes. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
active_location (
ConnectionSpec
) – Connection information for the management vCenter Server of the Active Node in a VCHA Cluster. This attribute was added in vSphere API 6.7.1.
-
class
com.vmware.vcenter.vcha_client.
DiskInfo
(datastore=None, datastore_name=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
DiskInfo
class contains information to describe the storage configuration of a vCenter virtual machine. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
datastore (
str
) – The identifier of the datastore to put all the virtual disks on. This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:Datastore:VCenter
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Datastore:VCenter
.datastore_name (
str
) – The name of the datastore. This attribute was added in vSphere API 6.7.1.
-
class
com.vmware.vcenter.vcha_client.
DiskSpec
(datastore=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
DiskSpec
class contains information to describe the storage configuration of a vCenter virtual machine. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
datastore (
str
orNone
) – The identifier of the datastore to put all the virtual disks on. This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:Datastore:VCenter
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Datastore:VCenter
. This field needs to be set. If None, then see vim.vm.RelocateSpec.datastore.
-
class
com.vmware.vcenter.vcha_client.
IpFamily
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
IpFamily
class defines the Ip address family. This enumeration was added in vSphere API 6.7.1.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theIpFamily
instance.
-
IPV4
= IpFamily(string='IPV4')¶ IPV4 address family. This class attribute was added in vSphere API 6.7.1.
-
IPV6
= IpFamily(string='IPV6')¶ IPv6 address family. This class attribute was added in vSphere API 6.7.1.
-
class
com.vmware.vcenter.vcha_client.
IpSpec
(ip_family=None, ipv4=None, ipv6=None, default_gateway=None, dns_servers=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
IpSpec
class contains IP information used to configure a network interface. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
ip_family (
IpFamily
) – Family of the IP address to configure the interface. This attribute was added in vSphere API 6.7.1.ipv4 (
Ipv4Spec
) – If the family of the ip is IPV4, then this will point to IPv4 address specification. This attribute was added in vSphere API 6.7.1. This attribute is optional and it is only relevant when the value ofipFamily
isIpFamily.IPV4
.ipv6 (
Ipv6Spec
) – If the family of the ip is IPV6, then this will point to IPv6 address specification. This attribute was added in vSphere API 6.7.1. This attribute is optional and it is only relevant when the value ofipFamily
isIpFamily.IPV6
.default_gateway (
str
orNone
) – The IP address of the Gateway for this interface. This attribute was added in vSphere API 6.7.1. If None, gateway will not be used for the network interface.dns_servers (
list
ofstr
orNone
) – The list of IP addresses of the DNS servers for this interface. This list is a comma separated list. This attribute was added in vSphere API 6.7.1. If None, DNS servers will not be used for the network interface.
-
class
com.vmware.vcenter.vcha_client.
Ipv4Spec
(address=None, subnet_mask=None, prefix=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Ipv4Spec
class contains IPV4 information used to configure a network interface. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
address (
str
) – IPV4 address to be used to configure the interface. This attribute was added in vSphere API 6.7.1.subnet_mask (
str
orNone
) – The subnet mask for the interface. This attribute was added in vSphere API 6.7.1. If None and theprefix
attribute is None, then an error will be reported. If None and theprefix
attribute is set, then theprefix
attribute will be used to create a subnet mask whose first prefix bits are 1 and the remaining bits 0. If both thesubnetMask
attribute and theprefix
attribute are set and they do not represent the same value, then an error will be reported.prefix (
long
orNone
) – The CIDR prefix for the interface. This attribute was added in vSphere API 6.7.1. If None and thesubnetMask
attribute is None, this an error will be reported. If None and thesubnetMask
attribute is set, then thesubnetMask
attribute will be used. If both thesubnetMask
attribute and theprefix
attribute are set and they do not represent the same value, then an error will be reported.
-
class
com.vmware.vcenter.vcha_client.
Ipv6Spec
(address=None, prefix=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Ipv6Spec
class contains IPV6 information used to configure a network interface. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
address (
str
) – IPv6 address to be used to configure the interface. This attribute was added in vSphere API 6.7.1.prefix (
long
) – The CIDR prefix for the interface. This attribute was added in vSphere API 6.7.1.
-
class
com.vmware.vcenter.vcha_client.
NetworkType
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
NetworkType
class defines the type of a vCenter Server network. This enumeration was added in vSphere API 6.7.1.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theNetworkType
instance.
-
DISTRIBUTED_PORTGROUP
= NetworkType(string='DISTRIBUTED_PORTGROUP')¶ Distributed virtual switch. This class attribute was added in vSphere API 6.7.1.
-
STANDARD_PORTGROUP
= NetworkType(string='STANDARD_PORTGROUP')¶ vSphere standard portgroup network. This class attribute was added in vSphere API 6.7.1.
-
class
com.vmware.vcenter.vcha_client.
Operations
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
Operations
class provides methods to figure out the currently active operations and currently disabled operations in a vCenter High Availability (VCHA) cluster. This class was added in vSphere API 6.7.1.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
CLUSTER_DEPLOY_OP
= 'com.vmware.vcenter.vcha.cluster.deploy'¶ Identifier of the cluster deploy operation. This class attribute was added in vSphere API 6.7.1.
-
CLUSTER_FAILOVER_OP
= 'com.vmware.vcenter.vcha.cluster.failover'¶ Identifier of the cluster failover operation. This class attribute was added in vSphere API 6.7.1.
-
CLUSTER_GET_OP
= 'com.vmware.vcenter.vcha.cluster.get'¶ Identifier of the cluster get operation. This class attribute was added in vSphere API 6.7.1.
-
CLUSTER_UNDEPLOY_OP
= 'com.vmware.vcenter.vcha.cluster.undeploy'¶ Identifier of the cluster undeploy operation. This class attribute was added in vSphere API 6.7.1.
-
class
Info
(disabled=None, active=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Operations.Info
class contains information about which the VCHA operations cannot be invoked in the current state of the system and the list of currently active VCHA operations. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
disabled (
set
ofstr
) – Identifiers of the operations that are current disabled. These operation strings are one ofOperations.CLUSTER_DEPLOY_OP
,Operations.CLUSTER_FAILOVER_OP
,Operations.PASSIVE_REDEPLOY_OP
,Operations.WITNESS_REDEPLOY_OP
,Operations.MODE_SET_OP
,Operations.CLUSTER_UNDEPLOY_OP
andOperations.CLUSTER_GET_OP
. 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.vapi.operation
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:com.vmware.vapi.operation
.active (
set
ofstr
) – Identifiers of the operations that are currently running. These operation strings are one ofOperations.CLUSTER_DEPLOY_OP
,Operations.CLUSTER_FAILOVER_OP
,Operations.PASSIVE_REDEPLOY_OP
,Operations.WITNESS_REDEPLOY_OP
,Operations.MODE_SET_OP
, andOperations.CLUSTER_UNDEPLOY_OP
. 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.vapi.operation
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:com.vmware.vapi.operation
.
-
MODE_GET_OP
= 'com.vmware.vcenter.vcha.cluster.mode.get'¶ Identifier of the get mode operation. This class attribute was added in vSphere API 6.7.1.
-
MODE_SET_OP
= 'com.vmware.vcenter.vcha.cluster.mode.set'¶ Identifier of the set mode operation. This class attribute was added in vSphere API 6.7.1.
-
PASSIVE_REDEPLOY_OP
= 'com.vmware.vcenter.vcha.cluster.passive.redeploy'¶ Identifier of the passive redeploy operation. This class attribute was added in vSphere API 6.7.1.
-
WITNESS_REDEPLOY_OP
= 'com.vmware.vcenter.vcha.cluster.witness.redeploy'¶ Identifier of the witness redeploy operation. This class attribute was added in vSphere API 6.7.1.
-
get
()¶ Retrieves the current active and disabled operations of a VCHA cluster. This method was added in vSphere API 6.7.1.
- Return type
- Returns
Info structure containing the current running and disabled operations of a VCHA cluster.
- Raise
com.vmware.vapi.std.errors_client.Unauthorized
If the user has insufficient privilege to perform the operation. Operation execution requires the System.Read privilege.- Raise
com.vmware.vapi.std.errors_client.Error
If any other error occurs.
-
class
com.vmware.vcenter.vcha_client.
PlacementInfo
(management_vcenter_name=None, management_vcenter_server_guid=None, vm_name=None, datacenter=None, datacenter_name=None, host=None, host_name=None, cluster=None, cluster_name=None, ha_network=None, ha_network_name=None, ha_network_type=None, management_network=None, management_network_name=None, management_network_type=None, storage=None, bios_uuid=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
PlacementInfo
class contains information to describe the inventory placement of a single node of a VCHA cluster. The active node’s management vCenter server credentials are required to populate all attributes except biosUuid. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
management_vcenter_name (
str
) – The hostname of the vCenter server that is managing the VCHA node. This attribute was added in vSphere API 6.7.1.management_vcenter_server_guid (
str
) – The unique identifier of the vCenter server that is managing the VCHA node. This attribute was added in vSphere API 7.0.0.1. This attribute is optional because it was added in a newer version than its parent node.vm_name (
str
) – The virtual machine name of the VCHA node. This attribute was added in vSphere API 6.7.1.datacenter (
str
) – The identifier of the datacenter of the VCHA node. This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:Datacenter:VCenter
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Datacenter:VCenter
.datacenter_name (
str
) – The name of the datacenter of the VCHA node. This attribute was added in vSphere API 6.7.1.host (
str
) – The identifier of the host of the VCHA node. This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:HostSystem:VCenter
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:HostSystem:VCenter
.host_name (
str
) – The name of the host of the VCHA node. This attribute was added in vSphere API 6.7.1.cluster (
str
orNone
) – The identifier of the cluster of whichhost
is member. 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:ClusterComputeResource:VCenter
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:ClusterComputeResource:VCenter
. If None,host
is a standalone host.cluster_name (
str
orNone
) – The name of the cluster of whichhost
is member. This attribute was added in vSphere API 6.7.1. If None,host
is a standalone host.ha_network (
str
orNone
) – The identifier of the Network object used for the HA network. This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:Network:VCenter
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Network:VCenter
. If None, the information is currently unavailable or the haNetwork is not configured.ha_network_name (
str
orNone
) – The name of the Network object used for the HA network. This attribute was added in vSphere API 6.7.1. If None, the information is currently unavailable or the haNetwork is not configured.ha_network_type (
NetworkType
orNone
) – The type of the Network object used for the HA network. This attribute was added in vSphere API 6.7.1. If None, the information is currently unavailable or the haNetwork is not configured.management_network (
str
) – The identifier of the Network object used for the Management network. This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:Network:VCenter
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Network:VCenter
.management_network_name (
str
) – The name of the Network object used for the Management network. This attribute was added in vSphere API 6.7.1.management_network_type (
NetworkType
) – The type of the Network object used for the Management network. This attribute was added in vSphere API 6.7.1.storage (
DiskInfo
) – The storage information of the VCHA node. This attribute was added in vSphere API 6.7.1.bios_uuid (
str
orNone
) – BIOS UUID for the node. This attribute was added in vSphere API 6.7.1. If None, the information is currently unavailable.
-
class
com.vmware.vcenter.vcha_client.
PlacementSpec
(name=None, folder=None, host=None, resource_pool=None, ha_network_type=None, ha_network=None, management_network_type=None, management_network=None, storage=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
PlacementSpec
class contains information to describe the inventory placement of a single node of a VCHA cluster. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
name (
str
) – The name of the VCHA node to be used for the virtual machine name. This attribute was added in vSphere API 6.7.1.folder (
str
) – The identifier of the folder to deploy the VCHA node to. 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:Folder:VCenter
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Folder:VCenter
.host (
str
orNone
) – The identifier of the host to deploy the VCHA node to. 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:HostSystem:VCenter
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:HostSystem:VCenter
. If None, see vim.vm.RelocateSpec.host.resource_pool (
str
orNone
) – The identifier of the resource pool to deploy the VCHA node to. 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:ResourcePool:VCenter
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:ResourcePool:VCenter
. If None, then the active node’s resource pool will be used.ha_network_type (
NetworkType
orNone
) – The type of the Network object used by the HA network. If thePlacementSpec.ha_network
attribute is set, then thePlacementSpec.ha_network_type
field must be set. If thePlacementSpec.ha_network
attribute is None, then thePlacementSpec.ha_network_type
attribute is ignored. This attribute was added in vSphere API 6.7.1. If None and thePlacementSpec.ha_network
attribute is unset, then the same network present on the Active node virtual machine is used to deploy the virtual machine with an assumption that the network is present on the destination. If None and thePlacementSpec.ha_network
attribute is set, then an error is reported.ha_network (
str
orNone
) – The identifier of the Network object used for the HA network. If thePlacementSpec.ha_network
attribute is set, then the {#link #haNetworkType} attribute must be set. If thePlacementSpec.ha_network
attribute is None, then thePlacementSpec.ha_network_type
attribute is ignored. This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:Network:VCenter
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Network:VCenter
. If None and thePlacementSpec.ha_network_type
attribute is unset, then the same network present on the Active node virtual machine is used to deploy the virtual machine with an assumption that the network is present on the destination.management_network_type (
NetworkType
orNone
) – The type of the Network object used by the Management network. If thePlacementSpec.management_network
attribute is set, then the {#link #managementNetworkType} field must be set. If thePlacementSpec.management_network
attribute is None, then thePlacementSpec.management_network_type
attribute is ignored. This attribute was added in vSphere API 6.7.1. If None and thePlacementSpec.management_network
attribute is unset, then the same network present on the Active node virtual machine is used to deploy the virtual machine with an assumption that the network is present on the destination. If None and thePlacementSpec.management_network
attribute is set, then an error is reported.management_network (
str
orNone
) – The identifier of the Network object used for the Management network. If thePlacementSpec.management_network
attribute is set, then thePlacementSpec.management_network_type
attribute must be set. If thePlacementSpec.management_network
attribute is None, then thePlacementSpec.management_network_type
attribute is ignored. This attribute was added in vSphere API 6.7.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:Network:VCenter
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Network:VCenter
. If None and thePlacementSpec.management_network_type
attribute is unset, then the same network present on the Active node virtual machine is used to deploy the virtual machine with an assumption that the network is present on the destination.storage (
DiskSpec
orNone
) – The storage specification to deploy the VCHA node to. This attribute was added in vSphere API 6.7.1. If None, see vim.vm.RelocateSpec.datastore.
-
class
com.vmware.vcenter.vcha_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.vm_client module¶
The com.vmware.vcenter.vm_client
module provides classes for managing
virtual machines.
-
class
com.vmware.vcenter.vm_client.
GuestOS
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
GuestOS
class defines the valid guest operating system types used for configuring a virtual machine.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theGuestOS
instance.
-
AMAZONLINUX2_64
= GuestOS(string='AMAZONLINUX2_64')¶ Amazon Linux 2 (64 bit). This class attribute was added in vSphere API 6.7.1.
-
AMAZONLINUX3_64
= GuestOS(string='AMAZONLINUX3_64')¶ Amazon Linux 3 (64 bit). This class attribute was added in vSphere API 7.0.1.0.
-
ASIANUX_3
= GuestOS(string='ASIANUX_3')¶ Asianux Server 3
-
ASIANUX_3_64
= GuestOS(string='ASIANUX_3_64')¶ Asianux Server 3 (64 bit)
-
ASIANUX_4
= GuestOS(string='ASIANUX_4')¶ Asianux Server 4
-
ASIANUX_4_64
= GuestOS(string='ASIANUX_4_64')¶ Asianux Server 4 (64 bit)
-
ASIANUX_5_64
= GuestOS(string='ASIANUX_5_64')¶ Asianux Server 5 (64 bit)
-
ASIANUX_7_64
= GuestOS(string='ASIANUX_7_64')¶ Asianux Server 7 (64 bit)
-
ASIANUX_8_64
= GuestOS(string='ASIANUX_8_64')¶ Asianux Server 8 (64 bit). This class attribute was added in vSphere API 6.7.
-
ASIANUX_9_64
= GuestOS(string='ASIANUX_9_64')¶ Asianux Server 9 (64 bit). This class attribute was added in vSphere API 7.0.1.0.
-
CENTOS
= GuestOS(string='CENTOS')¶ CentOS 4/5
-
CENTOS_6
= GuestOS(string='CENTOS_6')¶ CentOS 6
-
CENTOS_64
= GuestOS(string='CENTOS_64')¶ CentOS 4/5 (64-bit)
-
CENTOS_6_64
= GuestOS(string='CENTOS_6_64')¶ CentOS 6 (64-bit)
-
CENTOS_7
= GuestOS(string='CENTOS_7')¶ CentOS 7
-
CENTOS_7_64
= GuestOS(string='CENTOS_7_64')¶ CentOS 7 (64-bit)
-
CENTOS_8_64
= GuestOS(string='CENTOS_8_64')¶ CentOS 8 (64-bit). This class attribute was added in vSphere API 6.7.
-
CENTOS_9_64
= GuestOS(string='CENTOS_9_64')¶ CentOS 9 (64-bit). This class attribute was added in vSphere API 7.0.1.0.
-
COREOS_64
= GuestOS(string='COREOS_64')¶ CoreOS Linux (64 bit)
-
CRXPOD_1
= GuestOS(string='CRXPOD_1')¶ CRX Pod 1. This class attribute was added in vSphere API 7.0.0.0.
-
DARWIN
= GuestOS(string='DARWIN')¶ Mac OS 10.5
-
DARWIN_10
= GuestOS(string='DARWIN_10')¶ Mac OS 10.6
-
DARWIN_10_64
= GuestOS(string='DARWIN_10_64')¶ Mac OS 10.6 (64 bit)
-
DARWIN_11
= GuestOS(string='DARWIN_11')¶ Mac OS 10.7
-
DARWIN_11_64
= GuestOS(string='DARWIN_11_64')¶ Mac OS 10.7 (64 bit)
-
DARWIN_12_64
= GuestOS(string='DARWIN_12_64')¶ Mac OS 10.8 (64 bit)
-
DARWIN_13_64
= GuestOS(string='DARWIN_13_64')¶ Mac OS 10.9 (64 bit)
-
DARWIN_14_64
= GuestOS(string='DARWIN_14_64')¶ Mac OS 10.10 (64 bit)
-
DARWIN_15_64
= GuestOS(string='DARWIN_15_64')¶ Mac OS 10.11 (64 bit)
-
DARWIN_16_64
= GuestOS(string='DARWIN_16_64')¶ Mac OS 10.12 (64 bit)
-
DARWIN_17_64
= GuestOS(string='DARWIN_17_64')¶ Mac OS 10.13 (64 bit). This class attribute was added in vSphere API 6.7.
-
DARWIN_18_64
= GuestOS(string='DARWIN_18_64')¶ Mac OS 10.14 (64 bit). This class attribute was added in vSphere API 6.7.
-
DARWIN_19_64
= GuestOS(string='DARWIN_19_64')¶ Mac OS 10.15 (64 bit). This class attribute was added in vSphere API 7.0.0.0.
-
DARWIN_20_64
= GuestOS(string='DARWIN_20_64')¶ Mac OS 11 (64 bit). This class attribute was added in vSphere API 7.0.1.0.
-
DARWIN_21_64
= GuestOS(string='DARWIN_21_64')¶ Mac OS 12 (64 bit). This class attribute was added in vSphere API 7.0.1.0.
-
DARWIN_64
= GuestOS(string='DARWIN_64')¶ Mac OS 10.5 (64 bit)
-
DEBIAN_10
= GuestOS(string='DEBIAN_10')¶ Debian GNU/Linux 10
-
DEBIAN_10_64
= GuestOS(string='DEBIAN_10_64')¶ Debian GNU/Linux 10 (64 bit)
-
DEBIAN_11
= GuestOS(string='DEBIAN_11')¶ Debian GNU/Linux 11. This class attribute was added in vSphere API 7.0.0.0.
-
DEBIAN_11_64
= GuestOS(string='DEBIAN_11_64')¶ Debian GNU/Linux 11 (64 bit). This class attribute was added in vSphere API 7.0.0.0.
-
DEBIAN_4
= GuestOS(string='DEBIAN_4')¶ Debian GNU/Linux 4
-
DEBIAN_4_64
= GuestOS(string='DEBIAN_4_64')¶ Debian GNU/Linux 4 (64 bit)
-
DEBIAN_5
= GuestOS(string='DEBIAN_5')¶ Debian GNU/Linux 5
-
DEBIAN_5_64
= GuestOS(string='DEBIAN_5_64')¶ Debian GNU/Linux 5 (64 bit)
-
DEBIAN_6
= GuestOS(string='DEBIAN_6')¶ Debian GNU/Linux 6
-
DEBIAN_6_64
= GuestOS(string='DEBIAN_6_64')¶ Debian GNU/Linux 6 (64 bit)
-
DEBIAN_7
= GuestOS(string='DEBIAN_7')¶ Debian GNU/Linux 7
-
DEBIAN_7_64
= GuestOS(string='DEBIAN_7_64')¶ Debian GNU/Linux 7 (64 bit)
-
DEBIAN_8
= GuestOS(string='DEBIAN_8')¶ Debian GNU/Linux 8
-
DEBIAN_8_64
= GuestOS(string='DEBIAN_8_64')¶ Debian GNU/Linux 8 (64 bit)
-
DEBIAN_9
= GuestOS(string='DEBIAN_9')¶ Debian GNU/Linux 9
-
DEBIAN_9_64
= GuestOS(string='DEBIAN_9_64')¶ Debian GNU/Linux 9 (64 bit)
-
DOS
= GuestOS(string='DOS')¶ MS-DOS.
-
ECOMSTATION
= GuestOS(string='ECOMSTATION')¶ eComStation 1.x
-
ECOMSTATION_2
= GuestOS(string='ECOMSTATION_2')¶ eComStation 2.0
-
FEDORA
= GuestOS(string='FEDORA')¶ Fedora Linux
-
FEDORA_64
= GuestOS(string='FEDORA_64')¶ Fedora Linux (64 bit)
-
FREEBSD
= GuestOS(string='FREEBSD')¶ FreeBSD 10 or earlier
-
FREEBSD_11
= GuestOS(string='FREEBSD_11')¶ FreeBSD 11. This class attribute was added in vSphere API 6.7.
-
FREEBSD_11_64
= GuestOS(string='FREEBSD_11_64')¶ FreeBSD 11 x64. This class attribute was added in vSphere API 6.7.
-
FREEBSD_12
= GuestOS(string='FREEBSD_12')¶ FreeBSD 12. This class attribute was added in vSphere API 6.7.
-
FREEBSD_12_64
= GuestOS(string='FREEBSD_12_64')¶ FreeBSD 12 x64. This class attribute was added in vSphere API 6.7.
-
FREEBSD_13
= GuestOS(string='FREEBSD_13')¶ FreeBSD 13 or later. This class attribute was added in vSphere API 7.0.1.0.
-
FREEBSD_13_64
= GuestOS(string='FREEBSD_13_64')¶ FreeBSD 13 x64 or later. This class attribute was added in vSphere API 7.0.1.0.
-
FREEBSD_64
= GuestOS(string='FREEBSD_64')¶ FreeBSD 10 x64 or earlier
-
GENERIC_LINUX
= GuestOS(string='GENERIC_LINUX')¶ Other Linux
-
MANDRAKE
= GuestOS(string='MANDRAKE')¶ Mandrake Linux
-
MANDRIVA
= GuestOS(string='MANDRIVA')¶ Mandriva Linux
-
MANDRIVA_64
= GuestOS(string='MANDRIVA_64')¶ Mandriva Linux (64 bit)
-
NETWARE_4
= GuestOS(string='NETWARE_4')¶ Novell NetWare 4
-
NETWARE_5
= GuestOS(string='NETWARE_5')¶ Novell NetWare 5.1
-
NETWARE_6
= GuestOS(string='NETWARE_6')¶ Novell NetWare 6.x
-
NLD_9
= GuestOS(string='NLD_9')¶ Novell Linux Desktop 9
-
OES
= GuestOS(string='OES')¶ Open Enterprise Server
-
OPENSERVER_5
= GuestOS(string='OPENSERVER_5')¶ SCO OpenServer 5
-
OPENSERVER_6
= GuestOS(string='OPENSERVER_6')¶ SCO OpenServer 6
-
OPENSUSE
= GuestOS(string='OPENSUSE')¶ OpenSUSE Linux
-
OPENSUSE_64
= GuestOS(string='OPENSUSE_64')¶ OpenSUSE Linux (64 bit)
-
ORACLE_LINUX
= GuestOS(string='ORACLE_LINUX')¶ Oracle Linux 4/5
-
ORACLE_LINUX_6
= GuestOS(string='ORACLE_LINUX_6')¶ Oracle Linux 6
-
ORACLE_LINUX_64
= GuestOS(string='ORACLE_LINUX_64')¶ Oracle Linux 4/5 (64-bit)
-
ORACLE_LINUX_6_64
= GuestOS(string='ORACLE_LINUX_6_64')¶ Oracle Linux 6 (64-bit)
-
ORACLE_LINUX_7
= GuestOS(string='ORACLE_LINUX_7')¶ Oracle Linux 7
-
ORACLE_LINUX_7_64
= GuestOS(string='ORACLE_LINUX_7_64')¶ Oracle Linux 7 (64-bit)
-
ORACLE_LINUX_8_64
= GuestOS(string='ORACLE_LINUX_8_64')¶ Oracle Linux 8 (64-bit). This class attribute was added in vSphere API 6.7.
-
ORACLE_LINUX_9_64
= GuestOS(string='ORACLE_LINUX_9_64')¶ Oracle Linux 9 (64-bit). This class attribute was added in vSphere API 7.0.1.0.
-
OS2
= GuestOS(string='OS2')¶ OS/2
-
OTHER
= GuestOS(string='OTHER')¶ Other Operating System
-
OTHER_24X_LINUX
= GuestOS(string='OTHER_24X_LINUX')¶ Linux 2.4x Kernel
-
OTHER_24X_LINUX_64
= GuestOS(string='OTHER_24X_LINUX_64')¶ Linux 2.4x Kernel (64 bit) (experimental)
-
OTHER_26X_LINUX
= GuestOS(string='OTHER_26X_LINUX')¶ Linux 2.6x Kernel
-
OTHER_26X_LINUX_64
= GuestOS(string='OTHER_26X_LINUX_64')¶ Linux 2.6x Kernel (64 bit) (experimental)
-
OTHER_3X_LINUX
= GuestOS(string='OTHER_3X_LINUX')¶ Linux 3.x Kernel
-
OTHER_3X_LINUX_64
= GuestOS(string='OTHER_3X_LINUX_64')¶ Linux 3.x Kernel (64 bit)
-
OTHER_4X_LINUX
= GuestOS(string='OTHER_4X_LINUX')¶ Linux 4.x Kernel. This class attribute was added in vSphere API 6.7.
-
OTHER_4X_LINUX_64
= GuestOS(string='OTHER_4X_LINUX_64')¶ Linux 4.x Kernel (64 bit). This class attribute was added in vSphere API 6.7.
-
OTHER_5X_LINUX
= GuestOS(string='OTHER_5X_LINUX')¶ Linux 5.x Kernel. This class attribute was added in vSphere API 7.0.1.0.
-
OTHER_5X_LINUX_64
= GuestOS(string='OTHER_5X_LINUX_64')¶ Linux 5.x Kernel (64 bit). This class attribute was added in vSphere API 7.0.1.0.
-
OTHER_64
= GuestOS(string='OTHER_64')¶ Other Operating System (64 bit) (experimental)
-
OTHER_LINUX
= GuestOS(string='OTHER_LINUX')¶ Linux 2.2x Kernel
-
OTHER_LINUX_64
= GuestOS(string='OTHER_LINUX_64')¶ Linux (64 bit) (experimental)
-
REDHAT
= GuestOS(string='REDHAT')¶ Red Hat Linux 2.1
-
RHEL_2
= GuestOS(string='RHEL_2')¶ Red Hat Enterprise Linux 2
-
RHEL_3
= GuestOS(string='RHEL_3')¶ Red Hat Enterprise Linux 3
-
RHEL_3_64
= GuestOS(string='RHEL_3_64')¶ Red Hat Enterprise Linux 3 (64 bit)
-
RHEL_4
= GuestOS(string='RHEL_4')¶ Red Hat Enterprise Linux 4
-
RHEL_4_64
= GuestOS(string='RHEL_4_64')¶ Red Hat Enterprise Linux 4 (64 bit)
-
RHEL_5
= GuestOS(string='RHEL_5')¶ Red Hat Enterprise Linux 5
-
RHEL_5_64
= GuestOS(string='RHEL_5_64')¶ Red Hat Enterprise Linux 5 (64 bit) (experimental)
-
RHEL_6
= GuestOS(string='RHEL_6')¶ Red Hat Enterprise Linux 6
-
RHEL_6_64
= GuestOS(string='RHEL_6_64')¶ Red Hat Enterprise Linux 6 (64 bit)
-
RHEL_7
= GuestOS(string='RHEL_7')¶ Red Hat Enterprise Linux 7
-
RHEL_7_64
= GuestOS(string='RHEL_7_64')¶ Red Hat Enterprise Linux 7 (64 bit)
-
RHEL_8_64
= GuestOS(string='RHEL_8_64')¶ Red Hat Enterprise Linux 8 (64 bit). This class attribute was added in vSphere API 6.7.
-
RHEL_9_64
= GuestOS(string='RHEL_9_64')¶ Red Hat Enterprise Linux 9 (64 bit). This class attribute was added in vSphere API 7.0.1.0.
-
SJDS
= GuestOS(string='SJDS')¶ Sun Java Desktop System
-
SLES
= GuestOS(string='SLES')¶ Suse Linux Enterprise Server 9
-
SLES_10
= GuestOS(string='SLES_10')¶ Suse linux Enterprise Server 10
-
SLES_10_64
= GuestOS(string='SLES_10_64')¶ Suse Linux Enterprise Server 10 (64 bit) (experimental)
-
SLES_11
= GuestOS(string='SLES_11')¶ Suse linux Enterprise Server 11
-
SLES_11_64
= GuestOS(string='SLES_11_64')¶ Suse Linux Enterprise Server 11 (64 bit)
-
SLES_12
= GuestOS(string='SLES_12')¶ Suse linux Enterprise Server 12
-
SLES_12_64
= GuestOS(string='SLES_12_64')¶ Suse Linux Enterprise Server 12 (64 bit)
-
SLES_15_64
= GuestOS(string='SLES_15_64')¶ Suse Linux Enterprise Server 15 (64 bit). This class attribute was added in vSphere API 6.7.
-
SLES_16_64
= GuestOS(string='SLES_16_64')¶ Suse Linux Enterprise Server 16 (64 bit). This class attribute was added in vSphere API 7.0.1.0.
-
SLES_64
= GuestOS(string='SLES_64')¶ Suse Linux Enterprise Server 9 (64 bit)
-
SOLARIS_10
= GuestOS(string='SOLARIS_10')¶ Solaris 10 (32 bit) (experimental)
-
SOLARIS_10_64
= GuestOS(string='SOLARIS_10_64')¶ Solaris 10 (64 bit) (experimental)
-
SOLARIS_11_64
= GuestOS(string='SOLARIS_11_64')¶ Solaris 11 (64 bit)
-
SOLARIS_6
= GuestOS(string='SOLARIS_6')¶ Solaris 6
-
SOLARIS_7
= GuestOS(string='SOLARIS_7')¶ Solaris 7
-
SOLARIS_8
= GuestOS(string='SOLARIS_8')¶ Solaris 8
-
SOLARIS_9
= GuestOS(string='SOLARIS_9')¶ Solaris 9
-
SUSE
= GuestOS(string='SUSE')¶ Suse Linux
-
SUSE_64
= GuestOS(string='SUSE_64')¶ Suse Linux (64 bit)
-
TURBO_LINUX
= GuestOS(string='TURBO_LINUX')¶ Turbolinux
-
TURBO_LINUX_64
= GuestOS(string='TURBO_LINUX_64')¶ Turbolinux (64 bit)
-
UBUNTU
= GuestOS(string='UBUNTU')¶ Ubuntu Linux
-
UBUNTU_64
= GuestOS(string='UBUNTU_64')¶ Ubuntu Linux (64 bit)
-
UNIXWARE_7
= GuestOS(string='UNIXWARE_7')¶ SCO UnixWare 7
-
VMKERNEL
= GuestOS(string='VMKERNEL')¶ VMware ESX 4
-
VMKERNEL_5
= GuestOS(string='VMKERNEL_5')¶ VMware ESX 5
-
VMKERNEL_6
= GuestOS(string='VMKERNEL_6')¶ VMware ESX 6
-
VMKERNEL_65
= GuestOS(string='VMKERNEL_65')¶ VMware ESX 6.5
-
VMKERNEL_7
= GuestOS(string='VMKERNEL_7')¶ VMware ESX 7. This class attribute was added in vSphere API 7.0.0.0.
-
VMWARE_PHOTON_64
= GuestOS(string='VMWARE_PHOTON_64')¶ VMware Photon (64 bit)
-
WINDOWS_7
= GuestOS(string='WINDOWS_7')¶ Windows 7
-
WINDOWS_7_64
= GuestOS(string='WINDOWS_7_64')¶ Windows 7 (64 bit)
-
WINDOWS_7_SERVER_64
= GuestOS(string='WINDOWS_7_SERVER_64')¶ Windows Server 2008 R2 (64 bit)
-
WINDOWS_8
= GuestOS(string='WINDOWS_8')¶ Windows 8
-
WINDOWS_8_64
= GuestOS(string='WINDOWS_8_64')¶ Windows 8 (64 bit)
-
WINDOWS_8_SERVER_64
= GuestOS(string='WINDOWS_8_SERVER_64')¶ Windows 8 Server (64 bit)
-
WINDOWS_9
= GuestOS(string='WINDOWS_9')¶ Windows 10
-
WINDOWS_9_64
= GuestOS(string='WINDOWS_9_64')¶ Windows 10 (64 bit)
-
WINDOWS_9_SERVER_64
= GuestOS(string='WINDOWS_9_SERVER_64')¶ Windows 10 Server (64 bit)
-
WINDOWS_HYPERV
= GuestOS(string='WINDOWS_HYPERV')¶ Windows Hyper-V
-
WINDOWS_SERVER_2019
= GuestOS(string='WINDOWS_SERVER_2019')¶ Windows Server 2019. This class attribute was added in vSphere API 7.0.0.0.
-
WINDOWS_SERVER_2021
= GuestOS(string='WINDOWS_SERVER_2021')¶ Windows Server 2022. This class attribute was added in vSphere API 7.0.1.0.
-
WIN_2000_ADV_SERV
= GuestOS(string='WIN_2000_ADV_SERV')¶ Windows 2000 Advanced Server
-
WIN_2000_PRO
= GuestOS(string='WIN_2000_PRO')¶ Windows 2000 Professional
-
WIN_2000_SERV
= GuestOS(string='WIN_2000_SERV')¶ Windows 2000 Server
-
WIN_31
= GuestOS(string='WIN_31')¶ Windows 3.1
-
WIN_95
= GuestOS(string='WIN_95')¶ Windows 95
-
WIN_98
= GuestOS(string='WIN_98')¶ Windows 98
-
WIN_LONGHORN
= GuestOS(string='WIN_LONGHORN')¶ Windows Longhorn (experimental)
-
WIN_LONGHORN_64
= GuestOS(string='WIN_LONGHORN_64')¶ Windows Longhorn (64 bit) (experimental)
-
WIN_ME
= GuestOS(string='WIN_ME')¶ Windows Millennium Edition
-
WIN_NET_BUSINESS
= GuestOS(string='WIN_NET_BUSINESS')¶ Windows Small Business Server 2003
-
WIN_NET_DATACENTER
= GuestOS(string='WIN_NET_DATACENTER')¶ Windows Server 2003, Datacenter Edition
-
WIN_NET_DATACENTER_64
= GuestOS(string='WIN_NET_DATACENTER_64')¶ Windows Server 2003, Datacenter Edition (64 bit) (experimental)
-
WIN_NET_ENTERPRISE
= GuestOS(string='WIN_NET_ENTERPRISE')¶ Windows Server 2003, Enterprise Edition
-
WIN_NET_ENTERPRISE_64
= GuestOS(string='WIN_NET_ENTERPRISE_64')¶ Windows Server 2003, Enterprise Edition (64 bit)
-
WIN_NET_STANDARD
= GuestOS(string='WIN_NET_STANDARD')¶ Windows Server 2003, Standard Edition
-
WIN_NET_STANDARD_64
= GuestOS(string='WIN_NET_STANDARD_64')¶ Windows Server 2003, Standard Edition (64 bit)
-
WIN_NET_WEB
= GuestOS(string='WIN_NET_WEB')¶ Windows Server 2003, Web Edition
-
WIN_NT
= GuestOS(string='WIN_NT')¶ Windows NT 4
-
WIN_VISTA
= GuestOS(string='WIN_VISTA')¶ Windows Vista
-
WIN_VISTA_64
= GuestOS(string='WIN_VISTA_64')¶ Windows Vista (64 bit)
-
WIN_XP_HOME
= GuestOS(string='WIN_XP_HOME')¶ Windows XP Home Edition
-
WIN_XP_PRO
= GuestOS(string='WIN_XP_PRO')¶ Windows XP Professional
-
WIN_XP_PRO_64
= GuestOS(string='WIN_XP_PRO_64')¶ Windows XP Professional Edition (64 bit)
-
class
com.vmware.vcenter.vm_client.
GuestOSFamily
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
GuestOSFamily
class defines the valid guest operating system family types reported by a virtual machine. This enumeration was added in vSphere API 6.7.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theGuestOSFamily
instance.
-
DARWIN
= GuestOSFamily(string='DARWIN')¶ Mac OS operating system. This class attribute was added in vSphere API 6.7.
-
LINUX
= GuestOSFamily(string='LINUX')¶ Linux operating system. This class attribute was added in vSphere API 6.7.
-
NETWARE
= GuestOSFamily(string='NETWARE')¶ Novell Netware. This class attribute was added in vSphere API 6.7.
-
OTHER
= GuestOSFamily(string='OTHER')¶ Other operating systems. This class attribute was added in vSphere API 6.7.
-
SOLARIS
= GuestOSFamily(string='SOLARIS')¶ Solaris operating system. This class attribute was added in vSphere API 6.7.
-
WINDOWS
= GuestOSFamily(string='WINDOWS')¶ Windows operating system. This class attribute was added in vSphere API 6.7.
-
class
com.vmware.vcenter.vm_client.
Hardware
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
Hardware
class provides methods for configuring the virtual hardware of a virtual machine.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
Info
(version=None, upgrade_policy=None, upgrade_version=None, upgrade_status=None, upgrade_error=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Hardware.Info
class contains information related to the virtual hardware of a virtual machine.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
version (
Hardware.Version
) – Virtual hardware version.upgrade_policy (
Hardware.UpgradePolicy
) – Scheduled upgrade policy.upgrade_version (
Hardware.Version
) – Target hardware version to be used on the next scheduled virtual hardware upgrade. This attribute is optional and it is only relevant when the value ofupgradePolicy
is one ofHardware.UpgradePolicy.AFTER_CLEAN_SHUTDOWN
orHardware.UpgradePolicy.ALWAYS
.upgrade_status (
Hardware.UpgradeStatus
) – Scheduled upgrade status.upgrade_error (
Exception
) – Reason for the scheduled upgrade failure. This attribute is optional and it is only relevant when the value ofupgradeStatus
isHardware.UpgradeStatus.FAILED
.
-
class
UpdateSpec
(upgrade_policy=None, upgrade_version=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Hardware.UpdateSpec
class describes the updates to virtual hardware settings of a virtual machine.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
upgrade_policy (
Hardware.UpgradePolicy
orNone
) –Scheduled upgrade policy.
If set to
Hardware.UpgradePolicy.NEVER
, theHardware.Info.upgrade_version
attribute will be reset to None. If None, the value is unchanged.upgrade_version (
Hardware.Version
orNone
) –Target hardware version to be used on the next scheduled virtual hardware upgrade.
If specified, this attribute must represent a newer virtual hardware version than the current virtual hardware version reported in
Hardware.Info.version
. IfHardware.UpdateSpec.upgrade_policy
is set toHardware.UpgradePolicy.NEVER
, this attribute must be None. Otherwise, if this attribute is None, default to the most recent virtual hardware version supported by the server.
-
class
UpgradePolicy
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Hardware.UpgradePolicy
class defines the valid virtual hardware upgrade policies for a virtual machine.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theUpgradePolicy
instance.
-
AFTER_CLEAN_SHUTDOWN
= UpgradePolicy(string='AFTER_CLEAN_SHUTDOWN')¶ Run scheduled upgrade when the virtual machine is powered on after a clean shutdown of the guest operating system.
-
ALWAYS
= UpgradePolicy(string='ALWAYS')¶ Run scheduled upgrade when the virtual machine is powered on.
-
NEVER
= UpgradePolicy(string='NEVER')¶ Do not upgrade the virtual machine when it is powered on.
-
class
UpgradeStatus
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Hardware.UpgradeStatus
class defines the valid virtual hardware upgrade statuses for a virtual machine.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theUpgradeStatus
instance.
-
FAILED
= UpgradeStatus(string='FAILED')¶ The most recent scheduled upgrade was not successful.
-
NONE
= UpgradeStatus(string='NONE')¶ No scheduled upgrade has been attempted.
-
PENDING
= UpgradeStatus(string='PENDING')¶ Upgrade is scheduled but has not yet been run.
-
SUCCESS
= UpgradeStatus(string='SUCCESS')¶ The most recent scheduled upgrade was successful.
-
class
Version
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Hardware.Version
class defines the valid virtual hardware versions for a virtual machine. See https://kb.vmware.com/s/article/1003746 (Virtual machine hardware versions (1003746)).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 theVersion
instance.
-
VMX_03
= Version(string='VMX_03')¶ Hardware version 3, first supported in ESXi 2.5.
-
VMX_04
= Version(string='VMX_04')¶ Hardware version 4, first supported in ESXi 3.0.
-
VMX_06
= Version(string='VMX_06')¶ Hardware version 6, first supported in WS 6.0.
-
VMX_07
= Version(string='VMX_07')¶ Hardware version 7, first supported in ESXi 4.0.
-
VMX_08
= Version(string='VMX_08')¶ Hardware version 8, first supported in ESXi 5.0.
-
VMX_09
= Version(string='VMX_09')¶ Hardware version 9, first supported in ESXi 5.1.
-
VMX_10
= Version(string='VMX_10')¶ Hardware version 10, first supported in ESXi 5.5.
-
VMX_11
= Version(string='VMX_11')¶ Hardware version 11, first supported in ESXi 6.0.
-
VMX_12
= Version(string='VMX_12')¶ Hardware version 12, first supported in Workstation 12.0.
-
VMX_13
= Version(string='VMX_13')¶ Hardware version 13, first supported in ESXi 6.5.
-
VMX_14
= Version(string='VMX_14')¶ Hardware version 14, first supported in ESXi 6.7. This class attribute was added in vSphere API 6.7.
-
VMX_15
= Version(string='VMX_15')¶ Hardware version 15, first supported in ESXi 6.7 Update 2. This class attribute was added in vSphere API 6.7.2.
-
VMX_16
= Version(string='VMX_16')¶ Hardware version 16, first supported in Workstation 15.0. This class attribute was added in vSphere API 7.0.0.0.
-
VMX_17
= Version(string='VMX_17')¶ Hardware version 17, first supported in ESXi 7.0.0-0. This class attribute was added in vSphere API 7.0.0.0.
-
VMX_18
= Version(string='VMX_18')¶ Hardware version 18, first supported in ESXi 7.0 U1. This class attribute was added in vSphere API 7.0.1.0.
-
VMX_19
= Version(string='VMX_19')¶ Hardware version 19, first supported in ESXi 7.0 U2. This class attribute was added in vSphere API 7.0.2.0.
-
get
(vm)¶ Returns the virtual hardware settings of a virtual machine.
- Parameters
vm (
str
) – Virtual machine identifier. The parameter must be an identifier for the resource type:VirtualMachine
.- Return type
- Returns
Virtual hardware settings of the virtual machine.
- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the virtual machine is not found.- Raise
com.vmware.vapi.std.errors_client.ResourceInaccessible
if the virtual machine’s configuration state cannot be accessed.- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailable
if the system is unable to communicate with a service to complete the request.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.
-
update
(vm, spec)¶ Updates the virtual hardware settings of a virtual machine.
- Parameters
vm (
str
) – Virtual machine identifier. The parameter must be an identifier for the resource type:VirtualMachine
.spec (
Hardware.UpdateSpec
) – Specification for updating the virtual hardware settings of the virtual machine.
- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the virtual machine is not found.- Raise
com.vmware.vapi.std.errors_client.AlreadyInDesiredState
if the virtual machine is already configured for the desired hardware version.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
if the requested virtual hardware version is not newer than the current version.- Raise
com.vmware.vapi.std.errors_client.Unsupported
if the requested virtual hardware version is not supported by the server.- Raise
com.vmware.vapi.std.errors_client.ResourceBusy
if the virtual machine is busy performing another operation.- Raise
com.vmware.vapi.std.errors_client.ResourceInaccessible
if the virtual machine’s configuration state cannot be accessed.- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailable
if the system is unable to communicate with a service to complete the request.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.
-
upgrade
(vm, version=None)¶ Upgrades the virtual machine to a newer virtual hardware version.
- Parameters
vm (
str
) – Virtual machine identifier. The parameter must be an identifier for the resource type:VirtualMachine
.version (
Hardware.Version
orNone
) – New virtual machine version. If None, defaults to the most recent virtual hardware version supported by the server.
- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the virtual machine is not found.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the virtual machine is not powered off.- Raise
com.vmware.vapi.std.errors_client.AlreadyInDesiredState
if the virtual machine is already configured for the desired hardware version.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
ifversion
is older than the current virtual hardware version.- Raise
com.vmware.vapi.std.errors_client.Unsupported
ifversion
is not supported by the server.- Raise
com.vmware.vapi.std.errors_client.ResourceBusy
if the virtual machine is busy performing another operation.- Raise
com.vmware.vapi.std.errors_client.ResourceInaccessible
if the virtual machine’s configuration state cannot be accessed.- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailable
if the system is unable to communicate with a service to complete the request.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.
-
class
com.vmware.vcenter.vm_client.
Identity
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
Identity
class provides methods for managing the identity of a virtual machine. 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
Info
(name=None, bios_uuid=None, instance_uuid=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Identity.Info
class contains information about the identity of a virtual machine. This class was added in vSphere API 6.7.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
name (
str
) – Virtual machine name. This attribute was added in vSphere API 6.7.1.bios_uuid (
str
) – 128-bit SMBIOS UUID of a virtual machine represented as a hexadecimal string in “12345678-abcd-1234-cdef-123456789abc” format. This attribute was added in vSphere API 6.7.1.instance_uuid (
str
) – VirtualCenter-specific 128-bit UUID of a virtual machine, represented as a hexademical string. This identifier is used by VirtualCenter to uniquely identify all virtual machine instances, including those that may share the same SMBIOS UUID. This attribute was added in vSphere API 6.7.1.
-
class
com.vmware.vcenter.vm_client.
LibraryItem
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
LibraryItem
class provides methods to identify virtual machines managed by Content Library. This class was added in vSphere API 6.9.1.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
CheckOutInfo
(library_item=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItem.CheckOutInfo
class contains information about a virtual machine checked out of a content library item. This class was added in vSphere API 6.9.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
library_item (
str
) – Identifier of the library item that the virtual machine is checked out from. This attribute was added in vSphere API 6.9.1. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.content.library.Item
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.content.library.Item
.
-
class
Info
(check_out=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItem.Info
class contains information about the library item associated with a virtual machine. This class was added in vSphere API 6.9.1.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
check_out (
LibraryItem.CheckOutInfo
orNone
) – Information about the checked out virtual machine. This attribute was added in vSphere API 6.9.1. If None, the virtual machine is not checked out from a library item.
-
get
(vm)¶ Returns the information about the library item associated with the virtual machine. This method was added in vSphere API 6.9.1.
- Parameters
vm (
str
) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:VirtualMachine
.- Return type
- Returns
Information about the library item associated with the virtual machine.
- Raise
com.vmware.vapi.std.errors_client.NotFound
if the virtual machine is not found.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user that requested the method cannot be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user that requested the method is not authorized to perform the method.
-
class
com.vmware.vcenter.vm_client.
Power
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
Power
class provides methods for managing the power state of a virtual machine.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
Info
(state=None, clean_power_off=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Power.Info
class contains information about the power state of a virtual machine.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
state (
Power.State
) – Power state of the virtual machine.clean_power_off (
bool
) – Flag indicating whether the virtual machine was powered off cleanly. This attribute may be used to detect that the virtual machine crashed unexpectedly and should be restarted. This attribute is optional and it is only relevant when the value ofstate
isPower.State.POWERED_OFF
.
-
class
State
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Power.State
class defines the valid power states for a virtual machine.Note
This class represents an enumerated type in the interface language definition. The class contains class attributes which represent the values in the current version of the enumerated type. Newer versions of the enumerated type may contain new values. To use new values of the enumerated type in communication with a server that supports the newer version of the API, you instantiate this class. See enumerated type description page.
- Parameters
string (
str
) – String value for theState
instance.
-
POWERED_OFF
= State(string='POWERED_OFF')¶ The virtual machine is powered off.
-
POWERED_ON
= State(string='POWERED_ON')¶ The virtual machine is powered on.
-
SUSPENDED
= State(string='SUSPENDED')¶ The virtual machine is suspended.
-
get
(vm)¶ Returns the power state information of a virtual machine.
- Parameters
vm (
str
) – Virtual machine identifier. The parameter must be an identifier for the resource type:VirtualMachine
.- Return type
- Returns
Power state information for the specified virtual machine.
- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the virtual machine is not found.- Raise
com.vmware.vapi.std.errors_client.ResourceInaccessible
if the virtual machine’s configuration or execution state cannot be accessed.- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailable
if the system is unable to communicate with a service to complete the request.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:The resource
VirtualMachine
referenced by the parametervm
requiresSystem.Read
.
-
reset
(vm)¶ Resets a powered-on virtual machine.
- Parameters
vm (
str
) – Virtual machine identifier. The parameter must be an identifier for the resource type:VirtualMachine
.- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the virtual machine is not found.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the virtual machine is powered off or suspended.- Raise
com.vmware.vapi.std.errors_client.ResourceBusy
if the virtual machine is performing another operation- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailable
if the system is unable to communicate with a service to complete the request.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:The resource
VirtualMachine
referenced by the parametervm
requiresVirtualMachine.Interact.Reset
.
-
start
(vm)¶ Powers on a powered-off or suspended virtual machine.
- Parameters
vm (
str
) – Virtual machine identifier. The parameter must be an identifier for the resource type:VirtualMachine
.- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the virtual machine is not found.- Raise
com.vmware.vapi.std.errors_client.AlreadyInDesiredState
if the virtual machine is already powered on.- Raise
com.vmware.vapi.std.errors_client.Unsupported
if the virtual machine does not support being powered on (e.g. marked as a template, serving as a fault-tolerance secondary virtual machine).- Raise
com.vmware.vapi.std.errors_client.UnableToAllocateResource
if resources cannot be allocated for the virtual machine (e.g. physical resource allocation policy cannot be satisfied, insufficient licenses are available to run the virtual machine).- Raise
com.vmware.vapi.std.errors_client.ResourceInaccessible
if resources required by the virtual machine are not accessible (e.g. virtual machine configuration files or virtual disks are on inaccessible storage, no hosts are available to run the virtual machine).- Raise
com.vmware.vapi.std.errors_client.ResourceInUse
if resources required by the virtual machine are in use (e.g. virtual machine configuration files or virtual disks are locked, host containing the virtual machine is an HA failover host).- Raise
com.vmware.vapi.std.errors_client.ResourceBusy
if the virtual machine is performing another operation.- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailable
if the system is unable to communicate with a service to complete the request.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:The resource
VirtualMachine
referenced by the parametervm
requiresVirtualMachine.Interact.PowerOn
.
-
stop
(vm)¶ Powers off a powered-on or suspended virtual machine.
- Parameters
vm (
str
) – Virtual machine identifier. The parameter must be an identifier for the resource type:VirtualMachine
.- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the virtual machine is not found.- Raise
com.vmware.vapi.std.errors_client.AlreadyInDesiredState
if the virtual machine is already powered off.- Raise
com.vmware.vapi.std.errors_client.ResourceBusy
if the virtual machine is performing another operation.- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailable
if the system is unable to communicate with a service to complete the request.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:The resource
VirtualMachine
referenced by the parametervm
requiresVirtualMachine.Interact.PowerOff
.
-
suspend
(vm)¶ Suspends a powered-on virtual machine.
- Parameters
vm (
str
) – Virtual machine identifier. The parameter must be an identifier for the resource type:VirtualMachine
.- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the virtual machine is not found.- Raise
com.vmware.vapi.std.errors_client.AlreadyInDesiredState
if the virtual machine is already suspended.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the virtual machine is powered off.- Raise
com.vmware.vapi.std.errors_client.ResourceBusy
if the virtual machine is performing another operation.- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailable
if the system is unable to communicate with a service to complete the request.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user can not be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user doesn’t have the required privileges.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:The resource
VirtualMachine
referenced by the parametervm
requiresVirtualMachine.Interact.Suspend
.
-
class
com.vmware.vcenter.vm_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.vm_client.
Tools
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
Tools
class provides methods for managing VMware Tools in the guest operating system. 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
Info
(auto_update_supported=None, install_attempt_count=None, error=None, version_number=None, version=None, upgrade_policy=None, version_status=None, install_type=None, run_state=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
Tools.Info
class describes the VMWare Tools properties of a virtual 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
auto_update_supported (
bool
) – Set if the virtual machine supports auto-upgrading Tools viaTools.UpgradePolicy
. This attribute was added in vSphere API 7.0.0.0.install_attempt_count (
long
orNone
) – Number of attempts that have been made to install or upgrade the version of Tools installed on this virtual machine. This attribute was added in vSphere API 7.0.0.0. This attribute will be None if there have been no Tools install or upgrade attempt.error (
Exception
orNone
) – Error that happened, if any, during last attempt to upgrade or install Tools. This attribute was added in vSphere API 7.0.0.0. This attribute will be None if a the last Tools install or upgrade attempt succeeded.version_number (
long
orNone
) – Version of VMware Tools installed on the guest operating system. This attribute was added in vSphere API 7.0.0.0. This attribute wil be None if VMWare Tools is not installed. This is an integer constructed as follows: (((MJR) << 10) + ((MNR) << 5) + (REV)) Where MJR is tha major verson, MNR is the minor version and REV is the revision. Tools version = T Tools Version Major = MJR = (T / 1024) Tools Version Minor = MNR = ((T % 1024) / 32) Tools Version Revision = BASE = ((T % 1024) % 32) Tools actual version = MJR.MNR.REVversion (
str
orNone
) – Version of VMware Tools installed on the guest operating system. This is a human-readable value that should not be parsed. This attribute was added in vSphere API 7.0.0.0. This attribute wil be None if VMWare Tools is not installed.upgrade_policy (
Tools.UpgradePolicy
) – Tools upgrade policy setting for the virtual machine.Tools.UpgradePolicy
. This attribute was added in vSphere API 7.0.0.0.version_status (
Tools.VersionStatus
orNone
) – Current version status of VMware Tools in the guest operating system, if known. This attribute was added in vSphere API 7.0.0.0. This attribute will be None if the version status is not known, for example if VMware Tools is too old to report the information.install_type (
Tools.ToolsInstallType
orNone
) – Current installation type of VMware Tools in the guest operating system. This attribute was added in vSphere API 7.0.0.0. This attribute will be None if the installation type is not known, for example if VMware Tools is too old to report the information.run_state (
Tools.RunState
) – Current run state of VMware Tools in the guest operating system. This attribute was added in vSphere API 7.0.0.0.
-
class
RunState
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
Current run state of VMware Tools in the guest operating system. 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 theRunState
instance.
-
EXECUTING_SCRIPTS
= RunState(string='EXECUTING_SCRIPTS')¶ VMware Tools is running scripts as part of a state transition. This class attribute was added in vSphere API 7.0.0.0.
-
NOT_RUNNING
= RunState(string='NOT_RUNNING')¶ VMware Tools is not running. This class attribute was added in vSphere API 7.0.0.0.
-
RUNNING
= RunState(string='RUNNING')¶ VMware Tools is running. This class attribute was added in vSphere API 7.0.0.0.
-
class
ToolsInstallType
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Tools.ToolsInstallType
class defines the installation type of the Tools in the guest operating system. 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 theToolsInstallType
instance.
-
MSI
= ToolsInstallType(string='MSI')¶ MSI is the installation type used for VMware Tools on Windows. This class attribute was added in vSphere API 7.0.0.0.
-
OPEN_VM_TOOLS
= ToolsInstallType(string='OPEN_VM_TOOLS')¶ open-vm-tools are the open-source version of VMware Tools, may have been packaged by the OS vendor. This class attribute was added in vSphere API 7.0.0.0.
-
OSP
= ToolsInstallType(string='OSP')¶ OSPs are RPM or Debian packages tailored for the OS in the VM. See http://packages.vmware.com. This class attribute was added in vSphere API 7.0.0.0.
-
TAR
= ToolsInstallType(string='TAR')¶ Tools have been installed by the tar installer. This class attribute was added in vSphere API 7.0.0.0.
-
UNKNOWN
= ToolsInstallType(string='UNKNOWN')¶ Installation type is not known. Most likely tools have been installed by OSPs or open-vm-tools, but a version that does not report its install type or an install type that we do not recognize. This class attribute was added in vSphere API 7.0.0.0.
-
class
UpdateSpec
(upgrade_policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The (\@name UpdateSpec} class describes the VMware Tools properties of a virtual machine that can be updated. 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
upgrade_policy (
Tools.UpgradePolicy
orNone
) – Tools upgrade policy setting for the virtual machine.Tools.UpgradePolicy
. This attribute was added in vSphere API 7.0.0.0. If None the upgrade policy will not be modified.
-
class
UpgradePolicy
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Tools.UpgradePolicy
class defines when Tools are auto-upgraded for a virtual machine. 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 theUpgradePolicy
instance.
-
MANUAL
= UpgradePolicy(string='MANUAL')¶ No auto-upgrades for Tools will be performed for this virtual machine. Users must manually invoke the
Tools.upgrade()
method to update Tools. This class attribute was added in vSphere API 7.0.0.0.
-
UPGRADE_AT_POWER_CYCLE
= UpgradePolicy(string='UPGRADE_AT_POWER_CYCLE')¶ When the virtual machine is power-cycled, the system checks for a newer version of Tools when the virtual machine is powered on. If it is available, a Tools upgrade is automatically performed on the virtual machine and it is rebooted if necessary. This class attribute was added in vSphere API 7.0.0.0.
-
class
VersionStatus
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
Tools.VersionStatus
class defines the version status types of VMware Tools installed in the guest operating system. 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 theVersionStatus
instance.
-
BLACKLISTED
= VersionStatus(string='BLACKLISTED')¶ VMware Tools is installed, but the installed version is known to have a grave bug and should be immediately upgraded. This class attribute was added in vSphere API 7.0.0.0.
-
CURRENT
= VersionStatus(string='CURRENT')¶ VMware Tools is installed, and the version is current. This class attribute was added in vSphere API 7.0.0.0.
-
NOT_INSTALLED
= VersionStatus(string='NOT_INSTALLED')¶ VMware Tools has never been installed. This class attribute was added in vSphere API 7.0.0.0.
-
SUPPORTED_NEW
= VersionStatus(string='SUPPORTED_NEW')¶ VMware Tools is installed, supported, and newer than the version available on the host. This class attribute was added in vSphere API 7.0.0.0.
-
SUPPORTED_OLD
= VersionStatus(string='SUPPORTED_OLD')¶ VMware Tools is installed, supported, but a newer version is available. This class attribute was added in vSphere API 7.0.0.0.
-
TOO_NEW
= VersionStatus(string='TOO_NEW')¶ VMware Tools is installed, and the version is known to be too new to work correctly with this virtual machine. This class attribute was added in vSphere API 7.0.0.0.
-
TOO_OLD_UNSUPPORTED
= VersionStatus(string='TOO_OLD_UNSUPPORTED')¶ VMware Tools is installed, but the version is too old. This class attribute was added in vSphere API 7.0.0.0.
-
UNMANAGED
= VersionStatus(string='UNMANAGED')¶ VMware Tools is installed, but it is not managed by VMware. This includes open-vm-tools or OSPs which should be managed by the guest operating system. This class attribute was added in vSphere API 7.0.0.0.
-
get
(vm)¶ Get the properties of VMware Tools. This method was added in vSphere API 7.0.0.0.
- Parameters
vm (
str
) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:VirtualMachine
.- Return type
- Returns
VMware Tools properties.
- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the virtual machine is not found.
-
update
(vm, spec)¶ Update the properties of VMware Tools. This method was added in vSphere API 7.0.0.0.
- Parameters
vm (
str
) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:VirtualMachine
.spec (
Tools.UpdateSpec
) – The new values.
- 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 theTools.UpdateSpec.upgrade_policy
attribute contains a value that is not supported by the server.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the virtual machine is not found.
-
upgrade
(vm, command_line_options=None)¶ Begins the Tools upgrade process. To monitor the status of the Tools upgrade, clients should check the Tools status by calling
Tools.get()
and examiningversionStatus
andrunState
. This method was added in vSphere API 7.0.0.0.- Parameters
vm (
str
) – Identifier of the virtual machine. The parameter must be an identifier for the resource type:VirtualMachine
.command_line_options (
str
orNone
) – Command line options passed to the installer to modify the installation procedure for Tools. Set if any additional options are desired.
- Raise
com.vmware.vapi.std.errors_client.NotFound
if the virtual machine is not found.- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailable
if the VMware Tools are not running.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the virtual machine is not powered on.- Raise
com.vmware.vapi.std.errors_client.AlreadyInDesiredState
is an upgrade is already in progress.- Raise
com.vmware.vapi.std.errors_client.Error
if the upgrade process fails inside the guest operating system.
com.vmware.vcenter.vm_template_client module¶
The com.vmware.vcenter.vm_template_client
module provides classes and
classes that will let its client manage VMTX template in Content Library.
-
class
com.vmware.vcenter.vm_template_client.
LibraryItems
(config)¶ Bases:
vmware.vapi.bindings.stub.VapiInterface
The
LibraryItems
class provides methods to deploy virtual machines from library items containing virtual machine templates, as well as methods to create library items containing virtual machine templates. TheLibraryItems
class also provides an operation to retrieve information about the template contained in the library item. This class was added in vSphere API 6.8.- Parameters
config (
vmware.vapi.bindings.stub.StubConfiguration
) – Configuration to be used for creating the stub.
-
class
CpuInfo
(count=None, cores_per_socket=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.CpuInfo
class contains CPU related information about the virtual machine template. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
count (
long
) – Number of CPU cores. This attribute was added in vSphere API 6.8.cores_per_socket (
long
) – Number of CPU cores per socket. This attribute was added in vSphere API 6.8.
-
class
CpuUpdateSpec
(num_cpus=None, num_cores_per_socket=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.CpuUpdateSpec
class describes updates to the CPU configuration of the deployed virtual machine. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
num_cpus (
long
orNone
) – Number of virtual processors in the deployed virtual machine. This attribute was added in vSphere API 6.8. If {\@term.unset}, the deployed virtual machine has the same CPU count as the source virtual machine template contained in the library item.num_cores_per_socket (
long
orNone
) – Number of cores among which to distribute CPUs in the deployed virtual machine. This attribute was added in vSphere API 6.8. If {\@term.unset}, the deployed virtual machine has the same number of cores per socket as the source virtual machine template contained in the library item.
-
class
CreatePlacementSpec
(folder=None, resource_pool=None, host=None, cluster=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.CreatePlacementSpec
class contains information used to place a virtual machine template onto resources within the vCenter inventory. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
folder (
str
orNone
) – Virtual machine folder into which the virtual machine template should be placed. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:Folder
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Folder
. If None, the virtual machine template will be placed in the same folder as the source virtual machine.resource_pool (
str
orNone
) – Resource pool into which the virtual machine template should be placed. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:ResourcePool
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:ResourcePool
. If None, the system will attempt to choose a suitable resource pool for the virtual machine template; if a resource pool cannot be chosen, the library item creation operation will fail.host (
str
orNone
) – Host onto which the virtual machine template should be placed. Ifhost
andresourcePool
are both specified,resourcePool
must belong tohost
. Ifhost
andcluster
are both specified,host
must be a member ofcluster
. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:HostSystem
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:HostSystem
. This attribute may be None ifresourcePool
orcluster
is specified. If None, the system will attempt to choose a suitable host for the virtual machine template; if a host cannot be chosen, the library item creation operation will fail.cluster (
str
orNone
) – Cluster onto which the virtual machine template should be placed. Ifcluster
andresourcePool
are both specified,resourcePool
must belong tocluster
. Ifcluster
andhost
are both specified,host
must be a member ofcluster
. This attribute was added in vSphere API 6.8. 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
. IfresourcePool
orhost
is specified, it is recommended that this attribute be None.
-
class
CreateSpec
(source_vm=None, name=None, description=None, library=None, vm_home_storage=None, disk_storage=None, disk_storage_overrides=None, placement=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.CreateSpec
class defines the information required to create a library item containing a virtual machine template. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
source_vm (
str
) – Identifier of the source virtual machine to create the library item from. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:VirtualMachine
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:VirtualMachine
.name (
str
) – Name of the library item. This attribute was added in vSphere API 6.8.description (
str
orNone
) – Description of the library item. This attribute was added in vSphere API 6.8. If None, the newly created library item has the same description as the source virtual machine.library (
str
) – Identifier of the library in which the new library item should be created. This attribute was added in vSphere API 6.8. 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
.vm_home_storage (
LibraryItems.CreateSpecVmHomeStorage
orNone
) – Storage location for the virtual machine template’s configuration and log files. This attribute was added in vSphere API 6.8. If None, the virtual machine template’s configuration and log files are placed on the default storage backing associated with the library specified bylibrary
.disk_storage (
LibraryItems.CreateSpecDiskStorage
orNone
) –Storage specification for the virtual machine template’s disks. This attribute was added in vSphere API 6.8. If both
diskStorageOverrides
anddiskStorage
are None, the virtual machine template’s disks are placed in the default storage backing associated with the library specified bylibrary
.If
diskStorageOverrides
is None anddiskStorage
is specified, all of the virtual machine template’s disks are created with the storage spec specified bydiskStorage
.If
diskStorageOverrides
is specified anddiskStorage
is None, disks with identifiers that are not indiskStorageOverrides
are placed in the default storage backing associated with the library specified bylibrary
.If both
diskStorageOverrides
anddiskStorage
are specified, disks with identifiers that are not indiskStorageOverrides
are created with the storage spec specified bydiskStorage
.disk_storage_overrides ((
dict
ofstr
andLibraryItems.CreateSpecDiskStorage
) orNone
) –Storage specification for individual disks in the virtual machine template. This is specified as a mapping between disk identifiers in the source virtual machine and their respective storage specifications. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the key in the attribute
dict
must be an identifier for the resource type:com.vmware.vcenter.vm.hardware.Disk
. When methods return a value of this class as a return value, the key in the attributedict
will be an identifier for the resource type:com.vmware.vcenter.vm.hardware.Disk
. If bothdiskStorageOverrides
anddiskStorage
are None, the virtual machine template’s disks are placed in the default storage backing associated with the library specified bylibrary
.If
diskStorageOverrides
is None anddiskStorage
is specified, all of the virtual machine template’s disks are created with the storage spec specified bydiskStorage
.If
diskStorageOverrides
is specified anddiskStorage
is None, disks with identifiers that are not indiskStorageOverrides
are placed in the default storage backing associated with the library specified bylibrary
.If both
diskStorageOverrides
anddiskStorage
are specified, disks with identifiers that are not indiskStorageOverrides
are created with the storage spec specified bydiskStorage
.placement (
LibraryItems.CreatePlacementSpec
orNone
) –Information used to place the virtual machine template. This attribute was added in vSphere API 6.8. This attribute is currently required. In the future, if this attribute is None, the system will place the virtual machine template on a suitable resource.
If specified, each attribute will be used for placement. If the attributes result in disjoint placement, the operation will fail. If the attributes along with the placement values of the source virtual machine result in disjoint placement, the operation will fail.
-
class
CreateSpecDiskStorage
(datastore=None, storage_policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.CreateSpecDiskStorage
class defines the storage specification for a virtual machine template’s disks. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
datastore (
str
orNone
) –Identifier for the datastore associated with a virtual machine template’s disk. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:
Datastore
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Datastore
. This attribute is currently required.If
storagePolicy
is also specified and is incompatible with thedatastore
, then the disk will be flagged as being out of compliance with the specified storage policy.storage_policy (
LibraryItems.CreateSpecDiskStoragePolicy
orNone
) – Storage policy for a virtual machine template’s disk. This attribute was added in vSphere API 6.8. If None,datastore
must be specified and the virtual machine template’s disk is created with the default storage policy associated with thedatastore
.
-
class
CreateSpecDiskStoragePolicy
(type=None, policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.CreateSpecDiskStoragePolicy
class defines the storage policy specification for a virtual machine template’s disks. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
type (
LibraryItems.CreateSpecDiskStoragePolicy.Type
) – Policy type to be used when creating a virtual machine template’s disk. This attribute was added in vSphere API 6.8.policy (
str
) – Identifier for the storage policy to use. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.spbm.StorageProfile
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.spbm.StorageProfile
. This attribute is optional and it is only relevant when the value oftype
isLibraryItems.CreateSpecDiskStoragePolicy.Type.USE_SPECIFIED_POLICY
.
-
class
Type
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
Policy type for a virtual machine template’s disk. This enumeration was added in vSphere API 6.8.
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 theType
instance.
-
USE_SPECIFIED_POLICY
= Type(string='USE_SPECIFIED_POLICY')¶ Use the specified policy. This class attribute was added in vSphere API 6.8.
-
class
CreateSpecVmHomeStorage
(datastore=None, storage_policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.CreateSpecVmHomeStorage
class defines the storage specification for a virtual machine template’s configuration and log files. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
datastore (
str
orNone
) –Identifier of the datastore for the virtual machine template’s configuration and log files. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:
Datastore
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Datastore
. This attribute is currently required.When
storagePolicy
is also specified and is incompatible with thedatastore
, then the virtual machine template will be flagged as being out of compliance with the specified storage policy.storage_policy (
LibraryItems.CreateSpecVmHomeStoragePolicy
orNone
) – Storage policy for the virtual machine template’s configuration and log files. This attribute was added in vSphere API 6.8. If None,datastore
must be specified and the virtual machine template’s configuration and log files are created with the default storage policy associated with thedatastore
.
-
class
CreateSpecVmHomeStoragePolicy
(type=None, policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.CreateSpecVmHomeStoragePolicy
class defines the storage policy specification for a virtual machine template’s configuration and log files. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
type (
LibraryItems.CreateSpecVmHomeStoragePolicy.Type
) – Policy type to be used when creating the virtual machine template’s configuration and log files. This attribute was added in vSphere API 6.8.policy (
str
) – Identifier for the storage policy to use. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.spbm.StorageProfile
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.spbm.StorageProfile
. This attribute is optional and it is only relevant when the value oftype
isLibraryItems.CreateSpecVmHomeStoragePolicy.Type.USE_SPECIFIED_POLICY
.
-
class
Type
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
Policy type for the virtual machine template’s configuration and log files. This enumeration was added in vSphere API 6.8.
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 theType
instance.
-
USE_SPECIFIED_POLICY
= Type(string='USE_SPECIFIED_POLICY')¶ Use the specified policy. This class attribute was added in vSphere API 6.8.
-
class
DeployPlacementSpec
(folder=None, resource_pool=None, host=None, cluster=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.DeployPlacementSpec
class contains information used to place a virtual machine onto resources within the vCenter inventory. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
folder (
str
orNone
) –Virtual machine folder into which the deployed virtual machine should be placed. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:
Folder
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Folder
. This attribute is currently required.If None, the system will attempt to choose a suitable folder for the virtual machine; if a folder cannot be chosen, the virtual machine deployment operation will fail.
resource_pool (
str
orNone
) – Resource pool into which the deployed virtual machine should be placed. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:ResourcePool
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:ResourcePool
. If None, the system will attempt to choose a suitable resource pool for the virtual machine; if a resource pool cannot be chosen, the virtual machine deployment operation will fail.host (
str
orNone
) – Host onto which the virtual machine should be placed. Ifhost
andresourcePool
are both specified,resourcePool
must belong tohost
. Ifhost
andcluster
are both specified,host
must be a member ofcluster
. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:HostSystem
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:HostSystem
. This attribute may be None ifresourcePool
orcluster
is specified. If None, the system will attempt to choose a suitable host for the virtual machine; if a host cannot be chosen, the virtual machine deployment operation will fail.cluster (
str
orNone
) – Cluster onto which the deployed virtual machine should be placed. Ifcluster
andresourcePool
are both specified,resourcePool
must belong tocluster
. Ifcluster
andhost
are both specified,host
must be a member ofcluster
. This attribute was added in vSphere API 6.8. 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
. IfresourcePool
orhost
is specified, it is recommended that this attribute be None.
-
class
DeploySpec
(name=None, description=None, vm_home_storage=None, disk_storage=None, disk_storage_overrides=None, placement=None, powered_on=None, guest_customization=None, hardware_customization=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.DeploySpec
class defines the deployment parameters that can be specified for thedeploy
method. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
name (
str
) – Name of the deployed virtual machine. This attribute was added in vSphere API 6.8.description (
str
orNone
) – Description of the deployed virtual machine. This attribute was added in vSphere API 6.8. If None, the deployed virtual machine has the same description as the source library item.vm_home_storage (
LibraryItems.DeploySpecVmHomeStorage
orNone
) – Storage location for the deployed virtual machine’s configuration and log files. This attribute was added in vSphere API 6.8. If None, the deployed virtual machine’s configuration and log files are created with the same storage spec as the source virtual machine template’s configuration and log files.disk_storage (
LibraryItems.DeploySpecDiskStorage
orNone
) –Storage specification for the deployed virtual machine’s disks. This attribute was added in vSphere API 6.8. If both
diskStorageOverrides
anddiskStorage
are None, the deployed virtual machine’s disks are created with the same storage spec as the corresponding disks in the source virtual machine template contained in the library item.If
diskStorageOverrides
is None anddiskStorage
is specified, all of the deployed virtual machine’s disks are created with the storage spec specified bydiskStorage
.If
diskStorageOverrides
is specified anddiskStorage
is None, disks with identifiers that are not indiskStorageOverrides
are created with the same storage spec as the corresponding disks in the source virtual machine template contained in the library item.If both
diskStorageOverrides
anddiskStorage
are specified, disks with identifiers that are not indiskStorageOverrides
are created with the storage spec specified bydiskStorage
.disk_storage_overrides ((
dict
ofstr
andLibraryItems.DeploySpecDiskStorage
) orNone
) –Storage specification for individual disks in the deployed virtual machine. This is specified as a mapping between disk identifiers in the source virtual machine template contained in the library item and their storage specifications. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the key in the attribute
dict
must be an identifier for the resource type:com.vmware.vcenter.vm.hardware.Disk
. When methods return a value of this class as a return value, the key in the attributedict
will be an identifier for the resource type:com.vmware.vcenter.vm.hardware.Disk
. If bothdiskStorageOverrides
anddiskStorage
are None, the deployed virtual machine’s disks are created with the same storage spec as the corresponding disks in the source virtual machine template contained in the library item.If
diskStorageOverrides
is None anddiskStorage
is specified, all of the deployed virtual machine’s disks are created with the storage spec specified bydiskStorage
.If
diskStorageOverrides
is specified anddiskStorage
is None, disks with identifiers that are not indiskStorageOverrides
are created with the same storage spec as the corresponding disks in the source virtual machine template contained in the library item.If both
diskStorageOverrides
anddiskStorage
are specified, disks with identifiers that are not indiskStorageOverrides
are created with the storage spec specified bydiskStorage
.placement (
LibraryItems.DeployPlacementSpec
orNone
) –Information used to place the deployed virtual machine. This attribute was added in vSphere API 6.8. This attribute is currently required. In the future, if this attribute is None, the system will use the values from the source virtual machine template contained in the library item.
If specified, each attribute will be used for placement. If the attributes result in disjoint placement, the operation will fail. If the attributes along with the placement values of the source virtual machine template result in disjoint placement, the operation will fail.
powered_on (
bool
orNone
) – Specifies whether the deployed virtual machine should be powered on after deployment. This attribute was added in vSphere API 6.8. If None, the virtual machine will not be powered on after deployment.guest_customization (
LibraryItems.GuestCustomizationSpec
orNone
) – Guest customization spec to apply to the deployed virtual machine. This attribute was added in vSphere API 6.8. If None, the guest operating system is not customized after deployment.hardware_customization (
LibraryItems.HardwareCustomizationSpec
orNone
) – Hardware customization spec which specifies updates to the deployed virtual machine. This attribute was added in vSphere API 6.8. If None, the deployed virtual machine has the same hardware configuration as the source virtual machine template contained in the library item.
-
class
DeploySpecDiskStorage
(datastore=None, storage_policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.DeploySpecDiskStorage
class contains the storage specification for disks in the virtual machine. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
datastore (
str
orNone
) –Identifier for the datastore associated the deployed virtual machine’s disk. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:
Datastore
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Datastore
. This attribute is currently required.If
storagePolicy
is also specified and is incompatible with thedatastore
, then the disk will be flagged as being out of compliance with the specified storage policy.storage_policy (
LibraryItems.DeploySpecDiskStoragePolicy
orNone
) – Storage policy for the deployed virtual machine’s disk. This attribute was added in vSphere API 6.8. If None,datastore
must be specified and the deployed virtual machine’s disk is created with the default storage policy associated with thedatastore
.
-
class
DeploySpecDiskStoragePolicy
(type=None, policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.DeploySpecDiskStoragePolicy
class describes the storage policy specification for the deployed virtual machine’s disks. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
type (
LibraryItems.DeploySpecDiskStoragePolicy.Type
) – Policy type to be used when creating the deployed virtual machine’s disk. This attribute was added in vSphere API 6.8.policy (
str
) – Identifier of the storage policy to use. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.spbm.StorageProfile
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.spbm.StorageProfile
. This attribute is optional and it is only relevant when the value oftype
isLibraryItems.DeploySpecDiskStoragePolicy.Type.USE_SPECIFIED_POLICY
.
-
class
Type
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
Policy type for the deployed virtual machine’s disk. This enumeration was added in vSphere API 6.8.
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 theType
instance.
-
USE_SOURCE_POLICY
= Type(string='USE_SOURCE_POLICY')¶ Use the storage policy that is associated with the corresponding disk in the source virtual machine template. This class attribute was added in vSphere API 6.8.
-
USE_SPECIFIED_POLICY
= Type(string='USE_SPECIFIED_POLICY')¶ Use the specified policy. This class attribute was added in vSphere API 6.8.
-
class
DeploySpecVmHomeStorage
(datastore=None, storage_policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.DeploySpecVmHomeStorage
class defines the storage specification for a deployed virtual machine’s configuration and log files. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
datastore (
str
orNone
) –Identifier of the datastore for the deployed virtual machine’s configuration and log files. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:
Datastore
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Datastore
. This attribute is currently required.When
storagePolicy
is also specified and is incompatible with thedatastore
, then the deployed virtual machine will be flagged as being out of compliance with the specified storage policy.storage_policy (
LibraryItems.DeploySpecVmHomeStoragePolicy
orNone
) – Storage policy for the deployed virtual machine’s configuration and log files. This attribute was added in vSphere API 6.8. If None,datastore
must be specified and the deployed virtual machine’s configuration and log files are created with the default storage policy associated with thedatastore
.
-
class
DeploySpecVmHomeStoragePolicy
(type=None, policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.DeploySpecVmHomeStoragePolicy
class defines the storage policy specification for the deployed virtual machine’s configuration and log files. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
type (
LibraryItems.DeploySpecVmHomeStoragePolicy.Type
) – Policy type to be used when creating the deployed virtual machine’s configuration and log files. This attribute was added in vSphere API 6.8.policy (
str
) – Identifier for the storage policy to use. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.spbm.StorageProfile
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.spbm.StorageProfile
. This attribute is optional and it is only relevant when the value oftype
isLibraryItems.DeploySpecVmHomeStoragePolicy.Type.USE_SPECIFIED_POLICY
.
-
class
Type
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
Policy type for the deployed virtual machine’s configuration and log files. This enumeration was added in vSphere API 6.8.
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 theType
instance.
-
USE_SOURCE_POLICY
= Type(string='USE_SOURCE_POLICY')¶ Use the storage policy that is associated with the source virtual machine template’s configuration and log files. This class attribute was added in vSphere API 6.8.
-
USE_SPECIFIED_POLICY
= Type(string='USE_SPECIFIED_POLICY')¶ Use the specified policy. This class attribute was added in vSphere API 6.8.
-
class
DiskInfo
(capacity=None, disk_storage=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.DiskInfo
class contains information about the virtual machine template’s virtual disk. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
capacity (
long
orNone
) – Capacity of the virtual disk in bytes. This attribute was added in vSphere API 6.8. This attribute will be None if the virtual disk is inaccessible.disk_storage (
LibraryItems.DiskStorageInfo
) – Disk storage related information. This attribute was added in vSphere API 6.8.
-
class
DiskStorageInfo
(datastore=None, storage_policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.DiskStorageInfo
class contains storage related information about a virtual machine template’s virtual disk. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
datastore (
str
) – Identifier of the datastore where the disk is stored. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:Datastore
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Datastore
.storage_policy (
str
orNone
) – Identifier of the storage policy associated with the virtual disk. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.spbm.StorageProfile
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.spbm.StorageProfile
. If None, the virtual disk does not have a storage policy associated with it.
-
class
DiskUpdateSpec
(capacity=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.DiskUpdateSpec
class describes updates to the configuration of a virtual disk in the deployed virtual machine. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
capacity (
long
) – Updated capacity of the virtual disk backing in bytes. This value has to be larger than the original capacity of the disk. This attribute was added in vSphere API 6.8.
-
class
EthernetInfo
(backing_type=None, mac_type=None, network=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.EthernetInfo
class contains information about a virtual machine template’s virtual Ethernet adapter. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
backing_type (
LibraryItems.EthernetInfo.NetworkBackingType
) – Network backing type for the virtual Ethernet adapter. This attribute was added in vSphere API 6.8.mac_type (
LibraryItems.EthernetInfo.MacAddressType
) – MAC address type of the ethernet adapter. This attribute was added in vSphere API 6.8.network (
str
orNone
) – Identifier of the network backing the virtual Ethernet adapter. This attribute was added in vSphere API 6.8. 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
. This attribute will be None if the identifier of the network backing could not be determined.
-
class
MacAddressType
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
LibraryItems.EthernetInfo.MacAddressType
class defines the valid MAC address origins for a virtual Ethernet adapter. This enumeration was added in vSphere API 6.8.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 theMacAddressType
instance.
-
ASSIGNED
= MacAddressType(string='ASSIGNED')¶ MAC address is assigned by vCenter Server. This class attribute was added in vSphere API 6.8.
-
GENERATED
= MacAddressType(string='GENERATED')¶ MAC address is generated automatically. This class attribute was added in vSphere API 6.8.
-
MANUAL
= MacAddressType(string='MANUAL')¶ MAC address is assigned statically. This class attribute was added in vSphere API 6.8.
-
class
NetworkBackingType
(string)¶ Bases:
vmware.vapi.bindings.enum.Enum
The
LibraryItems.EthernetInfo.NetworkBackingType
class defines valid network backing types for a virtual Ethernet adapter. This enumeration was added in vSphere API 6.8.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 theNetworkBackingType
instance.
-
DISTRIBUTED_PORTGROUP
= NetworkBackingType(string='DISTRIBUTED_PORTGROUP')¶ Distributed virtual switch backing. This class attribute was added in vSphere API 6.8.
-
HOST_DEVICE
= NetworkBackingType(string='HOST_DEVICE')¶ Legacy host device network backing. Imported VMs may have virtual Ethernet adapters with this type of backing, but this type of backing cannot be used to create or to update a virtual Ethernet adapter. This class attribute was added in vSphere API 6.8.
-
OPAQUE_NETWORK
= NetworkBackingType(string='OPAQUE_NETWORK')¶ Opaque network backing. This class attribute was added in vSphere API 6.8.
-
STANDARD_PORTGROUP
= NetworkBackingType(string='STANDARD_PORTGROUP')¶ vSphere standard portgroup network backing. This class attribute was added in vSphere API 6.8.
-
class
EthernetUpdateSpec
(network=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.EthernetUpdateSpec
class describes the network that the ethernet adapter of the deployed virtual machine should be connected to. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
network (
str
orNone
) –Identifier of the network backing the virtual Ethernet adapter. This attribute was added in vSphere API 6.8. 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
. This attribute is currently required.If None, the virtual Ethernet adapter will be connected to same network as it was in the source virtual machine template.
-
class
GuestCustomizationSpec
(name=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.GuestCustomizationSpec
class contains information required to customize the deployed virtual machine. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
name (
str
orNone
) – Name of the customization specification. This attribute was added in vSphere API 6.8. If None, no guest customization is performed.
-
class
HardwareCustomizationSpec
(nics=None, disks_to_remove=None, disks_to_update=None, cpu_update=None, memory_update=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.HardwareCustomizationSpec
class defines the hardware customization options that are applied to the deployed virtual machine. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
nics ((
dict
ofstr
andLibraryItems.EthernetUpdateSpec
) orNone
) – Map of Ethernet network adapters to update. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the key in the attributedict
must be an identifier for the resource type:com.vmware.vcenter.vm.hardware.Ethernet
. When methods return a value of this class as a return value, the key in the attributedict
will be an identifier for the resource type:com.vmware.vcenter.vm.hardware.Ethernet
. If None, all Ethernet adapters will remain connected to the same network as they were in the source virtual machine template. An Ethernet adapter with a MacAddressType of MANUAL will not change. An Ethernet adapter with a MacAddressType of GENERATED or ASSIGNED will receive a new address.disks_to_remove (
set
ofstr
orNone
) – Idenfiers of disks to remove from the deployed virtual machine. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must contain identifiers for the resource type:com.vmware.vcenter.vm.hardware.Disk
. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type:com.vmware.vcenter.vm.hardware.Disk
. If None, all disks will be copied.disks_to_update ((
dict
ofstr
andLibraryItems.DiskUpdateSpec
) orNone
) – Disk update specification for individual disks in the deployed virtual machine. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the key in the attributedict
must be an identifier for the resource type:com.vmware.vcenter.vm.hardware.Disk
. When methods return a value of this class as a return value, the key in the attributedict
will be an identifier for the resource type:com.vmware.vcenter.vm.hardware.Disk
. If None, disks in the deployed virtual machine will have the same settings as the corresponding disks in the source virtual machine template contained in the library item.cpu_update (
LibraryItems.CpuUpdateSpec
orNone
) – CPU update specification for the deployed virtual machine. This attribute was added in vSphere API 6.8. If {\@term.unset}, the deployed virtual machine has the same CPU settings as the source virtual machine template contained in the library item.memory_update (
LibraryItems.MemoryUpdateSpec
orNone
) – Memory update specification for the deployed virtual machine. This attribute was added in vSphere API 6.8. If {\@term.unset}, the deployed virtual machine has the same memory settings as the source virtual machine template contained in the library item.
-
class
Info
(guest_os=None, cpu=None, memory=None, vm_home_storage=None, disks=None, nics=None, vm_template=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.Info
class contains information about a virtual machine template item in content library. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
guest_os (
com.vmware.vcenter.vm_client.GuestOS
) – Configured guest operating system of the virtual machine template. This attribute was added in vSphere API 6.8.cpu (
LibraryItems.CpuInfo
) – CPU configuration of the virtual machine template. This attribute was added in vSphere API 6.8.memory (
LibraryItems.MemoryInfo
) – Memory configuration of the virtual machine template. This attribute was added in vSphere API 6.8.vm_home_storage (
LibraryItems.VmHomeStorageInfo
) – Storage information about the virtual machine template’s configuration and log files. This attribute was added in vSphere API 6.8.disks (
dict
ofstr
andLibraryItems.DiskInfo
) – Storage information about the virtual machine template’s virtual disks. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the key in the attributedict
must be an identifier for the resource type:com.vmware.vcenter.vm.hardware.Disk
. When methods return a value of this class as a return value, the key in the attributedict
will be an identifier for the resource type:com.vmware.vcenter.vm.hardware.Disk
.nics (
dict
ofstr
andLibraryItems.EthernetInfo
) – Information about the virtual machine template’s virtual ethernet adapters. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the key in the attributedict
must be an identifier for the resource type:com.vmware.vcenter.vm.hardware.Ethernet
. When methods return a value of this class as a return value, the key in the attributedict
will be an identifier for the resource type:com.vmware.vcenter.vm.hardware.Ethernet
.vm_template (
str
) – Identifier of the latest virtual machine template contained in the library item. This attribute is the managed object identifier used to identify the virtual machine template in the vSphere Management (SOAP) API. This attribute was added in vSphere API 6.8.
-
class
MemoryInfo
(size_mib=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.MemoryInfo
class contains memory related information about the virtual machine template. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
size_mib (
long
) – Memory size in mebibytes. This attribute was added in vSphere API 6.8.
-
class
MemoryUpdateSpec
(memory=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.MemoryUpdateSpec
class describes updates to the memory configuration of the deployed virtual machine. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
memory (
long
orNone
) – Size of a virtual machine’s memory in MB. This attribute was added in vSphere API 6.8. If {\@term.unset}, the deployed virtual machine has the same memory size as the source virtual machine template.
-
class
VmHomeStorageInfo
(datastore=None, storage_policy=None)¶ Bases:
vmware.vapi.bindings.struct.VapiStruct
The
LibraryItems.VmHomeStorageInfo
class contains storage information about the virtual machine template’s configuration and log files. This class was added in vSphere API 6.8.Tip
The arguments are used to initialize data attributes with the same names.
- Parameters
datastore (
str
) – Identifier of the datastore where the virtual machine template’s configuration and log files are stored. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:Datastore
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:Datastore
.storage_policy (
str
orNone
) – Identifier of the storage policy associated with the virtual machine template’s configuration and log files. This attribute was added in vSphere API 6.8. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type:com.vmware.spbm.StorageProfile
. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type:com.vmware.spbm.StorageProfile
. If None, the virtual machine template’s configuration and log files do not have a storage policy associated with them.
-
create
(spec)¶ Creates a library item in content library from a virtual machine. This method creates a library item in content library whose content is a virtual machine template created from the source virtual machine, using the supplied create specification. The virtual machine template is stored in a newly created library item. This method was added in vSphere API 6.8.
- Parameters
spec (
LibraryItems.CreateSpec
) – information used to create the library item from the source virtual machine.- Return type
str
- Returns
Identifier of the newly created library item. The return value will be an identifier for the resource type:
com.vmware.content.library.Item
.- Raise
com.vmware.vapi.std.errors_client.AlreadyExists
if an entity with the name specified byLibraryItems.CreateSpec.name
already exists in the folder specified byLibraryItems.CreatePlacementSpec.folder
.- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
ifLibraryItems.CreateSpec
contains invalid arguments.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if the operation cannot be performed because of the source virtual machine’s current state.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the source virtual machine specified byLibraryItems.CreateSpec.source_vm
does not exist.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the library specified byLibraryItems.CreateSpec.library
does not exist.- Raise
com.vmware.vapi.std.errors_client.ResourceInaccessible
if there was an error accessing a file from the source virtual machine.- Raise
com.vmware.vapi.std.errors_client.ResourceInUse
if the source virtual machine is busy.- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailable
if any of the services involved in the method are unavailable.- Raise
com.vmware.vapi.std.errors_client.UnableToAllocateResource
if any of the resources needed to create the virtual machine template could not be allocated.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user that requested the method cannot be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user that requested the method is not authorized to perform the method.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
System.Read
.The resource
com.vmware.content.Library
referenced by the attributeLibraryItems.CreateSpec.library
requiresContentLibrary.AddLibraryItem
.The resource
VirtualMachine
referenced by the attributeLibraryItems.CreateSpec.source_vm
requiresSystem.Read
.The resource
Datastore
referenced by the attributeLibraryItems.CreateSpecVmHomeStorage.datastore
requiresSystem.Read
.The resource
com.vmware.spbm.StorageProfile
referenced by the attributeLibraryItems.CreateSpecVmHomeStoragePolicy.policy
requiresSystem.Read
.The resource
Datastore
referenced by the attributeLibraryItems.CreateSpecDiskStorage.datastore
requiresSystem.Read
.The resource
com.vmware.spbm.StorageProfile
referenced by the attributeLibraryItems.CreateSpecDiskStoragePolicy.policy
requiresSystem.Read
.The resource
com.vmware.vcenter.vm.hardware.Disk
referenced by thedict
key of attributeLibraryItems.CreateSpec.disk_storage_overrides
requiresSystem.Read
.The resource
Folder
referenced by the attributeLibraryItems.CreatePlacementSpec.folder
requiresSystem.Read
.The resource
ResourcePool
referenced by the attributeLibraryItems.CreatePlacementSpec.resource_pool
requiresSystem.Read
.The resource
HostSystem
referenced by the attributeLibraryItems.CreatePlacementSpec.host
requiresSystem.Read
.The resource
ClusterComputeResource
referenced by the attributeLibraryItems.CreatePlacementSpec.cluster
requiresSystem.Read
.
-
deploy
(template_library_item, spec)¶ Deploys a virtual machine as a copy of the source virtual machine template contained in the library item specified by
template_library_item
. It uses the deployment specification inspec
. IfLibraryItems.DeploySpec.powered_on
and/orLibraryItems.DeploySpec.guest_customization
are specified, the server triggers the power on and/or guest customization operations, which are executed asynchronously. This method was added in vSphere API 6.8.- Parameters
template_library_item (
str
) – identifier of the content library item containing the source virtual machine template to be deployed. The parameter must be an identifier for the resource type:com.vmware.content.library.Item
.spec (
LibraryItems.DeploySpec
) – specification of how the virtual machine should be deployed.
- Return type
str
- Returns
Identifier of the deployed virtual machine. The return value will be an identifier for the resource type:
VirtualMachine
.- Raise
com.vmware.vapi.std.errors_client.AlreadyExists
if a virtual machine with the name specified byLibraryItems.DeploySpec.name
already exists.- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.InvalidArgument
ifspec
contains invalid arguments.- Raise
com.vmware.vapi.std.errors_client.NotAllowedInCurrentState
if either a specified host or a specified datastore is in an invalid state for the deployment, such as maintenance mode.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the library item specified bytemplate_library_item
cannot be found.- Raise
com.vmware.vapi.std.errors_client.NotFound
if any resource specified by a attribute of theLibraryItems.DeploySpec
class, specified byspec
cannot be found.- Raise
com.vmware.vapi.std.errors_client.ResourceInaccessible
if there was an error accessing the source virtual machine template contained in the library item specified bytemplate_library_item
.- Raise
com.vmware.vapi.std.errors_client.ResourceInaccessible
if there an error accessing any of the resources specified in thespec
.- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailable
if any of the services involved in the method are unavailable.- Raise
com.vmware.vapi.std.errors_client.UnableToAllocateResource
if there was an error in allocating any of the resources required by the method.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user that requested the method cannot be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user that requested the method is not authorized to perform the method.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
System.Read
.The resource
com.vmware.content.library.Item
referenced by the parametertemplate_library_item
requiresVirtualMachine.Provisioning.DeployTemplate
.The resource
Datastore
referenced by the attributeLibraryItems.DeploySpecVmHomeStorage.datastore
requiresSystem.Read
.The resource
com.vmware.spbm.StorageProfile
referenced by the attributeLibraryItems.DeploySpecVmHomeStoragePolicy.policy
requiresSystem.Read
.The resource
Datastore
referenced by the attributeLibraryItems.DeploySpecDiskStorage.datastore
requiresSystem.Read
.The resource
com.vmware.spbm.StorageProfile
referenced by the attributeLibraryItems.DeploySpecDiskStoragePolicy.policy
requiresSystem.Read
.The resource
com.vmware.vcenter.vm.hardware.Disk
referenced by thedict
key of attributeLibraryItems.DeploySpec.disk_storage_overrides
requiresSystem.Read
.The resource
Folder
referenced by the attributeLibraryItems.DeployPlacementSpec.folder
requiresSystem.Read
.The resource
ResourcePool
referenced by the attributeLibraryItems.DeployPlacementSpec.resource_pool
requiresSystem.Read
.The resource
HostSystem
referenced by the attributeLibraryItems.DeployPlacementSpec.host
requiresSystem.Read
.The resource
ClusterComputeResource
referenced by the attributeLibraryItems.DeployPlacementSpec.cluster
requiresSystem.Read
.The resource
com.vmware.vcenter.vm.hardware.Ethernet
referenced by thedict
key of attributeLibraryItems.HardwareCustomizationSpec.nics
requiresSystem.Read
.The resource
Network
referenced by the attributeLibraryItems.EthernetUpdateSpec.network
requiresSystem.Read
.The resource
com.vmware.vcenter.vm.hardware.Disk
referenced by the attributeLibraryItems.HardwareCustomizationSpec.disks_to_remove
requiresSystem.Read
.The resource
com.vmware.vcenter.vm.hardware.Disk
referenced by thedict
key of attributeLibraryItems.HardwareCustomizationSpec.disks_to_update
requiresSystem.Read
.
-
get
(template_library_item)¶ Returns information about a virtual machine template contained in the library item specified by
template_library_item
. This method was added in vSphere API 6.8.- Parameters
template_library_item (
str
) – identifier of the library item containing the virtual machine template. The parameter must be an identifier for the resource type:com.vmware.content.library.Item
.- Return type
LibraryItems.Info
orNone
- Returns
Information about the virtual machine template item contained in the library item. If None, the library item specified by
template_library_item
does not contain a virtual machine template.- Raise
com.vmware.vapi.std.errors_client.Error
if the system reports an error while responding to the request.- Raise
com.vmware.vapi.std.errors_client.NotFound
if the library item could not be found.- Raise
com.vmware.vapi.std.errors_client.ResourceInaccessible
if the virtual machine template’s configuration state cannot be accessed.- Raise
com.vmware.vapi.std.errors_client.ServiceUnavailable
if any of the services involved in the method are unavailable.- Raise
com.vmware.vapi.std.errors_client.Unauthenticated
if the user that requested the method cannot be authenticated.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if the user that requested the method is not authorized to perform the method.- Raise
com.vmware.vapi.std.errors_client.Unauthorized
if you do not have all of the privileges described as follows:Method execution requires
System.Read
.The resource
com.vmware.content.library.Item
referenced by the parametertemplate_library_item
requiresSystem.Read
.
-
class
com.vmware.vcenter.vm_template_client.
StubFactory
(stub_config)¶ Bases:
vmware.vapi.bindings.stub.StubFactoryBase
Initialize StubFactoryBase
- Parameters
stub_config (
vmware.vapi.bindings.stub.StubConfiguration
) – Stub config instance