com.vmware.esx.settings.defaults.clusters package

Submodules

com.vmware.esx.settings.defaults.clusters.policies_client module

Copyright 2019-2020 VMware, Inc. All rights reserved. VMware Confidential

class com.vmware.esx.settings.defaults.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 ESXi clusters.

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)

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

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.

class PreRemediationPowerAction(string)

Bases: vmware.vapi.bindings.enum.Enum

The Apply.ConfiguredPolicySpec.PreRemediationPowerAction class defines the possible actions to be taken on VMs 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

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.

get()

Returns the configured policy that has been set.

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

set(spec)

This API will set the configured policy specification.

Parameters

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

class com.vmware.esx.settings.defaults.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