com.vmware.esx.settings.hosts package

Subpackages

Submodules

com.vmware.esx.settings.hosts.enablement_client module

The com.vmware.esx.settings.hosts.enablement_client module provides classes to manage standalone host with a single software specification.

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

Bases: VapiInterface

The Software class provides methods to control whether the host is managed with a single software specification. This class was added in vSphere API 8.0.0.1.

Parameters:

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

class CheckResult(notifications=None)

Bases: VapiStruct

The Software.CheckResult class contains information that describes the results of the checks. This class was added in vSphere API 8.0.0.1.

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. This attribute was added in vSphere API 8.0.0.1.

class CheckSpec(checks_to_skip=None)

Bases: VapiStruct

The Software.CheckSpec class contains information describing what checks should be performed. This class was added in vSphere API 8.0.0.1.

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. This attribute was added in vSphere API 8.0.0.1.

class CheckType(string)

Bases: Enum

The Software.CheckType class contains various checks to identify the possibility to enable the feature that manages the host with a single software specification. This enumeration was added in vSphere API 8.0.0.1.

Note

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

Parameters:

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

SOFTWARE = CheckType(string='SOFTWARE')

Perform host software check. The purpose of this check is to report standalone VIBs (VIBs which are not part of any component). This class attribute was added in vSphere API 8.0.0.1.

SOFTWARE_SPECIFICATION_EXISTENCE = CheckType(string='SOFTWARE_SPECIFICATION_EXISTENCE')

Perform host’s software specification existence check. This class attribute was added in vSphere API 8.0.0.1.

STATELESSNESS = CheckType(string='STATELESSNESS')

Perform host statelessness check. This feature does not support stateless hosts. This class attribute was added in vSphere API 8.0.0.1.

VERSION = CheckType(string='VERSION')

Perform host version check. This feature does not support hosts with version less than XYZ. This class attribute was added in vSphere API 8.0.0.1.

VSAN_WITNESS_ELIGIBILITY = CheckType(string='VSAN_WITNESS_ELIGIBILITY')

Perform vSAN witness check to verify if the standalone host acting as a vSAN witness can be managed with a software image. This class attribute was added in vSphere API 8.0.0.1.

VUM_REMEDIATION = CheckType(string='VUM_REMEDIATION')

Perform VUM active remediation check. This class attribute was added in vSphere API 8.0.0.1.

class EnableSpec(skip_software_check=None)

Bases: VapiStruct

The Software.EnableSpec class contains information describing checks that should be skipped during enablement. Currently only Software.CheckType.SOFTWARE check can be skipped. This class was added in vSphere API 8.0.0.1.

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. This attribute was added in vSphere API 8.0.0.1.

class Info(enabled=None)

Bases: VapiStruct

The Software.Info class contains information describing whether the feature is enabled. This class was added in vSphere API 8.0.0.1.

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

check_task(host, spec=None)

Checks the possibility to manage the host with a single software specification. This method was added in vSphere API 8.0.0.1.

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

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

Raise:

com.vmware.vapi.std.errors_client.NotFound If there is no host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

enable_task(host, spec=None)

Enables the feature which manages the host with a single software specification. This method was added in vSphere API 8.0.0.1.

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

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

Raise:

com.vmware.vapi.std.errors_client.NotFound If there is no host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

get(host)

Returns whether the given standalone host is managed with a single software specification. This method was added in vSphere API 8.0.0.1.

Parameters:

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

Return type:

Software.Info

Returns:

True if feature is enabled, false otherwise.

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 host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSettings.Read.

class com.vmware.esx.settings.hosts.enablement_client.StubFactory(stub_config)

Bases: StubFactoryBase

Initialize StubFactoryBase

Parameters:

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

com.vmware.esx.settings.hosts.policies_client module

The com.vmware.esx.settings.hosts.policies_client module provides classes to manage the policies that affect management of desired state configuration and software for an ESXi host. Copyright (c) 2019-2023 VMware, Inc. All rights reserved. – VMware Confidential

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

