com.vmware.esx.settings.defaults.clusters.policies package
Submodules
com.vmware.esx.settings.defaults.clusters.policies.apply_client module
The com.vmware.esx.settings.defaults.clusters.policies.apply_client module
provides classes to manage policies that affect application of desired state
configuration and software for ESXi clusters. 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.defaults.clusters.policies.apply_client.Effective(config)
- Bases: - vmware.vapi.bindings.stub.VapiInterface- The - Effectiveclass provides methods to manage the effective 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 EffectivePolicySpec(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 - Effective.EffectivePolicySpecclass contains attributes that describe the effective policies 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 ( - Effective.FailureAction) – What action is to be taken if entering maintenance mode fails on a given host of the cluster.
- pre_remediation_power_action ( - Effective.EffectivePolicySpec.PreRemediationPowerAction) – Specifies what should be done to the power state of the VM before entering maintenance mode.
- enable_quick_boot ( - bool) – Enable Quick Boot during remediation in the cluster.
- disable_dpm ( - bool) – Disable DPM on the cluster.
- disable_hac ( - bool) – Disable HA Admission control on the cluster.
- evacuate_offline_vms ( - bool) – Evacuate powered off/suspended VMs when attempting maintenance mode.
- enforce_hcl_validation ( - bool) – 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. This attribute is optional because it was added in a newer version than its parent node.
- parallel_remediation_action ( - Effective.ParallelRemediationAction) – 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 - Effective.EffectivePolicySpec.PreRemediationPowerActionclass 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- PreRemediationPowerActioninstance.
 - 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 - Effective.FailureActionclass 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 ( - Effective.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- actionis- Effective.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- actionis- Effective.FailureAction.Action.RETRY.
 
 - class Action(string)
- Bases: - vmware.vapi.bindings.enum.Enum- The - Effective.FailureAction.Actionclass 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- Actioninstance.
 - FAIL = Action(string='FAIL')
- Fail the apply method 
 - RETRY = Action(string='RETRY')
- Retry the task Apply.FailureAction#retryCount number of times on the failed host after Apply.FailureAction#retryDelay. 
 
 
 - 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 ( - longor- None) – Maximum number of hosts that can be remediated in parallel. Setting- com.vmware.esx.settings.defaults.clusters.policies_client.Apply.ParallelRemediationAction.max_hostsdoes not guarantee maxHosts to be remediated in parallel. This attribute was added in vSphere API 8.0.0.1.
 
 
 - get()
- Returns the effective apply policy based on system defaults and what has been configured. - Return type
- Returns
- The effective policies that impact the apply method 
- Raise
- com.vmware.vapi.std.errors_client.ErrorIf there is an unknown internal error. The accompanying error message will give more details about the failure.
- Raise
- com.vmware.vapi.std.errors_client.ServiceUnavailableIf the service is not available.
- Raise
- com.vmware.vapi.std.errors_client.Unauthenticatedif the caller is not authenticated.
- Raise
- com.vmware.vapi.std.errors_client.Unauthorizedif you do not have all of the privileges described as follows:- Method execution requires - VcIntegrity.lifecycleSettings.Read.
 
 
 
- class com.vmware.esx.settings.defaults.clusters.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