mirror of
https://github.com/vmware/vsphere-automation-sdk-python.git
synced 2024-11-22 01:39:58 -05:00
859 lines
76 KiB
HTML
859 lines
76 KiB
HTML
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
|
|
<title>item Package — vSphere Automation SDK for Python 6.5.0 documentation</title>
|
|
|
|
<link rel="stylesheet" href="_static/vapitheme.css" type="text/css" />
|
|
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
|
|
|
<script type="text/javascript">
|
|
var DOCUMENTATION_OPTIONS = {
|
|
URL_ROOT: '',
|
|
VERSION: '6.5.0',
|
|
COLLAPSE_INDEX: false,
|
|
FILE_SUFFIX: '.html',
|
|
HAS_SOURCE: true
|
|
};
|
|
</script>
|
|
<script type="text/javascript" src="_static/jquery.js"></script>
|
|
<script type="text/javascript" src="_static/underscore.js"></script>
|
|
<script type="text/javascript" src="_static/doctools.js"></script>
|
|
<link rel="top" title="vSphere Automation SDK for Python 6.5.0 documentation" href="index.html" />
|
|
<link rel="up" title="library Package" href="com.vmware.content.library.html" />
|
|
<link rel="next" title="vapi Package" href="com.vmware.vapi.html" />
|
|
<link rel="prev" title="library Package" href="com.vmware.content.library.html" />
|
|
</head>
|
|
<body>
|
|
<div class="related">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="genindex.html" title="General Index"
|
|
accesskey="I">index</a></li>
|
|
<li class="right" >
|
|
<a href="py-modindex.html" title="Python Module Index"
|
|
>modules</a> |</li>
|
|
<li class="right" >
|
|
<a href="com.vmware.vapi.html" title="vapi Package"
|
|
accesskey="N">next</a> |</li>
|
|
<li class="right" >
|
|
<a href="com.vmware.content.library.html" title="library Package"
|
|
accesskey="P">previous</a> |</li>
|
|
<li><a href="index.html">vSphere Automation SDK for Python 6.5.0 documentation</a> »</li>
|
|
<li><a href="com.html" >com Package</a> »</li>
|
|
<li><a href="com.vmware.html" >vmware Package</a> »</li>
|
|
<li><a href="com.vmware.content.html" >content Package</a> »</li>
|
|
<li><a href="com.vmware.content.library.html" accesskey="U">library Package</a> »</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="document">
|
|
<div class="documentwrapper">
|
|
<div class="bodywrapper">
|
|
<div class="body">
|
|
|
|
<div class="section" id="item-package">
|
|
<h1>item Package<a class="headerlink" href="#item-package" title="Permalink to this headline">¶</a></h1>
|
|
<div class="section" id="id1">
|
|
<h2><tt class="xref py py-mod docutils literal"><span class="pre">item</span></tt> Package<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
|
|
<span class="target" id="module-com.vmware.content.library.item"></span></div>
|
|
<div class="section" id="module-com.vmware.content.library.item.downloadsession_client">
|
|
<span id="downloadsession-client-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">downloadsession_client</span></tt> Module<a class="headerlink" href="#module-com.vmware.content.library.item.downloadsession_client" title="Permalink to this headline">¶</a></h2>
|
|
<p>The Content Library Item Download Session module provides classes and classes
|
|
for downloading files in a session.</p>
|
|
<dl class="class">
|
|
<dt id="com.vmware.content.library.item.downloadsession_client.File">
|
|
<em class="property">class </em><tt class="descclassname">com.vmware.content.library.item.downloadsession_client.</tt><tt class="descname">File</tt><big>(</big><em>config</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/downloadsession_client.html#File"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.downloadsession_client.File" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="vmware.vapi.bindings.html#vmware.vapi.bindings.stub.VapiInterface" title="vmware.vapi.bindings.stub.VapiInterface"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.bindings.stub.VapiInterface</span></tt></a></p>
|
|
<p>The <tt class="docutils literal"><span class="pre">File</span></tt> class provides methods for accessing files within a download
|
|
session.</p>
|
|
<p>After a download session is created against a library item, the <tt class="docutils literal"><span class="pre">File</span></tt>
|
|
class can be used to retrieve all downloadable content within the library
|
|
item. Since the content may not be available immediately in a downloadable
|
|
form on the server side, the client will have to prepare the file and wait
|
|
for the file status to become <a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.PREPARED" title="com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.PREPARED"><tt class="xref py py-attr docutils literal"><span class="pre">File.PrepareStatus.PREPARED</span></tt></a>.</p>
|
|
<blockquote>
|
|
<div>See <a class="reference internal" href="com.vmware.content.library.html#com.vmware.content.library.item_client.DownloadSession" title="com.vmware.content.library.item_client.DownloadSession"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.content.library.item_client.DownloadSession</span></tt></a>.</div></blockquote>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>config</strong> (<a class="reference internal" href="vmware.vapi.bindings.html#vmware.vapi.bindings.stub.StubConfiguration" title="vmware.vapi.bindings.stub.StubConfiguration"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.bindings.stub.StubConfiguration</span></tt></a>) – Configuration to be used for creating the stub.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<dl class="class">
|
|
<dt id="com.vmware.content.library.item.downloadsession_client.File.EndpointType">
|
|
<em class="property">class </em><tt class="descname">EndpointType</tt><big>(</big><em>string</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/downloadsession_client.html#File.EndpointType"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.downloadsession_client.File.EndpointType" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="vmware.vapi.bindings.html#vmware.vapi.bindings.enum.Enum" title="vmware.vapi.bindings.enum.Enum"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.bindings.enum.Enum</span></tt></a></p>
|
|
<p>The <tt class="docutils literal"><span class="pre">File.EndpointType</span></tt> class defines the types of endpoints used to
|
|
download the file.</p>
|
|
<div class="admonition note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p class="last">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 <a class="reference internal" href="custom/rst/enumeration.html#enumeration-description"><em>enumerated
|
|
type description page</em></a>.</p>
|
|
</div>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>string</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – String value for the <tt class="xref py py-class docutils literal"><span class="pre">EndpointType</span></tt> instance.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<dl class="attribute">
|
|
<dt id="com.vmware.content.library.item.downloadsession_client.File.EndpointType.DIRECT">
|
|
<tt class="descname">DIRECT</tt><em class="property"> = EndpointType(string=u'DIRECT')</em><a class="headerlink" href="#com.vmware.content.library.item.downloadsession_client.File.EndpointType.DIRECT" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>A direct download endpoint indicating the location of the file on storage.
|
|
The caller is responsible for retrieving the file from the storage location
|
|
directly.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="com.vmware.content.library.item.downloadsession_client.File.EndpointType.HTTPS">
|
|
<tt class="descname">HTTPS</tt><em class="property"> = EndpointType(string=u'HTTPS')</em><a class="headerlink" href="#com.vmware.content.library.item.downloadsession_client.File.EndpointType.HTTPS" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>An https download endpoint.</p>
|
|
</dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="class">
|
|
<dt id="com.vmware.content.library.item.downloadsession_client.File.Info">
|
|
<em class="property">class </em><tt class="descclassname">File.</tt><tt class="descname">Info</tt><big>(</big><em>name=None</em>, <em>size=None</em>, <em>bytes_transferred=None</em>, <em>status=None</em>, <em>download_endpoint=None</em>, <em>checksum_info=None</em>, <em>error_message=None</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/downloadsession_client.html#File.Info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.downloadsession_client.File.Info" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="vmware.vapi.bindings.html#vmware.vapi.bindings.struct.VapiStruct" title="vmware.vapi.bindings.struct.VapiStruct"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.bindings.struct.VapiStruct</span></tt></a></p>
|
|
<p>The <tt class="docutils literal"><span class="pre">File.Info</span></tt> class defines the downloaded file.</p>
|
|
<div class="admonition tip">
|
|
<p class="first admonition-title">Tip</p>
|
|
<p class="last">The arguments are used to initialize data attributes with the same
|
|
names.</p>
|
|
</div>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
|
|
<li><strong>name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – The name of the file.</li>
|
|
<li><strong>size</strong> (<tt class="xref py py-class docutils literal"><span class="pre">long</span></tt> or <tt class="docutils literal"><span class="pre">None</span></tt>) – The file size, in bytes.
|
|
This attribute may not be available immediately. It is guaranteed
|
|
to be set when the client finishes downloading the file.</li>
|
|
<li><strong>bytes_transferred</strong> (<tt class="xref py py-class docutils literal"><span class="pre">long</span></tt>) – The number of bytes that have been transferred by the server so far
|
|
for making this file prepared for download. This value may stay at
|
|
zero till the client starts downloading the file.</li>
|
|
<li><strong>status</strong> (<a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.PrepareStatus" title="com.vmware.content.library.item.downloadsession_client.File.PrepareStatus"><tt class="xref py py-class docutils literal"><span class="pre">File.PrepareStatus</span></tt></a>) – The preparation status (UNPREPARED, PREPARE_REQUESTED, PREPARING,
|
|
PREPARED, ERROR) of the file.</li>
|
|
<li><strong>download_endpoint</strong> (<a class="reference internal" href="com.vmware.content.library.html#com.vmware.content.library.item_client.TransferEndpoint" title="com.vmware.content.library.item_client.TransferEndpoint"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.content.library.item_client.TransferEndpoint</span></tt></a> or <tt class="docutils literal"><span class="pre">None</span></tt>) – Endpoint at which the file is available for download. The value is
|
|
valid only when the <tt class="xref py py-attr docutils literal"><span class="pre">File.Info.status</span></tt> is
|
|
<a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.PREPARED" title="com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.PREPARED"><tt class="xref py py-attr docutils literal"><span class="pre">File.PrepareStatus.PREPARED</span></tt></a>.
|
|
This attribute won’t be set until the file status is
|
|
<a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.PREPARED" title="com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.PREPARED"><tt class="xref py py-attr docutils literal"><span class="pre">File.PrepareStatus.PREPARED</span></tt></a>.</li>
|
|
<li><strong>checksum_info</strong> (<a class="reference internal" href="com.vmware.content.library.html#com.vmware.content.library.item_client.File.ChecksumInfo" title="com.vmware.content.library.item_client.File.ChecksumInfo"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.content.library.item_client.File.ChecksumInfo</span></tt></a> or <tt class="docutils literal"><span class="pre">None</span></tt>) – The checksum information of the file. When the download is
|
|
complete, you can retrieve the checksum from the <a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.get" title="com.vmware.content.library.item.downloadsession_client.File.get"><tt class="xref py py-func docutils literal"><span class="pre">File.get()</span></tt></a>
|
|
method to verify the checksum for the downloaded file.
|
|
The checksum is always calculated for the downloaded file, but this
|
|
attribute won’t be set until the download is complete.</li>
|
|
<li><strong>error_message</strong> (<a class="reference internal" href="com.vmware.vapi.html#com.vmware.vapi.std_client.LocalizableMessage" title="com.vmware.vapi.std_client.LocalizableMessage"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std_client.LocalizableMessage</span></tt></a> or <tt class="docutils literal"><span class="pre">None</span></tt>) – Error message for a failed preparation when the prepare status is
|
|
<a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.ERROR" title="com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.ERROR"><tt class="xref py py-attr docutils literal"><span class="pre">File.PrepareStatus.ERROR</span></tt></a>.
|
|
This attribute won’t be set unless there was an error with the file
|
|
transfer.</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="class">
|
|
<dt id="com.vmware.content.library.item.downloadsession_client.File.PrepareStatus">
|
|
<em class="property">class </em><tt class="descclassname">File.</tt><tt class="descname">PrepareStatus</tt><big>(</big><em>string</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/downloadsession_client.html#File.PrepareStatus"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.downloadsession_client.File.PrepareStatus" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="vmware.vapi.bindings.html#vmware.vapi.bindings.enum.Enum" title="vmware.vapi.bindings.enum.Enum"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.bindings.enum.Enum</span></tt></a></p>
|
|
<p>The <tt class="docutils literal"><span class="pre">File.PrepareStatus</span></tt> class defines the state of the file in
|
|
preparation for download.</p>
|
|
<div class="admonition note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p class="last">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 <a class="reference internal" href="custom/rst/enumeration.html#enumeration-description"><em>enumerated
|
|
type description page</em></a>.</p>
|
|
</div>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>string</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – String value for the <tt class="xref py py-class docutils literal"><span class="pre">PrepareStatus</span></tt> instance.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<dl class="attribute">
|
|
<dt id="com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.ERROR">
|
|
<tt class="descname">ERROR</tt><em class="property"> = PrepareStatus(string=u'ERROR')</em><a class="headerlink" href="#com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.ERROR" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Prepare failed.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.PREPARED">
|
|
<tt class="descname">PREPARED</tt><em class="property"> = PrepareStatus(string=u'PREPARED')</em><a class="headerlink" href="#com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.PREPARED" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Prepare succeeded. The file is ready for download.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.PREPARE_REQUESTED">
|
|
<tt class="descname">PREPARE_REQUESTED</tt><em class="property"> = PrepareStatus(string=u'PREPARE_REQUESTED')</em><a class="headerlink" href="#com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.PREPARE_REQUESTED" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>A prepare has been requested, however the server hasn’t started the
|
|
preparation yet.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.PREPARING">
|
|
<tt class="descname">PREPARING</tt><em class="property"> = PrepareStatus(string=u'PREPARING')</em><a class="headerlink" href="#com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.PREPARING" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>A prepare has been requested and the file is in the process of being
|
|
prepared.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.UNPREPARED">
|
|
<tt class="descname">UNPREPARED</tt><em class="property"> = PrepareStatus(string=u'UNPREPARED')</em><a class="headerlink" href="#com.vmware.content.library.item.downloadsession_client.File.PrepareStatus.UNPREPARED" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>The file hasn’t been requested for preparation.</p>
|
|
</dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="com.vmware.content.library.item.downloadsession_client.File.get">
|
|
<tt class="descclassname">File.</tt><tt class="descname">get</tt><big>(</big><em>download_session_id</em>, <em>file_name</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/downloadsession_client.html#File.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.downloadsession_client.File.get" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Retrieves file download information for a specific file.</p>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
|
|
<li><strong>download_session_id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – Identifier of the download session.
|
|
The parameter must be an identifier for the resource type:
|
|
<tt class="docutils literal"><span class="pre">com.vmware.content.library.item.DownloadSession</span></tt>.</li>
|
|
<li><strong>file_name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – Name of the file requested.</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.Info" title="com.vmware.content.library.item.downloadsession_client.File.Info"><tt class="xref py py-class docutils literal"><span class="pre">File.Info</span></tt></a></p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The <a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.Info" title="com.vmware.content.library.item.downloadsession_client.File.Info"><tt class="xref py py-class docutils literal"><span class="pre">File.Info</span></tt></a> instance containing the status of the file
|
|
and its download link if available.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raise :</th><td class="field-body"><p class="first"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.NotFound" title="com.vmware.vapi.std.errors_client.NotFound"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.NotFound</span></tt></a>
|
|
if the download session associated with <tt class="docutils literal"><span class="pre">download_session_id</span></tt>
|
|
does not exist.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Raise :</th><td class="field-body"><p class="first"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.InvalidArgument" title="com.vmware.vapi.std.errors_client.InvalidArgument"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.InvalidArgument</span></tt></a>
|
|
if there is no file with the specified <tt class="docutils literal"><span class="pre">file_name</span></tt>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raise :</th><td class="field-body"><p class="first"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.Unauthorized" title="com.vmware.vapi.std.errors_client.Unauthorized"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.Unauthorized</span></tt></a>
|
|
if you do not have all of the privileges described as follows:</p>
|
|
<ul class="last simple">
|
|
<li>The resource <tt class="docutils literal"><span class="pre">com.vmware.content.library.Item</span></tt> referenced by
|
|
the parameter <tt class="docutils literal"><span class="pre">libraryItemId</span></tt> requires <tt class="docutils literal"><span class="pre">System.Read</span></tt>.</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="com.vmware.content.library.item.downloadsession_client.File.list">
|
|
<tt class="descclassname">File.</tt><tt class="descname">list</tt><big>(</big><em>download_session_id</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/downloadsession_client.html#File.list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.downloadsession_client.File.list" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Lists the information of all the files in the library item associated
|
|
with the download session.</p>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>download_session_id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – Identifier of the download session.
|
|
The parameter must be an identifier for the resource type:
|
|
<tt class="docutils literal"><span class="pre">com.vmware.content.library.item.DownloadSession</span></tt>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.list" title="com.vmware.content.library.item.downloadsession_client.File.list"><tt class="xref py py-class docutils literal"><span class="pre">list</span></tt></a> of <a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.Info" title="com.vmware.content.library.item.downloadsession_client.File.Info"><tt class="xref py py-class docutils literal"><span class="pre">File.Info</span></tt></a></p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The <a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.list" title="com.vmware.content.library.item.downloadsession_client.File.list"><tt class="xref py py-class docutils literal"><span class="pre">list</span></tt></a> of <a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.Info" title="com.vmware.content.library.item.downloadsession_client.File.Info"><tt class="xref py py-class docutils literal"><span class="pre">File.Info</span></tt></a> instances.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raise :</th><td class="field-body"><p class="first"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.NotFound" title="com.vmware.vapi.std.errors_client.NotFound"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.NotFound</span></tt></a>
|
|
if the download session associated with <tt class="docutils literal"><span class="pre">download_session_id</span></tt>
|
|
doesn’t exist.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Raise :</th><td class="field-body"><p class="first"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.Unauthorized" title="com.vmware.vapi.std.errors_client.Unauthorized"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.Unauthorized</span></tt></a>
|
|
if you do not have all of the privileges described as follows:</p>
|
|
<ul class="last simple">
|
|
<li>The resource <tt class="docutils literal"><span class="pre">com.vmware.content.library.Item</span></tt> referenced by
|
|
the parameter <tt class="docutils literal"><span class="pre">libraryItemId</span></tt> requires <tt class="docutils literal"><span class="pre">System.Read</span></tt>.</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="com.vmware.content.library.item.downloadsession_client.File.prepare">
|
|
<tt class="descclassname">File.</tt><tt class="descname">prepare</tt><big>(</big><em>download_session_id</em>, <em>file_name</em>, <em>endpoint_type=None</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/downloadsession_client.html#File.prepare"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.downloadsession_client.File.prepare" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Requests a file to be prepared for download.</p>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
|
|
<li><strong>download_session_id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – Identifier of the download session.
|
|
The parameter must be an identifier for the resource type:
|
|
<tt class="docutils literal"><span class="pre">com.vmware.content.library.item.DownloadSession</span></tt>.</li>
|
|
<li><strong>file_name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – Name of the file requested for download.</li>
|
|
<li><strong>endpoint_type</strong> (<a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.EndpointType" title="com.vmware.content.library.item.downloadsession_client.File.EndpointType"><tt class="xref py py-class docutils literal"><span class="pre">File.EndpointType</span></tt></a> or <tt class="docutils literal"><span class="pre">None</span></tt>) – Endpoint type request, one of HTTPS, DIRECT. This will determine
|
|
the type of the <tt class="xref py py-attr docutils literal"><span class="pre">File.Info.download_endpoint</span></tt> that is
|
|
generated when the file is prepared. The
|
|
<a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.EndpointType.DIRECT" title="com.vmware.content.library.item.downloadsession_client.File.EndpointType.DIRECT"><tt class="xref py py-attr docutils literal"><span class="pre">File.EndpointType.DIRECT</span></tt></a> is only available to users who
|
|
have the ContentLibrary.ReadStorage privilege.
|
|
If not specified the default is <a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.EndpointType.HTTPS" title="com.vmware.content.library.item.downloadsession_client.File.EndpointType.HTTPS"><tt class="xref py py-attr docutils literal"><span class="pre">File.EndpointType.HTTPS</span></tt></a>.</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.Info" title="com.vmware.content.library.item.downloadsession_client.File.Info"><tt class="xref py py-class docutils literal"><span class="pre">File.Info</span></tt></a></p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">File information containing the status of the request and the
|
|
download link to the file.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raise :</th><td class="field-body"><p class="first"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.NotFound" title="com.vmware.vapi.std.errors_client.NotFound"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.NotFound</span></tt></a>
|
|
if the download session does not exist.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Raise :</th><td class="field-body"><p class="first"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.InvalidArgument" title="com.vmware.vapi.std.errors_client.InvalidArgument"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.InvalidArgument</span></tt></a>
|
|
if there is no file with the specified <tt class="docutils literal"><span class="pre">file_name</span></tt>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raise :</th><td class="field-body"><p class="first last"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.Unauthorized" title="com.vmware.vapi.std.errors_client.Unauthorized"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.Unauthorized</span></tt></a>
|
|
if the the download session wasn’t created with the
|
|
ContentLibrary.ReadStorage privilege and the caller requested a
|
|
<a class="reference internal" href="#com.vmware.content.library.item.downloadsession_client.File.EndpointType.DIRECT" title="com.vmware.content.library.item.downloadsession_client.File.EndpointType.DIRECT"><tt class="xref py py-attr docutils literal"><span class="pre">File.EndpointType.DIRECT</span></tt></a> endpoint type.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
</div>
|
|
<div class="section" id="module-com.vmware.content.library.item.updatesession_client">
|
|
<span id="updatesession-client-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">updatesession_client</span></tt> Module<a class="headerlink" href="#module-com.vmware.content.library.item.updatesession_client" title="Permalink to this headline">¶</a></h2>
|
|
<p>The Content Library Item Update Session module provides classes and classes for
|
|
updating files in a session.</p>
|
|
<dl class="class">
|
|
<dt id="com.vmware.content.library.item.updatesession_client.File">
|
|
<em class="property">class </em><tt class="descclassname">com.vmware.content.library.item.updatesession_client.</tt><tt class="descname">File</tt><big>(</big><em>config</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/updatesession_client.html#File"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.updatesession_client.File" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="vmware.vapi.bindings.html#vmware.vapi.bindings.stub.VapiInterface" title="vmware.vapi.bindings.stub.VapiInterface"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.bindings.stub.VapiInterface</span></tt></a></p>
|
|
<p>The <tt class="docutils literal"><span class="pre">File</span></tt> class provides methods for accessing files within an update
|
|
session.</p>
|
|
<p>After an update session is created against a library item, the <tt class="docutils literal"><span class="pre">File</span></tt>
|
|
class can be used to make changes to the underlying library item metadata
|
|
as well as the content of the files. The following changes can be made:</p>
|
|
<ul class="simple">
|
|
<li>deleting an existing file within the library item. This deletes both the
|
|
metadata and the content.</li>
|
|
<li>updating an existing file with new content.</li>
|
|
<li>adding a new file to the library item.</li>
|
|
</ul>
|
|
<p>The above changes are not applied or visible until the session is
|
|
completed. See
|
|
<a class="reference internal" href="com.vmware.content.library.html#com.vmware.content.library.item_client.UpdateSession" title="com.vmware.content.library.item_client.UpdateSession"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.content.library.item_client.UpdateSession</span></tt></a>.</p>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>config</strong> (<a class="reference internal" href="vmware.vapi.bindings.html#vmware.vapi.bindings.stub.StubConfiguration" title="vmware.vapi.bindings.stub.StubConfiguration"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.bindings.stub.StubConfiguration</span></tt></a>) – Configuration to be used for creating the stub.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<dl class="class">
|
|
<dt id="com.vmware.content.library.item.updatesession_client.File.AddSpec">
|
|
<em class="property">class </em><tt class="descname">AddSpec</tt><big>(</big><em>name=None</em>, <em>source_type=None</em>, <em>source_endpoint=None</em>, <em>size=None</em>, <em>checksum_info=None</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/updatesession_client.html#File.AddSpec"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.updatesession_client.File.AddSpec" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="vmware.vapi.bindings.html#vmware.vapi.bindings.struct.VapiStruct" title="vmware.vapi.bindings.struct.VapiStruct"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.bindings.struct.VapiStruct</span></tt></a></p>
|
|
<p>The <tt class="docutils literal"><span class="pre">File.AddSpec</span></tt> class describes the properties of the file to be
|
|
uploaded.</p>
|
|
<div class="admonition tip">
|
|
<p class="first admonition-title">Tip</p>
|
|
<p class="last">The arguments are used to initialize data attributes with the same
|
|
names.</p>
|
|
</div>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
|
|
<li><strong>name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – The name of the file being uploaded.</li>
|
|
<li><strong>source_type</strong> (<a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.SourceType" title="com.vmware.content.library.item.updatesession_client.File.SourceType"><tt class="xref py py-class docutils literal"><span class="pre">File.SourceType</span></tt></a>) – The source type (NONE, PUSH, PULL) from which the file content will
|
|
be retrieved.</li>
|
|
<li><strong>source_endpoint</strong> (<a class="reference internal" href="com.vmware.content.library.html#com.vmware.content.library.item_client.TransferEndpoint" title="com.vmware.content.library.item_client.TransferEndpoint"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.content.library.item_client.TransferEndpoint</span></tt></a>) – Location from which the Content Library Service will fetch the
|
|
file, rather than requiring a client to upload the file.
|
|
This attribute is optional and it is only relevant when the value
|
|
of <tt class="docutils literal"><span class="pre">sourceType</span></tt> is <a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.SourceType.PULL" title="com.vmware.content.library.item.updatesession_client.File.SourceType.PULL"><tt class="xref py py-attr docutils literal"><span class="pre">File.SourceType.PULL</span></tt></a>.</li>
|
|
<li><strong>size</strong> (<tt class="xref py py-class docutils literal"><span class="pre">long</span></tt> or <tt class="docutils literal"><span class="pre">None</span></tt>) – The file size, in bytes.
|
|
If specified the server will verify it received the correct size.</li>
|
|
<li><strong>checksum_info</strong> (<a class="reference internal" href="com.vmware.content.library.html#com.vmware.content.library.item_client.File.ChecksumInfo" title="com.vmware.content.library.item_client.File.ChecksumInfo"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.content.library.item_client.File.ChecksumInfo</span></tt></a> or <tt class="docutils literal"><span class="pre">None</span></tt>) – The checksum of the file. If specified, the server will verify the
|
|
checksum once the file is received. If there is a mismatch, the
|
|
upload will fail.
|
|
If not specified the server does not verify the checksum.</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="class">
|
|
<dt id="com.vmware.content.library.item.updatesession_client.File.Info">
|
|
<em class="property">class </em><tt class="descclassname">File.</tt><tt class="descname">Info</tt><big>(</big><em>name=None</em>, <em>source_type=None</em>, <em>size=None</em>, <em>checksum_info=None</em>, <em>source_endpoint=None</em>, <em>upload_endpoint=None</em>, <em>bytes_transferred=None</em>, <em>status=None</em>, <em>error_message=None</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/updatesession_client.html#File.Info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.updatesession_client.File.Info" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="vmware.vapi.bindings.html#vmware.vapi.bindings.struct.VapiStruct" title="vmware.vapi.bindings.struct.VapiStruct"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.bindings.struct.VapiStruct</span></tt></a></p>
|
|
<p>The <tt class="docutils literal"><span class="pre">File.Info</span></tt> class defines the uploaded file.</p>
|
|
<div class="admonition tip">
|
|
<p class="first admonition-title">Tip</p>
|
|
<p class="last">The arguments are used to initialize data attributes with the same
|
|
names.</p>
|
|
</div>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
|
|
<li><strong>name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – The name of the file.</li>
|
|
<li><strong>source_type</strong> (<a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.SourceType" title="com.vmware.content.library.item.updatesession_client.File.SourceType"><tt class="xref py py-class docutils literal"><span class="pre">File.SourceType</span></tt></a>) – The source type (NONE, PUSH, PULL) from which the file is being
|
|
retrieved. This may be <a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.SourceType.NONE" title="com.vmware.content.library.item.updatesession_client.File.SourceType.NONE"><tt class="xref py py-attr docutils literal"><span class="pre">File.SourceType.NONE</span></tt></a> if the file is
|
|
not being changed.</li>
|
|
<li><strong>size</strong> (<tt class="xref py py-class docutils literal"><span class="pre">long</span></tt> or <tt class="docutils literal"><span class="pre">None</span></tt>) – The file size, in bytes as received by the server. This attribute
|
|
is guaranteed to be set when the server has completely received the
|
|
file.
|
|
This attribute won’t be set until the file status is
|
|
<a class="reference internal" href="com.vmware.content.library.html#com.vmware.content.library.item_client.TransferStatus.READY" title="com.vmware.content.library.item_client.TransferStatus.READY"><tt class="xref py py-attr docutils literal"><span class="pre">com.vmware.content.library.item_client.TransferStatus.READY</span></tt></a>.</li>
|
|
<li><strong>checksum_info</strong> (<a class="reference internal" href="com.vmware.content.library.html#com.vmware.content.library.item_client.File.ChecksumInfo" title="com.vmware.content.library.item_client.File.ChecksumInfo"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.content.library.item_client.File.ChecksumInfo</span></tt></a> or <tt class="docutils literal"><span class="pre">None</span></tt>) – The checksum information of the file received by the server.
|
|
If not specified the server does not verify the checksum.</li>
|
|
<li><strong>source_endpoint</strong> (<a class="reference internal" href="com.vmware.content.library.html#com.vmware.content.library.item_client.TransferEndpoint" title="com.vmware.content.library.item_client.TransferEndpoint"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.content.library.item_client.TransferEndpoint</span></tt></a>) – A source endpoint from which to retrieve the file.
|
|
This attribute is optional and it is only relevant when the value
|
|
of <tt class="docutils literal"><span class="pre">sourceType</span></tt> is <a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.SourceType.PULL" title="com.vmware.content.library.item.updatesession_client.File.SourceType.PULL"><tt class="xref py py-attr docutils literal"><span class="pre">File.SourceType.PULL</span></tt></a>.</li>
|
|
<li><strong>upload_endpoint</strong> (<a class="reference internal" href="com.vmware.content.library.html#com.vmware.content.library.item_client.TransferEndpoint" title="com.vmware.content.library.item_client.TransferEndpoint"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.content.library.item_client.TransferEndpoint</span></tt></a>) – An upload endpoint to which the client can push the content.
|
|
This attribute is optional and it is only relevant when the value
|
|
of <tt class="docutils literal"><span class="pre">sourceType</span></tt> is <a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.SourceType.PUSH" title="com.vmware.content.library.item.updatesession_client.File.SourceType.PUSH"><tt class="xref py py-attr docutils literal"><span class="pre">File.SourceType.PUSH</span></tt></a>.</li>
|
|
<li><strong>bytes_transferred</strong> (<tt class="xref py py-class docutils literal"><span class="pre">long</span></tt>) – The number of bytes of this file that have been received by the
|
|
server.</li>
|
|
<li><strong>status</strong> (<a class="reference internal" href="com.vmware.content.library.html#com.vmware.content.library.item_client.TransferStatus" title="com.vmware.content.library.item_client.TransferStatus"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.content.library.item_client.TransferStatus</span></tt></a>) – The transfer status (WAITING_FOR_TRANSFER, TRANSFERRING, READY,
|
|
VALIDATING, ERROR) of this file.</li>
|
|
<li><strong>error_message</strong> (<a class="reference internal" href="com.vmware.vapi.html#com.vmware.vapi.std_client.LocalizableMessage" title="com.vmware.vapi.std_client.LocalizableMessage"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std_client.LocalizableMessage</span></tt></a> or <tt class="docutils literal"><span class="pre">None</span></tt>) – Details about the transfer error.
|
|
An error message is set if the status is
|
|
<a class="reference internal" href="com.vmware.content.library.html#com.vmware.content.library.item_client.TransferStatus.ERROR" title="com.vmware.content.library.item_client.TransferStatus.ERROR"><tt class="xref py py-attr docutils literal"><span class="pre">com.vmware.content.library.item_client.TransferStatus.ERROR</span></tt></a>.</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="class">
|
|
<dt id="com.vmware.content.library.item.updatesession_client.File.SourceType">
|
|
<em class="property">class </em><tt class="descclassname">File.</tt><tt class="descname">SourceType</tt><big>(</big><em>string</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/updatesession_client.html#File.SourceType"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.updatesession_client.File.SourceType" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="vmware.vapi.bindings.html#vmware.vapi.bindings.enum.Enum" title="vmware.vapi.bindings.enum.Enum"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.bindings.enum.Enum</span></tt></a></p>
|
|
<p>The <tt class="docutils literal"><span class="pre">File.SourceType</span></tt> class defines how the file content is retrieved.</p>
|
|
<div class="admonition note">
|
|
<p class="first admonition-title">Note</p>
|
|
<p class="last">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 <a class="reference internal" href="custom/rst/enumeration.html#enumeration-description"><em>enumerated
|
|
type description page</em></a>.</p>
|
|
</div>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>string</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – String value for the <tt class="xref py py-class docutils literal"><span class="pre">SourceType</span></tt> instance.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<dl class="attribute">
|
|
<dt id="com.vmware.content.library.item.updatesession_client.File.SourceType.NONE">
|
|
<tt class="descname">NONE</tt><em class="property"> = SourceType(string=u'NONE')</em><a class="headerlink" href="#com.vmware.content.library.item.updatesession_client.File.SourceType.NONE" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>No source type has been requested.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="com.vmware.content.library.item.updatesession_client.File.SourceType.PULL">
|
|
<tt class="descname">PULL</tt><em class="property"> = SourceType(string=u'PULL')</em><a class="headerlink" href="#com.vmware.content.library.item.updatesession_client.File.SourceType.PULL" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>The server is pulling content from a URL. The URL scheme can be <tt class="docutils literal"><span class="pre">http</span></tt>,
|
|
<tt class="docutils literal"><span class="pre">https</span></tt>, <tt class="docutils literal"><span class="pre">file</span></tt>, or <tt class="docutils literal"><span class="pre">ds</span></tt>.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="com.vmware.content.library.item.updatesession_client.File.SourceType.PUSH">
|
|
<tt class="descname">PUSH</tt><em class="property"> = SourceType(string=u'PUSH')</em><a class="headerlink" href="#com.vmware.content.library.item.updatesession_client.File.SourceType.PUSH" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>The client is uploading content using HTTP(S) PUT requests.</p>
|
|
</dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="class">
|
|
<dt id="com.vmware.content.library.item.updatesession_client.File.ValidationError">
|
|
<em class="property">class </em><tt class="descclassname">File.</tt><tt class="descname">ValidationError</tt><big>(</big><em>name=None</em>, <em>error_message=None</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/updatesession_client.html#File.ValidationError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.updatesession_client.File.ValidationError" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="vmware.vapi.bindings.html#vmware.vapi.bindings.struct.VapiStruct" title="vmware.vapi.bindings.struct.VapiStruct"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.bindings.struct.VapiStruct</span></tt></a></p>
|
|
<p>The <tt class="docutils literal"><span class="pre">File.ValidationError</span></tt> class defines the validation error of a file
|
|
in the session.</p>
|
|
<div class="admonition tip">
|
|
<p class="first admonition-title">Tip</p>
|
|
<p class="last">The arguments are used to initialize data attributes with the same
|
|
names.</p>
|
|
</div>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
|
|
<li><strong>name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – The name of the file.</li>
|
|
<li><strong>error_message</strong> (<a class="reference internal" href="com.vmware.vapi.html#com.vmware.vapi.std_client.LocalizableMessage" title="com.vmware.vapi.std_client.LocalizableMessage"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std_client.LocalizableMessage</span></tt></a>) – A message indicating why the file was considered invalid.</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="class">
|
|
<dt id="com.vmware.content.library.item.updatesession_client.File.ValidationResult">
|
|
<em class="property">class </em><tt class="descclassname">File.</tt><tt class="descname">ValidationResult</tt><big>(</big><em>has_errors=None</em>, <em>missing_files=None</em>, <em>invalid_files=None</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/updatesession_client.html#File.ValidationResult"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.updatesession_client.File.ValidationResult" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="vmware.vapi.bindings.html#vmware.vapi.bindings.struct.VapiStruct" title="vmware.vapi.bindings.struct.VapiStruct"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.bindings.struct.VapiStruct</span></tt></a></p>
|
|
<p>The <tt class="docutils literal"><span class="pre">File.ValidationResult</span></tt> class defines the result of validating the
|
|
files in the session.</p>
|
|
<div class="admonition tip">
|
|
<p class="first admonition-title">Tip</p>
|
|
<p class="last">The arguments are used to initialize data attributes with the same
|
|
names.</p>
|
|
</div>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
|
|
<li><strong>has_errors</strong> (<tt class="xref py py-class docutils literal"><span class="pre">bool</span></tt>) – Whether the validation was succesful or not. In case of errors, the
|
|
<tt class="xref py py-attr docutils literal"><span class="pre">File.ValidationResult.missing_files</span></tt> and
|
|
<tt class="xref py py-attr docutils literal"><span class="pre">File.ValidationResult.invalid_files</span></tt> will contain at least
|
|
one entry.</li>
|
|
<li><strong>missing_files</strong> (<tt class="xref py py-class docutils literal"><span class="pre">set</span></tt> of <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – A <tt class="xref py py-class docutils literal"><span class="pre">set</span></tt> containing the names of the files that are required
|
|
but the client hasn’t added.</li>
|
|
<li><strong>invalid_files</strong> (<tt class="xref py py-class docutils literal"><span class="pre">list</span></tt> of <a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.ValidationError" title="com.vmware.content.library.item.updatesession_client.File.ValidationError"><tt class="xref py py-class docutils literal"><span class="pre">File.ValidationError</span></tt></a>) – A <tt class="xref py py-class docutils literal"><span class="pre">list</span></tt> containing the files that have been identified as
|
|
invalid and details about the error.</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="com.vmware.content.library.item.updatesession_client.File.add">
|
|
<tt class="descclassname">File.</tt><tt class="descname">add</tt><big>(</big><em>update_session_id</em>, <em>file_spec</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/updatesession_client.html#File.add"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.updatesession_client.File.add" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Requests file content to be changed (either created, or updated).
|
|
Depending on the source type of the file, this method will either
|
|
return an upload endpoint where the client can push the content, or the
|
|
server will pull from the provided source endpoint. If a file with the
|
|
same name already exists in this session, this method will be used to
|
|
update the content of the existing file.</p>
|
|
<p>When importing a file directly from storage, where the source endpoint
|
|
is a file or datastore URI, you will need to have the
|
|
ContentLibrary.ReadStorage privilege on the library item. If the file
|
|
is located in the same directory as the library storage backing folder,
|
|
the server will move the file instead of copying it, thereby allowing
|
|
instantaneous import of files for efficient backup and restore
|
|
scenarios. In all other cases, a copy is performed rather than a move.</p>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
|
|
<li><strong>update_session_id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – Identifier of the update session to be modified.
|
|
The parameter must be an identifier for the resource type:
|
|
<tt class="docutils literal"><span class="pre">com.vmware.content.library.item.UpdateSession</span></tt>.</li>
|
|
<li><strong>file_spec</strong> (<a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.AddSpec" title="com.vmware.content.library.item.updatesession_client.File.AddSpec"><tt class="xref py py-class docutils literal"><span class="pre">File.AddSpec</span></tt></a>) – Specification for the file that needs to be added or updated. This
|
|
includes whether the client wants to push the content or have the
|
|
server pull it.</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.Info" title="com.vmware.content.library.item.updatesession_client.File.Info"><tt class="xref py py-class docutils literal"><span class="pre">File.Info</span></tt></a></p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">An <a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.Info" title="com.vmware.content.library.item.updatesession_client.File.Info"><tt class="xref py py-class docutils literal"><span class="pre">File.Info</span></tt></a> class containing upload links as well as
|
|
server side state tracking the transfer of the file.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raise :</th><td class="field-body"><p class="first"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.InvalidArgument" title="com.vmware.vapi.std.errors_client.InvalidArgument"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.InvalidArgument</span></tt></a>
|
|
if the <tt class="docutils literal"><span class="pre">file_spec</span></tt> is invalid.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Raise :</th><td class="field-body"><p class="first"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.NotFound" title="com.vmware.vapi.std.errors_client.NotFound"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.NotFound</span></tt></a>
|
|
if the update session doesn’t exist.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raise :</th><td class="field-body"><p class="first last"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.Unauthorized" title="com.vmware.vapi.std.errors_client.Unauthorized"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.Unauthorized</span></tt></a>
|
|
if the caller doesn’t have ContentLibrary.ReadStorage privilege on
|
|
the library item of the update session and source type
|
|
<a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.SourceType.PULL" title="com.vmware.content.library.item.updatesession_client.File.SourceType.PULL"><tt class="xref py py-attr docutils literal"><span class="pre">File.SourceType.PULL</span></tt></a> is requested for a file or datastore
|
|
source endpoint (that is, not HTTP or HTTPs based endpoint).</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="com.vmware.content.library.item.updatesession_client.File.get">
|
|
<tt class="descclassname">File.</tt><tt class="descname">get</tt><big>(</big><em>update_session_id</em>, <em>file_name</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/updatesession_client.html#File.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.updatesession_client.File.get" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Retrieves information about a specific file in the snapshot of the
|
|
library item at the time when the update session was created.</p>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
|
|
<li><strong>update_session_id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – Identifier of the update session.
|
|
The parameter must be an identifier for the resource type:
|
|
<tt class="docutils literal"><span class="pre">com.vmware.content.library.item.UpdateSession</span></tt>.</li>
|
|
<li><strong>file_name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – Name of the file.</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.Info" title="com.vmware.content.library.item.updatesession_client.File.Info"><tt class="xref py py-class docutils literal"><span class="pre">File.Info</span></tt></a></p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">Information about the file.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raise :</th><td class="field-body"><p class="first"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.NotFound" title="com.vmware.vapi.std.errors_client.NotFound"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.NotFound</span></tt></a>
|
|
if the update session doesn’t exist.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Raise :</th><td class="field-body"><p class="first"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.InvalidArgument" title="com.vmware.vapi.std.errors_client.InvalidArgument"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.InvalidArgument</span></tt></a>
|
|
if the file doesn’t exist in the library item associated with the
|
|
update session.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raise :</th><td class="field-body"><p class="first"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.Unauthorized" title="com.vmware.vapi.std.errors_client.Unauthorized"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.Unauthorized</span></tt></a>
|
|
if you do not have all of the privileges described as follows:</p>
|
|
<ul class="last simple">
|
|
<li>The resource <tt class="docutils literal"><span class="pre">com.vmware.content.library.Item</span></tt> referenced by
|
|
the parameter <tt class="docutils literal"><span class="pre">libraryItemId</span></tt> requires <tt class="docutils literal"><span class="pre">System.Read</span></tt>.</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="com.vmware.content.library.item.updatesession_client.File.list">
|
|
<tt class="descclassname">File.</tt><tt class="descname">list</tt><big>(</big><em>update_session_id</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/updatesession_client.html#File.list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.updatesession_client.File.list" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Lists all files in the library item associated with the update session.</p>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>update_session_id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – Identifier of the update session.
|
|
The parameter must be an identifier for the resource type:
|
|
<tt class="docutils literal"><span class="pre">com.vmware.content.library.item.UpdateSession</span></tt>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.list" title="com.vmware.content.library.item.updatesession_client.File.list"><tt class="xref py py-class docutils literal"><span class="pre">list</span></tt></a> of <a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.Info" title="com.vmware.content.library.item.updatesession_client.File.Info"><tt class="xref py py-class docutils literal"><span class="pre">File.Info</span></tt></a></p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">The <a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.list" title="com.vmware.content.library.item.updatesession_client.File.list"><tt class="xref py py-class docutils literal"><span class="pre">list</span></tt></a> of the files in the library item associated with
|
|
the update session. This <a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.list" title="com.vmware.content.library.item.updatesession_client.File.list"><tt class="xref py py-class docutils literal"><span class="pre">list</span></tt></a> may be empty if the caller
|
|
has removed all the files as part of this session (in which case
|
|
completing the update session will result in an empty library
|
|
item).</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raise :</th><td class="field-body"><p class="first"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.NotFound" title="com.vmware.vapi.std.errors_client.NotFound"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.NotFound</span></tt></a>
|
|
if the update session doesn’t exist.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Raise :</th><td class="field-body"><p class="first"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.Unauthorized" title="com.vmware.vapi.std.errors_client.Unauthorized"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.Unauthorized</span></tt></a>
|
|
if you do not have all of the privileges described as follows:</p>
|
|
<ul class="last simple">
|
|
<li>The resource <tt class="docutils literal"><span class="pre">com.vmware.content.library.Item</span></tt> referenced by
|
|
the parameter <tt class="docutils literal"><span class="pre">libraryItemId</span></tt> requires <tt class="docutils literal"><span class="pre">System.Read</span></tt>.</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="com.vmware.content.library.item.updatesession_client.File.remove">
|
|
<tt class="descclassname">File.</tt><tt class="descname">remove</tt><big>(</big><em>update_session_id</em>, <em>file_name</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/updatesession_client.html#File.remove"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.updatesession_client.File.remove" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Requests a file to be removed. The file will only be effectively
|
|
removed when the update session is completed.</p>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
|
|
<li><strong>update_session_id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – Identifier of the update session.
|
|
The parameter must be an identifier for the resource type:
|
|
<tt class="docutils literal"><span class="pre">com.vmware.content.library.item.UpdateSession</span></tt>.</li>
|
|
<li><strong>file_name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – Name of the file to be removed.</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raise :</th><td class="field-body"><p class="first"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.NotFound" title="com.vmware.vapi.std.errors_client.NotFound"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.NotFound</span></tt></a>
|
|
if the update session doesn’t exist.</p>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Raise :</th><td class="field-body"><p class="first last"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.InvalidArgument" title="com.vmware.vapi.std.errors_client.InvalidArgument"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.InvalidArgument</span></tt></a>
|
|
if the file doesn’t exist in the library item associated with the
|
|
update session.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="com.vmware.content.library.item.updatesession_client.File.validate">
|
|
<tt class="descclassname">File.</tt><tt class="descname">validate</tt><big>(</big><em>update_session_id</em><big>)</big><a class="reference internal" href="_modules/com/vmware/content/library/item/updatesession_client.html#File.validate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#com.vmware.content.library.item.updatesession_client.File.validate" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Validates the files in the update session with the referenced
|
|
identifier and ensures all necessary files are received. In the case
|
|
where a file is missing, this method will return its name in the
|
|
<tt class="xref py py-attr docutils literal"><span class="pre">File.ValidationResult.missing_files</span></tt> set. The user can add the
|
|
missing files and try re-validating. For other type of errors,
|
|
<tt class="xref py py-attr docutils literal"><span class="pre">File.ValidationResult.invalid_files</span></tt> will contain the list of
|
|
invalid files.</p>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>update_session_id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – Identifier of the update session to validate.
|
|
The parameter must be an identifier for the resource type:
|
|
<tt class="docutils literal"><span class="pre">com.vmware.content.library.item.UpdateSession</span></tt>.</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#com.vmware.content.library.item.updatesession_client.File.ValidationResult" title="com.vmware.content.library.item.updatesession_client.File.ValidationResult"><tt class="xref py py-class docutils literal"><span class="pre">File.ValidationResult</span></tt></a></td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A validation result containing missing files or invalid files and
|
|
the reason why they are invalid.</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raise :</th><td class="field-body"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.NotFound" title="com.vmware.vapi.std.errors_client.NotFound"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.NotFound</span></tt></a>
|
|
if no update session with the given identifier exists.</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Raise :</th><td class="field-body"><a class="reference internal" href="com.vmware.vapi.std.html#com.vmware.vapi.std.errors_client.NotAllowedInCurrentState" title="com.vmware.vapi.std.errors_client.NotAllowedInCurrentState"><tt class="xref py py-class docutils literal"><span class="pre">com.vmware.vapi.std.errors_client.NotAllowedInCurrentState</span></tt></a>
|
|
if the update session is not in the
|
|
<a class="reference internal" href="com.vmware.content.library.html#com.vmware.content.library.item_client.UpdateSessionModel.State.ACTIVE" title="com.vmware.content.library.item_client.UpdateSessionModel.State.ACTIVE"><tt class="xref py py-attr docutils literal"><span class="pre">com.vmware.content.library.item_client.UpdateSessionModel.State.ACTIVE</span></tt></a>
|
|
state, or if some of the files that will be uploaded by the client
|
|
aren’t received correctly.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sphinxsidebar">
|
|
<div class="sphinxsidebarwrapper">
|
|
<h3><a href="index.html">Table Of Contents</a></h3>
|
|
<ul>
|
|
<li><a class="reference internal" href="#">item Package</a><ul>
|
|
<li><a class="reference internal" href="#id1"><tt class="docutils literal"><span class="pre">item</span></tt> Package</a></li>
|
|
<li><a class="reference internal" href="#module-com.vmware.content.library.item.downloadsession_client"><tt class="docutils literal"><span class="pre">downloadsession_client</span></tt> Module</a></li>
|
|
<li><a class="reference internal" href="#module-com.vmware.content.library.item.updatesession_client"><tt class="docutils literal"><span class="pre">updatesession_client</span></tt> Module</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
<h4>Previous topic</h4>
|
|
<p class="topless"><a href="com.vmware.content.library.html"
|
|
title="previous chapter">library Package</a></p>
|
|
<h4>Next topic</h4>
|
|
<p class="topless"><a href="com.vmware.vapi.html"
|
|
title="next chapter">vapi Package</a></p>
|
|
<h3>This Page</h3>
|
|
<ul class="this-page-menu">
|
|
<li><a href="_sources/com.vmware.content.library.item.txt"
|
|
rel="nofollow">Show Source</a></li>
|
|
</ul>
|
|
<div id="searchbox" style="display: none">
|
|
<h3>Quick search</h3>
|
|
<form class="search" action="search.html" method="get">
|
|
<input type="text" name="q" />
|
|
<input type="submit" value="Go" />
|
|
<input type="hidden" name="check_keywords" value="yes" />
|
|
<input type="hidden" name="area" value="default" />
|
|
</form>
|
|
<p class="searchtip" style="font-size: 90%">
|
|
Enter search terms or a module, class or function name.
|
|
</p>
|
|
</div>
|
|
<script type="text/javascript">$('#searchbox').show(0);</script>
|
|
</div>
|
|
</div>
|
|
<div class="clearer"></div>
|
|
</div>
|
|
<div class="related">
|
|
<h3>Navigation</h3>
|
|
<ul>
|
|
<li class="right" style="margin-right: 10px">
|
|
<a href="genindex.html" title="General Index"
|
|
>index</a></li>
|
|
<li class="right" >
|
|
<a href="py-modindex.html" title="Python Module Index"
|
|
>modules</a> |</li>
|
|
<li class="right" >
|
|
<a href="com.vmware.vapi.html" title="vapi Package"
|
|
>next</a> |</li>
|
|
<li class="right" >
|
|
<a href="com.vmware.content.library.html" title="library Package"
|
|
>previous</a> |</li>
|
|
<li><a href="index.html">vSphere Automation SDK for Python 6.5.0 documentation</a> »</li>
|
|
<li><a href="com.html" >com Package</a> »</li>
|
|
<li><a href="com.vmware.html" >vmware Package</a> »</li>
|
|
<li><a href="com.vmware.content.html" >content Package</a> »</li>
|
|
<li><a href="com.vmware.content.library.html" >library Package</a> »</li>
|
|
</ul>
|
|
</div>
|
|
<div class="footer">
|
|
© Copyright 2014, VMware, Inc..
|
|
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
|
|
</div>
|
|
</body>
|
|
</html> |