Bases: 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 host. This class was added in vSphere API 8.0.0.1.

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)

Bases: 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 host. This class was added in vSphere API 8.0.0.1.

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 an ESXi host. This attribute was added in vSphere API 8.0.0.1. 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. This attribute was added in vSphere API 8.0.0.1. If None, configured value would be unset.

  • enable_quick_boot (bool or None) – Enable Quick Boot during remediation of the host. This attribute was added in vSphere API 8.0.0.1. If None, configured value would be unset.

class PreRemediationPowerAction(string)

Bases: Enum

The Apply.ConfiguredPolicySpec.PreRemediationPowerAction class defines the possible actions to take, before entering maintenance mode. This enumeration was added in vSphere API 8.0.0.1.

Note

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

Parameters:

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

DO_NOT_CHANGE_VMS_POWER_STATE = PreRemediationPowerAction(string='DO_NOT_CHANGE_VMS_POWER_STATE')

Do not change the VM power state. This class attribute was added in vSphere API 8.0.0.1.

POWER_OFF_VMS = PreRemediationPowerAction(string='POWER_OFF_VMS')

Power off VMs before entering maintenance mode. This class attribute was added in vSphere API 8.0.0.1.

SUSPEND_VMS = PreRemediationPowerAction(string='SUSPEND_VMS')

Suspend VMs before entering maintenance mode. This class attribute was added in vSphere API 8.0.0.1.

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

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

Bases: VapiStruct

The Apply.FailureAction class contains attributes that describe the actions to be taken when entering maintenance mode fails on an ESXi host. This class was added in vSphere API 8.0.0.1.

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 an ESXi host. This attribute was added in vSphere API 8.0.0.1.

  • retry_delay (long) – Time to wait to retry the failed operation in seconds. This attribute was added in vSphere API 8.0.0.1. 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 was added in vSphere API 8.0.0.1. This attribute is optional and it is only relevant when the value of action is Apply.FailureAction.Action.RETRY.

class Action(string)

Bases: Enum

The Apply.FailureAction.Action class defines the actions to be taken when entering maintenance mode fails on an ESXi host. This enumeration was added in vSphere API 8.0.0.1.

Note

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

Parameters:

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

FAIL = Action(string='FAIL')

Fail the apply method. This class attribute was added in vSphere API 8.0.0.1.

RETRY = Action(string='RETRY')

Retry the task Apply.FailureAction.retry_count number of times on the failed host after Apply.FailureAction.retry_delay. This class attribute was added in vSphere API 8.0.0.1.

get(host)

Returns the configured policy that has been set for the ESXi host. This method was added in vSphere API 8.0.0.1.

Parameters:

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

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 host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSettings.Read.

set(host, spec)

This API will set the configured policy for an ESXi host. This method was added in vSphere API 8.0.0.1.

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

  • spec (Apply.ConfiguredPolicySpec) – The policy specification.

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 host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSettings.Write.

class com.vmware.esx.settings.hosts.policies_client.StubFactory(stub_config)

Bases: StubFactoryBase

Initialize StubFactoryBase

Parameters:

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

com.vmware.esx.settings.hosts.software_client module

The com.vmware.esx.settings.hosts.software_client module provides classes to manage desired software on a standalone host.

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

Bases: VapiInterface

The AddOn class provides methods to manage desired OEM add-on specification for a given standalone host. This class was added in vSphere API 8.0.0.1.

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. This class attribute was added in vSphere API 8.0.0.1.

get(host)

Returns the desired OEM add-on specification for a given host. This method was added in vSphere API 8.0.0.1.

Parameters:

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

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 host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Read.

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

Bases: VapiInterface

The BaseImage class provides methods to manage desired ESX base image. This class was added in vSphere API 8.0.0.1.

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. This class attribute was added in vSphere API 8.0.0.1.

get(host)

