<spanid="com-vmware-vcenter-vm-storage-package"></span><h1>com.vmware.vcenter.vm.storage package<aclass="headerlink"href="#module-com.vmware.vcenter.vm.storage"title="Permalink to this headline">¶</a></h1>
<divclass="section"id="submodules">
<h2>Submodules<aclass="headerlink"href="#submodules"title="Permalink to this headline">¶</a></h2>
<spanid="com-vmware-vcenter-vm-storage-policy-client-module"></span><h2>com.vmware.vcenter.vm.storage.policy_client module<aclass="headerlink"href="#module-com.vmware.vcenter.vm.storage.policy_client"title="Permalink to this headline">¶</a></h2>
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">com.vmware.vcenter.vm.storage.policy_client.</span></code><codeclass="sig-name descname"><spanclass="pre">Compliance</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.vcenter.vm.storage.policy_client.Compliance"title="Permalink to this definition">¶</a></dt>
<p>The Compliance class provides methods that return the compliance status of
virtual machine entities(virtual machine home directory and virtual disks)
that specify storage policy requirements. This class was added in vSphere
API 6.7.</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>
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-name descname"><spanclass="pre">CheckSpec</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">vm_home</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">disks</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.vcenter.vm.storage.policy_client.Compliance.CheckSpec"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">Compliance.CheckSpec</span></code> class contains attributes used to specify the
entities on which the storage policy compliance check is to be invoked.
This class was added in vSphere API 6.7.</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>vm_home</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">bool</span></code>) – Invoke compliance check on the virtual machine home directory if
set to true. This attribute was added in vSphere API 6.7.</p></li>
<li><p><strong>disks</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">set</span></code> of <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Identifiers of the virtual machine’s virtual disks for which
compliance should be checked. This attribute was added in vSphere
API 6.7.
When clients pass a value of this class as a parameter, the
attribute must contain identifiers for the resource type:
<codeclass="docutils literal notranslate"><spanclass="pre">com.vmware.vcenter.vm.hardware.Disk</span></code>. When methods return a
value of this class as a return value, the attribute will contain
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-name descname"><spanclass="pre">Info</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">overall_compliance</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">vm_home</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">disks</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.vcenter.vm.storage.policy_client.Compliance.Info"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">Compliance.Info</span></code> class contains information about the storage policy
compliance of a virtual machine, including information about it’s home
directory and/or it’s virtual disks. This class was added in vSphere API
6.7.</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>overall_compliance</strong> (<aclass="reference internal"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.Status"title="com.vmware.vcenter.vm.storage.policy_client.Compliance.Status"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Compliance.Status</span></code></a>) – The overall compliance status of the virtual machine and all it’s
entities. This attribute was added in vSphere API 6.7.</p></li>
<li><p><strong>vm_home</strong> (<aclass="reference internal"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.VmComplianceInfo"title="com.vmware.vcenter.vm.storage.policy_client.Compliance.VmComplianceInfo"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Compliance.VmComplianceInfo</span></code></a> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – The storage policy compliance information
<aclass="reference internal"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.VmComplianceInfo"title="com.vmware.vcenter.vm.storage.policy_client.Compliance.VmComplianceInfo"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Compliance.VmComplianceInfo</span></code></a> for the virtual machine’s home
directory. This attribute was added in vSphere API 6.7.
If None the virtual machine home directory has no storage policy
association.</p></li>
<li><p><strong>disks</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dict</span></code> of <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code> and <aclass="reference internal"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.VmComplianceInfo"title="com.vmware.vcenter.vm.storage.policy_client.Compliance.VmComplianceInfo"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Compliance.VmComplianceInfo</span></code></a>) – The compliance information <aclass="reference internal"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.VmComplianceInfo"title="com.vmware.vcenter.vm.storage.policy_client.Compliance.VmComplianceInfo"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Compliance.VmComplianceInfo</span></code></a> for
the virtual machine’s virtual disks that are currently associated
with a storage policy. This attribute was added in vSphere API 6.7.
When clients pass a value of this class as a parameter, the key in
the attribute <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dict</span></code> must be an identifier for the resource
type: <codeclass="docutils literal notranslate"><spanclass="pre">com.vmware.vcenter.vm.hardware.Disk</span></code>. When methods return
a value of this class as a return value, the key in the attribute
<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dict</span></code> will be an identifier for the resource type:
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-name descname"><spanclass="pre">Status</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.vcenter.vm.storage.policy_client.Compliance.Status"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">Compliance.Status</span></code> class defines the storage compliance status of a
virtual machine and its applicable entities. This enumeration was added in
vSphere API 6.7.</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">Status</span></code> instance.</p>
<codeclass="sig-name descname"><spanclass="pre">COMPLIANT</span></code><emclass="property"><spanclass="pre">=</span><spanclass="pre">Status(string='COMPLIANT')</span></em><aclass="headerlink"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.Status.COMPLIANT"title="Permalink to this definition">¶</a></dt>
<dd><p>Entity is in compliance. This class attribute was added in vSphere API 6.7.</p>
<codeclass="sig-name descname"><spanclass="pre">NON_COMPLIANT</span></code><emclass="property"><spanclass="pre">=</span><spanclass="pre">Status(string='NON_COMPLIANT')</span></em><aclass="headerlink"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.Status.NON_COMPLIANT"title="Permalink to this definition">¶</a></dt>
<dd><p>Entity is out of compliance. This class attribute was added in vSphere API
<codeclass="sig-name descname"><spanclass="pre">NOT_APPLICABLE</span></code><emclass="property"><spanclass="pre">=</span><spanclass="pre">Status(string='NOT_APPLICABLE')</span></em><aclass="headerlink"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.Status.NOT_APPLICABLE"title="Permalink to this definition">¶</a></dt>
<dd><p>Compliance computation is not applicable for this entity because it does
not have any storage requirements that apply to the datastore on which it
is placed. This class attribute was added in vSphere API 6.7.</p>
<codeclass="sig-name descname"><spanclass="pre">OUT_OF_DATE</span></code><emclass="property"><spanclass="pre">=</span><spanclass="pre">Status(string='OUT_OF_DATE')</span></em><aclass="headerlink"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.Status.OUT_OF_DATE"title="Permalink to this definition">¶</a></dt>
<dd><p>The Compliance status becomes out-of-date when the profile associated with
the entity is edited but not applied. The compliance status remains
out-of-date until the edited policy is applied to the entity. This class
<codeclass="sig-name descname"><spanclass="pre">UNKNOWN_COMPLIANCE</span></code><emclass="property"><spanclass="pre">=</span><spanclass="pre">Status(string='UNKNOWN_COMPLIANCE')</span></em><aclass="headerlink"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.Status.UNKNOWN_COMPLIANCE"title="Permalink to this definition">¶</a></dt>
<dd><p>Compliance status of the entity is not known. This class attribute was
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-name descname"><spanclass="pre">VmComplianceInfo</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">status</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">check_time</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">policy</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">failure_cause</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.vcenter.vm.storage.policy_client.Compliance.VmComplianceInfo"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">Compliance.VmComplianceInfo</span></code> class contains information about
storage policy compliance associated with a virtual machine. This class was
added in vSphere API 6.7.</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>status</strong> (<aclass="reference internal"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.Status"title="com.vmware.vcenter.vm.storage.policy_client.Compliance.Status"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Compliance.Status</span></code></a>) – Status of the compliance operation. This attribute was added in
vSphere API 6.7.</p></li>
<li><p><strong>check_time</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">datetime.datetime</span></code>) – Date and time of the most recent compliance check. This attribute
was added in vSphere API 6.7.</p></li>
<li><p><strong>policy</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Identifier of the storage policy associated with the virtual
machine. This attribute was added in vSphere API 6.7.
When clients pass a value of this class as a parameter, the
attribute must be an identifier for the resource type:
<codeclass="docutils literal notranslate"><spanclass="pre">com.vmware.vcenter.StoragePolicy</span></code>. When methods return a value
of this class as a return value, the attribute will be an
If None SPBM is unable to retrieve or determine the associated
policy, <codeclass="xref py py-attr docutils literal notranslate"><spanclass="pre">Compliance.VmComplianceInfo.failure_cause</span></code> is set in
such casses.</p></li>
<li><p><strong>failure_cause</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">list</span></code> of <aclass="reference internal"href="com.vmware.vapi.html#com.vmware.vapi.std_client.LocalizableMessage"title="com.vmware.vapi.std_client.LocalizableMessage"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">com.vmware.vapi.std_client.LocalizableMessage</span></code></a>) – The exception that caused the compliance check to fail. There can
be more than one cause, since a policy can contain capabilities
from multiple providers. If empty, it implies no failures while
retrieving compliance. This attribute was added in vSphere API 6.7.</p></li>
<codeclass="sig-name descname"><spanclass="pre">check</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">vm</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">check_spec</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.vcenter.vm.storage.policy_client.Compliance.check"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the storage policy Compliance <aclass="reference internal"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.Info"title="com.vmware.vcenter.vm.storage.policy_client.Compliance.Info"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Compliance.Info</span></code></a> of a
virtual machine after explicitly re-computing compliance check. This
<li><p><strong>check_spec</strong> (<aclass="reference internal"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.CheckSpec"title="com.vmware.vcenter.vm.storage.policy_client.Compliance.CheckSpec"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Compliance.CheckSpec</span></code></a> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Parameter specifies the entities on which storage policy compliance
check is to be invoked. The storage compliance Info
<aclass="reference internal"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.Info"title="com.vmware.vcenter.vm.storage.policy_client.Compliance.Info"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Compliance.Info</span></code></a> is returned.
If None, the behavior is equivalent to a
<aclass="reference internal"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.CheckSpec"title="com.vmware.vcenter.vm.storage.policy_client.Compliance.CheckSpec"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Compliance.CheckSpec</span></code></a> with CheckSpec#vmHome set to true and
CheckSpec#disks populated with all disks attached to the virtual
<codeclass="sig-name descname"><spanclass="pre">get</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">vm</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.vcenter.vm.storage.policy_client.Compliance.get"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the cached storage policy compliance information of a virtual
machine. This method was added in vSphere API 6.7.</p>
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">com.vmware.vcenter.vm.storage.policy_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.vcenter.vm.storage.policy_client.StubFactory"title="Permalink to this definition">¶</a></dt>