com.vmware.esx.settings.clusters.enablement package

Submodules

com.vmware.esx.settings.clusters.enablement.configuration_client module

The com.vmware.esx.settings.clusters.enablement.configuration_client module provides classes to manage enablement of configuration on an ESX cluster.

class com.vmware.esx.settings.clusters.enablement.configuration_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.esx.settings.clusters.enablement.configuration_client.Transition(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Transition class provides methods to manage transition of an existing cluster to a desired configuration managed cluster. This class was added in vSphere API 8.0.1.0.

Parameters

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

class EligibilityResult(status=None, notifications=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

This Transition.EligibilityResult class contains attributes that describe the result of the eligibility checks performed on the cluster to determine if the cluster can transition to desired configuration management platform. This class was added in vSphere API 8.0.1.0.

Tip

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

Parameters
  • status (Transition.EligibilityResult.Status) – Status of eligibility checks performed on a cluster. This attribute was added in vSphere API 8.0.1.0.

  • notifications (com.vmware.esx.settings_client.Notifications or None) – Notifications providing additional information about the status of eligibility checks. This attribute was added in vSphere API 8.0.1.0. This field is None when Transition.EligibilityResult.status is ELLIGIBLE.

class Status(string)

Bases: vmware.vapi.bindings.enum.Enum

The Transition.EligibilityResult.Status class contains the possible status codes describing the result of eligibility checks. This enumeration was added in vSphere API 8.0.1.0.

Note

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

Parameters

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

ELIGIBLE = Status(string='ELIGIBLE')

This indicates that the cluster meets all the eligibility requirements. This class attribute was added in vSphere API 8.0.1.0.

NOT_ELIGIBLE = Status(string='NOT_ELIGIBLE')

This indicates that the cluster does not meet the eligibility requirements. This class attribute was added in vSphere API 8.0.1.0.

class EnableResult(status=None, errors=None, apply_task_id=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Transition.EnableResult class contains attributes that describes the result of enabling configmanager on a cluster as part of the transition process. This class was added in vSphere API 8.0.1.0.

Tip

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

Parameters
  • status (Transition.EnableResult.Status) – Status of enabling configmanager on a cluster. This attribute was added in vSphere API 8.0.1.0.

  • errors (list of com.vmware.esx.settings_client.Notification) – List of errors if any. This attribute was added in vSphere API 8.0.1.0. This attribute is optional and it is only relevant when the value of status is Transition.EnableResult.Status.ERROR.

  • apply_task_id (str) – ID of the Apply task invoked once ConfigManager is enabled on the cluster. This attribute was added in vSphere API 8.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.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 is optional and it is only relevant when the value of status is Transition.EnableResult.Status.SUCCESS_APPLY_INITIATED.

class Status(string)

Bases: vmware.vapi.bindings.enum.Enum

The Transition.EnableResult.Status class contains the status of Enable API. This enumeration was added in vSphere API 8.0.1.0.

Note

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

Parameters

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

ERROR = Status(string='ERROR')

Failed to enable ConfigManager on the cluster. This class attribute was added in vSphere API 8.0.1.0.

RUNNING = Status(string='RUNNING')

The task is in-progress. This class attribute was added in vSphere API 8.0.1.0.

SUCCESS = Status(string='SUCCESS')

ConfigMnager enabled on the cluster. This class attribute was added in vSphere API 8.0.1.0.

SUCCESS_APPLY_INITIATED = Status(string='SUCCESS_APPLY_INITIATED')

ConfigMnager enabled on the cluster and remediation was initiated. This class attribute was added in vSphere API 8.0.1.0.

class FileSpec(filename=None, config=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Transition.FileSpec contain attributes that contains the details of the file being imported during transition process. This class was added in vSphere API 8.0.1.0.

Tip

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

Parameters
  • filename (str) – Filename of the imported configuration. This attribute was added in vSphere API 8.0.1.0.

  • config (str) – Configuration from the imported file. This attribute was added in vSphere API 8.0.1.0.

class Info(status=None, state=None, fast_track=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Transition.Info class contains attributes that describe the current status of transition process in the cluster. This class was added in vSphere API 8.0.1.0.

Tip

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

Parameters
  • status (Transition.Info.Status) – Status of transition on a cluster. This attribute was added in vSphere API 8.0.1.0.

  • state (Transition.State) – State of the transition. This field is set if the cluster is currently being transitioned to desired configuration management platform. This attribute was added in vSphere API 8.0.1.0. This attribute is optional and it is only relevant when the value of status is one of Transition.Info.Status.STARTED or Transition.Info.Status.NOT_ALLOWED_IN_CURRENT_STATE.

  • fast_track (bool) – Flag describing if fast transition workflow is eligible on the cluster. Fast transition allows user to enable desired configuration platform on the cluster with default configuration. The cluster is eligible if transition workflow is not started and the cluster is empty. This attribute was added in vSphere API 8.0.1.0. This attribute is optional and it is only relevant when the value of status is Transition.Info.Status.NOT_STARTED.

class Status(string)

Bases: vmware.vapi.bindings.enum.Enum

The Transition.Info.Status class contains the possible status codes describing the transition state of the cluster. This enumeration was added in vSphere API 8.0.1.0.

Note

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

Parameters

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

ENABLED = Status(string='ENABLED')

Transition has completed successfully and the cluster is managed through the desired configuration management platform. This class attribute was added in vSphere API 8.0.1.0.

ENABLE_IN_PROGRESS = Status(string='ENABLE_IN_PROGRESS')

Transition has started and Transition.enable() task is running on the cluster. This class attribute was added in vSphere API 8.0.1.0.

NOT_ALLOWED_IN_CURRENT_STATE = Status(string='NOT_ALLOWED_IN_CURRENT_STATE')

Cluster is not in a state to transition to desired configuration management platform. The cluster ends up in this state if another user identified by Transition.State.author has already started transition. This class attribute was added in vSphere API 8.0.1.0.

NOT_STARTED = Status(string='NOT_STARTED')

Transition has not started on the cluster. This class attribute was added in vSphere API 8.0.1.0.

SOFTWARE_SPECIFICATION_NOT_SET = Status(string='SOFTWARE_SPECIFICATION_NOT_SET')

Desired software specification is not set on the cluster. This is a pre-requisite to transition a cluster to desired configuration management platform. This class attribute was added in vSphere API 8.0.1.0.

STARTED = Status(string='STARTED')

Transition has started on the cluster. This class attribute was added in vSphere API 8.0.1.0.

class ReferenceHost(host=None, host_info=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Transition.ReferenceHost contains attributes that specify the reference host information used by the transition process. This class was added in vSphere API 8.0.1.0.

Tip

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

Parameters
  • host (str) – Reference host ID. This attribute was added in vSphere API 8.0.1.0. 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.

  • host_info (com.vmware.esx.settings_client.HostInfo) – Host Info for Reference host. This attribute was added in vSphere API 8.0.1.0.

class Source(string)

Bases: vmware.vapi.bindings.enum.Enum

The Transition.Source class describes the possible sources for specifying the desired configuration of the cluster. This enumeration was added in vSphere API 8.0.1.0.

Note

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

Parameters

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

FILE = Source(string='FILE')

This indicates that desired configuration originated from a file. This class attribute was added in vSphere API 8.0.1.0.

HOST = Source(string='HOST')

This indicates that desired configuration originated from a reference host. This class attribute was added in vSphere API 8.0.1.0.

class State(author=None, start_time=None, modified_time=None, source=None, host=None, filename=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Transition.State class contains attributes that describe the latest state of transitioning a cluster to desired configuration management platform. This class was added in vSphere API 8.0.1.0.

Tip

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

Parameters
  • author (str) – Author of transition. This attribute was added in vSphere API 8.0.1.0.

  • start_time (datetime.datetime) – The start time of the transition process. This attribute was added in vSphere API 8.0.1.0.

  • modified_time (datetime.datetime) – Last modified time of the transition process. This attribute was added in vSphere API 8.0.1.0.

  • source (Transition.Source) – Source of reference configuration. This attribute was added in vSphere API 8.0.1.0.

  • host (Transition.ReferenceHost) – Reference host. This attribute was added in vSphere API 8.0.1.0. This attribute is optional and it is only relevant when the value of source is Transition.Source.HOST.

  • filename (str) – Filename of the imported configuration. This attribute was added in vSphere API 8.0.1.0. This attribute is optional and it is only relevant when the value of source is Transition.Source.FILE.

class ValidateResult(status=None, errors=None, compliance=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Transition.ValidateResult class contains attributes that describe the validity of the imported desired configuration, and compliance information. This class was added in vSphere API 8.0.1.0.

Tip

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

Parameters
class Status(string)

Bases: vmware.vapi.bindings.enum.Enum

The Transition.ValidateResult.Status class contains the possible status codes describing the result of validating configuration draft. This enumeration was added in vSphere API 8.0.1.0.

Note

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

Parameters

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

INVALID = Status(string='INVALID')

This indicates that the configuration draft is invalid. This class attribute was added in vSphere API 8.0.1.0.

VALID = Status(string='VALID')

This indicates that the configuration draft is valid. This class attribute was added in vSphere API 8.0.1.0.

cancel(cluster)

This API cancels the workflow to transition the cluster to desired configuration platform. If the status of transition is Transition.Info.Status.STARTED, the associated state information will be deleted. Otherwise, cancel will not be allowed and the API will throw an error. This method was added in vSphere API 8.0.1.0.

Parameters

cluster (str) – Identifier of the cluster. The parameter must be an identifier for the resource type: ClusterComputeResource.

Raise

com.vmware.vapi.std.errors_client.Error If there is unknown internal error. The accompanying error message will give more details about the failure.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState If the status of transition process is not Transition.Info.Status.STARTED.

Raise

com.vmware.vapi.std.errors_client.NotFound If there is no cluster associated with cluster in the system.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable If the service is not available.

Raise

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

Raise

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

  • Method execution requires VcIntegrity.ClusterConfiguration.Modify.

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.ClusterConfiguration.Modify.

check_eligibility_task(cluster)

The API performs eligibility checks on the cluster to see if it can be transitioned to desired configuration management platform. This method was added in vSphere API 8.0.1.0.

Parameters

cluster (str) – Identifier of the cluster. The parameter must be an identifier for the resource type: ClusterComputeResource.

Return type

class

vmware.vapi.stdlib.client.task.Task

Returns

Task instance

Raise

com.vmware.vapi.std.errors_client.Error If there is unknown internal error. The accompanying error message will give more details about the failure.

Raise

com.vmware.vapi.std.errors_client.NotFound If there is no cluster associated with cluster in the system.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable If the service is not available.

Raise

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

enable_task(cluster)

The API enables ConfigManager on the cluster. Before setting the desired configuration state, the API verifies the eligibility of the cluster to transition to desired configuration platform. The API then validates and sets the configuration draft as the desired configuration of the cluster, thus enabling ConfigManager. The API finally initiates remediation by invoking Apply. Apply is not invoked if the cluster is empty. The API does not wait for remediation to complete before returning. If any of the above step fails, the API will fail and result will contain descriptive error messages. This method was added in vSphere API 8.0.1.0.

Parameters

cluster (str) – Identifier of the cluster. The parameter must be an identifier for the resource type: ClusterComputeResource.

Return type

class

vmware.vapi.stdlib.client.task.Task

Returns

Task instance

Raise

com.vmware.vapi.std.errors_client.Error If there is unknown internal error. The accompanying error message will give more details about the failure.

Raise

com.vmware.vapi.std.errors_client.NotFound If there is no cluster associated with cluster in the system.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable If the service is not available.

Raise

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

export_config(cluster)

This API will export configuration associated with the cluster generated as part of the transition workflow. The API will throw an error if the transition state is not Transition.Info.Status.STARTED. This method was added in vSphere API 8.0.1.0.

Parameters

cluster (str) – Identifier of the cluster on which operation should be performed. The parameter must be an identifier for the resource type: ClusterComputeResource.

Return type

com.vmware.esx.settings.clusters.configuration_client.ExportResult

Returns

This output structure of type com.vmware.esx.settings.clusters.configuration_client.ExportResult contains the configuration document encoded as JSON.

Raise

com.vmware.vapi.std.errors_client.Error If there is some other unknown internal error. The accompanying error message will give more details about the failure.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState If the status of transition process is not Transition.Info.Status.STARTED.

Raise

com.vmware.vapi.std.errors_client.NotFound If the cluster is not found in the system.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable If the service is not available.

Raise

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

Raise

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

  • Method execution requires VcIntegrity.ClusterConfiguration.Export.

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.ClusterConfiguration.Export.

export_schema(cluster)

This API will export schema associated with the cluster. The API will throw an error if the transition state is not Transition.Info.Status.STARTED. This method was added in vSphere API 8.0.1.0.

Parameters

cluster (str) – Identifier of the cluster on which operation should be performed. The parameter must be an identifier for the resource type: ClusterComputeResource.

Return type

com.vmware.esx.settings.clusters.configuration_client.SchemaResult

Returns

This output structure of type com.vmware.esx.settings.clusters.configuration_client.SchemaResult containing the schema document encoded as JSON.

Raise

com.vmware.vapi.std.errors_client.Error If there is some other unknown internal error. The accompanying error message will give more details about the failure.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState If the status of transition process is not Transition.Info.Status.STARTED.

Raise

com.vmware.vapi.std.errors_client.NotFound If the cluster is not found in the system.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable If the service is not available.

Raise

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

Raise

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

  • Method execution requires VcIntegrity.ClusterConfiguration.Export.

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.ClusterConfiguration.Export.

get(cluster)

This API returns the current transition state of the cluster. This method was added in vSphere API 8.0.1.0.

Parameters

cluster (str) – Identifier of the cluster. The parameter must be an identifier for the resource type: ClusterComputeResource.

Return type

Transition.Info

Returns

The transition state of the cluster.

Raise

com.vmware.vapi.std.errors_client.Error If there is unknown internal error. The accompanying error message will give more details about the failure.

Raise

com.vmware.vapi.std.errors_client.NotFound If there is no cluster associated with cluster in the system.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable If the service is not available.

Raise

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

Raise

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

  • Method execution requires VcIntegrity.ClusterConfiguration.View.

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.ClusterConfiguration.View.

import_from_file(cluster, spec)

The API imports the desired configuration from a file. Import API does not validate the configuration against the schema. The result will specify if the configuration was imported successfully. The result will provide localized error message if the import operation failed. This method was added in vSphere API 8.0.1.0.

Parameters
  • cluster (str) – Identifier of the cluster. The parameter must be an identifier for the resource type: ClusterComputeResource.

  • spec (Transition.FileSpec) – Input structure containing file information.

Return type

com.vmware.esx.settings.clusters.configuration_client.DraftImportResult

Returns

Output structure containing the status of the operation and error if any.

Raise

com.vmware.vapi.std.errors_client.Error If there is unknown internal error. The accompanying error message will give more details about the failure.

Raise

com.vmware.vapi.std.errors_client.NotFound If there is no cluster associated with cluster in the system.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable If the service is not available.

Raise

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

Raise

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

  • Method execution requires VcIntegrity.ClusterConfiguration.Modify.

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.ClusterConfiguration.Modify.

import_from_host_task(cluster, host)

The API imports the desired configuration from a reference host in the cluster. The API also adds host-specific and host-overrides from the other hosts in the cluster. Import API does not validate the configuration against the schema. The result will specify if the configuration was imported successfully. The result will provide localized error message if the import operation failed. This method was added in vSphere API 8.0.1.0.

Parameters
  • cluster (str) – Identifier of the cluster. The parameter must be an identifier for the resource type: ClusterComputeResource.

  • host (str) – Identifier of the reference host The parameter must be an identifier for the resource type: HostSystem.

Return type

class

vmware.vapi.stdlib.client.task.Task

Returns

Task instance

Raise

com.vmware.vapi.std.errors_client.Error If there is unknown internal error. The accompanying error message will give more details about the failure.

Raise

com.vmware.vapi.std.errors_client.NotFound If there is no cluster associated with cluster in the system.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable If the service is not available.

Raise

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

precheck_task(cluster)

The API computes impact of transitioning the cluster to be managed by desired configuration platform. It also runs health checks to verify the cluster’s health before transitioning. The API returns the impact on the hosts in the cluster and the result of health checks from the cluster and hosts. Health checks are run only if the host needs be rebooted or put in maintenanceMode. This method was added in vSphere API 8.0.1.0.

Parameters

cluster (str) – Identifier of the cluster. The parameter must be an identifier for the resource type: ClusterComputeResource.

Return type

class

vmware.vapi.stdlib.client.task.Task

Returns

Task instance

Raise

com.vmware.vapi.std.errors_client.Error If there is unknown internal error. The accompanying error message will give more details about the failure.

Raise

com.vmware.vapi.std.errors_client.NotFound If there is no cluster associated with cluster in the system.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable If the service is not available.

Raise

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

validate_config_task(cluster)

The API validates the imported desired configuration against the schema and on the hosts with validation plugins. If the document is valid, the API will check all the hosts for compliance with the desired configuration. The API returns validation errors if the configuration is not valid on any of the host. If the configuration is valid, the API returns compliance information. This method was added in vSphere API 8.0.1.0.

Parameters

cluster (str) – Identifier of the cluster. The parameter must be an identifier for the resource type: ClusterComputeResource.

Return type

class

vmware.vapi.stdlib.client.task.Task

Returns

Task instance

Raise

com.vmware.vapi.std.errors_client.Error If there is unknown internal error. The accompanying error message will give more details about the failure.

Raise

com.vmware.vapi.std.errors_client.NotFound If there is no cluster associated with cluster in the system.

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable If the service is not available.

Raise

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