Returns the desired base-image specification set for given host. This method was added in vSphere API 8.0.0.1.

Parameters:

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

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 host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Read.

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

Bases: VapiInterface

The Commits class provides methods to manage committed changes to desired software document. This class was added in vSphere API 8.0.0.1.

Parameters:

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

class ApplyStatusType(string)

Bases: Enum

The Commits.ApplyStatusType class defines possible values regarding the application of this commit. This enumeration was added in vSphere API 8.0.0.1.

Note

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

Parameters:

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

APPLIED = ApplyStatusType(string='APPLIED')

Commit has been applied to the host. This class attribute was added in vSphere API 8.0.0.1.

NOT_APPLIED = ApplyStatusType(string='NOT_APPLIED')

Commit hasn’t been applied to the host. This class attribute was added in vSphere API 8.0.0.1.

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

Bases: VapiStruct

The Commits.Info class defines the information about software draft. This class was added in vSphere API 8.0.0.1.

Tip

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

Parameters:
  • author (str) – Author of the commit. This attribute was added in vSphere API 8.0.0.1.

  • commit_time (datetime.datetime) – Creation time of the commit. This attribute was added in vSphere API 8.0.0.1.

  • description (str) – Description accompanying this commit. This attribute was added in vSphere API 8.0.0.1.

  • apply_status (Commits.ApplyStatusType) – Apply status of the commit. This attribute was added in vSphere API 8.0.0.1.

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

Resource type for commit resource. This class attribute was added in vSphere API 8.0.0.1.

get(host, commit)

Returns the information about a specific commit. This method was added in vSphere API 8.0.0.1.

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

  • 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 host associated with host in the system or if working copy of the software document 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Read.

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

Bases: VapiInterface

The Compliance class provides methods to get compliance results for a standalone host. This class was added in vSphere API 8.0.0.1.

Parameters:

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

get(host)

Returns the compliance state for the host. This method was added in vSphere API 8.0.0.1.

Parameters:

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

Return type:

com.vmware.esx.settings_client.HostCompliance

Returns:

Host 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 host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Read.

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

Bases: VapiInterface

The Components class provides methods to manage desired component specification for a standalone ESX host. This class was added in vSphere API 8.0.0.1.

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. This class attribute was added in vSphere API 8.0.0.1.

get(host, component)

Returns the component version for the given component in the desired software specification. This method was added in vSphere API 8.0.0.1.

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

  • 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.NotFound If there is no host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Read.

list(host)

Returns a list of components in the desired software specification. This method was added in vSphere API 8.0.0.1.

Parameters:

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

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 it will be empty. 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 host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Read.

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

Bases: VapiInterface

The Drafts class provides methods to manage working copy of software documents. This class was added in vSphere API 8.0.0.1.

Parameters:

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

class CommitSpec(message=None)

Bases: VapiStruct

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

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.0.1. If None, message is set to empty string.

class FilterSpec(owners=None)

Bases: VapiStruct

The Drafts.FilterSpec class contains attributes used to filter the results when listing software drafts. See Drafts.list(). This class was added in vSphere API 8.0.0.1.

Tip

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

Parameters:

owners (set of str or None) – Owners of the drafts. This attribute was added in vSphere API 8.0.0.1. 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: VapiStruct

The Drafts.ImportSpec class defines the information used to import the desired software specification. This class was added in vSphere API 8.0.0.1.

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. This attribute was added in vSphere API 8.0.0.1.

  • location (str) – Location of the software specification file to be imported. This attribute was added in vSphere API 8.0.0.1. 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 was added in vSphere API 8.0.0.1. 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 was added in vSphere API 8.0.0.1. 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: VapiStruct

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

Tip

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

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

Bases: VapiStruct

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

Tip

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

Parameters:
  • owner (str) – Owner of the software draft. This attribute was added in vSphere API 8.0.0.1.

  • status (Drafts.StatusType) – Status of the software draft. This attribute was added in vSphere API 8.0.0.1.

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

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

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

