com.vmware.esx.settings.clusters package

Subpackages

Submodules

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

The com.vmware.esx.settings.clusters.configuration_client module provides classes to manage the configuration of an ESX cluster. The com.vmware.esx.settings.clusters.configuration.reports_client module provides classes for accessing reports regarding the configuration state of the cluster.

class com.vmware.esx.settings.clusters.configuration_client.AuditRecords(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The AuditRecords class provides methods to get the auditing records of the configuration actions performed on a cluster in vCenter Server. This class was added in vSphere API 8.0.2.0.

Parameters

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

class FilterSpec(operations=None, usernames=None, time_duration=None, time_period=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The AuditRecords.FilterSpec class contains attributes used to filter the audit records. If multiple attributes are specified, only records matching all of the attributes match the filter. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
  • operations (set of str or None) –

    List of audit records that match the given operations An operation in operations can be any of

    • Import

    • Export

    • Remediate

    • Checkcompliance

    • Precheck

    • Transition-Enable

    • Draft-List

    • Draft-Create

    • Draft-ImportFromHost

    • Draft-Get

    • Draft-ExportConfig

    • Draft-Update

    • Draft-ShowChanges

    • Draft-CheckCompliance

    • Draft-Precheck

    • Draft-Delete

    • Draft-Apply

    . This attribute was added in vSphere API 8.0.2.0. If None or empty, records with any operation match the filter.

  • usernames (set of str or None) – List of audit records that match the given users. This attribute was added in vSphere API 8.0.2.0. If None or empty, records with any users match the filter.

  • time_duration (AuditRecords.FilterSpec.Timeframe or None) – List of audit records that match AuditRecords.FilterSpec.Timeframe, valid values are THREE_MONTHS, SIX_MONTHS, YEAR, CUSTOM. i.e. For ex: records within last 3 months. This attribute was added in vSphere API 8.0.2.0. If None or empty, last one year audit records match the filter.

  • time_period (AuditRecords.TimePeriod) – List of audit records that match the given start time i.e. occurred after the AuditRecords.TimePeriod.start and the given end time i.e. before the AuditRecords.TimePeriod.end. This attribute was added in vSphere API 8.0.2.0. This attribute is optional and it is only relevant when the value of timeDuration is AuditRecords.FilterSpec.Timeframe.CUSTOM.

class Timeframe(string)

Bases: vmware.vapi.bindings.enum.Enum

List of audit records that match the given time frame i.e. For ex: occurred within last 30 days. This enumeration was added in vSphere API 8.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 the Timeframe instance.

CUSTOM = Timeframe(string='CUSTOM')

To indicate custom time frame for getting audit records. Users can specify start time and end time. This class attribute was added in vSphere API 8.0.2.0.

SIX_MONTHS = Timeframe(string='SIX_MONTHS')

To indicate last 6 months audit records. This class attribute was added in vSphere API 8.0.2.0.

THREE_MONTHS = Timeframe(string='THREE_MONTHS')

To indicate last 3 months audit records. This class attribute was added in vSphere API 8.0.2.0.

YEAR = Timeframe(string='YEAR')

To indicate last 1 year audit records. This class attribute was added in vSphere API 8.0.2.0.

class Info(cluster_id=None, operation=None, username=None, start_time=None, end_time=None, status=None, operation_details=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The AuditRecords.Info class contains Audit Info of an operation for a cluster in vCenter Server. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
  • cluster_id (str) – Identifier of the cluster. This attribute was added in vSphere API 8.0.2.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.

  • operation (str) –

    Name of the operation which can be one of

    • Import

    • Export

    • Remediate

    • Checkcompliance

    • Precheck

    • Transition-Enable

    • Draft-List

    • Draft-Create

    • Draft-ImportFromHost

    • Draft-Get

    • Draft-ExportConfig

    • Draft-Update

    • Draft-ShowChanges

    • Draft-CheckCompliance

    • Draft-Precheck

    • Draft-Delete

    • Draft-Apply

    . This attribute was added in vSphere API 8.0.2.0. When clients pass a value of this class as a parameter, the attribute must be one of Import, Export, Remediate, Checkcompliance, Precheck, Transition-Enable, Draft-List, Draft-Create, Draft-ImportFromHost, Draft-Get, Draft-ExportConfig, Draft-Update, Draft-ShowChanges, Draft-CheckCompliance, Draft-Precheck, Draft-Delete, or Draft-Apply. When methods return a value of this class as a return value, the attribute will be one of Import, Export, Remediate, Checkcompliance, Precheck, Transition-Enable, Draft-List, Draft-Create, Draft-ImportFromHost, Draft-Get, Draft-ExportConfig, Draft-Update, Draft-ShowChanges, Draft-CheckCompliance, Draft-Precheck, Draft-Delete, or Draft-Apply.

  • username (str) – User who initiated the operation. This attribute was added in vSphere API 8.0.2.0.

  • start_time (datetime.datetime or None) – Time when the operation AuditRecords.Info.operation was started. This attribute was added in vSphere API 8.0.2.0. startTime might not be available for a task.

  • end_time (datetime.datetime or None) – Time when the operation AuditRecords.Info.operation was completed. This attribute was added in vSphere API 8.0.2.0. endTime might not be available for a task.

  • status (com.vmware.cis.task_client.Status) – Status of the operation AuditRecords.Info.operation. This attribute was added in vSphere API 8.0.2.0.

  • operation_details (AuditRecords.OperationDetails or None) – Details of the operation. This attribute was added in vSphere API 8.0.2.0. operationdetails might not be available for an operation which is not a task.

class OperationDetails(error=None, task_id=None, draft_id=None, cancelled=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The AuditRecords.OperationDetails class contains Operation Details of an operation. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
  • error (Exception or None) – Error occurred during the operation. This attribute was added in vSphere API 8.0.2.0. error shall only be set if configmanager operation is a task

  • task_id (str or None) – TaskId of the operation. This attribute was added in vSphere API 8.0.2.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. taskId shall only be set if configmanager operation is a task

  • draft_id (str or None) – Draft ID of the draft operation. This attribute was added in vSphere API 8.0.2.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.esx.settings.draft. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.esx.settings.draft. draftId shall only be set if this is an operaton on draft

  • cancelled (bool or None) – Indicates if the operation was cancelled. This attribute was added in vSphere API 8.0.2.0. cancelled shall only be set if configmanager operation is a task

class OperationType

Bases: vmware.vapi.bindings.struct.VapiStruct

The AuditRecords.OperationType class contains class attributes used to represent all possible config manager operations. This class was added in vSphere API 8.0.2.0.

Tip

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

CHECK_COMPLIANCE = 'Checkcompliance'

Represents Check compliance config manager operation {\@link com.vmware.esx.settings.clusters. Configuration#checkCompliance}. This class attribute was added in vSphere API 8.0.2.0.

DRAFT_APPLY = 'Draft-Apply'

Represents Configmanager Draft Apply com.vmware.esx.settings.clusters.configuration.Drafts#impact. This class attribute was added in vSphere API 8.0.2.0.

DRAFT_CHECK_COMPLIANCE = 'Draft-CheckCompliance'

Represents Configmanager Draft Check Compliance {\@link com.vmware.esx.settings.clusters.configuration .Drafts#CheckCompliance}. This class attribute was added in vSphere API 8.0.2.0.

DRAFT_CREATE = 'Draft-Create'

Represents Configmanager Draft Create Drafts.create(). This class attribute was added in vSphere API 8.0.2.0.

DRAFT_DELETE = 'Draft-Delete'

Represents Configmanager Draft Delete Drafts.delete(). This class attribute was added in vSphere API 8.0.2.0.

DRAFT_EXPORT_CONFIG = 'Draft-ExportConfig'

Represents Configmanager Draft Export Config {\@link com.vmware.esx.settings.clusters.configuration .Drafts#exportConfig}. This class attribute was added in vSphere API 8.0.2.0.

DRAFT_GET = 'Draft-Get'

Represents Configmanager Draft Get Drafts.get(). This class attribute was added in vSphere API 8.0.2.0.

DRAFT_IMPORT_FROM_HOST = 'Draft-ImportFromHost'

Represents Configmanager Draft Import from host {\@link com.vmware.esx.settings.clusters.configuration .Drafts#importFromHost}. This class attribute was added in vSphere API 8.0.2.0.

DRAFT_LIST = 'Draft-List'

Represents Configmanager Draft List Drafts.list(). This class attribute was added in vSphere API 8.0.2.0.

DRAFT_PRECHECK = 'Draft-Precheck'

Represents Configmanager Draft Precheck {\@link com.vmware.esx.settings.clusters.configuration .Drafts#precheck}. This class attribute was added in vSphere API 8.0.2.0.

DRAFT_SHOW_CHANGES = 'Draft-ShowChanges'

Represents Configmanager Draft Show Changes {\@link com.vmware.esx.settings.clusters.configuration .Drafts#showChanges}. This class attribute was added in vSphere API 8.0.2.0.

DRAFT_UPDATE = 'Draft-Update'

Represents Configmanager Draft Update Drafts.update(). This class attribute was added in vSphere API 8.0.2.0.

EXPORT = 'Export'

Represents Export config manager operation com.vmware.esx.settings.clusters_client.Configuration.export_config(). This class attribute was added in vSphere API 8.0.2.0.

IMPORT = 'Import'

Represents Import config manager operation com.vmware.esx.settings.clusters_client.Configuration.import_config(). This class attribute was added in vSphere API 8.0.2.0.

OPERATIONS = ['Import', 'Export', 'Remediate', 'Checkcompliance', 'Precheck', 'Transition-Enable', 'Draft-List', 'Draft-Create', 'Draft-ImportFromHost', 'Draft-Get', 'Draft-ExportConfig', 'Draft-Update', 'Draft-ShowChanges', 'Draft-CheckCompliance', 'Draft-Precheck', 'Draft-Delete', 'Draft-Apply']

Represents all audit enabled config manager operations. This class attribute was added in vSphere API 8.0.2.0.

PRE_CHECK = 'Precheck'

Represents Pre-check config manager operation com.vmware.esx.settings.clusters_client.Configuration.precheck(). This class attribute was added in vSphere API 8.0.2.0.

REMEDIATE = 'Remediate'

Represents Remediate config manager operation com.vmware.esx.settings.clusters_client.Configuration.apply(). This class attribute was added in vSphere API 8.0.2.0.

TRANSITION_ENABLE = 'Transition-Enable'

Represents Transition enable config manager operation {\@link com.vmware.esx.settings.clusters.enablement. configuration.Transition#enable}. This class attribute was added in vSphere API 8.0.2.0.

class TimePeriod(start=None, end=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The AuditRecords.TimePeriod class contains AuditRecords.TimePeriod.start and AuditRecords.TimePeriod.end to get audit records for a specific time period. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
  • start (datetime.datetime) – List of audit records that match the given start time i.e. occurred after the DateTime start. This attribute was added in vSphere API 8.0.2.0.

  • end (datetime.datetime) – List of audit records that match the given end time i.e. occurred before the DateTime end. This attribute was added in vSphere API 8.0.2.0.

list(cluster, filters=None)

Retrieves audit information about the configuration actions performed on the cluster. This method was added in vSphere API 8.0.2.0.

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

  • filters (AuditRecords.FilterSpec or None) – used to filter the audit records. If {\@term.unset} returns all available audit records associated with cluster

Return type

list of AuditRecords.Info

Returns

audit Information about the cluster associated with cluster.

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 system is unable to communicate with a service to complete the request.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated if the session id is missing from the request or the corresponding session object cannot be found.

Raise

com.vmware.vapi.std.errors_client.Unauthorized if the user doesn’t not 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 VcIntegrity.ClusterConfiguration.View.

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

class com.vmware.esx.settings.clusters.configuration_client.ClusterCompliance(cluster_status=None, commit=None, software_commit=None, summary=None, host_info=None, hosts=None, compliant_hosts=None, non_compliant_hosts=None, failed_hosts=None, skipped_hosts=None, end_time=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

This ClusterCompliance class contains attributes that describe the compliance result for each host in the cluster as well as overall cluster compliance status. 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
  • cluster_status (ClusterCompliance.Status) – Consolidated status of all host compliance checks. This attribute was added in vSphere API 8.0.1.0.

  • commit (str or None) – This identifier refers to the commit action of importing the desired configuration document. It will not be set for a draft execution of check compliance. 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.esx.settings.commit. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.esx.settings.commit.

  • software_commit (str) – The current commit ID for the software associated with 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.esx.settings.commit. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.esx.settings.commit.

  • summary (com.vmware.vapi.std_client.LocalizableMessage) – Summarizing check compliance operation on the hosts in the cluster. This attribute was added in vSphere API 8.0.1.0.

  • host_info (dict of str and com.vmware.esx.settings_client.HostInfo) – Map of host IDs to hostname. This attribute was added in vSphere API 8.0.1.0. 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: HostSystem. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: HostSystem.

  • hosts (dict of str and HostResult) – Map of host IDs to their compliance results. This attribute was added in vSphere API 8.0.1.0. 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: HostSystem. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: HostSystem.

  • compliant_hosts (set of str) – Identifiers of compliant hosts. 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 contain identifiers for the resource type: HostSystem. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: HostSystem.

  • non_compliant_hosts (set of str) – Identifiers of non-compliant hosts. 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 contain identifiers for the resource type: HostSystem. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: HostSystem.

  • failed_hosts (set of str) – Identifiers of hosts where the operation failed. 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 contain identifiers for the resource type: HostSystem. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: HostSystem.

  • skipped_hosts (set of str) – Identifiers of hosts where the operation was skipped. i.e disconnected hosts. 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 contain identifiers for the resource type: HostSystem. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: HostSystem.

  • end_time (datetime.datetime) – CheckCompliance completion time. This attribute was added in vSphere API 8.0.1.0.

class Status(string)

Bases: vmware.vapi.bindings.enum.Enum

Consolidated compliance status 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.

COMPLIANT = Status(string='COMPLIANT')

All hosts in the cluster are compliant. This class attribute was added in vSphere API 8.0.1.0.

NOT_COMPLIANT = Status(string='NOT_COMPLIANT')
RUNNING = Status(string='RUNNING')

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

class com.vmware.esx.settings.clusters.configuration_client.ClusterPrecheckResult(status=None, commit=None, software_commit=None, end_time=None, summary=None, remediation_summary=None, remediation_notes=None, host_info=None, host_precheck=None, precheck_result=None, successful_hosts=None, failed_hosts=None, skipped_hosts=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The PrecheckResult class contains attributes that describe precheck status of applying the desired document to a group of hosts. 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 (ClusterPrecheckResult.Status) – Overall status of precheck on the cluster. Operation is sucessfull when precheck is run on all hosts successfully and no validation or precheck errors are detected. This attribute was added in vSphere API 8.0.1.0.

  • commit (str or None) – This identifier refers to the commit action of importing the desired configuration document. 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.esx.settings.commit. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.esx.settings.commit. This field is s not set for a precheck of a draft configuration.

  • software_commit (str) – The current commit ID for the software associated with 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.esx.settings.commit. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.esx.settings.commit.

  • end_time (datetime.datetime) – Precheck completion time. This attribute was added in vSphere API 8.0.1.0.

  • summary (com.vmware.vapi.std_client.LocalizableMessage) – Summarizing precheck operation on the host and cluster. This attribute was added in vSphere API 8.0.1.0.

  • remediation_summary (list of com.vmware.vapi.std_client.LocalizableMessage) – Summarizing remediation stating number of hosts needing reboot and maintenance mode during remediation and number of precheck errors on host and cluster. This attribute was added in vSphere API 8.0.1.0.

  • remediation_notes (list of com.vmware.vapi.std_client.LocalizableMessage) – Static notes to the user describing steps that will be taken during remediation. This attribute was added in vSphere API 8.0.1.0.

  • host_info (dict of str and com.vmware.esx.settings_client.HostInfo) – Map of host IDs to hostname. This attribute was added in vSphere API 8.0.1.0. 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: HostSystem. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: HostSystem.

  • host_precheck (dict of str and HostPrecheckResult) – Map of host IDs to their precheck results. If ClusterPrecheckResult.status is ERROR, This field will contain Validation errors or Host Impact and Health Check errors. If ClusterPrecheckResult.status is OK, This field will contain Impact and Health Check information. This attribute was added in vSphere API 8.0.1.0. 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: HostSystem. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: HostSystem.

  • precheck_result (com.vmware.esx.settings_client.StatusInfo or None) – This field represents the precheck results on the cluster, if any one host in the cluster needs to be put in maintenance mode or to be rebooted. This attribute was added in vSphere API 8.0.1.0. This field is set if cluster prechecks are invoked.

  • successful_hosts (set of str) – Hosts in this cluster where the precheck was sucessfully run. 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 contain identifiers for the resource type: HostSystem. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: HostSystem.

  • failed_hosts (set of str) – Hosts in this cluster where the precheck failed to run. 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 contain identifiers for the resource type: HostSystem. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: HostSystem.

  • skipped_hosts (set of str) – Hosts in this cluster where the precheck was not tried because the host was disconnected. 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 contain identifiers for the resource type: HostSystem. When methods return a value of this class as a return value, the attribute will contain identifiers for the resource type: HostSystem.

class Status(string)

Bases: vmware.vapi.bindings.enum.Enum

The ClusterPrecheckResult.Status class contains the possible statuses of the Precheck API on 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.

ERROR = Status(string='ERROR')

The operation failed with errors. This class attribute was added in vSphere API 8.0.1.0.

OK = Status(string='OK')

The operation completed successfully. 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.

class com.vmware.esx.settings.clusters.configuration_client.ComplianceInfo(sets=None, adds=None, deletes=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ComplianceInfo class contains attributes that describe the configuration drift between the desired document and the configurations on the ESXi host. 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
  • sets (list of SettingCompliance or None) – List of configuration drifts represented by SettingCompliance. Each describing a configuration whose value on ESXi host is different to that in the desired document. This attribute was added in vSphere API 8.0.1.0. This field is None if there are no drifts to report in this category.

  • adds (list of SettingCompliance or None) – List of configuration drifts represented by SettingCompliance. Each describing a configuration that is present in the desired document but absent on the ESXi host. This attribute was added in vSphere API 8.0.1.0. This field is None if there are no drifts to report in this category.

  • deletes (list of SettingCompliance or None) – List of configuration drifts represented by SettingCompliance. Each describing a configuration that is present on the ESXi host but absent in the desired document. This attribute was added in vSphere API 8.0.1.0. This field is None if there are no drifts to report in this category.

class com.vmware.esx.settings.clusters.configuration_client.ComplianceStatus(string)

Bases: vmware.vapi.bindings.enum.Enum

This ComplianceStatus class represents the compliance status of desired configuration on the ESXi host. 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 ComplianceStatus instance.

COMPLIANT = ComplianceStatus(string='COMPLIANT')

ESXi host is in compliance with Desired configuration. This class attribute was added in vSphere API 8.0.1.0.

NON_COMPLIANT = ComplianceStatus(string='NON_COMPLIANT')

ESXi host is not in compliance with Desired configuration. This class attribute was added in vSphere API 8.0.1.0.

class com.vmware.esx.settings.clusters.configuration_client.ConfigurationSpec(spec=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ConfigurationSpec class contains attributes that describe the desired configuration that is associated with a 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

spec (str) – Desired configuration document. This attribute was added in vSphere API 8.0.1.0.

class com.vmware.esx.settings.clusters.configuration_client.DependencyError(required_value=None, current_value=None, possible_values=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The DependencyError class contains details of the validation error caused by dependency between different properties in the configuration. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
  • required_value (str) – The dependency required by a union tag. This attribute was added in vSphere API 8.0.2.0.

  • current_value (str or None) – This attribute was added in vSphere API 8.0.2.0. If set, it contains the current value of the dependency property.

  • possible_values (str) – The possible values of the dependency property that are compatible with this property. This attribute was added in vSphere API 8.0.2.0.

class com.vmware.esx.settings.clusters.configuration_client.DetailedValidationError(hosts=None, message=None, type=None, pattern=None, expected_type=None, instance_id=None, property_name=None, maximum_length=None, minimum_length=None, maximum_value=None, minimum_value=None, dependency_error=None, component=None, group=None, key=None, path=None, required_property=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The SchemaValidationError class contains details of validation errors for a property. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
class ErrorType(string)

Bases: vmware.vapi.bindings.enum.Enum

The DetailedValidationError.ErrorType enum contains the possible types of errors related to property validation. This enumeration was added in vSphere API 8.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 the ErrorType instance.

ADDITIONAL_PROPERTY = ErrorType(string='ADDITIONAL_PROPERTY')

A property that is not specified in the schema was found. This class attribute was added in vSphere API 8.0.2.0.

DUPLICATE_INSTANCE_ID = ErrorType(string='DUPLICATE_INSTANCE_ID')

An instance has an instance ID that was already used in another instance. This class attribute was added in vSphere API 8.0.2.0.

EMPTY_PROPERTY = ErrorType(string='EMPTY_PROPERTY')

An object or array property is empty. This class attribute was added in vSphere API 8.0.2.0.

GENERIC = ErrorType(string='GENERIC')

A generic error. Check the message property for more information. This class attribute was added in vSphere API 8.0.2.0.

HOST_SPECIFIC_IN_PROFILE = ErrorType(string='HOST_SPECIFIC_IN_PROFILE')

The property is host-specific, but was found in the profile section. This class attribute was added in vSphere API 8.0.2.0.

HOST_SPECIFIC_KEY_IN_OVERRIDE = ErrorType(string='HOST_SPECIFIC_KEY_IN_OVERRIDE')

A host-specific configuration was found in the host-override section. This class attribute was added in vSphere API 8.0.2.0.

INVALID_DELETE_DEFAULT = ErrorType(string='INVALID_DELETE_DEFAULT')

The property is only valid for mutable default configurations. This class attribute was added in vSphere API 8.0.2.0.

INVALID_ENUM_OPTION = ErrorType(string='INVALID_ENUM_OPTION')

The value of an enum property does not match one of the allowed values. This class attribute was added in vSphere API 8.0.2.0.

INVALID_TYPE = ErrorType(string='INVALID_TYPE')

The value of a property is not the expected type. This class attribute was added in vSphere API 8.0.2.0.

INVALID_UNION_TAG = ErrorType(string='INVALID_UNION_TAG')

A property that is dependent on another property is invalid. This class attribute was added in vSphere API 8.0.2.0.

KEY_IN_HOST_OVERRIDE = ErrorType(string='KEY_IN_HOST_OVERRIDE')

The configuration exists in both host-override and host-specific sections. This class attribute was added in vSphere API 8.0.2.0.

MAX_ARRAY_LENGTH = ErrorType(string='MAX_ARRAY_LENGTH')

The length of an array is larger than the maximum allowed. This class attribute was added in vSphere API 8.0.2.0.

MAX_STRING_LENGTH = ErrorType(string='MAX_STRING_LENGTH')

The length of a string is larger than the maximum allowed. This class attribute was added in vSphere API 8.0.2.0.

MAX_VALUE = ErrorType(string='MAX_VALUE')

The value of a numeric property is larger than the maximum allowed. This class attribute was added in vSphere API 8.0.2.0.

MIN_ARRAY_LENGTH = ErrorType(string='MIN_ARRAY_LENGTH')

The length of an array is smaller than the minimum allowed. This class attribute was added in vSphere API 8.0.2.0.

MIN_STRING_LENGTH = ErrorType(string='MIN_STRING_LENGTH')

The length of a string is smaller than the minimum allowed. This class attribute was added in vSphere API 8.0.2.0.

MIN_VALUE = ErrorType(string='MIN_VALUE')

The value of a numeric property is smaller than the minimum allowed. This class attribute was added in vSphere API 8.0.2.0.

MISSING_INSTANCE_ID = ErrorType(string='MISSING_INSTANCE_ID')

An instance does not have the required ID property. This class attribute was added in vSphere API 8.0.2.0.

MISSING_REQUIRED = ErrorType(string='MISSING_REQUIRED')

A required property is missing. This class attribute was added in vSphere API 8.0.2.0.

MISSING_REQUIRED_PROFILE_INSTANCE = ErrorType(string='MISSING_REQUIRED_PROFILE_INSTANCE')

The host-specific configuration refers to an instance that does not exist in the profile section. This class attribute was added in vSphere API 8.0.2.0.

MISSING_REQUIRED_PROFILE_KEY = ErrorType(string='MISSING_REQUIRED_PROFILE_KEY')

The host-specific configuration refers to a configuration key that does not exist in the profile section. This class attribute was added in vSphere API 8.0.2.0.

NOT_HOST_SPECIFIC = ErrorType(string='NOT_HOST_SPECIFIC')

The property is not host-specific, but was found in the host-specific section. This class attribute was added in vSphere API 8.0.2.0.

NULL_VALUE = ErrorType(string='NULL_VALUE')

A property has a null value. This class attribute was added in vSphere API 8.0.2.0.

PATTERN_MISMATCH = ErrorType(string='PATTERN_MISMATCH')

The value of a string property does not match the allowed pattern. This class attribute was added in vSphere API 8.0.2.0.

PLACEHOLDER_FOUND = ErrorType(string='PLACEHOLDER_FOUND')

The property contains a placeholder that must be replaced. This class attribute was added in vSphere API 8.0.2.0.

PROPERTY_NAME_MISMATCH = ErrorType(string='PROPERTY_NAME_MISMATCH')

A property name does not match the required pattern. This class attribute was added in vSphere API 8.0.2.0.

SCHEMA_NOT_FOUND = ErrorType(string='SCHEMA_NOT_FOUND')

A configuration was found for software that is not in the image associated with the cluster. This class attribute was added in vSphere API 8.0.2.0.

UNION_CASE_WITHOUT_UNION_TAG = ErrorType(string='UNION_CASE_WITHOUT_UNION_TAG')

A union-case property was provided, but the corresponding union tag property was not set. This class attribute was added in vSphere API 8.0.2.0.

class com.vmware.esx.settings.clusters.configuration_client.DocumentStructure(string)

Bases: vmware.vapi.bindings.enum.Enum

The DocumentStructure class contains the possible structures of the configuration document. 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 DocumentStructure instance.

HOST_ORIENTED = DocumentStructure(string='HOST_ORIENTED')

The host-specific portions of the document are stored in the “host-specific” object at the top-level with entries for each host, organized by the host’s BIOS UUID. This class attribute was added in vSphere API 8.0.1.0.

PROFILE_ORIENTED = DocumentStructure(string='PROFILE_ORIENTED')

The host-specific portions of the document are distributed through the “profile” object hierarchy. Each property that is host-specific will be an object with entries for each host where the property is defined. The hosts in the object are organized by BIOS UUID. This class attribute was added in vSphere API 8.0.1.0.

class com.vmware.esx.settings.clusters.configuration_client.DraftImportResult(status=None, draft=None, error=None, warnings=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The DraftImportResult class contains attributes that describe the result of importing the desired configuration for a cluster into a draft.

Tip

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

Parameters
  • status (DraftImportResult.Status) – Status of importing desired configuration.

  • draft (str) – This identifier refers to the commit action of importing the desired configuration document. This identifier can be used in the apply API. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.esx.settings.draft. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.esx.settings.draft. This attribute is optional and it is only relevant when the value of status is DraftImportResult.Status.OK.

  • error (com.vmware.vapi.std_client.LocalizableMessage) – Localized message describing the error encountered while importing desired configuration. The import operation will fail if the configuration document is an invalid JSON. This attribute is optional and it is only relevant when the value of status is DraftImportResult.Status.ERROR.

  • warnings (list of com.vmware.vapi.std_client.LocalizableMessage or None) – Any issues found during the import are reported in this list.

class Status(string)

Bases: vmware.vapi.bindings.enum.Enum

The DraftImportResult.Status class contains the possible status codes describing the result of importing desired configuration for a cluster.

Note

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

Parameters

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

CANCELED = Status(string='CANCELED')
ERROR = Status(string='ERROR')

Desired configuration import failed with error.

OK = Status(string='OK')

Desired configuration imported successfully.

RUNNING = Status(string='RUNNING')

The task is in-progress.

class com.vmware.esx.settings.clusters.configuration_client.Drafts(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Drafts class provides methods to manage cluster configuration drafts. This class was added in vSphere API 8.0.2.0.

Parameters

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

class ApplyResult(commit=None, apply_task=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.ApplyResult class contains the result of committing a draft. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
  • commit (str) – The ID of the commit created for this operation. This attribute was added in vSphere API 8.0.2.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.esx.settings.commit. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.esx.settings.commit.

  • apply_task (str or None) – If the cluster is not empty, this will be set to the ID of the Apply task. This attribute was added in vSphere API 8.0.2.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.

class ApplySpec(message=None, apply_policy_spec=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.ApplySpec class contains attributes that are used to create a new commit. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
  • message (str or None) – Message to include with the commit. This attribute was added in vSphere API 8.0.2.0. If None, message is set to empty string.

  • apply_policy_spec (com.vmware.esx.settings.clusters.policies.apply_client.Effective.EffectivePolicySpec or None) – The parameter can be used to override the default remediation policies for the apply task. This attribute was added in vSphere API 8.0.2.0. if None the default cluster remediation policies are used.

class ChangeDetails(modified_properties=None, deleted_properties=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.ChangeDetails class contains information about changes made in the draft when compared against the current desired document. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
  • modified_properties (dict of str and Drafts.ModificationInfo) – Captures the properties that were added/modified in this draft. The map keys are JSON-Pointers that refer to the properties in the draft that are modifications. The values contain information about the property and, in the case of a modification, the location of the corresponding property in the desired document. This attribute was added in vSphere API 8.0.2.0.

  • deleted_properties (dict of str and Drafts.DeletionInfo) – Captures the properties that were deleted from this draft. The map keys are JSON-Pointers that refer to the properties in the desired document that were deleted. This attribute was added in vSphere API 8.0.2.0.

class ChangedProperty(path=None, current=None, draft=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.ChangedProperty class contains information about a property that is different in this draft from the committed configuration. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
  • path (str) – A JSON-Pointer that refers to the property that has been changed. This attribute was added in vSphere API 8.0.2.0.

  • current (str or None) – This attribute was added in vSphere API 8.0.2.0. If set, the current value of the property in the cluster configuration. If not set, the property does not exist in the current cluster configuration.

  • draft (str or None) – This attribute was added in vSphere API 8.0.2.0. If set, this is the new value for the property in this draft. If not set, the property has been deleted in this draft.

class ChangesResult(sets=None, adds=None, deletes=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.ChangesResult class contains a detailed description of the differences between this draft and the current desired configuration. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
  • sets (list of Drafts.ChangedProperty or None) – This attribute was added in vSphere API 8.0.2.0. If set, this contains a list of properties that have been changed from one value to another in this draft.

  • adds (list of Drafts.ChangedProperty or None) – This attribute was added in vSphere API 8.0.2.0. If set, this contains a list of properties that have been added in this draft.

  • deletes (list of Drafts.ChangedProperty or None) – This attribute was added in vSphere API 8.0.2.0. If set, this contains a list of properties that have been deleted in this draft.

class ConflictDetails(properties=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Tip

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

Parameters

properties (dict of str and Drafts.ConflictPropertyInfo) – Map of properties in the current draft that were changed and conflict with changes that were applied to the cluster configuration document since this draft was created. This attribute was added in vSphere API 8.0.2.0.

class ConflictPropertyInfo(property_path=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.ConflictPropertyInfo class contains information about conflicts that have been detected when attempting to merge configuration changes that have been committed by other users. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters

property_path (str) – The path refers to the conflicting property in the cluster configuration document. This attribute was added in vSphere API 8.0.2.0.

class CreateSpec(config=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.CreateSpec class contains information used when creating a draft. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters

config (str or None) – The initial configuration for the draft. This attribute was added in vSphere API 8.0.2.0. If not specified, the current desired configuration for the cluster will be used.

class DeletionInfo(display_path=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.DeletionInfo class contains information about a property that was deleted from the draft configuration. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters

display_path (list of str) – A list of the display names for components of the property path. This attribute was added in vSphere API 8.0.2.0.

class Info(metadata=None, errors=None, changes=None, conflicts=None, host_info=None, host_id_to_uuid=None, config=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.Info class defines the information about configuration draft. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
  • metadata (Drafts.Metadata) – Metadata about the configuration draft. This attribute was added in vSphere API 8.0.2.0.

  • errors (Drafts.ValidationDetails or None) – This attribute was added in vSphere API 8.0.2.0. If set, there were validation errors detected in the draft configuration.

  • changes (Drafts.ChangeDetails or None) – This attribute was added in vSphere API 8.0.2.0. If set, there are changes in this draft configuration from the current desired configuration.

  • conflicts (Drafts.ConflictDetails or None) – This attribute was added in vSphere API 8.0.2.0. If set, there are changes in this draft configuration that conflict with changes applied by a different user.

  • host_info (dict of str and com.vmware.esx.settings_client.HostInfo) – A mapping of BIOS UUIDs for every host in the cluster to information about that host. The host-specific/host-override sections of the configuration use BIOS UUIDs to identify hosts, so this information can be useful to get details about hosts mentioned there. This attribute was added in vSphere API 8.0.2.0.

  • host_id_to_uuid (dict of str and str) – Map of host IDs to BIOS UUIDs. This attribute was added in vSphere API 8.0.2.0. 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: HostSystem. When methods return a value of this class as a return value, the key in the attribute dict will be an identifier for the resource type: HostSystem.

  • config (str) – Configuration specification associated with the draft, encoded as JSON. This attribute was added in vSphere API 8.0.2.0.

class Metadata(id=None, parent_id=None, owner=None, state=None, revision=None, creation_time=None, modified_time=None, precheck_task=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.Metadata class defines the metadata information about configuration draft. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
  • id (str) – The draft identifier. This attribute was added in vSphere API 8.0.2.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.esx.settings.draft. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.esx.settings.draft.

  • parent_id (str) – The identifier of the parent commit. This attribute was added in vSphere API 8.0.2.0. When clients pass a value of this class as a parameter, the attribute must be an identifier for the resource type: com.vmware.esx.settings.commit. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.esx.settings.commit.

  • owner (str) – Owner of the configuration draft. This attribute was added in vSphere API 8.0.2.0.

  • state (Drafts.State) – State of the configuration draft. This attribute was added in vSphere API 8.0.2.0.

  • revision (long) – The current revision of this draft. Any updates to the draft will increment this value. This value should be included in calls to Drafts.update() so that concurrent changes can be detected. This attribute was added in vSphere API 8.0.2.0.

  • creation_time (datetime.datetime) – Creation time of the configuration draft. This attribute was added in vSphere API 8.0.2.0.

  • modified_time (datetime.datetime) – Last modified time of the configuration draft. This attribute was added in vSphere API 8.0.2.0.

  • precheck_task (str or None) – The ID of the precheck task that was last run for this draft. This attribute was added in vSphere API 8.0.2.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 field is None if precheck has not been done since the last modification.

class ModificationInfo(display_path=None, original_path=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.ModificationInfo class contains information about a modification to a property in the configuration. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
  • display_path (list of str) – A list of the display names for components of the property path. This attribute was added in vSphere API 8.0.2.0.

  • original_path (str or None) – This attribute was added in vSphere API 8.0.2.0. If set, it contains a JSON-Pointer to the corresponding property in the original document. Otherwise, this modification is an addition to the draft.

RESOURCE_TYPE = 'com.vmware.esx.settings.draft'

Resource type for draft resource. This class attribute was added in vSphere API 8.0.2.0.

class State(string)

Bases: vmware.vapi.bindings.enum.Enum

The states of the draft configuration. This enumeration was added in vSphere API 8.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 the State instance.

INVALID = State(string='INVALID')

Configuration draft is invalid. This class attribute was added in vSphere API 8.0.2.0.

VALID = State(string='VALID')

Configuration draft is valid. This class attribute was added in vSphere API 8.0.2.0.

class UpdateSpec(expected_revision=None, config=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.UpdateSpec class contains the new configuration for the draft. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
  • expected_revision (long or None) – When supplied, this revision value will be compared against the draft’s current revision as returned in Drafts.Metadata.revision to ensure no other changes have been applied. This attribute was added in vSphere API 8.0.2.0.

  • config (str) – The new cluster configuration for this draft, encoded as JSON. This attribute was added in vSphere API 8.0.2.0.

class ValidationDetails(errors=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.ValidationDetails class contains all validation errors related to the draft configuration. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters

errors (dict of str and Drafts.ValidationErrors) – Map of JSON-Pointers to properties in the draft configuration that have validation errors based on the schema and host-level validations. This attribute was added in vSphere API 8.0.2.0.

class ValidationErrors(display_path=None, errors=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.ValidationErrors class contains schema-based validation errors for a given property. This class was added in vSphere API 8.0.2.0.

Tip

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

Parameters
  • display_path (list of str) – A list of the display names for components of the property path. This attribute was added in vSphere API 8.0.2.0.

  • errors (list of DetailedValidationError) – Localized error message describing the validation error. This attribute was added in vSphere API 8.0.2.0.

apply(cluster, draft, spec=None)

Commit this draft and make it the new desired configuration for the cluster. The draft must be in the Drafts.State.VALID state for this method to succeed. A successful commit will result in the draft being deleted. If the cluster is not empty, the Apply API will be called with the new desired state. This method was added in vSphere API 8.0.2.0.

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

  • draft (str) – Identifier of the working copy of the document. The parameter must be an identifier for the resource type: com.vmware.esx.settings.draft.

  • spec (Drafts.ApplySpec or None) – Additional arguments for the operation.

Return type

Drafts.ApplyResult

Returns

A structure that contains the ID of the new commit and, if an ApplySpec was supplied, the ID of the Apply task.

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 or no draft associated with draft in the system.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState If the draft is not in the Drafts.State.VALID state.

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

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

check_compliance_task(cluster, draft)

Check all the hosts in the cluster for compliance with the configuration specified in the draft. This method was added in vSphere API 8.0.2.0.

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

  • draft (str) – Identifier of the working copy of the document. The parameter must be an identifier for the resource type: com.vmware.esx.settings.draft.

Return type

class

vmware.vapi.stdlib.client.task.Task

Returns

Task instance

Raise

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

Raise

com.vmware.vapi.std.errors_client.InvalidArgument If API is called on a cluster that is not managed by desired configuration management platform.

Raise

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

Raise

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

Raise

com.vmware.vapi.std.errors_client.TimedOut If the API timed out before completion.

Raise

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

create(cluster, spec=None)

Create a new draft with the given values. If a configuration is supplied in the spec, it will be used as the initial value. Otherwise, the current desired configuration will be used as the initial value. The Drafts.Metadata.owner field will be set to the caller’s user ID and the Drafts.Metadata.parent_id will be set to the current commit ID for the cluster. This method was added in vSphere API 8.0.2.0.

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

  • spec (Drafts.CreateSpec or None) – Options used when creating the new draft.

Return type

str

Returns

The return value will be an identifier for the resource type: com.vmware.esx.settings.draft.

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.AlreadyExists If there is already a draft by this author for this cluster.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument If the supplied configuration is not valid JSON.

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.

delete(cluster, draft)

Delete this draft. Any changes will be abandoned. This method was added in vSphere API 8.0.2.0.

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

  • draft (str) – Identifier of the working copy of the document. The parameter must be an identifier for the resource type: com.vmware.esx.settings.draft.

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 or no draft associated with draft 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.

export_config(cluster, draft)

This API will export the draft configuration associated with the cluster. This method was added in vSphere API 8.0.2.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.

  • draft (str) – Identifier of the working copy of the document. The parameter must be an identifier for the resource type: com.vmware.esx.settings.draft.

Return type

ExportResult

Returns

This output structure of type com.vmware.esx.settings.clusters.Configuration#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.NotFound If there is no cluster associated with cluster or no draft associated with draft 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, draft)

Get the cluster configuration and related metadata from this draft. This method was added in vSphere API 8.0.2.0.

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

  • draft (str) – Identifier of the working copy of the document. The parameter must be an identifier for the resource type: com.vmware.esx.settings.draft.

Return type

Drafts.Info

Returns

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 or no draft associated with draft 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, draft, 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.2.0.

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

  • draft (str) – The parameter must be an identifier for the resource type: com.vmware.esx.settings.draft.

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

list(cluster)

Get the active drafts for this cluster. This method was added in vSphere API 8.0.2.0.

Parameters

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

Return type

dict of str and Drafts.Metadata

Returns

Map of drafts keyed by their identifiers. The key in the return value dict will be an identifier for the resource type: com.vmware.esx.settings.draft.

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.

precheck_task(cluster, draft)

This API will perform impact analysis of the configuration specified in the draft on each of the hosts in the cluster. The API will check against the desired image schema whether the desired configuration has added any requirements for the host to be put in maintenance mode or to be rebooted. The API will also invoke plugins which will validate the configuration on each hosts in the cluster. If the configuration is valid the API will also detect if the host needs to be maintenance mode or to be rebooted. If the hosts requires maintenance mode or reboot, then the API will run health checks to see the hosts can be put into the maintenance mode based on their current state. If any host cannot be put into maintenance mode due to health errors, then those errors will be reported in the result. The result will also list the configurations that will change on applying the configuration in the draft. This method was added in vSphere API 8.0.2.0.

Parameters
  • cluster (str) – The cluster on which to perform impact analysis. The parameter must be an identifier for the resource type: ClusterComputeResource.

  • draft (str) – Identifier of the working copy of the document. The parameter must be an identifier for the resource type: com.vmware.esx.settings.draft.

Return type

class

vmware.vapi.stdlib.client.task.Task

Returns

Task instance

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.

show_changes(cluster, draft)

Get the differences between this draft and the current desired state for the cluster. This method was added in vSphere API 8.0.2.0.

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

  • draft (str) – Identifier of the working copy of the document. The parameter must be an identifier for the resource type: com.vmware.esx.settings.draft.

Return type

Drafts.ChangesResult

Returns

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 or no draft associated with draft 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.

update(cluster, draft, spec)

Replace the current configuration in this draft with the supplied one. If the supplied configuration is different from the current value, the Drafts.Metadata.precheck_task fields will be cleared. If an expected revision number is provided, it must match the current revision of this draft or a ConcurrentChange exception will be raised. If no expected revision number is provided, this check will be skipped and the update will go through. This method was added in vSphere API 8.0.2.0.

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

  • draft (str) – Identifier of the working copy of the document. The parameter must be an identifier for the resource type: com.vmware.esx.settings.draft.

  • spec (Drafts.UpdateSpec) –

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 or no draft associated with draft in the system.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument If the supplied configuration is not valid JSON.

Raise

com.vmware.vapi.std.errors_client.ConcurrentChange If the expectedRevision in the spec differs from the draft’s current revision.

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.

class com.vmware.esx.settings.clusters.configuration_client.ExportResult(config=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

This ExportResult class contains attributes that describe the result of exporting configuration from 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

config (str) – Configuration of the cluster encoded as JSON. This attribute was added in vSphere API 8.0.1.0.

class com.vmware.esx.settings.clusters.configuration_client.HostCompliance(status=None, compliance_info=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The HostCompliance class contains attributes that describe compliance information for the ESXi host on which the Check Compliance operation completed successfully. 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 (ComplianceStatus) – This field indicates whether the ESXi host is compliant with the desired configuration specified in com.vmware.esx.settings_daemon.Configuration#CheckComplianceSpec. If COMPLIANT, no other information is available. If NON_COMPLAINT, drift information can be fetched from {#ComplianceInfo}. This attribute was added in vSphere API 8.0.1.0.

  • compliance_info (ComplianceInfo) – Settings compliance information generated by the CheckCompliance operation. 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 ComplianceStatus.NON_COMPLIANT.

class com.vmware.esx.settings.clusters.configuration_client.HostPrecheckResult(status=None, summary=None, validation_errors=None, impact=None, precheck_result=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

This HostPrecheckResult class contains attributes that describes the Precheck API result on a host. 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 (HostStatus) – This field represents the status of the precheck request for this host. {link HostStatus#status} is ERROR or SKIPPED, if precheck was not completed on the host due to some error or if health checks failed. If precheck failed due to host validation errors, details are specified in HostPrecheckResult.validation_errors. If precheck failed due to generic error, details are specified in the HostPrecheckResult.summary. Health check result is specified in HostPrecheckResult.precheck_result. This attribute was added in vSphere API 8.0.1.0.

  • summary (com.vmware.vapi.std_client.LocalizableMessage) – Summarizing precheck operation on the host. This attribute was added in vSphere API 8.0.1.0.

  • validation_errors (list of ValidationError or None) – This field represents the validation errors if the desired configuration specified is not valid. This attribute was added in vSphere API 8.0.1.0. This field is set if #HostStatus#status is ERROR due to host returning validation errors.

  • impact (ImpactInfo or None) – This field represents the impact on the host to reach the desired configuration state. This attribute was added in vSphere API 8.0.1.0. This field is set if there are no validation errors on the host. The HostStatus.status may be OK or ERROR.

  • precheck_result (com.vmware.esx.settings_client.StatusInfo or None) – This field represents the health check results from the host, if the host needs to be put in maintenance mode or to be rebooted. This attribute was added in vSphere API 8.0.1.0. This field is set if there are not validation errors and health checks are run on the host. The HostStatus.status may be OK or ERROR.

class com.vmware.esx.settings.clusters.configuration_client.HostResult(host_status=None, summary=None, errors=None, host_compliance=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

This HostResult class contains attributes that describe the result of the check compliance operation on an ESXi host. 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_status (HostStatus) – This field represents the status of the check compliance operation. If status is OK, the result of operation can be retrived from {#HostCompliance} {#Summary} field will summarize the status of the operation and if applicable, the specific error that occured. Additionally, {#ValidationError} is populated if the operation fails due to host validation errors in desired document. This attribute was added in vSphere API 8.0.1.0.

  • summary (com.vmware.vapi.std_client.LocalizableMessage) – Summary of check compliance operation on the host. This attribute was added in vSphere API 8.0.1.0.

  • errors (list of ValidationError or None) – List of validation errors returned by the host. This is only set for a specific HostStatus ERROR case. This attribute was added in vSphere API 8.0.1.0. This field is set only if the document fails to validate on the host.

  • host_compliance (HostCompliance or None) – This field provides compliance results for the host if the operation successfully completed on the host. That is, this field is populated only if HostStatus is OK. This attribute was added in vSphere API 8.0.1.0. This field is None if check compliance could not be completed on the host.

class com.vmware.esx.settings.clusters.configuration_client.HostStatus(status=None, attempts=None, remaining_retries=None, start_time=None, end_time=None, notifications=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The HostStatus class contains attributes that describe the status of an method. 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 (HostStatus.Status) – The status of the method. This attribute was added in vSphere API 8.0.1.0.

  • attempts (long or None) – Number of the performed attempts of the method. This attribute was added in vSphere API 8.0.1.0. This field is None if it is not applicable.

  • remaining_retries (long or None) – Number of the remaining attempts of the method. This attribute was added in vSphere API 8.0.1.0. This field is None if it is not applicable.

  • start_time (datetime.datetime) – Time when the method started. This attribute was added in vSphere API 8.0.1.0.

  • end_time (datetime.datetime) – Time when the method completed. This attribute was added in vSphere API 8.0.1.0.

  • notifications (com.vmware.esx.settings_client.Notifications) – Notifications providing additional information about the status of the method. This attribute was added in vSphere API 8.0.1.0.

class Status(string)

Bases: vmware.vapi.bindings.enum.Enum

The HostStatus.Status class contains the possible different status codes that can be returned while trying to perform an operation on the hosts within 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.

CANCELED = Status(string='CANCELED')

The method was canceled. This class attribute was added in vSphere API 8.0.1.0.

ERROR = Status(string='ERROR')

The method encountered an unspecified error. This class attribute was added in vSphere API 8.0.1.0.

OK = Status(string='OK')

The method completed successfully. This class attribute was added in vSphere API 8.0.1.0.

PENDING = Status(string='PENDING')

The method is pending. This class attribute was added in vSphere API 8.0.1.0.

RETRY_PENDING = Status(string='RETRY_PENDING')

The method is pending a retry. This class attribute was added in vSphere API 8.0.1.0.

RUNNING = Status(string='RUNNING')

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

SKIPPED = Status(string='SKIPPED')

The method was skipped. This class attribute was added in vSphere API 8.0.1.0.

TIMED_OUT = Status(string='TIMED_OUT')

The method timed out. This class attribute was added in vSphere API 8.0.1.0.

class com.vmware.esx.settings.clusters.configuration_client.ImpactInfo(impact=None, info=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

This ImpactInfo class contains attributes that describes the Impact if the host is not compliant against the desired configuration. 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
  • impact (ImpactType) – This field indicates the ESXi host impact on applying the desired configuration. This attribute was added in vSphere API 8.0.1.0.

  • info (list of com.vmware.vapi.std_client.LocalizableMessage) – This field represents the list of impact information describing the configuration changes needed on the host to reach the desired state. This attribute was added in vSphere API 8.0.1.0.

class com.vmware.esx.settings.clusters.configuration_client.ImpactType(string)

Bases: vmware.vapi.bindings.enum.Enum

The ImpactType class contains information about the impact of applying desired configuration on the ESXi host. 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 ImpactType instance.

MAINTENANCE_MODE_REQUIRED = ImpactType(string='MAINTENANCE_MODE_REQUIRED')

Host requires maintenance mode to reach the desired state. This class attribute was added in vSphere API 8.0.1.0.

NO_IMPACT = ImpactType(string='NO_IMPACT')

Host has no impact. This class attribute was added in vSphere API 8.0.1.0.

REBOOT_REQUIRED = ImpactType(string='REBOOT_REQUIRED')

Host requires reboot to reach the desired state. This class attribute was added in vSphere API 8.0.1.0.

class com.vmware.esx.settings.clusters.configuration_client.ImportResult(status=None, commit=None, errors=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

This ImportResult class contains attributes that describe the result of importing a configuration document 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 (ImportResult.Status) –

  • commit (str) – This identifier refers to the commit action of importing the desired configuration document. This identifier can be used in the apply API. 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.esx.settings.commit. When methods return a value of this class as a return value, the attribute will be an identifier for the resource type: com.vmware.esx.settings.commit. This attribute is optional and it is only relevant when the value of status is ImportResult.Status.OK.

  • errors (list of ValidationError) – Lists all validation errors identified in the configuration document. This attribute was added in vSphere API 8.0.1.0. This is set when #success is false.

class Status(string)

Bases: vmware.vapi.bindings.enum.Enum

This enum indicates whether the configuration document was imported successfully in 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.

CANCELED = Status(string='CANCELED')
ERROR = Status(string='ERROR')
OK = Status(string='OK')
RUNNING = Status(string='RUNNING')

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

class com.vmware.esx.settings.clusters.configuration_client.Schema(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Schema class provides methods to manage the desired configuration schema of an ESX 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.

get(cluster)

Returns the configuration schema associated with 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

SchemaResult

Returns

The schema associated with the cluster

Raise

com.vmware.vapi.std.errors_client.Error In case of an unknown internal error.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument If the cluster is invalid

Raise

com.vmware.vapi.std.errors_client.NotFound If the schema associated with the cluster is not found

Raise

com.vmware.vapi.std.errors_client.ServiceUnavailable If the service is unavailable.

Raise

com.vmware.vapi.std.errors_client.Unauthenticated If the session is unauthenticated.

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.

class com.vmware.esx.settings.clusters.configuration_client.SchemaResult(schema=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The SchemaResult class contains attributes that describe the configuration schema associated with 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

schema (str) – The configuration schema associated with the cluster. This attribute was added in vSphere API 8.0.1.0.

class com.vmware.esx.settings.clusters.configuration_client.SettingCompliance(path=None, current=None, target=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The SettingCompliance class contains attributes that describe a drift in an ESXi host setting. This structure is used to describe either a change in configuration value(set) or addition of configuration or deletion of configuration. When used to describe addition or deletion of a setting, only the path is set. When used to describe a set operation, current and target values are set only if drift is in a property that is of primitive type. 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
  • path (str) – Full path to the setting within the desired document. This attribute was added in vSphere API 8.0.1.0.

  • current (str or None) – Value of setting on the ESXi host. This attribute was added in vSphere API 8.0.1.0. This field is None if there is no host value to report or if setting is of complex type.

  • target (str or None) – Value of setting in the desired document. This attribute was added in vSphere API 8.0.1.0. This field is None if there is no value in the desired document to report or if setting is of complex type.

class com.vmware.esx.settings.clusters.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.configuration_client.ValidationError(path=None, messages=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The ValidationError class contains attributes that describes a validation error in the configuration. 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
  • path (str) – Full path to the configuration or the property within the configuration which was found to be invalid. This attribute was added in vSphere API 8.0.1.0.

  • messages (list of com.vmware.vapi.std_client.LocalizableMessage) – Localized error message describing the validation error. This attribute was added in vSphere API 8.0.1.0.

class com.vmware.esx.settings.clusters.configuration_client.ValidationResult(valid=None, errors=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

This ValidationResult class contains attributes that describe the result of validating a configuration document. 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
  • valid (bool) – This boolean flag indicates whether the configuration document validated successfully with no validation errors. This attribute was added in vSphere API 8.0.1.0.

  • errors (list of ValidationError or None) – Lists all validation errors identified in the configuration document. This attribute was added in vSphere API 8.0.1.0. This is set when ValidationResult.valid is false.

com.vmware.esx.settings.clusters.enablement_client module

The com.vmware.esx.settings.clusters.enablement_client module provides classes to manage enablement of the feature that allows to collectively manage hosts within the cluster with a single software specification.

class com.vmware.esx.settings.clusters.enablement_client.Configuration(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Configuration class provides methods to control whether the cluster is managed using desired configuration platform semantics. 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 Info(enabled=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Configuration.Info class contains information describing whether the feature is enabled. 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

enabled (bool) – Status of the feature enablement True if feature is enabled, false otherwise. This attribute was added in vSphere API 8.0.1.0.

get(cluster)

Returns whether the given cluster is managed using a desired configuration plaftorm. 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

Configuration.Info

Returns

Information about the feature enablement.

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.

class com.vmware.esx.settings.clusters.enablement_client.Software(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Software class provides methods to control whether the cluster is managed with a single software specification.

Parameters

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

class CheckResult(notifications=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Software.CheckResult class contains information that describes the results of the checks.

Tip

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

Parameters

notifications (dict of Software.CheckType and com.vmware.esx.settings_client.Notifications) – Notifications containing check results grouped by Software.CheckType type.

class CheckSpec(checks_to_skip=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Software.CheckSpec class contains information describing what checks should be performed.

Tip

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

Parameters

checks_to_skip (set of Software.CheckType) – Specifies the checks that should be skipped. If the set is empty, all checks will be performed.

class CheckType(string)

Bases: vmware.vapi.bindings.enum.Enum

The Software.CheckType class contains various checks to identify the possibility to enable the feature that manages the cluster with a single software specification.

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

SOFTWARE = CheckType(string='SOFTWARE')

Perform host software check. This check is to report standalone VIBs (VIBs which are not part of any component) and the features on the given cluster that cannot coexist with the feature which manages the cluster with a single software specification.

SOFTWARE_SPECIFICATION_EXISTENCE = CheckType(string='SOFTWARE_SPECIFICATION_EXISTENCE')

Perform cluster’s software specification existence check.

STATELESSNESS = CheckType(string='STATELESSNESS')

Perform host statelessness check. This feature does not support stateless hosts.

VERSION = CheckType(string='VERSION')

Perform host version check. This feature does not support hosts with version less than XYZ.

VSAN_WITNESS_ELIGIBILITY = CheckType(string='VSAN_WITNESS_ELIGIBILITY')

Checks to verify if the cluster software specification can be used to manage any vSAN witness hosts in the cluster. This class attribute was added in vSphere API 7.0.2.1.

VUM_REMEDIATION = CheckType(string='VUM_REMEDIATION')

Perform VUM active remediation check.

class EnableSpec(skip_software_check=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Software.EnableSpec class contains information describing checks that should be skipped during enablement. Currently only Software.CheckType.SOFTWARE check can be skipped.

Tip

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

Parameters

skip_software_check (bool) – Skip Software.CheckType.SOFTWARE check during feature enablement.

class Info(enabled=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Software.Info class contains information describing whether the feature is enabled.

Tip

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

Parameters

enabled (bool) – Status of the feature enablement True if feature is enabled, false otherwise

check_task(cluster, spec=None)

Checks the possibility to manage the cluster with a single software specification.

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

  • spec (Software.CheckSpec or None) – Check specification. If None, all checks are performed.

Return type

class

vmware.vapi.stdlib.client.task.Task

Returns

Task instance

Raise

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

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState If the feature is already enabled for the given cluster.

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, spec=None)

Enables the feature which manages the cluster with a single software specification.

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

  • spec (Software.EnableSpec or None) – Enablement specification. If None, all checks are performed.

Raise

com.vmware.vapi.std.errors_client.Error If feature enablement failed for the given cluster. The value of the data attribute of com.vmware.vapi.std.errors_client.Error will be a class that contains all the attributes defined in Software.CheckResult.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState If the feature is already enabled for the given cluster.

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.

get(cluster)

Returns whether the given cluster is managed with a single software specification.

Parameters

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

Return type

Software.Info

Returns

Information about the feature enablement.

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

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSettings.Read.

class com.vmware.esx.settings.clusters.enablement_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.esx.settings.clusters.policies_client module

The com.vmware.esx.settings.clusters.policies_client module provides classes to manage policies that affect management of desired state configuration and software for an ESXi cluster. Copyright 2019-2023 VMware, Inc. All rights reserved. VMware Confidential Copyright 2020-2021 VMware, Inc. All rights reserved. VMware Confidential

class com.vmware.esx.settings.clusters.policies_client.Apply(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Apply class provides methods to configure the policies that will impact how the software and configuration specification documents are applied to an ESXi cluster.

Parameters

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

class ConfiguredPolicySpec(failure_action=None, pre_remediation_power_action=None, enable_quick_boot=None, disable_dpm=None, disable_hac=None, evacuate_offline_vms=None, enforce_hcl_validation=None, parallel_remediation_action=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Apply.ConfiguredPolicySpec class contains attributes that describe the policies configured to be used when the software and configuration specification documents are applied to an ESXi cluster.

Tip

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

Parameters
  • failure_action (Apply.FailureAction or None) – What action is to be taken if entering maintenance mode fails on a given host of the cluster. If None, configured value would be unset.

  • pre_remediation_power_action (Apply.ConfiguredPolicySpec.PreRemediationPowerAction or None) – Specifies what should be done to the power state of the VM before entering maintenance mode. If None, configured value would be unset.

  • enable_quick_boot (bool or None) – Enable Quick Boot during remediation in the cluster. If None, configured value would be unset.

  • disable_dpm (bool or None) – Disable DPM on the cluster. If None, configured value would be unset.

  • disable_hac (bool or None) – Disable HA Admission control on the cluster. If None, configured value would be unset.

  • evacuate_offline_vms (bool or None) – Evacuate powered off/suspended VMs when attempting maintenance mode. If None, configured value would be unset.

  • enforce_hcl_validation (bool or None) – Enforce Hcl validation, when applicable, to prevent remediation if hardware compatibility issues are found. This attribute was added in vSphere API 7.0.1.0. If None, hardware compatibility issues will not prevent remediation.

  • parallel_remediation_action (Apply.ParallelRemediationAction or None) – Enable parallel remediation of hosts in maintenance mode. Set max hosts when applicable. This attribute was added in vSphere API 8.0.0.1. If None, parallel remediation will not happen.

class PreRemediationPowerAction(string)

Bases: vmware.vapi.bindings.enum.Enum

The Apply.ConfiguredPolicySpec.PreRemediationPowerAction class defines the possible actions to be taken, before entering maintenance mode.

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

DO_NOT_CHANGE_VMS_POWER_STATE = PreRemediationPowerAction(string='DO_NOT_CHANGE_VMS_POWER_STATE')

Do not change the VM power state

POWER_OFF_VMS = PreRemediationPowerAction(string='POWER_OFF_VMS')

Power off VMs before entering maintenance mode.

SUSPEND_VMS = PreRemediationPowerAction(string='SUSPEND_VMS')

Suspend VMs before entering maintenance mode

SUSPEND_VMS_TO_MEMORY = PreRemediationPowerAction(string='SUSPEND_VMS_TO_MEMORY')

Suspend VMs to Memory before entering maintenance mode. This class attribute was added in vSphere API 7.0.2.0.

class FailureAction(action=None, retry_delay=None, retry_count=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Apply.FailureAction class contains attributes that describe the actions to be taken when entering maintenance mode fails on a single host within the cluster.

Tip

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

Parameters
  • action (Apply.FailureAction.Action) – What action (FAIL, RETRY) is to be taken if entering maintenance mode fails on a single host within the cluster.

  • retry_delay (long) – Time to wait to retry the failed operation in seconds. This attribute is optional and it is only relevant when the value of action is Apply.FailureAction.Action.RETRY.

  • retry_count (long) – Number of times to retry the failed operation. This attribute is optional and it is only relevant when the value of action is Apply.FailureAction.Action.RETRY.

class Action(string)

Bases: vmware.vapi.bindings.enum.Enum

The Apply.FailureAction.Action class defines the actions to be taken when entering maintenance mode fails on a single host within the cluster.

Note

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

Parameters

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

FAIL = Action(string='FAIL')

Fail the apply method

RETRY = Action(string='RETRY')

Retry the task Apply.FailureAction.retry_count number of times on the failed host after Apply.FailureAction.retry_delay.

class ParallelRemediationAction(enabled=None, max_hosts=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

Tip

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

Parameters
  • enabled (bool) – Enable parallel remediation for hosts in maintenance mode within a cluster. This attribute was added in vSphere API 8.0.0.1.

  • max_hosts (long or None) – Maximum number of hosts that can be remediated in parallel. Setting Apply.ParallelRemediationAction.max_hosts does not guarantee maxHosts to be remediated in parallel. This attribute was added in vSphere API 8.0.0.1.

get(cluster)

Returns the configured policy that has been set for the cluster.

Parameters

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

Return type

Apply.ConfiguredPolicySpec

Returns

The configured policies that impact the apply method

Raise

com.vmware.vapi.std.errors_client.Error If there is an 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.lifecycleSettings.Read.

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSettings.Read.

set(cluster, spec)

This API will set the configured policy specification for the cluster.

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

  • spec (Apply.ConfiguredPolicySpec) – The policy that needs to be configured.

Raise

com.vmware.vapi.std.errors_client.Error If there is an 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.InvalidArgument If invalid value is provided.

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

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSettings.Write.

class com.vmware.esx.settings.clusters.policies_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.esx.settings.clusters.software_client module

The com.vmware.esx.settings.clusters.software_client module provides classes to manage desired state software for ESX cluster.

class com.vmware.esx.settings.clusters.software_client.AddOn(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The AddOn class provides methods to manage desired OEM add-on specification for a given cluster.

Parameters

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

RESOURCE_TYPE = 'com.vmware.esx.settings.add_on'

Resource type for add-on resource

get(cluster)

Returns the desired OEM add-on specification for a given cluster.

Parameters

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

Return type

com.vmware.esx.settings_client.AddOnInfo

Returns

Desired OEM add-on specification.

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 or if desired OEM add-on specification is not found.

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

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Read.

class com.vmware.esx.settings.clusters.software_client.BaseImage(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The BaseImage class provides methods to manage desired ESX base image.

Parameters

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

RESOURCE_TYPE = 'com.vmware.esx.settings.base_image'

Resource type for base-image resource

get(cluster)

Returns the desired base-image specification set for given cluster

Parameters

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

Return type

com.vmware.esx.settings_client.BaseImageInfo

Returns

Base-image specification.

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 or if desired specification is not found.

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

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Read.

class com.vmware.esx.settings.clusters.software_client.Commits(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Commits class provides methods to manage committed changes to desired software document.

Parameters

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

class Info(author=None, commit_time=None, description=None, apply_status=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Commits.Info class defines the information about software draft.

Tip

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

Parameters
  • author (str) – Author of the commit.

  • commit_time (datetime.datetime) – Creation time of the commit.

  • description (str) – Description accompanying this commit.

  • apply_status (Commits.Info.ApplyStatusType) – Apply status of the commit.

class ApplyStatusType(string)

Bases: vmware.vapi.bindings.enum.Enum

The Commits.Info.ApplyStatusType class defines possible values regarding the application of this commit.

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

APPLIED = ApplyStatusType(string='APPLIED')

Commit has been applied to the cluster.

NOT_APPLIED = ApplyStatusType(string='NOT_APPLIED')

Commit hasn’t been applied to the cluster.

RESOURCE_TYPE = 'com.vmware.esx.settings.commit'

Resource type for commit resource

get(cluster, commit)

Returns the information about a specific commit.

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

  • commit (str) – Identifier of the specific commit. The parameter must be an identifier for the resource type: com.vmware.esx.settings.commit.

Return type

Commits.Info

Returns

Information about the commit.

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 or if desired specification commit is not found.

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

class com.vmware.esx.settings.clusters.software_client.Compliance(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Compliance class provides methods to get the last software compliance result for an ESX cluster.

Parameters

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

RESOURCE_TYPE = 'ClusterComputeResource'

Resource type for cluster resource

get(cluster)

Returns the compliance state for the cluster

Parameters

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

Return type

com.vmware.esx.settings_client.ClusterCompliance

Returns

Cluster compliance result.

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 or if the compliance information is unavailable.

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

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Read.

class com.vmware.esx.settings.clusters.software_client.Components(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Components class provides methods to get desired component specification for an ESX cluster.

Parameters

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

RESOURCE_TYPE = 'com.vmware.esx.settings.component'

Resource type for component resource

get(cluster, component)

Returns the component version for the given component in the desired software specification.

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

  • component (str) – Identifier of the component. The parameter must be an identifier for the resource type: com.vmware.esx.settings.component.

Return type

com.vmware.esx.settings_client.ComponentInfo or None

Returns

Details about the component version. If None then version is supposed to be chosen based on the constraints in the system.

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.InvalidArgument If invalid component name is provided.

Raise

com.vmware.vapi.std.errors_client.NotFound If there is no cluster associated with cluster in the system or or no component associated with component 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.lifecycleSoftwareSpecification.Read.

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Read.

list(cluster)

Returns a list of components in the desired software specification.

Parameters

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

Return type

dict of str and com.vmware.esx.settings_client.ComponentInfo

Returns

Map of ComponentInfo keyed by the component identifier. If no version is specified in desired software specification, then ComponentInfo will not be present for that component. The key in the return value dict will be an identifier for the resource type: com.vmware.esx.settings.component.

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.

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

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Read.

class com.vmware.esx.settings.clusters.software_client.Drafts(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Drafts class provides methods to manage working copy of software documents.

Parameters

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

class CommitSpec(message=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.CommitSpec class contains attributes that are used to create a new commit.

Tip

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

Parameters

message (str or None) – Message to include with the commit. If None, message is set to empty string.

class FilterSpec(owners=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.FilterSpec class contains attributes used to filter the results when listing software drafts. See Drafts.list().

Tip

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

Parameters

owners (set of str or None) – Owners of the drafts. If None or empty, drafts from all owners will be returned.

class ImportSpec(source_type=None, location=None, file_id=None, software_spec=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.ImportSpec class defines the information used to import the desired software specification.

Tip

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

Parameters
  • source_type (Drafts.SourceType) – Type of the source to import the desired software specification

  • location (str) – Location of the software specification file to be imported. This attribute is optional and it is only relevant when the value of sourceType is Drafts.SourceType.PULL.

  • file_id (str) – File identifier returned by the file upload endpoint after file is uploaded. This attribute is optional and it is only relevant when the value of sourceType is Drafts.SourceType.PUSH.

  • software_spec (str) – The JSON string representing the desired software specification. This attribute is optional and it is only relevant when the value of sourceType is Drafts.SourceType.JSON_STRING.

class Info(metadata=None, software=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.Info class defines the information about software draft.

Tip

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

Parameters
class Metadata(owner=None, status=None, creation_time=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.Metadata class defines the metadata information about software draft.

Tip

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

Parameters
  • owner (str) – Owner of the software draft.

  • status (Drafts.StatusType) – Status of the software draft.

  • creation_time (datetime.datetime) – Creation time of the software draft.

RESOURCE_TYPE = 'com.vmware.esx.settings.draft'

Resource type for draft resource

class SourceType(string)

Bases: vmware.vapi.bindings.enum.Enum

The Drafts.SourceType class defines possible values of sources to import software specification.

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

CURRENT_SERIES_RECOMMENDATION = SourceType(string='CURRENT_SERIES_RECOMMENDATION')

Content is from recommended image specification based on latest base image patch or update of the current series. For example, a cluster’s current desired base image is 7.0. Recommendation engine will look into any recommendable image specification with 7.0 series base images available at depot manager and try to recommend the highest version within 7.0 series if possible. Let’s say in this example, depot manager has 7.0 patch a and 7.0 update 1 base images. Recommendation engine would first validate all possible images based on 7.0 update 1. If it finds a valid one, it will store the recommended content with that series. This enum value will point to that stored recommended image content. Recommendations can be generated using {\@link: com.vmware.esx.settings.clusters.software.Recommendations#generate}.

JSON_STRING = SourceType(string='JSON_STRING')

The string representing the content of the software specfication.

LATEST_RECOMMENDATION = SourceType(string='LATEST_RECOMMENDATION')

Content is from recommended image specification based on latest base image version. Recommendations can be generated using {\@link: com.vmware.esx.settings.clusters.software.Recommendations#generate}.

PULL = SourceType(string='PULL')

Content is pulled from the URL location. The URL scheme of the value in {\@link #pullLocation) can be http, https or file.

PUSH = SourceType(string='PUSH')

Content was previously uploaded using the file upload enpoint present on vCenter appliance. This endpoint is present at https://VCENTERFQDN:9087/vum-fileupload URL.

SPECIFIED_BASE_IMAGE_RECOMMENDATION = SourceType(string='SPECIFIED_BASE_IMAGE_RECOMMENDATION')

Content is from recommended image specification based on a specified base image version. Recommendations can be generated using {\@link: com.vmware.esx.settings.clusters.software.Recommendations#generate}. This class attribute was added in vSphere API 7.0.2.0.

class StatusType(string)

Bases: vmware.vapi.bindings.enum.Enum

The Drafts.StatusType class defines possible values of status of a software draft.

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

INVALID = StatusType(string='INVALID')

Software draft is invalid.

VALID = StatusType(string='VALID')

Software draft is valid.

class Summary(metadata=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.Summary class defines the summary information about software draft.

Tip

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

Parameters

metadata (Drafts.Metadata) – Metadata about the software draft.

class ValidateResult(notifications=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Drafts.ValidateResult class contains attributes to describe result of validation of desired software specification.

Tip

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

Parameters

notifications (com.vmware.esx.settings_client.Notifications) – Notifications associated with the validation.

commit_task(cluster, draft, spec)

Commits the specified draft as the desired state document. The result of this operation can be queried by calling the cis/tasks/{task-id} where the task-id is the response of this operation.

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

  • draft (str) – Identifier of the draft. The parameter must be an identifier for the resource type: com.vmware.esx.settings.draft.

  • spec (Drafts.CommitSpec) – The spec to be used to create the commit.

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 or no draft associated with draft in the system.

Raise

com.vmware.vapi.std.errors_client.NotAllowedInCurrentState If there is another operation in progress.

Raise

com.vmware.vapi.std.errors_client.InvalidArgument If validation of the software document fails. The value of the data attribute of com.vmware.vapi.std.errors_client.Error will be a class that contains all the attributes defined in Drafts.ValidateResult.

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.

create(cluster)

Creates a new software draft from the desired document. It will be deleted, when the draft is committed successfully. If a desired document is missing, then this method will create an empty draft.

Parameters

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

Return type

str

Returns

Identifier of the working copy of the document. The return value will be an identifier for the resource type: com.vmware.esx.settings.draft.

Raise

com.vmware.vapi.std.errors_client.AlreadyExists If there is already a draft created by this user.

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

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Write.

delete(cluster, draft)

Deletes the software draft.

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

  • draft (str) – Identifier of the working copy of the document. The parameter must be an identifier for the resource type: com.vmware.esx.settings.draft.

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 or no draft associated with draft 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.lifecycleSoftwareSpecification.Write.

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Write.

get(cluster, draft)

Returns the information about given software draft.

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

  • draft (str) – Identifier of the software draft. The parameter must be an identifier for the resource type: com.vmware.esx.settings.draft.

Return type

Drafts.Info

Returns

Information about the Software Draft.

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 or no draft associated with draft 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.lifecycleSoftwareSpecification.Read.

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Read.

import_software_spec(cluster, spec)

Imports the desired software specification as a new draft. If a desired document is missing, then this method will create an empty draft except when the source type is of either Drafts.SourceType.LATEST_RECOMMENDATION or Drafts.SourceType.CURRENT_SERIES_RECOMMENDATION, then com.vmware.vapi.std.errors_client.NotFound error is reported. In addition, the exisiting draft will be overwritten when the source type is of either LATEST_RECOMMENDATION or CURRENT_SERIES_RECOMMENDATION.

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

  • spec (Drafts.ImportSpec) – Specification to import desired software specification.

Return type

str

Returns

Identifier of the software draft. The return value will be an identifier for the resource type: com.vmware.esx.settings.draft.

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 or if the source type of import specification is of either LATEST_RECOMMENDATION or CURRENT_SERIES_RECOMMENDATION, and a recommendation does not exist for the cluster. It was either never generated or deleted due to changes in cluster state such as a new desired image spec being committed.

Raise

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

Raise

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

  • Method execution requires VcIntegrity.lifecycleSoftwareSpecification.Write.

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Write.

list(cluster, filter=None)

Returns information about the software drafts for the specified cluster that match the Drafts.FilterSpec.

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

  • filter (Drafts.FilterSpec or None) – Filter to be applied while returning drafts. If None, all drafts will be returned.

Return type

dict of str and Drafts.Summary

Returns

Map of software drafts keyed by their identifiers. The key in the return value dict will be an identifier for the resource type: com.vmware.esx.settings.draft.

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

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Read.

scan_task(cluster, draft)

Scans all the hosts in the cluster against the software draft. The result of this operation can be queried by calling the cis/tasks/{task-id} where the task-id is the response of this operation.

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

  • draft (str) – Identifier of the working copy of the document. The parameter must be an identifier for the resource type: com.vmware.esx.settings.draft.

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 or no draft associated with draft 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_task(cluster, draft)

Validates the software draft. The result of this operation can be queried by calling the cis/tasks/{task-id} where the task-id is the response of this operation.

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

  • draft (str) – Identifier of the software draft. The parameter must be an identifier for the resource type: com.vmware.esx.settings.draft.

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 or no draft associated with draft 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.

class com.vmware.esx.settings.clusters.software_client.EffectiveComponents(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The EffectiveComponents class provides methods to get effective list of components.

Parameters

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

list(cluster)

Returns the effective components for the cluster.

Parameters

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

Return type

dict of str and com.vmware.esx.settings_client.EffectiveComponentInfo

Returns

Map of effective components keyed by their identifier. The key in the return value dict will be an identifier for the resource type: com.vmware.esx.settings.component.

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

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Read.

class com.vmware.esx.settings.clusters.software_client.HardwareSupport(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The HardwareSupport class provides methods to manage a cluster’s Hardware Support Package (HSP) configuration.

Parameters

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

get(cluster)

Returns a given cluster’s Hardware Support Package (HSP) configuration.

Parameters

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

Return type

com.vmware.esx.settings_client.HardwareSupportInfo

Returns

Hardware Support Package (HSP) selected for use

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.

Raise

com.vmware.vapi.std.errors_client.NotFound If there is no cluster named cluster or no Hardware Support Package (HSP) configured in the cluster’s desired state document.

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

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Read.

class com.vmware.esx.settings.clusters.software_client.Recommendations(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Recommendations class provides methods to manage the generation and retrieval of recommended image specs.

Parameters

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

class ExplanationDetails(display_name=None, display_version=None, explanation=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Recommendations.ExplanationDetails class contains attributes to describe the result of validation of desired software specification.

Tip

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

Parameters
  • display_name (str) – Display name of an excluded image entity (base image, add-on etc.).

  • display_version (str) – Display version of an excluded image entity (base image, add-on etc.).

  • explanation (list of com.vmware.vapi.std_client.LocalizableMessage) – List of explanations on why the image entity is excluded.

class FilterSpec(base_image_version=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Recommendations.FilterSpec class contains attributes used to filter the generated recommendations (see Recommendations.generate()) based on a specified base image version. 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

base_image_version (str or None) – Base image version string is used in generating the specified base image recommendations. Default recommendations are generated when the value is empty. This attribute was added in vSphere API 7.0.2.0.

class Info(latest_recommendation=None, current_series_recommendation=None, specified_base_image_version_recommendation=None, base_image_explanation_details=None, check_time=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Recommendations.Info class defines the information about the most recent recommendation generation result.

Tip

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

Parameters
  • latest_recommendation (com.vmware.esx.settings_client.SoftwareInfo or None) – Recommended image specification based on latest base image version. None if no recommended image based on latest base image version is available.

  • current_series_recommendation (com.vmware.esx.settings_client.SoftwareInfo or None) – Recommended image specification based on latest base image patch or update of the current series. None if no recommended image based on latest base image patch or update of the current series is available.

  • specified_base_image_version_recommendation (com.vmware.esx.settings_client.SoftwareInfo or None) – Recommended image specification based on a specified base image version. This attribute was added in vSphere API 7.0.2.0. None if no recommendation image based on the specified base image version is available.

  • base_image_explanation_details (list of Recommendations.ExplanationDetails) – Details about why some base images are excluded in latest and current series recommendations. This is not applicable for specified base image recommendations.

  • check_time (datetime.datetime or None) – The most recent timestamp when check for recommended image is launched. None if no recommendation check has ever been launched.

generate_task(cluster, filter=None)

Generates recommended software image spec(s) based on current desired software spec. The result of this operation can be queried by calling the cis/tasks/{task-id} where the task-id is the response of this operation.

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

  • filter (Recommendations.FilterSpec or None) – Specification on how to filter recommendations based on a specified base image version. This parameter was added in vSphere API 7.0.2.0. If None, latest and current series recommendations are generated.

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.

Raise

com.vmware.vapi.std.errors_client.ConcurrentChange If a new desired image is committed in parallel via a different client while recommendation is being generated.

Raise

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

get(cluster)

Returns Information about the most recent recommendation generation result.

Parameters

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

Return type

Recommendations.Info

Returns

Information about the most recent recommendation generation result.

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 or recommendation is non-existing for the cluster due to either it is never generated or deleted due to changes in cluster state such as a new desired image spec being committed.

Raise

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

Raise

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

  • Method execution requires VcIntegrity.lifecycleSoftwareSpecification.Read.

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Read.

class com.vmware.esx.settings.clusters.software_client.Solutions(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Solutions class provides methods to manage desired software solution specifications for an ESX cluster.

Parameters

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

RESOURCE_TYPE = 'com.vmware.esx.settings.solution'

Resource type for solution resource

delete_task(cluster, solution)

Deletes the given solution from the desired software specification. The deletion will be validated along with the entire software specification before it is committed as new desired spec. The result of this operation can be queried by calling the cis/tasks/{task-id} where the task-id is the response of this operation.

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

  • solution (str) – Identifier of the solution. The parameter must be an identifier for the resource type: com.vmware.esx.settings.solution.

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.InvalidArgument if validation of the software document fails. The value of the data attribute of com.vmware.vapi.std.errors_client.Error will be a class that contains all the attributes defined in ValidateResult.

Raise

com.vmware.vapi.std.errors_client.NotFound If there is no cluster associated with cluster or no solution associated with solution 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.

get(cluster, solution)

Returns components registered for the given solution in the desired software specification.

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

  • solution (str) – Identifier of the solution. The parameter must be an identifier for the resource type: com.vmware.esx.settings.solution.

Return type

com.vmware.esx.settings_client.SolutionInfo

Returns

Specification of components registered by the solution.

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.InvalidArgument If invalid component name is provided.

Raise

com.vmware.vapi.std.errors_client.NotFound If there is no cluster associated with cluster in the system or or no solution associated with solution 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.lifecycleSoftwareSpecification.Read.

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Read.

list(cluster)

Returns all solutions in the desired software specification.

Parameters

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

Return type

dict of str and com.vmware.esx.settings_client.SolutionInfo

Returns

Map of solutions where key is solution identifier and value is a list of components registered by that solution. The key in the return value dict will be an identifier for the resource type: com.vmware.esx.settings.solution.

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

  • The resource ClusterComputeResource referenced by the parameter cluster requires VcIntegrity.lifecycleSoftwareSpecification.Read.

set_task(cluster, solution, spec)

Sets the components registered for the given solution in the desired software specification. The task will set only one solution specification at a time. Solution constraints would be validated with the current desired software specification before it is committed as new desired spec. The result of this operation can be queried by calling the cis/tasks/{task-id} where the task-id is the response of this operation.

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

  • solution (str) – Identifier of the solution. The parameter must be an identifier for the resource type: com.vmware.esx.settings.solution.

  • spec (com.vmware.esx.settings_client.SolutionSpec) – Registered solution specification.

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.InvalidArgument if validation of the software document fails. The value of the data attribute of com.vmware.vapi.std.errors_client.Error will be a class that contains all the attributes defined in ValidateResult.

Raise

com.vmware.vapi.std.errors_client.NotFound If there is no cluster associated with cluster or no solution associated with solution 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.

class com.vmware.esx.settings.clusters.software_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

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