com.vmware.esx.settings.hosts.policies package

Submodules

com.vmware.esx.settings.hosts.policies.apply_client module

The com.vmware.esx.settings.hosts.policies.apply_client module provides classes to manage the policies that affect application of desired state configuration and software for an ESXi host. Copyright 2019-2022 VMware, Inc. All rights reserved. VMware Confidential Copyright 2019-2022 VMware, Inc. All rights reserved. VMware Confidential

class com.vmware.esx.settings.hosts.policies.apply_client.Effective(config)

Bases: vmware.vapi.bindings.stub.VapiInterface

The Effective class provides methods to manage the effective 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 EffectivePolicySpec(failure_action=None, pre_remediation_power_action=None, enable_quick_boot=None)

Bases: vmware.vapi.bindings.struct.VapiStruct

The Effective.EffectivePolicySpec class contains attributes that describe the effective policies to be used when the software and configuration specification documents are applied to ESXi hosts. 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 (Effective.FailureAction) – 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.

  • pre_remediation_power_action (Effective.EffectivePolicySpec.PreRemediationPowerAction) – 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.

  • enable_quick_boot (bool) – Enable Quick Boot during remediation of an ESXi host. This attribute was added in vSphere API 8.0.0.1.

class PreRemediationPowerAction(string)

Bases: vmware.vapi.bindings.enum.Enum

The Effective.EffectivePolicySpec.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: vmware.vapi.bindings.struct.VapiStruct

The Effective.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 (Effective.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 Effective.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 Effective.FailureAction.Action.RETRY.

class Action(string)

Bases: vmware.vapi.bindings.enum.Enum

The Effective.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#retryCount number of times on the failed host after Apply.FailureAction#retryDelay. This class attribute was added in vSphere API 8.0.0.1.

get(host)

Returns the effective policy based on system defaults and what has been configured 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

Effective.EffectivePolicySpec

Returns

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

class com.vmware.esx.settings.hosts.policies.apply_client.StubFactory(stub_config)

Bases: vmware.vapi.bindings.stub.StubFactoryBase

Initialize StubFactoryBase

Parameters

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