class SourceType(string)

Bases: Enum

The Drafts.SourceType class defines possible values of sources to import software specification. This enumeration was added in vSphere API 8.0.0.1.

Note

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

Parameters:

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

CURRENT_SERIES_RECOMMENDATION = SourceType(string='CURRENT_SERIES_RECOMMENDATION')

This class attribute was added in vSphere API 8.0.0.1.

JSON_STRING = SourceType(string='JSON_STRING')

The string representing the content of the software specfication. This class attribute was added in vSphere API 8.0.0.1.

LATEST_RECOMMENDATION = SourceType(string='LATEST_RECOMMENDATION')

This class attribute was added in vSphere API 8.0.0.1.

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. This class attribute was added in vSphere API 8.0.0.1.

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. This class attribute was added in vSphere API 8.0.0.1.

class StatusType(string)

Bases: Enum

The Drafts.StatusType class defines possible values of status of a software draft. This enumeration was added in vSphere API 8.0.0.1.

Note

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

Parameters:

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

INVALID = StatusType(string='INVALID')

Software draft is invalid. This class attribute was added in vSphere API 8.0.0.1.

VALID = StatusType(string='VALID')

Software draft is valid. This class attribute was added in vSphere API 8.0.0.1.

class Summary(metadata=None)

Bases: VapiStruct

The Drafts.Summary class defines the summary information about software draft. This class was added in vSphere API 8.0.0.1.

Tip

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

Parameters:

metadata (Drafts.Metadata) – Metadata about the software draft. This attribute was added in vSphere API 8.0.0.1.

class ValidateResult(notifications=None)

Bases: VapiStruct

The Drafts.ValidateResult class contains attributes to describe result of validation of desired software specification. This class was added in vSphere API 8.0.0.1.

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. This attribute was added in vSphere API 8.0.0.1.

