<spanid="com-vmware-esx-settings-defaults-clusters-package"></span><h1>com.vmware.esx.settings.defaults.clusters package<aclass="headerlink"href="#module-com.vmware.esx.settings.defaults.clusters"title="Permalink to this headline">¶</a></h1>
<divclass="section"id="subpackages">
<h2>Subpackages<aclass="headerlink"href="#subpackages"title="Permalink to this headline">¶</a></h2>
<spanid="com-vmware-esx-settings-defaults-clusters-policies-client-module"></span><h2>com.vmware.esx.settings.defaults.clusters.policies_client module<aclass="headerlink"href="#module-com.vmware.esx.settings.defaults.clusters.policies_client"title="Permalink to this headline">¶</a></h2>
<p>Copyright 2019-2020 VMware, Inc. All rights reserved. VMware Confidential</p>
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">com.vmware.esx.settings.defaults.clusters.policies_client.</span></code><codeclass="sig-name descname"><spanclass="pre">Apply</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">config</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">Apply</span></code> class provides methods to configure the policies that will
impact how the software and configuration specification documents are
applied to ESXi clusters.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>config</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">vmware.vapi.bindings.stub.StubConfiguration</span></code>) – Configuration to be used for creating the stub.</p>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">Apply.ConfiguredPolicySpec</span></code> class contains attributes that describe
the policies configured to be used when the software and configuration
specification documents are applied to ESXi clusters.</p>
<divclass="admonition tip">
<pclass="admonition-title">Tip</p>
<p>The arguments are used to initialize data attributes with the same
names.</p>
</div>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>failure_action</strong> (<aclass="reference internal"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.FailureAction"title="com.vmware.esx.settings.defaults.clusters.policies_client.Apply.FailureAction"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Apply.FailureAction</span></code></a> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – 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.</p></li>
<li><p><strong>pre_remediation_power_action</strong> (<aclass="reference internal"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.ConfiguredPolicySpec.PreRemediationPowerAction"title="com.vmware.esx.settings.defaults.clusters.policies_client.Apply.ConfiguredPolicySpec.PreRemediationPowerAction"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Apply.ConfiguredPolicySpec.PreRemediationPowerAction</span></code></a> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Specifies what should be done to the power state of the VM before
entering maintenance mode.
If None, configured value would be unset.</p></li>
<li><p><strong>enable_quick_boot</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">bool</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Enable Quick Boot during remediation in the cluster.
If None, configured value would be unset.</p></li>
<li><p><strong>disable_dpm</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">bool</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Disable DPM on the cluster.
If None, configured value would be unset.</p></li>
<li><p><strong>disable_hac</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">bool</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Disable HA Admission control on the cluster.
If None, configured value would be unset.</p></li>
<li><p><strong>evacuate_offline_vms</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">bool</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Evacuate powered off/suspended VMs when attempting maintenance
mode.
If None, configured value would be unset.</p></li>
<li><p><strong>enforce_hcl_validation</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">bool</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – 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
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-name descname"><spanclass="pre">PreRemediationPowerAction</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">string</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.ConfiguredPolicySpec.PreRemediationPowerAction"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">Apply.ConfiguredPolicySpec.PreRemediationPowerAction</span></code> class defines
the possible actions to be taken on VMs before entering maintenance mode.</p>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>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 <aclass="reference internal"href="enumeration.html#enumeration-description"><spanclass="std std-ref">enumerated
type description page</span></a>.</p>
</div>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>string</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – String value for the <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">PreRemediationPowerAction</span></code> instance.</p>
<codeclass="sig-name descname"><spanclass="pre">DO_NOT_CHANGE_VMS_POWER_STATE</span></code><emclass="property"><spanclass="pre">=</span><spanclass="pre">PreRemediationPowerAction(string='DO_NOT_CHANGE_VMS_POWER_STATE')</span></em><aclass="headerlink"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.ConfiguredPolicySpec.PreRemediationPowerAction.DO_NOT_CHANGE_VMS_POWER_STATE"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname"><spanclass="pre">POWER_OFF_VMS</span></code><emclass="property"><spanclass="pre">=</span><spanclass="pre">PreRemediationPowerAction(string='POWER_OFF_VMS')</span></em><aclass="headerlink"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.ConfiguredPolicySpec.PreRemediationPowerAction.POWER_OFF_VMS"title="Permalink to this definition">¶</a></dt>
<dd><p>Power off VMs before entering maintenance mode.</p>
<codeclass="sig-name descname"><spanclass="pre">SUSPEND_VMS</span></code><emclass="property"><spanclass="pre">=</span><spanclass="pre">PreRemediationPowerAction(string='SUSPEND_VMS')</span></em><aclass="headerlink"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.ConfiguredPolicySpec.PreRemediationPowerAction.SUSPEND_VMS"title="Permalink to this definition">¶</a></dt>
<dd><p>Suspend VMs before entering maintenance mode</p>
<codeclass="sig-name descname"><spanclass="pre">SUSPEND_VMS_TO_MEMORY</span></code><emclass="property"><spanclass="pre">=</span><spanclass="pre">PreRemediationPowerAction(string='SUSPEND_VMS_TO_MEMORY')</span></em><aclass="headerlink"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.ConfiguredPolicySpec.PreRemediationPowerAction.SUSPEND_VMS_TO_MEMORY"title="Permalink to this definition">¶</a></dt>
<dd><p>Suspend VMs to Memory before entering maintenance mode. This class
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-name descname"><spanclass="pre">FailureAction</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">action</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">retry_delay</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">retry_count</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.FailureAction"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">Apply.FailureAction</span></code> class contains attributes that describe the
actions to be taken when entering maintenance mode fails on a single host
within the cluster.</p>
<divclass="admonition tip">
<pclass="admonition-title">Tip</p>
<p>The arguments are used to initialize data attributes with the same
names.</p>
</div>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>action</strong> (<aclass="reference internal"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.FailureAction.Action"title="com.vmware.esx.settings.defaults.clusters.policies_client.Apply.FailureAction.Action"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Apply.FailureAction.Action</span></code></a>) – What action (FAIL, RETRY) is to be taken if entering maintenance
mode fails on a single host within the cluster.</p></li>
<li><p><strong>retry_delay</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">long</span></code>) – Time to wait to retry the failed operation in seconds.
This attribute is optional and it is only relevant when the value
of <codeclass="docutils literal notranslate"><spanclass="pre">action</span></code> is <aclass="reference internal"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.FailureAction.Action.RETRY"title="com.vmware.esx.settings.defaults.clusters.policies_client.Apply.FailureAction.Action.RETRY"><codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">Apply.FailureAction.Action.RETRY</span></code></a>.</p></li>
<li><p><strong>retry_count</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">long</span></code>) – Number of times to retry the failed operation.
This attribute is optional and it is only relevant when the value
of <codeclass="docutils literal notranslate"><spanclass="pre">action</span></code> is <aclass="reference internal"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.FailureAction.Action.RETRY"title="com.vmware.esx.settings.defaults.clusters.policies_client.Apply.FailureAction.Action.RETRY"><codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">Apply.FailureAction.Action.RETRY</span></code></a>.</p></li>
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-name descname"><spanclass="pre">Action</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">string</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.FailureAction.Action"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">Apply.FailureAction.Action</span></code> class defines the actions to be taken
when entering maintenance mode fails on a single host within the cluster.</p>
<divclass="admonition note">
<pclass="admonition-title">Note</p>
<p>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 <aclass="reference internal"href="enumeration.html#enumeration-description"><spanclass="std std-ref">enumerated
type description page</span></a>.</p>
</div>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>string</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – String value for the <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Action</span></code> instance.</p>
<codeclass="sig-name descname"><spanclass="pre">FAIL</span></code><emclass="property"><spanclass="pre">=</span><spanclass="pre">Action(string='FAIL')</span></em><aclass="headerlink"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.FailureAction.Action.FAIL"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname"><spanclass="pre">RETRY</span></code><emclass="property"><spanclass="pre">=</span><spanclass="pre">Action(string='RETRY')</span></em><aclass="headerlink"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.FailureAction.Action.RETRY"title="Permalink to this definition">¶</a></dt>
<dd><p>Retry the task <codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">Apply.FailureAction.retry_count</span></code> number of times on
the failed host after <codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">Apply.FailureAction.retry_delay</span></code>.</p>
<codeclass="sig-name descname"><spanclass="pre">get</span></code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.get"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the configured policy that has been set.</p>
<codeclass="sig-name descname"><spanclass="pre">set</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">spec</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.set"title="Permalink to this definition">¶</a></dt>
<dd><p>This API will set the configured policy specification.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>spec</strong> (<aclass="reference internal"href="#com.vmware.esx.settings.defaults.clusters.policies_client.Apply.ConfiguredPolicySpec"title="com.vmware.esx.settings.defaults.clusters.policies_client.Apply.ConfiguredPolicySpec"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Apply.ConfiguredPolicySpec</span></code></a>) – The policy that needs to be configured.</p>
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">com.vmware.esx.settings.defaults.clusters.policies_client.</span></code><codeclass="sig-name descname"><spanclass="pre">StubFactory</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">stub_config</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.esx.settings.defaults.clusters.policies_client.StubFactory"title="Permalink to this definition">¶</a></dt>