<spanid="com-vmware-vcenter-storage-policies-package"></span><h1>com.vmware.vcenter.storage.policies package<aclass="headerlink"href="#module-com.vmware.vcenter.storage.policies"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-storage-policies-compliance-client-module"></span><h2>com.vmware.vcenter.storage.policies.compliance_client module<aclass="headerlink"href="#module-com.vmware.vcenter.storage.policies.compliance_client"title="Permalink to this headline">¶</a></h2>
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">com.vmware.vcenter.storage.policies.compliance_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.storage.policies.compliance_client.StubFactory"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">com.vmware.vcenter.storage.policies.compliance_client.</span></code><codeclass="sig-name descname"><spanclass="pre">VM</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.storage.policies.compliance_client.VM"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">VM</span></code> class provides methods related to query virtual machines of
given compliance statuses. 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">FilterSpec</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">vms</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.storage.policies.compliance_client.VM.FilterSpec"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">VM.FilterSpec</span></code> class contains Status used to filter the results when
listing virtual machines (see <aclass="reference internal"href="#com.vmware.vcenter.storage.policies.compliance_client.VM.list"title="com.vmware.vcenter.storage.policies.compliance_client.VM.list"><codeclass="xref py py-func docutils literal notranslate"><spanclass="pre">VM.list()</span></code></a>). 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> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">set</span></code> of <aclass="reference internal"href="#com.vmware.vcenter.storage.policies.compliance_client.VM.Status"title="com.vmware.vcenter.storage.policies.compliance_client.VM.Status"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">VM.Status</span></code></a>) – Compliance Status that a virtual machine must have to match the
filter. Atleast one status must be specified. This attribute was
added in vSphere API 6.7.</p></li>
<li><p><strong>vms</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 virtual machines that can match the filter. 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">VirtualMachine</span></code>. When methods return a value of this class as a
return value, the attribute will contain identifiers for the
<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">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.storage.policies.compliance_client.VM.Info"title="Permalink to this definition">¶</a></dt>
<p>Provides the compliance details of a virtual machine and its associated
entities which match the given compliance statuses. 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> (<aclass="reference internal"href="#com.vmware.vcenter.storage.policies.compliance_client.VM.Status"title="com.vmware.vcenter.storage.policies.compliance_client.VM.Status"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">VM.Status</span></code></a> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Compliance status of the virtual machine home. This attribute was
added in vSphere API 6.7.
If None or empty, virtual machine home is not associated with a
storage policy.</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.storage.policies.compliance_client.VM.Status"title="com.vmware.vcenter.storage.policies.compliance_client.VM.Status"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">VM.Status</span></code></a>) – A Map of virtual disks and their compliance status If empty, the
virtual machine does not have any disks or its disks are not
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.storage.policies.compliance_client.VM.Status"title="Permalink to this definition">¶</a></dt>
<p>The {\@Status} class defines he valid compliance status values for a
virtual machine or virtual disk. 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.storage.policies.compliance_client.VM.Status.COMPLIANT"title="Permalink to this definition">¶</a></dt>
<dd><p>The virtual machine or virtual disk is in compliance. This class attribute
<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.storage.policies.compliance_client.VM.Status.NON_COMPLIANT"title="Permalink to this definition">¶</a></dt>
<dd><p>The virtual machine or virtual disk is in not in compliance. This class
<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.storage.policies.compliance_client.VM.Status.NOT_APPLICABLE"title="Permalink to this definition">¶</a></dt>
<dd><p>Compliance computation is not applicable for this virtual machine or disk
because it does not have any storage requirement that apply to the
object-based datastore on which the entity is placed. This class attribute
<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.storage.policies.compliance_client.VM.Status.OUT_OF_DATE"title="Permalink to this definition">¶</a></dt>
<dd><p>Compliance status becomes out of date when the profile associated with the
virtual machine or disk is edited and not applied. The compliance status
will remain out of date until the latest policy is applied. 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.storage.policies.compliance_client.VM.Status.UNKNOWN_COMPLIANCE"title="Permalink to this definition">¶</a></dt>
<dd><p>Compliance status of the virtual machine or virtual disk is not known. This
<codeclass="sig-name descname"><spanclass="pre">list</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">filter</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.vcenter.storage.policies.compliance_client.VM.list"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns compliance information about at most 1000 virtual machines
matching the filter <aclass="reference internal"href="#com.vmware.vcenter.storage.policies.compliance_client.VM.FilterSpec"title="com.vmware.vcenter.storage.policies.compliance_client.VM.FilterSpec"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">VM.FilterSpec</span></code></a>. If there are no virtual
machines matching the <aclass="reference internal"href="#com.vmware.vcenter.storage.policies.compliance_client.VM.FilterSpec"title="com.vmware.vcenter.storage.policies.compliance_client.VM.FilterSpec"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">VM.FilterSpec</span></code></a> an empty List is returned.
Virtual machines without storage policy association are not returned.
This method was added in vSphere API 6.7.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>filter</strong> (<aclass="reference internal"href="#com.vmware.vcenter.storage.policies.compliance_client.VM.FilterSpec"title="com.vmware.vcenter.storage.policies.compliance_client.VM.FilterSpec"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">VM.FilterSpec</span></code></a>) – compliance status of matching virtual machines for which
If more than 1000 results match the <aclass="reference internal"href="#com.vmware.vcenter.storage.policies.compliance_client.VM.FilterSpec"title="com.vmware.vcenter.storage.policies.compliance_client.VM.FilterSpec"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">VM.FilterSpec</span></code></a></p>