commit_task(host, 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. It will also validate the document before committing it. This method was added in vSphere API 8.0.0.1.

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

  • 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.NotAllowedInCurrentState If there is another operation in progress.

Raise:

com.vmware.vapi.std.errors_client.NotFound If there is no host associated with host or if there is no draft associated with draft in the system.

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.

Raise:

com.vmware.vapi.std.errors_client.Unsupported If the host is not a vLCM managed standlone host.

create(host)

Creates a new software draft from the desired document. It will be deleted, when the draft is committed successfully. This method was added in vSphere API 8.0.0.1.

Parameters:

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

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 host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Write.

delete(host, draft)

Deletes the software draft. This method was added in vSphere API 8.0.0.1.

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

  • draft (str) – Identifier of the draft. 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 host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Write.

get(host, draft)

Returns the information about given software draft. This method was added in vSphere API 8.0.0.1.

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

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

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 host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Read.

import_software_spec(host, spec)

Imports the desired software specification.

Warning: Using HTTP is not secure. Please use HTTPS URLs instead.. This method was added in vSphere API 8.0.0.1.

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

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

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.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 host associated with host 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 host. It was either never generated or deleted due to changes in host 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.Unauthenticated If the caller is not authenticated.

Raise:

com.vmware.vapi.std.errors_client.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Write.

list(host, filter=None)

Returns information about the software drafts for the specified host that match the Drafts.FilterSpec. This method was added in vSphere API 8.0.0.1.

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

  • 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 host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Read.

scan_task(host, draft)

Scans the host 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. This method was added in vSphere API 8.0.0.1.

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

  • 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 host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

validate_task(host, 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. This method was added in vSphere API 8.0.0.1.

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

  • 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 host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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

Bases: VapiInterface

The EffectiveComponents class provides methods to get effective list of components. This class was added in vSphere API 8.0.0.1.

Parameters:

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

list(host)

Returns the effective components for the host. This method was added in vSphere API 8.0.0.1.

Parameters:

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

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 host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Read.

list_with_removed_components(host)

Returns the list of all the effective components. Pass the param “with-removed-components” to get even the removed components. This method was added in vSphere API 8.0.3.0.

Parameters:

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

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 host associated with host 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 the caller does not have the necessary privileges.

Raise:

com.vmware.vapi.std.errors_client.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Read.

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

Bases: VapiInterface

The Recommendations class provides methods to manage the generation and retrieval of recommended image specs. This class was added in vSphere API 8.0.0.1.

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: VapiStruct

The Recommendations.ExplanationDetails class contains attributes to describe the result of validation of desired software specification. This class was added in vSphere API 8.0.0.1.

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.). This attribute was added in vSphere API 8.0.0.1.

  • display_version (str) – Display version of an excluded image entity (base image, add-on etc.). This attribute was added in vSphere API 8.0.0.1.

  • explanation (list of com.vmware.vapi.std_client.LocalizableMessage) – List of explanations on why the image entity is excluded. This attribute was added in vSphere API 8.0.0.1.

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

Bases: VapiStruct

The Recommendations.Info class defines the information about the most recent recommendation generation result. This class was added in vSphere API 8.0.0.1.

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. This attribute was added in vSphere API 8.0.0.1. 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. This attribute was added in vSphere API 8.0.0.1. None if no recommended image based on latest base image patch or update of the current series 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. This attribute was added in vSphere API 8.0.0.1.

  • check_time (datetime.datetime or None) – The most recent timestamp when check for recommended image is launched. This attribute was added in vSphere API 8.0.0.1. None if no recommendation check has ever been launched.

generate_task(host)

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. This method was added in vSphere API 8.0.0.1.

Parameters:

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

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

Raise:

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

Raise:

com.vmware.vapi.std.errors_client.Unsupported If the host is not a vLCM managed standlone host.

get(host)

Returns Information about the most recent recommendation generation result. This method was added in vSphere API 8.0.0.1.

Parameters:

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

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.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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Read.

class com.vmware.esx.settings.hosts.software_client.RemovedComponents(config)

Bases: VapiInterface

The RemovedComponents class provides methods to manage removal of components in a software draft. This class was added in vSphere API 8.0.3.0.

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. This class attribute was added in vSphere API 8.0.3.0.

get(host, component)

Returns the component version for the given removed component in the desired software specification. This method was added in vSphere API 8.0.3.0.

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

  • 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

Returns:

Details about the 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 host associated with host 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 the caller does not have the necessary privileges.

Raise:

com.vmware.vapi.std.errors_client.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Read.

list(host)

Returns a map of removed components in the desired software specification. This method was added in vSphere API 8.0.3.0.

Parameters:

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

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 it will be empty. 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 host associated with host 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 the caller does not have the necessary privileges.

Raise:

com.vmware.vapi.std.errors_client.Unsupported If the host is not a vLCM managed standlone host.

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

Bases: VapiInterface

The Solutions class provides methods to manage desired software solution specifications for an ESX host. This class was added in vSphere API 8.0.0.1.

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. This class attribute was added in vSphere API 8.0.0.1.

delete_task(host, 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. This method was added in vSphere API 8.0.0.1.

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

  • 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 some 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 host associated with host or 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.Unsupported If the host is not a vLCM managed standlone host.

get(host, solution)

Returns components registered for the given solution in the desired software specification. This method was added in vSphere API 8.0.0.1.

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

  • 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.NotFound If there is no host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Read.

list(host)

Returns all solutions in the desired software specification. This method was added in vSphere API 8.0.0.1.

Parameters:

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

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 host associated with host 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.Unsupported If the host is not a vLCM managed standlone host.

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 HostSystem referenced by the parameter host requires VcIntegrity.lifecycleSoftwareSpecification.Read.

set_task(host, 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. This method was added in vSphere API 8.0.0.1.

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

  • 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.NotFound If there is no host associated with host or 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.Unsupported If the host is not a vLCM managed standlone host.

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

Bases: StubFactoryBase

Initialize StubFactoryBase

Parameters:

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