1
0
mirror of https://github.com/vmware/vsphere-automation-sdk-python.git synced 2024-11-29 12:00:00 -05:00
vsphere-automation-sdk-python/vsphere/6.5/vmware.vapi.protocol.client.rpc.html

540 lines
38 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>rpc Package &mdash; 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="client Package" href="vmware.vapi.protocol.client.html" />
<link rel="next" title="common Package" href="vmware.vapi.protocol.common.html" />
<link rel="prev" title="msg Package" href="vmware.vapi.protocol.client.msg.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.common.html" title="common Package"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="vmware.vapi.protocol.client.msg.html" title="msg Package"
accesskey="P">previous</a> |</li>
<li><a href="index.html">vSphere Automation SDK for Python 6.5.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>
<li><a href="vmware.vapi.protocol.html" >protocol Package</a> &raquo;</li>
<li><a href="vmware.vapi.protocol.client.html" accesskey="U">client Package</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="rpc-package">
<h1>rpc Package<a class="headerlink" href="#rpc-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">rpc</span></tt> Package<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h2>
<span class="target" id="module-vmware.vapi.protocol.client.rpc"></span></div>
<div class="section" id="module-vmware.vapi.protocol.client.rpc.http_provider">
<span id="http-provider-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">http_provider</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.protocol.client.rpc.http_provider" title="Permalink to this headline"></a></h2>
<p>Http protocol rpc provider</p>
<dl class="class">
<dt id="vmware.vapi.protocol.client.rpc.http_provider.GzipReader">
<em class="property">class </em><tt class="descclassname">vmware.vapi.protocol.client.rpc.http_provider.</tt><tt class="descname">GzipReader</tt><big>(</big><em>rfile</em>, <em>encoding=1</em>, <em>read_chunk_size=512</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/http_provider.html#GzipReader"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.http_provider.GzipReader" 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>Gzip reader</p>
<p>Gzip reader init</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>rfile</strong> (<tt class="xref py py-class docutils literal"><span class="pre">file</span></tt>) &#8211; file object to read from</li>
<li><strong>encoding</strong> (<tt class="xref py py-class docutils literal"><span class="pre">int</span></tt> (<tt class="docutils literal"><span class="pre">GzipReader.GZIP</span></tt> or <tt class="docutils literal"><span class="pre">GzipReader.DEFLATE</span></tt>)) &#8211; Zip stream encoding enum</li>
<li><strong>read_chunk_size</strong> (<tt class="xref py py-class docutils literal"><span class="pre">int</span></tt>) &#8211; Read chunk size</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="attribute">
<dt id="vmware.vapi.protocol.client.rpc.http_provider.GzipReader.DEFLATE">
<tt class="descname">DEFLATE</tt><em class="property"> = 2</em><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.http_provider.GzipReader.DEFLATE" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="attribute">
<dt id="vmware.vapi.protocol.client.rpc.http_provider.GzipReader.GZIP">
<tt class="descname">GZIP</tt><em class="property"> = 1</em><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.http_provider.GzipReader.GZIP" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="vmware.vapi.protocol.client.rpc.http_provider.GzipReader.read">
<tt class="descname">read</tt><big>(</big><em>num_bytes=-1</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/http_provider.html#GzipReader.read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.http_provider.GzipReader.read" title="Permalink to this definition"></a></dt>
<dd><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>num_bytes</strong> (<tt class="xref py py-class docutils literal"><span class="pre">int</span></tt>) &#8211; Number of decompressed bytes to read</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">bytes</span></tt></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Decompressed data (len up to num_bytes)</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="vmware.vapi.protocol.client.rpc.http_provider.HttpRpcProvider">
<em class="property">class </em><tt class="descclassname">vmware.vapi.protocol.client.rpc.http_provider.</tt><tt class="descname">HttpRpcProvider</tt><big>(</big><em>ssl_args</em>, <em>url</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/http_provider.html#HttpRpcProvider"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.http_provider.HttpRpcProvider" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#vmware.vapi.protocol.client.rpc.provider.RpcProvider" title="vmware.vapi.protocol.client.rpc.provider.RpcProvider"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.protocol.client.rpc.provider.RpcProvider</span></tt></a></p>
<p>http rpc provider</p>
<p>http rpc provider init</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>ssl_args</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) &#8211; ssl arguments</li>
<li><strong>url</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; url to connected to</li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="vmware.vapi.protocol.client.rpc.http_provider.HttpRpcProvider.connect">
<tt class="descname">connect</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/http_provider.html#HttpRpcProvider.connect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.http_provider.HttpRpcProvider.connect" title="Permalink to this definition"></a></dt>
<dd><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.protocol.client.rpc.provider.RpcProvider" title="vmware.vapi.protocol.client.rpc.provider.RpcProvider"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.protocol.client.rpc.provider.RpcProvider</span></tt></a></td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">http rpc provider</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="staticmethod">
<dt id="vmware.vapi.protocol.client.rpc.http_provider.HttpRpcProvider.disable_nagle">
<em class="property">static </em><tt class="descname">disable_nagle</tt><big>(</big><em>conn</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/http_provider.html#HttpRpcProvider.disable_nagle"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.http_provider.HttpRpcProvider.disable_nagle" title="Permalink to this definition"></a></dt>
<dd><p>disable nagle algorithm for a connection</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>conn</strong> (<tt class="xref py py-class docutils literal"><span class="pre">http_client.HTTPConnection</span></tt>) &#8211; http connection</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="vmware.vapi.protocol.client.rpc.http_provider.HttpRpcProvider.disconnect">
<tt class="descname">disconnect</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/http_provider.html#HttpRpcProvider.disconnect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.http_provider.HttpRpcProvider.disconnect" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="vmware.vapi.protocol.client.rpc.http_provider.HttpRpcProvider.do_request">
<tt class="descname">do_request</tt><big>(</big><em>request_ctx</em>, <em>request</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/http_provider.html#HttpRpcProvider.do_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.http_provider.HttpRpcProvider.do_request" title="Permalink to this definition"></a></dt>
<dd><p>Do rpc request</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>request_ctx</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>, <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; Request context dictionary. The valid key/value pairs are:
content-type, {as in <a class="reference external" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html</a> 14.17}</li>
<li><strong>request</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; The request body</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">dict</span></tt> of <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>, <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>),
<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"><p>Tuple of (response_ctx, response_body) where
response_ctx: Response context dictionary. The valid key/value pairs are:</p>
<blockquote>
<div><p>content-type, {as in <a class="reference external" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html</a> 14.17}</p>
</div></blockquote>
<p>response: The response body</p>
</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="staticmethod">
<dt id="vmware.vapi.protocol.client.rpc.http_provider.HttpRpcProvider.is_connection_dropped">
<em class="property">static </em><tt class="descname">is_connection_dropped</tt><big>(</big><em>conn</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/http_provider.html#HttpRpcProvider.is_connection_dropped"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.http_provider.HttpRpcProvider.is_connection_dropped" title="Permalink to this definition"></a></dt>
<dd><p>Returns True if the connection is dropped and should be closed.</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>conn</strong> (<tt class="xref py py-class docutils literal"><span class="pre">http_client.HTTPConnection</span></tt>) &#8211; HTTP connection object</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">bool</span></tt></td>
</tr>
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">True if the connection is dropped, False otherwise</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="vmware.vapi.protocol.client.rpc.http_provider.HttpsConnection">
<em class="property">class </em><tt class="descclassname">vmware.vapi.protocol.client.rpc.http_provider.</tt><tt class="descname">HttpsConnection</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/http_provider.html#HttpsConnection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.http_provider.HttpsConnection" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">httplib.HTTPSConnection</span></tt></p>
<p>Internal version of https connection</p>
<p>Internal version of https connection init</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>args</strong> (<tt class="xref py py-class docutils literal"><span class="pre">tuple</span></tt>) &#8211; position parameters to <tt class="xref py py-class docutils literal"><span class="pre">http_client.HTTPSConnection</span></tt></li>
<li><strong>kwargs</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) &#8211; key parameters to <tt class="xref py py-class docutils literal"><span class="pre">http_client.HTTPSConnection</span></tt></li>
</ul>
</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="vmware.vapi.protocol.client.rpc.http_provider.HttpsConnection.connect">
<tt class="descname">connect</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/http_provider.html#HttpsConnection.connect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.http_provider.HttpsConnection.connect" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
</dd></dl>
<dl class="class">
<dt id="vmware.vapi.protocol.client.rpc.http_provider.UnixSocketConnection">
<em class="property">class </em><tt class="descclassname">vmware.vapi.protocol.client.rpc.http_provider.</tt><tt class="descname">UnixSocketConnection</tt><big>(</big><em>path</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/http_provider.html#UnixSocketConnection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.http_provider.UnixSocketConnection" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">httplib.HTTPConnection</span></tt></p>
<p>Variant of http_client.HTTPConnection that supports HTTP
connections over Unix domain sockets.</p>
<p>Initialize a Unix domain socket HTTP connection</p>
<p>The HTTPConnection __init__ method expects a single argument,
which it interprets as the host to connect to. For this
class, we instead interpret the parameter as the filesystem
path of the Unix domain socket.</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>path</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; Unix domain socket path</td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="vmware.vapi.protocol.client.rpc.http_provider.UnixSocketConnection.connect">
<tt class="descname">connect</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/http_provider.html#UnixSocketConnection.connect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.http_provider.UnixSocketConnection.connect" title="Permalink to this definition"></a></dt>
<dd><p>Override the HTTPConnection connect method to connect to a
Unix domain socket. Obey the same contract as HTTPConnection.connect
which puts the socket in self.sock.</p>
</dd></dl>
</dd></dl>
<dl class="function">
<dt id="vmware.vapi.protocol.client.rpc.http_provider.patch_http_response_read">
<tt class="descclassname">vmware.vapi.protocol.client.rpc.http_provider.</tt><tt class="descname">patch_http_response_read</tt><big>(</big><em>func</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/http_provider.html#patch_http_response_read"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.http_provider.patch_http_response_read" title="Permalink to this definition"></a></dt>
<dd><p>Wrapper function to patch the http read method to return the partial data
when the server doesn&#8217;t send a zero length chunk</p>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.protocol.client.rpc.provider">
<span id="provider-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">provider</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.protocol.client.rpc.provider" title="Permalink to this headline"></a></h2>
<p>rpc provider interface</p>
<dl class="class">
<dt id="vmware.vapi.protocol.client.rpc.provider.RpcProvider">
<em class="property">class </em><tt class="descclassname">vmware.vapi.protocol.client.rpc.provider.</tt><tt class="descname">RpcProvider</tt><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/provider.html#RpcProvider"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.provider.RpcProvider" 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>Rpc provider interface</p>
<p>Rpc provider interface init</p>
<dl class="method">
<dt id="vmware.vapi.protocol.client.rpc.provider.RpcProvider.connect">
<tt class="descname">connect</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/provider.html#RpcProvider.connect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.provider.RpcProvider.connect" title="Permalink to this definition"></a></dt>
<dd><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.protocol.client.rpc.provider.RpcProvider" title="vmware.vapi.protocol.client.rpc.provider.RpcProvider"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.protocol.client.rpc.provider.RpcProvider</span></tt></a></td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">a rpc provider</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="vmware.vapi.protocol.client.rpc.provider.RpcProvider.disconnect">
<tt class="descname">disconnect</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/provider.html#RpcProvider.disconnect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.provider.RpcProvider.disconnect" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="vmware.vapi.protocol.client.rpc.provider.RpcProvider.do_request">
<tt class="descname">do_request</tt><big>(</big><em>request_ctx</em>, <em>request</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/provider.html#RpcProvider.do_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.provider.RpcProvider.do_request" title="Permalink to this definition"></a></dt>
<dd><p>Do rpc request</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>request_ctx</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>, <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; Request context dictionary. The valid key/value pairs are:
content-type, {as in <a class="reference external" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html</a> 14.17}</li>
<li><strong>request</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; The request body</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">dict</span></tt> of <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>, <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>),
<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"><p>Tuple of (response_ctx, response_body) where
response_ctx: Response context dictionary. The valid key/value pairs are:</p>
<blockquote>
<div><p>content-type, {as in <a class="reference external" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html</a> 14.17}</p>
</div></blockquote>
<p>response: The response body</p>
</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.protocol.client.rpc.provider_factory">
<span id="provider-factory-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">provider_factory</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.protocol.client.rpc.provider_factory" title="Permalink to this headline"></a></h2>
<p>rpc provider factory</p>
<dl class="class">
<dt id="vmware.vapi.protocol.client.rpc.provider_factory.RpcProviderFactory">
<em class="property">class </em><tt class="descclassname">vmware.vapi.protocol.client.rpc.provider_factory.</tt><tt class="descname">RpcProviderFactory</tt><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/provider_factory.html#RpcProviderFactory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.provider_factory.RpcProviderFactory" 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>Rpc provider factory</p>
<p>Rpc provider factory init</p>
<dl class="method">
<dt id="vmware.vapi.protocol.client.rpc.provider_factory.RpcProviderFactory.get_rpc_provider">
<tt class="descname">get_rpc_provider</tt><big>(</big><em>rpc_provider_name</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/provider_factory.html#RpcProviderFactory.get_rpc_provider"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.provider_factory.RpcProviderFactory.get_rpc_provider" title="Permalink to this definition"></a></dt>
<dd><p>Create rpc 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> &#8211; </li>
<li><strong>args</strong> (<tt class="xref py py-class docutils literal"><span class="pre">tuple</span></tt>) &#8211; position parameters to rpc provider constructor</li>
<li><strong>kwargs</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) &#8211; key parameters to rpc provider constructor</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.rpc.provider.RpcProvider" title="vmware.vapi.protocol.client.rpc.provider.RpcProvider"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.protocol.client.rpc.provider.RpcProvider</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">Rpc provider object</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-vmware.vapi.protocol.client.rpc.requests_provider">
<span id="requests-provider-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">requests_provider</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.protocol.client.rpc.requests_provider" title="Permalink to this headline"></a></h2>
<p>RPC Provider using Requests Library</p>
<dl class="class">
<dt id="vmware.vapi.protocol.client.rpc.requests_provider.RequestsRpcProvider">
<em class="property">class </em><tt class="descclassname">vmware.vapi.protocol.client.rpc.requests_provider.</tt><tt class="descname">RequestsRpcProvider</tt><big>(</big><em>session</em>, <em>url</em>, <em>timeout</em>, <em>pool_size</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/requests_provider.html#RequestsRpcProvider"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.requests_provider.RequestsRpcProvider" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference internal" href="#vmware.vapi.protocol.client.rpc.provider.RpcProvider" title="vmware.vapi.protocol.client.rpc.provider.RpcProvider"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.protocol.client.rpc.provider.RpcProvider</span></tt></a></p>
<p>vAPI RPC provider using requests library</p>
<p>Initialize RequestsRpcProvider</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>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>
</tbody>
</table>
<dl class="method">
<dt id="vmware.vapi.protocol.client.rpc.requests_provider.RequestsRpcProvider.connect">
<tt class="descname">connect</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/requests_provider.html#RequestsRpcProvider.connect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.requests_provider.RequestsRpcProvider.connect" title="Permalink to this definition"></a></dt>
<dd><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.protocol.client.rpc.provider.RpcProvider" title="vmware.vapi.protocol.client.rpc.provider.RpcProvider"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.protocol.client.rpc.provider.RpcProvider</span></tt></a></td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">http rpc provider</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="vmware.vapi.protocol.client.rpc.requests_provider.RequestsRpcProvider.disconnect">
<tt class="descname">disconnect</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/requests_provider.html#RequestsRpcProvider.disconnect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.requests_provider.RequestsRpcProvider.disconnect" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dl class="method">
<dt id="vmware.vapi.protocol.client.rpc.requests_provider.RequestsRpcProvider.do_request">
<tt class="descname">do_request</tt><big>(</big><em>request_ctx</em>, <em>request</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/protocol/client/rpc/requests_provider.html#RequestsRpcProvider.do_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.protocol.client.rpc.requests_provider.RequestsRpcProvider.do_request" title="Permalink to this definition"></a></dt>
<dd><p>Do rpc request</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>request_ctx</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>, <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; Request context dictionary. The valid key/value pairs are:
content-type, {as in <a class="reference external" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html</a> 14.17}</li>
<li><strong>request</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) &#8211; The request body</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">dict</span></tt> of <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>, <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>),
<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"><p>Tuple of (response_ctx, response_body) where
response_ctx: Response context dictionary. The valid key/value pairs are:</p>
<blockquote>
<div><p>content-type, {as in <a class="reference external" href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html">http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html</a> 14.17}</p>
</div></blockquote>
<p>response: The response body</p>
</p>
</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="#">rpc Package</a><ul>
<li><a class="reference internal" href="#id1"><tt class="docutils literal"><span class="pre">rpc</span></tt> Package</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.protocol.client.rpc.http_provider"><tt class="docutils literal"><span class="pre">http_provider</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.protocol.client.rpc.provider"><tt class="docutils literal"><span class="pre">provider</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.protocol.client.rpc.provider_factory"><tt class="docutils literal"><span class="pre">provider_factory</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-vmware.vapi.protocol.client.rpc.requests_provider"><tt class="docutils literal"><span class="pre">requests_provider</span></tt> Module</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="vmware.vapi.protocol.client.msg.html"
title="previous chapter">msg Package</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="vmware.vapi.protocol.common.html"
title="next chapter">common Package</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/vmware.vapi.protocol.client.rpc.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.common.html" title="common Package"
>next</a> |</li>
<li class="right" >
<a href="vmware.vapi.protocol.client.msg.html" title="msg Package"
>previous</a> |</li>
<li><a href="index.html">vSphere Automation SDK for Python 6.5.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>
<li><a href="vmware.vapi.protocol.html" >protocol Package</a> &raquo;</li>
<li><a href="vmware.vapi.protocol.client.html" >client 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>