1
0
mirror of https://github.com/vmware/vsphere-automation-sdk-python.git synced 2024-11-29 20:09:58 -05:00
vsphere-automation-sdk-python/vsphere/6.0/vmware.vapi.lib.html

1002 lines
70 KiB
HTML
Raw Normal View History

2018-08-07 19:42:25 -04:00
<!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>lib Package &mdash; vCloud Suite SDK for Python 6.0.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.0.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="vCloud Suite SDK for Python 6.0.0 documentation" href="index.html" />
<link rel="up" title="vapi Package" href="vmware.vapi.html" />
<link rel="next" title="protocol Package" href="vmware.vapi.protocol.html" />
<link rel="prev" title="l10n Package" href="vmware.vapi.l10n.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="vmware.vapi.protocol.html" title="protocol Package"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="vmware.vapi.l10n.html" title="l10n Package"
accesskey="P">previous</a> |</li>
<li><a href="index.html">vCloud Suite SDK for Python 6.0.0 documentation</a> &raquo;</li>
<li><a href="vmware.html" >vmware Package</a> &raquo;</li>
<li><a href="vmware.vapi.html" accesskey="U">vapi Package</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="lib-package">
<h1>lib Package<a class="headerlink" href="#lib-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">lib</span></tt> Package<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<span class="target" id="module-vmware.vapi.lib"></span></div>
<div class="section" id="module-vmware.vapi.lib.addr_url_parser">
<span id="addr-url-parser-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">addr_url_parser</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.lib.addr_url_parser" title="Permalink to this headline"></a></h2>
<p>vAPI configuration addr url parser</p>
<dl class="function">
<dt id="vmware.vapi.lib.addr_url_parser.get_url_scheme">
<tt class="descclassname">vmware.vapi.lib.addr_url_parser.</tt><tt class="descname">get_url_scheme</tt><big>(</big><em>url</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/addr_url_parser.html#get_url_scheme"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.addr_url_parser.get_url_scheme" title="Permalink to this definition"></a></dt>
<dd><p>Get the scheme from the url (as described in <a class="reference external" href="http://www.rabbitmq.com/uri-spec.html">http://www.rabbitmq.com/uri-spec.html</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>url</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; The addr url to parse</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">str</span></tt></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">url scheme</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="vmware.vapi.lib.addr_url_parser.parse_addr_url">
<tt class="descclassname">vmware.vapi.lib.addr_url_parser.</tt><tt class="descname">parse_addr_url</tt><big>(</big><em>url</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/addr_url_parser.html#parse_addr_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.addr_url_parser.parse_addr_url" title="Permalink to this definition"></a></dt>
<dd><p>Parse addr url (as described in <a class="reference external" href="http://www.rabbitmq.com/uri-spec.html">http://www.rabbitmq.com/uri-spec.html</a>)
Note: This fn make no attempt to unescape the url, just like the urlparse</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>url</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; The addr url to parse</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">tuple</span></tt> of (scheme, host, port, user, password, path, query_dict) where scheme: url scheme
host: hostname
port: query_dict is a dictionary of (name, [values])</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Parsed addr url</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.lib.connect">
<span id="connect-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">connect</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.lib.connect" title="Permalink to this headline"></a></h2>
<p>vAPI Connection factory</p>
<dl class="function">
<dt id="vmware.vapi.lib.connect.check_file_exists">
<tt class="descclassname">vmware.vapi.lib.connect.</tt><tt class="descname">check_file_exists</tt><big>(</big><em>filename</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/connect.html#check_file_exists"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.connect.check_file_exists" title="Permalink to this definition"></a></dt>
<dd><p>Check if name is a file and exists</p>
<p>:type <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>
:param file name</p>
</dd></dl>
<dl class="function">
<dt id="vmware.vapi.lib.connect.get_connector">
<tt class="descclassname">vmware.vapi.lib.connect.</tt><tt class="descname">get_connector</tt><big>(</big><em>rpc_provider_name</em>, <em>msg_protocol</em>, <em>ssl_context=None</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/connect.html#get_connector"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.connect.get_connector" title="Permalink to this definition"></a></dt>
<dd><p>Create a connection to the vAPI Provider using the specified arguments</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>rpc_provider_name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; The RPC provider to be used for the connection.
Valid values are &#8216;http&#8217;, &#8216;https&#8217; and &#8216;requests&#8217;</li>
<li><strong>msg_protocol</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; The message protocol to be used for the connection.
Valid values are &#8216;json&#8217;.</li>
<li><strong>ssl_context</strong> (<tt class="xref py py-class docutils literal"><span class="pre">OpenSSL.SSL.Context</span></tt>) &#8211; SSL context to use for SSL connections</li>
<li><strong>kwargs</strong> &#8211; Additional arguments for the RPC provider</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="vmware.vapi.protocol.client.html#vmware.vapi.protocol.client.connector.Connector" title="vmware.vapi.protocol.client.connector.Connector"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.protocol.client.connector.Connector</span></tt></a></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Connection to the vAPI provider</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="vmware.vapi.lib.connect.get_requests_connector">
<tt class="descclassname">vmware.vapi.lib.connect.</tt><tt class="descname">get_requests_connector</tt><big>(</big><em>session</em>, <em>msg_protocol='json'</em>, <em>url=None</em>, <em>timeout=None</em>, <em>pool_size=8</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/connect.html#get_requests_connector"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.connect.get_requests_connector" title="Permalink to this definition"></a></dt>
<dd><p>Create a connection that uses &#8216;requests&#8217; library for http connections</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>session</strong> (<tt class="xref py py-class docutils literal"><span class="pre">requests.Session</span></tt>) &#8211; Session object</li>
<li><strong>msg_protocol</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; Message protocol to be used for the connection. Valid
values are &#8216;json&#8217;.</li>
<li><strong>url</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; HTTP(S) URL to be used</li>
<li><strong>timeout</strong> (<tt class="xref py py-class docutils literal"><span class="pre">int</span></tt>) &#8211; Request timeout</li>
<li><strong>pool_size</strong> (<tt class="xref py py-class docutils literal"><span class="pre">int</span></tt>) &#8211; Connection pool size to be used</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="vmware.vapi.protocol.client.html#vmware.vapi.protocol.client.connector.Connector" title="vmware.vapi.protocol.client.connector.Connector"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.protocol.client.connector.Connector</span></tt></a></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Connection to the vAPI provider</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="vmware.vapi.lib.connect.get_saml_hok_connector">
<tt class="descclassname">vmware.vapi.lib.connect.</tt><tt class="descname">get_saml_hok_connector</tt><big>(</big><em>rpc_provider_name</em>, <em>msg_protocol='json'</em>, <em>ssl_context=None</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/connect.html#get_saml_hok_connector"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.connect.get_saml_hok_connector" title="Permalink to this definition"></a></dt>
<dd><p>Create a connection that uses SAML Hok based authentication
to connect to a vAPI Provider</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>rpc_provider_name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; The RPC provider to be used for the connection.
Valid values are &#8216;http&#8217;, &#8216;https&#8217; or &#8216;requests&#8217;</li>
<li><strong>msg_protocol</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; The message protocol to be used for the connection.
Valid values are &#8216;json&#8217;.</li>
<li><strong>ssl_context</strong> (<tt class="xref py py-class docutils literal"><span class="pre">OpenSSL.SSL.Context</span></tt>) &#8211; SSL context to use for SSL connections</li>
<li><strong>kwargs</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt> of <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> and <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt>) &#8211; Additional arguments for the RPC provider</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="vmware.vapi.protocol.client.html#vmware.vapi.protocol.client.connector.Connector" title="vmware.vapi.protocol.client.connector.Connector"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.protocol.client.connector.Connector</span></tt></a></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Connection to the vAPI provider</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.lib.constants">
<span id="constants-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">constants</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.lib.constants" title="Permalink to this headline"></a></h2>
<p>String Constants used in vAPI runtime</p>
<dl class="class">
<dt id="vmware.vapi.lib.constants.Introspection">
<em class="property">class </em><tt class="descclassname">vmware.vapi.lib.constants.</tt><tt class="descname">Introspection</tt><a class="reference internal" href="_modules/vmware/vapi/lib/constants.html#Introspection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.constants.Introspection" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>String constants used in introsection service</p>
<dl class="attribute">
<dt id="vmware.vapi.lib.constants.Introspection.DATA_DEFINITION">
<tt class="descname">DATA_DEFINITION</tt><em class="property"> = 'com.vmware.vapi.std.introspection.operation.data_definition'</em><a class="headerlink" href="#vmware.vapi.lib.constants.Introspection.DATA_DEFINITION" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="vmware.vapi.lib.constants.Introspection.OPERATION_SVC">
<tt class="descname">OPERATION_SVC</tt><em class="property"> = 'com.vmware.vapi.std.introspection.operation'</em><a class="headerlink" href="#vmware.vapi.lib.constants.Introspection.OPERATION_SVC" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="vmware.vapi.lib.constants.Introspection.PACKAGE">
<tt class="descname">PACKAGE</tt><em class="property"> = 'com.vmware.vapi.std.introspection'</em><a class="headerlink" href="#vmware.vapi.lib.constants.Introspection.PACKAGE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="vmware.vapi.lib.constants.Introspection.PROVIDER_SVC">
<tt class="descname">PROVIDER_SVC</tt><em class="property"> = 'com.vmware.vapi.std.introspection.provider'</em><a class="headerlink" href="#vmware.vapi.lib.constants.Introspection.PROVIDER_SVC" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="vmware.vapi.lib.constants.Introspection.SERVICE_SVC">
<tt class="descname">SERVICE_SVC</tt><em class="property"> = 'com.vmware.vapi.std.introspection.service'</em><a class="headerlink" href="#vmware.vapi.lib.constants.Introspection.SERVICE_SVC" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.lib.context">
<span id="context-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">context</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.lib.context" title="Permalink to this headline"></a></h2>
<p>Factory methods for creating application context</p>
<dl class="function">
<dt id="vmware.vapi.lib.context.create_default_application_context">
<tt class="descclassname">vmware.vapi.lib.context.</tt><tt class="descname">create_default_application_context</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/context.html#create_default_application_context"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.context.create_default_application_context" title="Permalink to this definition"></a></dt>
<dd><p>Create a default application context. The
created context will only have opId.</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">Return type:</th><td class="field-body"><a class="reference internal" href="vmware.vapi.html#vmware.vapi.core.ApplicationContext" title="vmware.vapi.core.ApplicationContext"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.core.ApplicationContext</span></tt></a></td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Newly created application context</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.lib.converter">
<span id="converter-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">converter</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.lib.converter" title="Permalink to this headline"></a></h2>
<p>Convenience methods for converting variable names</p>
<dl class="class">
<dt id="vmware.vapi.lib.converter.Converter">
<em class="property">class </em><tt class="descclassname">vmware.vapi.lib.converter.</tt><tt class="descname">Converter</tt><a class="reference internal" href="_modules/vmware/vapi/lib/converter.html#Converter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.converter.Converter" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Convenience methods for converting variable names</p>
<dl class="staticmethod">
<dt id="vmware.vapi.lib.converter.Converter.canonical_to_pep">
<em class="property">static </em><tt class="descname">canonical_to_pep</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/converter.html#Converter.canonical_to_pep"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.converter.Converter.canonical_to_pep" title="Permalink to this definition"></a></dt>
<dd><p>Converts the argument from vAPI canonical format to PEP8 compliant
parameter or attribute name</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>name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; The string to be converted</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">str</span></tt></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The converted string</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="staticmethod">
<dt id="vmware.vapi.lib.converter.Converter.capitalize">
<em class="property">static </em><tt class="descname">capitalize</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/converter.html#Converter.capitalize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.converter.Converter.capitalize" title="Permalink to this definition"></a></dt>
<dd><p>Capitalize the first letter of the name</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>name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; name to be converted</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">str</span></tt></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">name with first letter capitalized</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="staticmethod">
<dt id="vmware.vapi.lib.converter.Converter.capwords_to_underscore">
<em class="property">static </em><tt class="descname">capwords_to_underscore</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/converter.html#Converter.capwords_to_underscore"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.converter.Converter.capwords_to_underscore" title="Permalink to this definition"></a></dt>
<dd><p>Convert from CapWords to lower_case_with_underscore format</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>name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; name in CapWords format</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">str</span></tt></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">name in lower_case_with_underscore format</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="staticmethod">
<dt id="vmware.vapi.lib.converter.Converter.mixedcase_to_underscore">
<em class="property">static </em><tt class="descname">mixedcase_to_underscore</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/converter.html#Converter.mixedcase_to_underscore"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.converter.Converter.mixedcase_to_underscore" title="Permalink to this definition"></a></dt>
<dd><p>Convert from mixedCase to lower_case_with_underscore format</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>name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; name in mixedCase format</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">str</span></tt></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">name in lower_case_with_underscore format</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="staticmethod">
<dt id="vmware.vapi.lib.converter.Converter.pepify">
<em class="property">static </em><tt class="descname">pepify</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/converter.html#Converter.pepify"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.converter.Converter.pepify" title="Permalink to this definition"></a></dt>
<dd><p>Converts the argument into a name that conforms to PEP8 standard.
i.e. lower_case_with_underscore</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>name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; The string to be converted</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">str</span></tt></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The converted string</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="staticmethod">
<dt id="vmware.vapi.lib.converter.Converter.uncapitalize">
<em class="property">static </em><tt class="descname">uncapitalize</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/converter.html#Converter.uncapitalize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.converter.Converter.uncapitalize" title="Permalink to this definition"></a></dt>
<dd><p>Uncapitalize the first letter of the name</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>name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; name to be converted</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">str</span></tt></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">name with first letter uncapitalized</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="staticmethod">
<dt id="vmware.vapi.lib.converter.Converter.underscore_to_capwords">
<em class="property">static </em><tt class="descname">underscore_to_capwords</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/converter.html#Converter.underscore_to_capwords"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.converter.Converter.underscore_to_capwords" title="Permalink to this definition"></a></dt>
<dd><p>Convert from lower_case_with_underscore to CapWords format</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>name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; name in lower_case_with_underscore</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">str</span></tt></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">name in CapWords</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="staticmethod">
<dt id="vmware.vapi.lib.converter.Converter.underscore_to_mixedcase">
<em class="property">static </em><tt class="descname">underscore_to_mixedcase</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/converter.html#Converter.underscore_to_mixedcase"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.converter.Converter.underscore_to_mixedcase" title="Permalink to this definition"></a></dt>
<dd><p>Convert from lower_case_with_underscore to mixedCase format</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>name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; name in lower_case_with_underscore</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">str</span></tt></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">name in mixedCase</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="staticmethod">
<dt id="vmware.vapi.lib.converter.Converter.unreserve_name">
<em class="property">static </em><tt class="descname">unreserve_name</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/converter.html#Converter.unreserve_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.converter.Converter.unreserve_name" title="Permalink to this definition"></a></dt>
<dd><p>Converts the argument if it clashes with a python keyword. If the string
matches a keyword, adds a trailing underscore, else it returns the same
string</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>name</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; The string to be converted</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">str</span></tt></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">The converted string</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.lib.fingerprint">
<span id="fingerprint-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">fingerprint</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.lib.fingerprint" title="Permalink to this headline"></a></h2>
<p>Fingerprint related functions</p>
<dl class="function">
<dt id="vmware.vapi.lib.fingerprint.generate_fingerprint">
<tt class="descclassname">vmware.vapi.lib.fingerprint.</tt><tt class="descname">generate_fingerprint</tt><big>(</big><em>data</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/fingerprint.html#generate_fingerprint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.fingerprint.generate_fingerprint" title="Permalink to this definition"></a></dt>
<dd><p>Generate fingerprint for the given data</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">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">str</span></tt></td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">fingerprint of the given data</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.lib.load">
<span id="load-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">load</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.lib.load" title="Permalink to this headline"></a></h2>
<p>Convenience methods for dynamic loading</p>
<dl class="function">
<dt id="vmware.vapi.lib.load.dynamic_import">
<tt class="descclassname">vmware.vapi.lib.load.</tt><tt class="descname">dynamic_import</tt><big>(</big><em>constructor</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/load.html#dynamic_import"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.load.dynamic_import" title="Permalink to this definition"></a></dt>
<dd><p>Dynamically import a module and get the specified module attribute</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>constructor</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; Fully qualified module attribute</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Python object</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="vmware.vapi.lib.load.import_multiple_classes">
<tt class="descclassname">vmware.vapi.lib.load.</tt><tt class="descname">import_multiple_classes</tt><big>(</big><em>section</em>, <em>property_key</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/load.html#import_multiple_classes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.load.import_multiple_classes" title="Permalink to this definition"></a></dt>
<dd><p>Import multiple class names provided in the config 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>section</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; Name of the section in the config file</li>
<li><strong>property_key</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; Name of the property in the config file</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><tt class="xref py py-class docutils literal"><span class="pre">list</span></tt> of <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">List of class references</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.lib.profiler">
<span id="profiler-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">profiler</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.lib.profiler" title="Permalink to this headline"></a></h2>
<p>Convenience methods for loading the profiler</p>
<dl class="function">
<dt id="vmware.vapi.lib.profiler.mock_profile">
<tt class="descclassname">vmware.vapi.lib.profiler.</tt><tt class="descname">mock_profile</tt><big>(</big><em>func</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/profiler.html#mock_profile"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.profiler.mock_profile" title="Permalink to this definition"></a></dt>
<dd><p>Mock decorator that is used when the PROFILER is not set</p>
</dd></dl>
<dl class="function">
<dt id="vmware.vapi.lib.profiler.profile">
<tt class="descclassname">vmware.vapi.lib.profiler.</tt><tt class="descname">profile</tt><big>(</big><em>func</em><big>)</big><a class="headerlink" href="#vmware.vapi.lib.profiler.profile" title="Permalink to this definition"></a></dt>
<dd><p>Mock decorator that is used when the PROFILER is not set</p>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.lib.ssl">
<span id="ssl-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">ssl</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.lib.ssl" title="Permalink to this headline"></a></h2>
<p>SSL Context factories</p>
<dl class="class">
<dt id="vmware.vapi.lib.ssl.ClientContextFactory">
<em class="property">class </em><tt class="descclassname">vmware.vapi.lib.ssl.</tt><tt class="descname">ClientContextFactory</tt><a class="reference internal" href="_modules/vmware/vapi/lib/ssl.html#ClientContextFactory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.ssl.ClientContextFactory" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Context factory base class. This class should be used to set the
SSL options</p>
<dl class="method">
<dt id="vmware.vapi.lib.ssl.ClientContextFactory.get_context">
<tt class="descname">get_context</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/ssl.html#ClientContextFactory.get_context"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.ssl.ClientContextFactory.get_context" title="Permalink to this definition"></a></dt>
<dd><p>Returns the SSL context</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="vmware.vapi.lib.ssl.DefaultClientContextFactory">
<em class="property">class </em><tt class="descclassname">vmware.vapi.lib.ssl.</tt><tt class="descname">DefaultClientContextFactory</tt><big>(</big><em>certificate=None</em>, <em>private_key=None</em>, <em>ca_certs=None</em>, <em>ca_certs_dir=None</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/ssl.html#DefaultClientContextFactory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.ssl.DefaultClientContextFactory" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#vmware.vapi.lib.ssl.ClientContextFactory" title="vmware.vapi.lib.ssl.ClientContextFactory"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.lib.ssl.ClientContextFactory</span></tt></a></p>
<p>Default SSL context class. This chooses some default options for SSL context.
Clients can retrieve the context.</p>
<p>To modify the context and set some options directly. Create a class like below
and set the options. Pass this to the get_connector function</p>
<dl class="docutils">
<dt>class CustomClientContextFactory(DefaultClientContextFactory):</dt>
<dd><dl class="first last docutils">
<dt>def getContext(self):</dt>
<dd>ctx = DefaultClientContextFactory.getContext(self)
# modify ctx
return ctx</dd>
</dl>
</dd>
</dl>
<p>Initialize DefaultClientContextFactory</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 last simple">
<li><strong>certificate</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; File path of the certificate</li>
<li><strong>private_key</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; File path of the private key</li>
<li><strong>ca_certs</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; File path of ca certificates</li>
<li><strong>ca_certs_dir</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; Directory prepared using the c_rehash tool
included with OpenSSL</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="vmware.vapi.lib.ssl.DefaultClientContextFactory.get_context">
<tt class="descname">get_context</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/ssl.html#DefaultClientContextFactory.get_context"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.ssl.DefaultClientContextFactory.get_context" title="Permalink to this definition"></a></dt>
<dd><p>Returns the SSL context</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">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">OpenSSL.SSL.Context</span></tt></td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">SSL context</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.lib.std">
<span id="std-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">std</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.lib.std" title="Permalink to this headline"></a></h2>
<p>Helper functions for manipulating vAPI runtime objects corresponding to
the standard types (e.g. LocalizableMessage) and errors</p>
<dl class="function">
<dt id="vmware.vapi.lib.std.make_error_value_from_error_value_and_msgs">
<tt class="descclassname">vmware.vapi.lib.std.</tt><tt class="descname">make_error_value_from_error_value_and_msgs</tt><big>(</big><em>error_def</em>, <em>cause</em>, <em>*msg_list</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/std.html#make_error_value_from_error_value_and_msgs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.std.make_error_value_from_error_value_and_msgs" title="Permalink to this definition"></a></dt>
<dd><p>Create an error result for a &#8220;standard&#8221; error from a cause ErrorValue
and an list of messages.</p>
<p>The list of message will be prepended to the messages from the cause
(if any).</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>error_def</strong> (<tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.type.ErrorDefinition</span></tt>) &#8211; ErrorDefintion for the error</li>
<li><strong>cause</strong> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.ErrorValue" title="vmware.vapi.data.value.ErrorValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.ErrorValue</span></tt></a>) &#8211; Lower level ErrorValue that &#8220;caused&#8221; the error</li>
<li><strong>msg_list</strong> (<tt class="xref py py-class docutils literal"><span class="pre">list</span></tt> of <a class="reference internal" href="vmware.vapi.html#vmware.vapi.message.Message" title="vmware.vapi.message.Message"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.message.Message</span></tt></a>) &#8211; list of localizable messages</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="vmware.vapi.data.html#vmware.vapi.data.value.ErrorValue" title="vmware.vapi.data.value.ErrorValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.ErrorValue</span></tt></a></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">ErrorValue containing a single message</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="vmware.vapi.lib.std.make_error_value_from_msg_id">
<tt class="descclassname">vmware.vapi.lib.std.</tt><tt class="descname">make_error_value_from_msg_id</tt><big>(</big><em>error_def</em>, <em>msg_id</em>, <em>*args</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/std.html#make_error_value_from_msg_id"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.std.make_error_value_from_msg_id" title="Permalink to this definition"></a></dt>
<dd><p>Create an error result for a &#8220;standard&#8221; error</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>error_def</strong> (<tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.type.ErrorDefinition</span></tt>) &#8211; ErrorDefintion for the error</li>
<li><strong>msg_id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; Message identifier</li>
<li><strong>args</strong> (<tt class="xref py py-class docutils literal"><span class="pre">list</span></tt> of <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; Argument list for constructing a Message</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="vmware.vapi.data.html#vmware.vapi.data.value.ErrorValue" title="vmware.vapi.data.value.ErrorValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.ErrorValue</span></tt></a></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">ErrorValue containing a single message</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="vmware.vapi.lib.std.make_error_value_from_msgs">
<tt class="descclassname">vmware.vapi.lib.std.</tt><tt class="descname">make_error_value_from_msgs</tt><big>(</big><em>error_def</em>, <em>*msg_list</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/std.html#make_error_value_from_msgs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.std.make_error_value_from_msgs" title="Permalink to this definition"></a></dt>
<dd><p>Create an error result for a &#8220;standard&#8221; error</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>error_def</strong> (<tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.type.ErrorDefinition</span></tt>) &#8211; ErrorDefintion for the error</li>
<li><strong>msg_list</strong> (<tt class="xref py py-class docutils literal"><span class="pre">list</span></tt> of <a class="reference internal" href="vmware.vapi.html#vmware.vapi.message.Message" title="vmware.vapi.message.Message"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.message.Message</span></tt></a>) &#8211; list of localizable messages</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="vmware.vapi.data.html#vmware.vapi.data.value.ErrorValue" title="vmware.vapi.data.value.ErrorValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.ErrorValue</span></tt></a></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">ErrorValue containing a single message</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="function">
<dt id="vmware.vapi.lib.std.make_std_error_def">
<tt class="descclassname">vmware.vapi.lib.std.</tt><tt class="descname">make_std_error_def</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/std.html#make_std_error_def"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.std.make_std_error_def" title="Permalink to this definition"></a></dt>
<dd><p>Internal function to create a &#8220;standard&#8221; ErrorDefinition for use only by
the vAPI runtime.
:type name: <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>
:param args: Fully qualified name of the standard error type
:rtype: <a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.definition.ErrorDefinition" title="vmware.vapi.data.definition.ErrorDefinition"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.definition.ErrorDefinition</span></tt></a>
:return: ErrorDefinition containing a single message field</p>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.lib.thread_pool">
<span id="thread-pool-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">thread_pool</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.lib.thread_pool" title="Permalink to this headline"></a></h2>
<p>This module is YATP (Yet another thread pool)</p>
<dl class="class">
<dt id="vmware.vapi.lib.thread_pool.ThreadPool">
<em class="property">class </em><tt class="descclassname">vmware.vapi.lib.thread_pool.</tt><tt class="descname">ThreadPool</tt><big>(</big><em>min_workers=1</em>, <em>max_workers=8</em>, <em>idle_timeout=300</em>, <em>logger=None</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/thread_pool.html#ThreadPool"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.thread_pool.ThreadPool" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Thread pool</p>
<p>Thread pool constructor</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" colspan="2">Params min_workers:</th></tr>
<tr class="field-odd field"><td>&nbsp;</td><td class="field-body">Min number of worker threads</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">Params max_workers:</th></tr>
<tr class="field-even field"><td>&nbsp;</td><td class="field-body">Max number of worker threads</td>
</tr>
<tr class="field-odd field"><th class="field-name" colspan="2">Params idle_timeout:</th></tr>
<tr class="field-odd field"><td>&nbsp;</td><td class="field-body">Worker threads idle timeout</td>
</tr>
<tr class="field-even field"><th class="field-name">Params logger:</th><td class="field-body">logger to use. Default to stdout</td>
</tr>
</tbody>
</table>
<dl class="staticmethod">
<dt id="vmware.vapi.lib.thread_pool.ThreadPool.normalize_works">
<em class="property">static </em><tt class="descname">normalize_works</tt><big>(</big><em>works</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/thread_pool.html#ThreadPool.normalize_works"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.thread_pool.ThreadPool.normalize_works" title="Permalink to this definition"></a></dt>
<dd><p>Generator to return work in normalize form: (fn, args, kwargs)</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>works</strong> (<em>iteratable of fn / (fn, args) / (fn, args, kwargs)</em>) &#8211; An iteratable of possible functor form</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">tuple</span></tt> of (fn, args, kwargs)</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A normalize tuple of (functor, args, kwargs)</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="vmware.vapi.lib.thread_pool.ThreadPool.queue_work">
<tt class="descname">queue_work</tt><big>(</big><em>fn</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/thread_pool.html#ThreadPool.queue_work"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.thread_pool.ThreadPool.queue_work" title="Permalink to this definition"></a></dt>
<dd><p>Queue work</p>
<p>Returns a work_item when work is queued to work queue
The work will start when a ready worker is available to process the work
User could call {work_item}.join() to wait for the work item to finish</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>fn</strong> (<em>function</em>) &#8211; Work item functor</li>
<li><strong>args</strong> (<tt class="xref py py-class docutils literal"><span class="pre">tuple</span></tt>) &#8211; Work item functor positional parameters</li>
<li><strong>kwargs</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) &#8211; Work item functor key-value parameters</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="#vmware.vapi.lib.thread_pool.WorkItem" title="vmware.vapi.lib.thread_pool.WorkItem"><tt class="xref py py-class docutils literal"><span class="pre">WorkItem</span></tt></a></p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">work item when work is queued to work queue</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="vmware.vapi.lib.thread_pool.ThreadPool.queue_work_and_wait">
<tt class="descname">queue_work_and_wait</tt><big>(</big><em>fn</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/thread_pool.html#ThreadPool.queue_work_and_wait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.thread_pool.ThreadPool.queue_work_and_wait" title="Permalink to this definition"></a></dt>
<dd><p>Queue a work and wait until the work is completed / error out</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>fn</strong> (<em>function</em>) &#8211; Work item functor</li>
<li><strong>args</strong> (<tt class="xref py py-class docutils literal"><span class="pre">tuple</span></tt>) &#8211; Work item functor positional parameters</li>
<li><strong>kwargs</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) &#8211; Work item functor key-value parameters</li>
</ul>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><tt class="xref py py-class docutils literal"><span class="pre">tuple</span></tt> of (<tt class="xref py py-class docutils literal"><span class="pre">bool</span></tt>, <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt>) or (<tt class="xref py py-class docutils literal"><span class="pre">bool</span></tt>, <tt class="xref py py-class docutils literal"><span class="pre">Exception</span></tt>)</p>
</td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">(True, return val) / (False, exception) when work is done</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="vmware.vapi.lib.thread_pool.ThreadPool.queue_works_and_wait">
<tt class="descname">queue_works_and_wait</tt><big>(</big><em>works</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/thread_pool.html#ThreadPool.queue_works_and_wait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.thread_pool.ThreadPool.queue_works_and_wait" title="Permalink to this definition"></a></dt>
<dd><p>Queue a brunch of works and wait until all works are completed / error
out</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>works</strong> (<em>iteratable of fn / (fn, args) / (fn, args, kwargs)</em>) &#8211; An iteratable of possible functor form</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">list</span></tt> of {tuple} of <tt class="xref py py-class docutils literal"><span class="pre">bool</span></tt>,:class:<cite>object</cite> or <tt class="xref py py-class docutils literal"><span class="pre">bool</span></tt>,:class:<cite>Exception</cite></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">A list of (True, return val) / (False, exception) when all works done</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="vmware.vapi.lib.thread_pool.ThreadPool.shutdown">
<tt class="descname">shutdown</tt><big>(</big><em>no_wait=False</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/thread_pool.html#ThreadPool.shutdown"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.thread_pool.ThreadPool.shutdown" title="Permalink to this definition"></a></dt>
<dd><p>Shuthdown this thread pool</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>no_wait</strong> (<tt class="xref py py-class docutils literal"><span class="pre">bool</span></tt>) &#8211; Set to True to return immediately without waiting for all workers to quit</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="vmware.vapi.lib.thread_pool.WorkItem">
<em class="property">class </em><tt class="descclassname">vmware.vapi.lib.thread_pool.</tt><tt class="descname">WorkItem</tt><big>(</big><em>fn</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/thread_pool.html#WorkItem"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.thread_pool.WorkItem" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Work item</p>
<p>Work item constructor</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 last simple">
<li><strong>fn</strong> (<em>function</em>) &#8211; Work item functor</li>
<li><strong>args</strong> (<tt class="xref py py-class docutils literal"><span class="pre">tuple</span></tt>) &#8211; Work item functor positional parameters</li>
<li><strong>kwargs</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) &#8211; Work item functor key-value parameters</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="vmware.vapi.lib.thread_pool.WorkItem.done">
<tt class="descname">done</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/thread_pool.html#WorkItem.done"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.thread_pool.WorkItem.done" title="Permalink to this definition"></a></dt>
<dd><p>Signal work item is done</p>
</dd></dl>
<dl class="method">
<dt id="vmware.vapi.lib.thread_pool.WorkItem.join">
<tt class="descname">join</tt><big>(</big><em>timeout=inf</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/thread_pool.html#WorkItem.join"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.thread_pool.WorkItem.join" title="Permalink to this definition"></a></dt>
<dd><p>Wait for work item is done</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>timeout</strong> (<tt class="xref py py-class docutils literal"><span class="pre">float</span></tt>) &#8211; Timeout in seconds</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Work item functor&#8217;s return value</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.lib.visitor">
<span id="visitor-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">visitor</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.lib.visitor" title="Permalink to this headline"></a></h2>
<p>Visitor helper class</p>
<dl class="class">
<dt id="vmware.vapi.lib.visitor.VapiVisitor">
<em class="property">class </em><tt class="descclassname">vmware.vapi.lib.visitor.</tt><tt class="descname">VapiVisitor</tt><big>(</big><em>suffix=None</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/visitor.html#VapiVisitor"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.visitor.VapiVisitor" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Convenience class for visitors used in vAPI Python runtime</p>
<p>Initialize VapiVisitor</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>suffix</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; The suffix string that should be removed from
class name during the dispatch</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="vmware.vapi.lib.visitor.VapiVisitor.visit">
<tt class="descname">visit</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/visitor.html#VapiVisitor.visit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.visitor.VapiVisitor.visit" title="Permalink to this definition"></a></dt>
<dd><p>Dispatch the call to the appropriate method based
on the type of the input argument</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>value</strong> (<tt class="xref py py-class docutils literal"><span class="pre">object</span></tt>) &#8211; The object to be used for dispatch</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.lib.workers_pool">
<span id="workers-pool-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">workers_pool</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.lib.workers_pool" title="Permalink to this headline"></a></h2>
<p>Workers thread pool</p>
<dl class="function">
<dt id="vmware.vapi.lib.workers_pool.get_workers_pool">
<tt class="descclassname">vmware.vapi.lib.workers_pool.</tt><tt class="descname">get_workers_pool</tt><big>(</big><em>pool_tag</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/lib/workers_pool.html#get_workers_pool"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.lib.workers_pool.get_workers_pool" title="Permalink to this definition"></a></dt>
<dd><p>get workers pool</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>pool_tag</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; workers pool tag</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body"><a class="reference internal" href="#vmware.vapi.lib.thread_pool.ThreadPool" title="vmware.vapi.lib.thread_pool.ThreadPool"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.lib.thread_pool.ThreadPool</span></tt></a></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">workers pool</td>
</tr>
</tbody>
</table>
</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="#">lib Package</a><ul>
<li><a class="reference internal" href="#id1"><tt class="docutils literal"><span class="pre">lib</span></tt> Package</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.lib.addr_url_parser"><tt class="docutils literal"><span class="pre">addr_url_parser</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.lib.connect"><tt class="docutils literal"><span class="pre">connect</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.lib.constants"><tt class="docutils literal"><span class="pre">constants</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.lib.context"><tt class="docutils literal"><span class="pre">context</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.lib.converter"><tt class="docutils literal"><span class="pre">converter</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.lib.fingerprint"><tt class="docutils literal"><span class="pre">fingerprint</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.lib.load"><tt class="docutils literal"><span class="pre">load</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.lib.profiler"><tt class="docutils literal"><span class="pre">profiler</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.lib.ssl"><tt class="docutils literal"><span class="pre">ssl</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.lib.std"><tt class="docutils literal"><span class="pre">std</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.lib.thread_pool"><tt class="docutils literal"><span class="pre">thread_pool</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.lib.visitor"><tt class="docutils literal"><span class="pre">visitor</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.lib.workers_pool"><tt class="docutils literal"><span class="pre">workers_pool</span></tt> Module</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="vmware.vapi.l10n.html"
title="previous chapter">l10n Package</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="vmware.vapi.protocol.html"
title="next chapter">protocol Package</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/vmware.vapi.lib.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="vmware.vapi.protocol.html" title="protocol Package"
>next</a> |</li>
<li class="right" >
<a href="vmware.vapi.l10n.html" title="l10n Package"
>previous</a> |</li>
<li><a href="index.html">vCloud Suite SDK for Python 6.0.0 documentation</a> &raquo;</li>
<li><a href="vmware.html" >vmware Package</a> &raquo;</li>
<li><a href="vmware.vapi.html" >vapi Package</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2014, VMware, Inc..
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>