<spanid="com-vmware-vcenter-vm-template-package"></span><h1>com.vmware.vcenter.vm_template package<aclass="headerlink"href="#module-com.vmware.vcenter.vm_template"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-template-library-items-client-module"></span><h2>com.vmware.vcenter.vm_template.library_items_client module<aclass="headerlink"href="#module-com.vmware.vcenter.vm_template.library_items_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_template.library_items_client.</span></code><codeclass="sig-name descname"><spanclass="pre">CheckOuts</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_template.library_items_client.CheckOuts"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">CheckOuts</span></code> class provides methods for managing the checkouts of a
library item containing a virtual machine template. This class provides
operations to check out a library item to update the virtual machine
template, and to check in the library item when the virtual machine changes
are complete. This class was added in vSphere API 6.9.1.</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">CheckInSpec</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">message</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_template.library_items_client.CheckOuts.CheckInSpec"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">CheckOuts.CheckInSpec</span></code> class defines the information required to
check in a virtual machine into a library item. This class was added in
vSphere API 6.9.1.</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"><p><strong>message</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Message describing the changes made to the virtual machine. This
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-name descname"><spanclass="pre">CheckOutSpec</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">name</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">placement</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">powered_on</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_template.library_items_client.CheckOuts.CheckOutSpec"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">CheckOuts.CheckOutSpec</span></code> class defines the information required to
check out a library item containing a virtual machine template. This class
was added in vSphere API 6.9.1.</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>name</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Name of the virtual machine to check out of the library item. This
attribute was added in vSphere API 6.9.1.
This attribute is currently required. In the future, if this
attribute is None, the system will choose a suitable name for the
virtual machine.</p></li>
<li><p><strong>placement</strong> (<aclass="reference internal"href="#com.vmware.vcenter.vm_template.library_items_client.CheckOuts.PlacementSpec"title="com.vmware.vcenter.vm_template.library_items_client.CheckOuts.PlacementSpec"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">CheckOuts.PlacementSpec</span></code></a> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) –<p>Information used to place the checked out virtual machine. This
attribute was added in vSphere API 6.9.1.
This attribute is currently required. In the future, if this
attribute is None, the system will place the virtual machine on a
suitable resource.</p>
<p>If specified, each attribute will be used for placement. If the
attributes result in disjoint placement, the operation will fail.
If the attributes along with the placement values of the source
virtual machine template result in disjoint placement, the
operation will fail.</p>
</p></li>
<li><p><strong>powered_on</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">bool</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Specifies whether the virtual machine should be powered on after
check out. This attribute was added in vSphere API 6.9.1.
If None, the virtual machine will not be powered on after check
<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">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">user</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_template.library_items_client.CheckOuts.Info"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">CheckOuts.Info</span></code> class contains information about a checked out
virtual machine. This class was added in vSphere API 6.9.1.</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>time</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">datetime.datetime</span></code>) – Date and time when the virtual machine was checked out. This
attribute was added in vSphere API 6.9.1.</p></li>
<li><p><strong>user</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Name of the user who checked out the virtual machine. This
attribute was added in vSphere API 6.9.1.</p></li>
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-name descname"><spanclass="pre">PlacementSpec</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">folder</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">resource_pool</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">host</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">cluster</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_template.library_items_client.CheckOuts.PlacementSpec"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">CheckOuts.PlacementSpec</span></code> class contains information used to place a
checked out virtual machine onto resources within the vCenter inventory.
The specified compute resource should have access to the storage associated
with the checked out virtual machine. This class was added in vSphere API
6.9.1.</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>folder</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Virtual machine folder into which the virtual machine should be
placed. This attribute was added in vSphere API 6.9.1.
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">Folder</span></code>.
When methods return a value of this class as a return value, the
attribute will be an identifier for the resource type: <codeclass="docutils literal notranslate"><spanclass="pre">Folder</span></code>.
If None, the virtual machine will be placed in the same folder as
the source virtual machine template.</p></li>
<li><p><strong>resource_pool</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Resource pool into which the virtual machine should be placed. This
attribute was added in vSphere API 6.9.1.
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">ResourcePool</span></code>. When methods return a value of this class as a
return value, the attribute will be an identifier for the resource
If None, the system will attempt to choose a suitable resource pool
for the virtual machine; if a resource pool cannot be chosen, the
operation will fail.</p></li>
<li><p><strong>host</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Host onto which the virtual machine should be placed. If <codeclass="docutils literal notranslate"><spanclass="pre">host</span></code>
and <codeclass="docutils literal notranslate"><spanclass="pre">resourcePool</span></code> are both specified, <codeclass="docutils literal notranslate"><spanclass="pre">resourcePool</span></code> must
belong to <codeclass="docutils literal notranslate"><spanclass="pre">host</span></code>. If <codeclass="docutils literal notranslate"><spanclass="pre">host</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">cluster</span></code> are both specified,
<codeclass="docutils literal notranslate"><spanclass="pre">host</span></code> must be a member of <codeclass="docutils literal notranslate"><spanclass="pre">cluster</span></code>. This attribute was added
in vSphere API 6.9.1.
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">HostSystem</span></code>. When methods return a value of this class as a
return value, the attribute will be an identifier for the resource
This attribute may be None if <codeclass="docutils literal notranslate"><spanclass="pre">resourcePool</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">cluster</span></code> is
specified. If None, the system will attempt to choose a suitable
host for the virtual machine; if a host cannot be chosen, the
operation will fail.</p></li>
<li><p><strong>cluster</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Cluster onto which the virtual machine should be placed. If
<codeclass="docutils literal notranslate"><spanclass="pre">cluster</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">resourcePool</span></code> are both specified,
<codeclass="docutils literal notranslate"><spanclass="pre">resourcePool</span></code> must belong to <codeclass="docutils literal notranslate"><spanclass="pre">cluster</span></code>. If <codeclass="docutils literal notranslate"><spanclass="pre">cluster</span></code> and
<codeclass="docutils literal notranslate"><spanclass="pre">host</span></code> are both specified, <codeclass="docutils literal notranslate"><spanclass="pre">host</span></code> must be a member of
<codeclass="docutils literal notranslate"><spanclass="pre">cluster</span></code>. This attribute was added in vSphere API 6.9.1.
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">ClusterComputeResource</span></code>. When methods return a value of this
class as a return value, the attribute will be an identifier for
the resource type: <codeclass="docutils literal notranslate"><spanclass="pre">ClusterComputeResource</span></code>.
If <codeclass="docutils literal notranslate"><spanclass="pre">resourcePool</span></code> or <codeclass="docutils literal notranslate"><spanclass="pre">host</span></code> is specified, it is recommended
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-name descname"><spanclass="pre">Summary</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">vm</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_template.library_items_client.CheckOuts.Summary"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">CheckOuts.Summary</span></code> class contains commonly used information about a
checked out virtual machine. This class was added in vSphere API 6.9.1.</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"><p><strong>vm</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Identifier of the checked out virtual machine. This attribute was
added in vSphere API 6.9.1.
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">VirtualMachine</span></code>. When methods return a value of this class as a
return value, the attribute will be an identifier for the resource
<codeclass="sig-name descname"><spanclass="pre">check_in</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">template_library_item</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">vm</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">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_template.library_items_client.CheckOuts.check_in"title="Permalink to this definition">¶</a></dt>
<dd><p>Checks in a virtual machine into the library item. This method updates
the library item to contain the virtual machine being checked in as a
template. This template becomes the latest version of the library item.
The previous virtual machine template contained in the library item is
available as a backup and its information can be queried using the
<codeclass="docutils literal notranslate"><spanclass="pre">Versions</span></code> class. At most one previous version of a virtual machine
template is retained in the library item. This method was added in
vSphere API 6.9.1.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>template_library_item</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Identifier of the content library item in which the virtual machine
is checked in.
The parameter must be an identifier for the resource type:
<li><p><strong>vm</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Identifier of the virtual machine to check into the library item.
The parameter must be an identifier for the resource type:
<li><p><strong>spec</strong> (<aclass="reference internal"href="#com.vmware.vcenter.vm_template.library_items_client.CheckOuts.CheckInSpec"title="com.vmware.vcenter.vm_template.library_items_client.CheckOuts.CheckInSpec"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">CheckOuts.CheckInSpec</span></code></a> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Specification used to check in the virtual machine into the library
item.
This parameter is currently required. In the future, if this
parameter is None, the system will apply suitable defaults.</p></li>
<codeclass="sig-name descname"><spanclass="pre">check_out</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">template_library_item</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">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_template.library_items_client.CheckOuts.check_out"title="Permalink to this definition">¶</a></dt>
<dd><p>Checks out a library item containing a virtual machine template. This
method makes a copy of the source virtual machine template contained in
the library item as a virtual machine. The virtual machine is copied
with the same storage specification as the source virtual machine
template. Changes to the checked out virtual machine do not affect the
virtual machine template contained in the library item. To save these
changes back into the library item, <aclass="reference internal"href="#com.vmware.vcenter.vm_template.library_items_client.CheckOuts.check_in"title="com.vmware.vcenter.vm_template.library_items_client.CheckOuts.check_in"><codeclass="xref py py-func docutils literal notranslate"><spanclass="pre">CheckOuts.check_in()</span></code></a> the
virtual machine. To discard the changes, <aclass="reference internal"href="#com.vmware.vcenter.vm_template.library_items_client.CheckOuts.delete"title="com.vmware.vcenter.vm_template.library_items_client.CheckOuts.delete"><codeclass="xref py py-func docutils literal notranslate"><spanclass="pre">CheckOuts.delete()</span></code></a> the
virtual machine. This method was added in vSphere API 6.9.1.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>template_library_item</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Identifier of the content library item containing the source
virtual machine template to be checked out.
The parameter must be an identifier for the resource type:
<li><p><strong>spec</strong> (<aclass="reference internal"href="#com.vmware.vcenter.vm_template.library_items_client.CheckOuts.CheckOutSpec"title="com.vmware.vcenter.vm_template.library_items_client.CheckOuts.CheckOutSpec"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">CheckOuts.CheckOutSpec</span></code></a> or <codeclass="docutils literal notranslate"><spanclass="pre">None</span></code>) – Specification used to check out the source virtual machine template
as a virtual machine.
This parameter is currently required. In the future, if this
parameter is None, the system will apply suitable defaults.</p></li>
<codeclass="sig-name descname"><spanclass="pre">delete</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">template_library_item</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">vm</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.vcenter.vm_template.library_items_client.CheckOuts.delete"title="Permalink to this definition">¶</a></dt>
<dd><p>Deletes the checked out virtual machine. This method was added in
vSphere API 6.9.1.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>template_library_item</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Identifier of the VM template library item.
The parameter must be an identifier for the resource type:
<li><p><strong>vm</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Identifier of the checked out virtual machine to delete.
The parameter must be an identifier for the resource type:
<codeclass="sig-name descname"><spanclass="pre">get</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">template_library_item</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">vm</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.vcenter.vm_template.library_items_client.CheckOuts.get"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the information about a checked out virtual machine. This
method was added in vSphere API 6.9.1.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>template_library_item</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Identifier of the VM template library item.
The parameter must be an identifier for the resource type:
<li><p><strong>vm</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Identifier of the checked out virtual machine.
The parameter must be an identifier for the resource type:
<codeclass="sig-name descname"><spanclass="pre">list</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">template_library_item</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.vcenter.vm_template.library_items_client.CheckOuts.list"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns commonly used information about the virtual machines that are
checked out of the library item. This method was added in vSphere API
6.9.1.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>template_library_item</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Identifier of the VM template library item.
The parameter must be an identifier for the resource type:
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">com.vmware.vcenter.vm_template.library_items_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_template.library_items_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.vm_template.library_items_client.</span></code><codeclass="sig-name descname"><spanclass="pre">Versions</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_template.library_items_client.Versions"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">Versions</span></code> class provides methods for managing the live versions of
the virtual machine templates contained in a library item. Live versions
include the latest and previous virtual machine templates that are
available on disk. As new versions of virtual machine templates are checked
in, old versions of virtual machine templates are automatically purged.
Currently, at most one previous virtual machine template version is stored.
This class was added in vSphere API 6.9.1.</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">Info</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">vm_template</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_template.library_items_client.Versions.Info"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">Versions.Info</span></code> class contains information about a version of a
library item containing a virtual machine template. This class was added in
vSphere API 6.9.1.</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"><p><strong>vm_template</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Identifier of the virtual machine template associated with the
library item version. This attribute is the managed object
identifier used to identify the virtual machine template in the
vSphere Management (SOAP) API. This attribute was added in vSphere
<codeclass="sig-name descname"><spanclass="pre">RESOURCE_TYPE</span></code><emclass="property"><spanclass="pre">=</span><spanclass="pre">'com.vmware.content.library.item.Version'</span></em><aclass="headerlink"href="#com.vmware.vcenter.vm_template.library_items_client.Versions.RESOURCE_TYPE"title="Permalink to this definition">¶</a></dt>
<dd><p>Resource type for library item versions. This class attribute was added in
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-name descname"><spanclass="pre">RollbackSpec</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">message</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_template.library_items_client.Versions.RollbackSpec"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">Versions.RollbackSpec</span></code> class defines the information required to
rollback a virtual machine template library item to a previous version.
This class was added in vSphere API 6.9.1.</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"><p><strong>message</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Message describing the reason for the rollback. This attribute was
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-name descname"><spanclass="pre">Summary</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">version</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_template</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_template.library_items_client.Versions.Summary"title="Permalink to this definition">¶</a></dt>
<p>The <codeclass="docutils literal notranslate"><spanclass="pre">Versions.Summary</span></code> class contains commonly used information about a
version of a library item containing a virtual machine template. This class
was added in vSphere API 6.9.1.</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>version</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – The version of the library item. This attribute was added in
vSphere API 6.9.1.
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.content.library.item.Version</span></code>. When methods return a
value of this class as a return value, the attribute will be an
<li><p><strong>vm_template</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Identifier of the virtual machine template associated with the
library item version. This attribute is the managed object
identifier used to identify the virtual machine template in the
vSphere Management (SOAP) API. This attribute was added in vSphere
<codeclass="sig-name descname"><spanclass="pre">delete</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">template_library_item</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">version</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.vcenter.vm_template.library_items_client.Versions.delete"title="Permalink to this definition">¶</a></dt>
<dd><p>Deletes the virtual machine template contained in the library item at
the specified version. This method was added in vSphere API 6.9.1.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>template_library_item</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Identifier of the VM template library item.
The parameter must be an identifier for the resource type:
<li><p><strong>version</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Version of the library item to delete.
The parameter must be an identifier for the resource type:
<codeclass="sig-name descname"><spanclass="pre">get</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">template_library_item</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">version</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.vcenter.vm_template.library_items_client.Versions.get"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns information about the live version of a library item containing
a virtual machine template. This method was added in vSphere API 6.9.1.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>template_library_item</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Identifier of the VM template library item.
The parameter must be an identifier for the resource type:
<li><p><strong>version</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Version of the library item.
The parameter must be an identifier for the resource type:
<codeclass="sig-name descname"><spanclass="pre">list</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">template_library_item</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#com.vmware.vcenter.vm_template.library_items_client.Versions.list"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns commonly used information about the live versions of a virtual
machine template library item. This method was added in vSphere API
6.9.1.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>template_library_item</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Identifier of the VM template library item.
The parameter must be an identifier for the resource type:
<codeclass="sig-name descname"><spanclass="pre">rollback</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">template_library_item</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">version</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">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_template.library_items_client.Versions.rollback"title="Permalink to this definition">¶</a></dt>
<dd><p>Rollbacks a library item containing a virtual machine template to a
previous version. The virtual machine template at the specified version
becomes the latest virtual machine template with a new version
identifier. This method was added in vSphere API 6.9.1.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>template_library_item</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Identifier of the VM template library item.
The parameter must be an identifier for the resource type:
<li><p><strong>version</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Version of the library item to rollback.
The parameter must be an identifier for the resource type: