<spanid="vmware-vapi-lib-package"></span><h1>vmware.vapi.lib package<aclass="headerlink"href="#module-vmware.vapi.lib"title="Permalink to this headline">¶</a></h1>
<divclass="section"id="submodules">
<h2>Submodules<aclass="headerlink"href="#submodules"title="Permalink to this headline">¶</a></h2>
<spanid="vmware-vapi-lib-connect-module"></span><h2>vmware.vapi.lib.connect module<aclass="headerlink"href="#module-vmware.vapi.lib.connect"title="Permalink to this headline">¶</a></h2>
<codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.lib.connect.</span></code><codeclass="sig-name descname"><spanclass="pre">check_file_exists</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">filename</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.lib.connect.check_file_exists"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.lib.connect.</span></code><codeclass="sig-name descname"><spanclass="pre">get_connector</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">rpc_provider_name</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">msg_protocol</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">ssl_context</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>rpc_provider_name</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – The RPC provider to be used for the connection.
Valid values are ‘http’, ‘https’ and ‘requests’</p></li>
<li><p><strong>msg_protocol</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – The message protocol to be used for the connection.
Valid values are ‘json’.</p></li>
<li><p><strong>ssl_context</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">OpenSSL.SSL.Context</span></code>) – SSL context to use for SSL connections</p></li>
<li><p><strong>kwargs</strong>– Additional arguments for the RPC provider</p></li>
<li><p><strong>msg_protocol</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Message protocol to be used for the connection. Valid
values are ‘json’.</p></li>
<li><p><strong>url</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – HTTP(S) URL to be used</p></li>
<li><p><strong>pool_size</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">int</span></code>) – Connection pool size to be used</p></li>
<li><p><strong>provider_filter_chain</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">list</span></code> of
<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">vmware.vapi.provider.filter.ApiProviderFilter</span></code>) – List of API filters in order they are to be
<codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.lib.connect.</span></code><codeclass="sig-name descname"><spanclass="pre">get_requests_hok_connector</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">session</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">msg_protocol</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">'json'</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">url</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">timeout</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">pool_size</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">8</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.lib.connect.get_requests_hok_connector"title="Permalink to this definition">¶</a></dt>
<dd><p>Create a connection that uses SAML Hok based authentication using ‘requests’
<li><p><strong>msg_protocol</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Message protocol to be used for the connection. Valid
values are ‘json’.</p></li>
<li><p><strong>url</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – HTTP(S) URL to be used</p></li>
<li><p><strong>pool_size</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">int</span></code>) – Connection pool size to be used</p></li>
<codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.lib.connect.</span></code><codeclass="sig-name descname"><spanclass="pre">get_saml_hok_connector</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">rpc_provider_name</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">msg_protocol</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">'json'</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">ssl_context</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>rpc_provider_name</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – The RPC provider to be used for the connection.
Valid values are ‘http’, ‘https’ or ‘requests’</p></li>
<li><p><strong>msg_protocol</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – The message protocol to be used for the connection.
Valid values are ‘json’.</p></li>
<li><p><strong>ssl_context</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">OpenSSL.SSL.Context</span></code>) – SSL context to use for SSL connections</p></li>
<li><p><strong>kwargs</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">dict</span></code> of <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code> and <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">object</span></code>) – Additional arguments for the RPC provider</p></li>