mirror of
https://github.com/vmware/vsphere-automation-sdk-python.git
synced 2024-11-29 20:09:58 -05:00
1371 lines
104 KiB
HTML
1371 lines
104 KiB
HTML
|
|
||
|
|
||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
|
||
|
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
|
||
|
<title>serializers Package — vSphere Automation SDK for Python 6.5.0 documentation</title>
|
||
|
|
||
|
<link rel="stylesheet" href="_static/vapitheme.css" type="text/css" />
|
||
|
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
||
|
|
||
|
<script type="text/javascript">
|
||
|
var DOCUMENTATION_OPTIONS = {
|
||
|
URL_ROOT: '',
|
||
|
VERSION: '6.5.0',
|
||
|
COLLAPSE_INDEX: false,
|
||
|
FILE_SUFFIX: '.html',
|
||
|
HAS_SOURCE: true
|
||
|
};
|
||
|
</script>
|
||
|
<script type="text/javascript" src="_static/jquery.js"></script>
|
||
|
<script type="text/javascript" src="_static/underscore.js"></script>
|
||
|
<script type="text/javascript" src="_static/doctools.js"></script>
|
||
|
<link rel="top" title="vSphere Automation SDK for Python 6.5.0 documentation" href="index.html" />
|
||
|
<link rel="up" title="data Package" href="vmware.vapi.data.html" />
|
||
|
<link rel="next" title="debug Package" href="vmware.vapi.debug.html" />
|
||
|
<link rel="prev" title="data Package" href="vmware.vapi.data.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.debug.html" title="debug Package"
|
||
|
accesskey="N">next</a> |</li>
|
||
|
<li class="right" >
|
||
|
<a href="vmware.vapi.data.html" title="data Package"
|
||
|
accesskey="P">previous</a> |</li>
|
||
|
<li><a href="index.html">vSphere Automation SDK for Python 6.5.0 documentation</a> »</li>
|
||
|
<li><a href="vmware.html" >vmware Package</a> »</li>
|
||
|
<li><a href="vmware.vapi.html" >vapi Package</a> »</li>
|
||
|
<li><a href="vmware.vapi.data.html" accesskey="U">data Package</a> »</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
|
||
|
<div class="document">
|
||
|
<div class="documentwrapper">
|
||
|
<div class="bodywrapper">
|
||
|
<div class="body">
|
||
|
|
||
|
<div class="section" id="serializers-package">
|
||
|
<h1>serializers Package<a class="headerlink" href="#serializers-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">serializers</span></tt> Package<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
|
||
|
<span class="target" id="module-vmware.vapi.data.serializers"></span></div>
|
||
|
<div class="section" id="module-vmware.vapi.data.serializers.cleanjson">
|
||
|
<span id="cleanjson-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">cleanjson</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.data.serializers.cleanjson" title="Permalink to this headline">¶</a></h2>
|
||
|
<p>Serializer vAPI data values to clean (human readable/writable) json documents</p>
|
||
|
<dl class="class">
|
||
|
<dt id="vmware.vapi.data.serializers.cleanjson.DataValueConverter">
|
||
|
<em class="property">class </em><tt class="descclassname">vmware.vapi.data.serializers.cleanjson.</tt><tt class="descname">DataValueConverter</tt><a class="reference internal" href="_modules/vmware/vapi/data/serializers/cleanjson.html#DataValueConverter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.cleanjson.DataValueConverter" 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>Converter class that converts values from vAPI DataValue to clean
|
||
|
JSON objects.</p>
|
||
|
<dl class="staticmethod">
|
||
|
<dt id="vmware.vapi.data.serializers.cleanjson.DataValueConverter.convert_to_json">
|
||
|
<em class="property">static </em><tt class="descname">convert_to_json</tt><big>(</big><em>data_value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/cleanjson.html#DataValueConverter.convert_to_json"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.cleanjson.DataValueConverter.convert_to_json" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Convert the given data value to a JSON string representation</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>data_value</strong> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.DataValue" title="vmware.vapi.data.value.DataValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.DataValue</span></tt></a>) – Data value 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">JSON representation of the data value</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="class">
|
||
|
<dt id="vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder">
|
||
|
<em class="property">class </em><tt class="descclassname">vmware.vapi.data.serializers.cleanjson.</tt><tt class="descname">DataValueToJSONEncoder</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/cleanjson.html#DataValueToJSONEncoder"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">json.encoder.JSONEncoder</span></tt></p>
|
||
|
<p>Custon JSON encoder that converts vAPI runtime values directly
|
||
|
into JSON string representation.</p>
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.encode">
|
||
|
<tt class="descname">encode</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/cleanjson.html#DataValueToJSONEncoder.encode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.encode" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Encode a given vAPI runtime object</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>) – vAPI runtime 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.visit_blob_value">
|
||
|
<tt class="descname">visit_blob_value</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/cleanjson.html#DataValueToJSONEncoder.visit_blob_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.visit_blob_value" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit BlobValue</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> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.BlobValue" title="vmware.vapi.data.value.BlobValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.BlobValue</span></tt></a>) – BlobValue 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.visit_default">
|
||
|
<tt class="descname">visit_default</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/cleanjson.html#DataValueToJSONEncoder.visit_default"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.visit_default" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>This is the default visit method if the type of the input value
|
||
|
does not match any type in the keys present in dispatch map.</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>) – Python 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="staticmethod">
|
||
|
<dt id="vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.visit_double_value">
|
||
|
<em class="property">static </em><tt class="descname">visit_double_value</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/cleanjson.html#DataValueToJSONEncoder.visit_double_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.visit_double_value" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit a DoubleValue object</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> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.DoubleValue" title="vmware.vapi.data.value.DoubleValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.DoubleValue</span></tt></a>) – Double value 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.visit_list">
|
||
|
<tt class="descname">visit_list</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/cleanjson.html#DataValueToJSONEncoder.visit_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.visit_list" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit a ListValue object</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> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.ListValue" title="vmware.vapi.data.value.ListValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.ListValue</span></tt></a>) – List value 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.visit_optional_value">
|
||
|
<tt class="descname">visit_optional_value</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/cleanjson.html#DataValueToJSONEncoder.visit_optional_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.visit_optional_value" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit a OptionalValue object</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> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.OptionalValue" title="vmware.vapi.data.value.OptionalValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.OptionalValue</span></tt></a>) – Optional value 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.visit_primitive_value">
|
||
|
<tt class="descname">visit_primitive_value</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/cleanjson.html#DataValueToJSONEncoder.visit_primitive_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.visit_primitive_value" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit one of StringValue, IntegerValue, BooleanValue or VoidValue</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> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.StringValue" title="vmware.vapi.data.value.StringValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.StringValue</span></tt></a> (or)
|
||
|
<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.IntegerValue" title="vmware.vapi.data.value.IntegerValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.IntegerValue</span></tt></a> (or)
|
||
|
<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.BooleanValue" title="vmware.vapi.data.value.BooleanValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.BooleanValue</span></tt></a> (or)
|
||
|
<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.VoidValue" title="vmware.vapi.data.value.VoidValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.VoidValue</span></tt></a> (or)) – StringValue, IntegerValue, BooleanValue or VoidValue 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.visit_struct_value">
|
||
|
<tt class="descname">visit_struct_value</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/cleanjson.html#DataValueToJSONEncoder.visit_struct_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.cleanjson.DataValueToJSONEncoder.visit_struct_value" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit a StructValue object</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> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.StructValue" title="vmware.vapi.data.value.StructValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.StructValue</span></tt></a>) – Struct value 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
</dd></dl>
|
||
|
|
||
|
</div>
|
||
|
<div class="section" id="module-vmware.vapi.data.serializers.introspection">
|
||
|
<span id="introspection-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">introspection</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.data.serializers.introspection" title="Permalink to this headline">¶</a></h2>
|
||
|
<p>Convenient libraries for introspection data</p>
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.introspection.convert_data_def_to_data_value">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.introspection.</tt><tt class="descname">convert_data_def_to_data_value</tt><big>(</big><em>data_def</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/introspection.html#convert_data_def_to_data_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.introspection.convert_data_def_to_data_value" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Convert <a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.definition.DataDefinition" title="vmware.vapi.data.definition.DataDefinition"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.definition.DataDefinition</span></tt></a> object to
|
||
|
<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.DataValue" title="vmware.vapi.data.value.DataValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.DataValue</span></tt></a> object. The type of the object
|
||
|
returned is a struct value that corresponds to DataDefinition VMODL2 type
|
||
|
present in introspection service.</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>data_def</strong> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.definition.DataDefinition" title="vmware.vapi.data.definition.DataDefinition"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.definition.DataDefinition</span></tt></a>) – Data definition</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.data.html#vmware.vapi.data.value.DataValue" title="vmware.vapi.data.value.DataValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.DataValue</span></tt></a></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Data value representing the data definition object</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.introspection.convert_data_value_to_data_def">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.introspection.</tt><tt class="descname">convert_data_value_to_data_def</tt><big>(</big><em>data_value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/introspection.html#convert_data_value_to_data_def"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.introspection.convert_data_value_to_data_def" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Convert <a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.DataValue" title="vmware.vapi.data.value.DataValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.DataValue</span></tt></a> object that
|
||
|
corresponds to DataDefinition structure in introspection VMODL2 into
|
||
|
<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.definition.DataDefinition" title="vmware.vapi.data.definition.DataDefinition"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.definition.DataDefinition</span></tt></a> object.</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>data_value</strong> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.DataValue" title="vmware.vapi.data.value.DataValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.DataValue</span></tt></a>) – Data value representing the data definition object</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.data.html#vmware.vapi.data.definition.DataDefinition" title="vmware.vapi.data.definition.DataDefinition"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.definition.DataDefinition</span></tt></a></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">Data definition</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
</div>
|
||
|
<div class="section" id="module-vmware.vapi.data.serializers.jsonrpc">
|
||
|
<span id="jsonrpc-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">jsonrpc</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.data.serializers.jsonrpc" title="Permalink to this headline">¶</a></h2>
|
||
|
<p>Json rpc de/serializer</p>
|
||
|
<dl class="exception">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error">
|
||
|
<em class="property">exception </em><tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">JsonRpc20Error</tt><big>(</big><em>code</em>, <em>message=None</em>, <em>data=None</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpc20Error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Bases: <a class="reference internal" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcError" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcError"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.serializers.jsonrpc.JsonRpcError</span></tt></a></p>
|
||
|
<p>json rpc 2.0 error</p>
|
||
|
<p>Json rpc 2.0 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 last simple">
|
||
|
<li><strong>code</strong> (<tt class="xref py py-class docutils literal"><span class="pre">int</span></tt>) – error type that occurred</li>
|
||
|
<li><strong>message</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – a short description of the error</li>
|
||
|
<li><strong>data</strong> (Primitive type / <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt> / None) – more info about the error</li>
|
||
|
</ul>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<dl class="attribute">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.DEFAULT_MESSAGES">
|
||
|
<tt class="descname">DEFAULT_MESSAGES</tt><em class="property"> = {-32700: 'Parse error.', -32603: 'Internal error.', -32602: 'Invalid params.', -32601: 'Method not found.', -32600: 'Invalid Request.', -32300: 'Transport error.'}</em><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.DEFAULT_MESSAGES" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd></dd></dl>
|
||
|
|
||
|
<dl class="attribute">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.INTERNAL_ERROR">
|
||
|
<tt class="descname">INTERNAL_ERROR</tt><em class="property"> = -32603</em><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.INTERNAL_ERROR" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd></dd></dl>
|
||
|
|
||
|
<dl class="attribute">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.INVALID_PARAMS">
|
||
|
<tt class="descname">INVALID_PARAMS</tt><em class="property"> = -32602</em><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.INVALID_PARAMS" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd></dd></dl>
|
||
|
|
||
|
<dl class="attribute">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.INVALID_REQUEST">
|
||
|
<tt class="descname">INVALID_REQUEST</tt><em class="property"> = -32600</em><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.INVALID_REQUEST" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd></dd></dl>
|
||
|
|
||
|
<dl class="attribute">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.METHOD_NOT_FOUND">
|
||
|
<tt class="descname">METHOD_NOT_FOUND</tt><em class="property"> = -32601</em><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.METHOD_NOT_FOUND" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd></dd></dl>
|
||
|
|
||
|
<dl class="attribute">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.PARSE_ERROR">
|
||
|
<tt class="descname">PARSE_ERROR</tt><em class="property"> = -32700</em><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.PARSE_ERROR" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd></dd></dl>
|
||
|
|
||
|
<dl class="attribute">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.SERVER_ERROR_RANGE_MAX">
|
||
|
<tt class="descname">SERVER_ERROR_RANGE_MAX</tt><em class="property"> = -32000</em><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.SERVER_ERROR_RANGE_MAX" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd></dd></dl>
|
||
|
|
||
|
<dl class="attribute">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.SERVER_ERROR_RANGE_MIN">
|
||
|
<tt class="descname">SERVER_ERROR_RANGE_MIN</tt><em class="property"> = -32768</em><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.SERVER_ERROR_RANGE_MIN" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd></dd></dl>
|
||
|
|
||
|
<dl class="attribute">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.TRANSPORT_ERROR">
|
||
|
<tt class="descname">TRANSPORT_ERROR</tt><em class="property"> = -32300</em><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Error.TRANSPORT_ERROR" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd></dd></dl>
|
||
|
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="class">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Request">
|
||
|
<em class="property">class </em><tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">JsonRpc20Request</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpc20Request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Request" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Bases: <a class="reference internal" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcRequest" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcRequest"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.serializers.jsonrpc.JsonRpcRequest</span></tt></a></p>
|
||
|
<p>Json rpc 2.0 request</p>
|
||
|
<p>Json rpc 2.0 request 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>jsonrpc</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> or None) – json rpc request version</li>
|
||
|
<li><strong>method</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – json rpc method</li>
|
||
|
<li><strong>params</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">list</span></tt> or None) – json rpc method params</li>
|
||
|
<li><strong>id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">long</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">int</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> or None) – json rpc request id. Do not set for notification</li>
|
||
|
</ul>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Request.serialize">
|
||
|
<tt class="descname">serialize</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpc20Request.serialize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Request.serialize" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Serialize a json rpc 2.0 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">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">json rpc request str</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Request.serialize_notification">
|
||
|
<tt class="descname">serialize_notification</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpc20Request.serialize_notification"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Request.serialize_notification" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Serialize a json rpc 2.0 notification</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">json rpc notification str</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Request.validate_response">
|
||
|
<tt class="descname">validate_response</tt><big>(</big><em>response</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpc20Request.validate_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Request.validate_response" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Validate a json rpc 2.0 response.
|
||
|
Check for version / id mismatch with 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"><strong>response</strong> (<a class="reference internal" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcResponse" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcResponse"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcResponse</span></tt></a>) – json rpc response object to validate</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="class">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Response">
|
||
|
<em class="property">class </em><tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">JsonRpc20Response</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpc20Response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Response" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Bases: <a class="reference internal" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcResponse" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcResponse"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.serializers.jsonrpc.JsonRpcResponse</span></tt></a></p>
|
||
|
<p>Json rpc 2.0 response</p>
|
||
|
<p>Json rpc 2.0 response init
|
||
|
Either result or error must be set, but not both</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>jsonrpc</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> or None) – json rpc response version</li>
|
||
|
<li><strong>result</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – json rpc response dict</li>
|
||
|
<li><strong>error</strong> (<a class="reference internal" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcError" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcError"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcError</span></tt></a> or dict) – json rpc response error</li>
|
||
|
<li><strong>id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">long</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">int</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – json rpc response id</li>
|
||
|
</ul>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpc20Response.serialize">
|
||
|
<tt class="descname">serialize</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpc20Response.serialize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpc20Response.serialize" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Serialize a json rpc 2.0 response</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">json rpc response str</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="class">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpcDictToVapi">
|
||
|
<em class="property">class </em><tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">JsonRpcDictToVapi</tt><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpcDictToVapi"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcDictToVapi" 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>Json rpc dict to vapi type</p>
|
||
|
<p>Json rpc dict to vapi type init</p>
|
||
|
<dl class="staticmethod">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpcDictToVapi.app_ctx">
|
||
|
<em class="property">static </em><tt class="descname">app_ctx</tt><big>(</big><em>ctx</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpcDictToVapi.app_ctx"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcDictToVapi.app_ctx" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>get application context from jsonrpc dict</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>ctx</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – json application context</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">operation identifier</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="staticmethod">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpcDictToVapi.data_value">
|
||
|
<em class="property">static </em><tt class="descname">data_value</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpcDictToVapi.data_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcDictToVapi.data_value" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>get data value from new jsonrpc dict</p>
|
||
|
<p># TODO: Structure names and its fields are converted from
|
||
|
# u’’ format to str format. This will break if we allow non
|
||
|
# ASCII characters in the IDL</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">dict</span></tt>) – json data value</td>
|
||
|
</tr>
|
||
|
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">subclass of <a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.DataValue" title="vmware.vapi.data.value.DataValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.DataValue</span></tt></a></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">subclass of data value</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="staticmethod">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpcDictToVapi.error_value">
|
||
|
<em class="property">static </em><tt class="descname">error_value</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpcDictToVapi.error_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcDictToVapi.error_value" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>get error value from jsonrpc dict</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>msg</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – json error value</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.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></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">error value</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="staticmethod">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpcDictToVapi.execution_context">
|
||
|
<em class="property">static </em><tt class="descname">execution_context</tt><big>(</big><em>ctx</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpcDictToVapi.execution_context"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcDictToVapi.execution_context" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>get execution context from jsonrpc dict</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>ctx</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – json execution context</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.html#vmware.vapi.core.ExecutionContext" title="vmware.vapi.core.ExecutionContext"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.core.ExecutionContext</span></tt></a></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">execution context</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="staticmethod">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpcDictToVapi.method_result">
|
||
|
<em class="property">static </em><tt class="descname">method_result</tt><big>(</big><em>result</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpcDictToVapi.method_result"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcDictToVapi.method_result" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>get method result from jsonrpc dict</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>result</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – json method result</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.html#vmware.vapi.core.MethodResult" title="vmware.vapi.core.MethodResult"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.core.MethodResult</span></tt></a></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">method result</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="staticmethod">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpcDictToVapi.security_ctx">
|
||
|
<em class="property">static </em><tt class="descname">security_ctx</tt><big>(</big><em>ctx</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpcDictToVapi.security_ctx"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcDictToVapi.security_ctx" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>get security context from jsonrpc dict</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>ctx</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – json security context</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.html#vmware.vapi.core.SecurityContext" title="vmware.vapi.core.SecurityContext"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.core.SecurityContext</span></tt></a></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">json user session</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="exception">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpcError">
|
||
|
<em class="property">exception </em><tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">JsonRpcError</tt><big>(</big><em>error</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpcError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcError" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
|
||
|
<p>json rpc error base class</p>
|
||
|
<p>json rpc error base class 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"><strong>error</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – json rpc error</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="class">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpcRequest">
|
||
|
<em class="property">class </em><tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">JsonRpcRequest</tt><big>(</big><em>version</em>, <em>method</em>, <em>params=None</em>, <em>notification=True</em>, <em>request_id=None</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpcRequest"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcRequest" 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>Json rpc request base class</p>
|
||
|
<p>Json rpc request base class 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>version</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – json rpc request version</li>
|
||
|
<li><strong>method</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – json rpc method</li>
|
||
|
<li><strong>params</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">list</span></tt> or None) – json rpc method params</li>
|
||
|
<li><strong>notification</strong> (<tt class="xref py py-class docutils literal"><span class="pre">bool</span></tt>) – True for notification</li>
|
||
|
<li><strong>request_id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">long</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">int</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> or None) – json rpc request id. Do not set for notification</li>
|
||
|
</ul>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpcRequest.serialize">
|
||
|
<tt class="descname">serialize</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpcRequest.serialize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcRequest.serialize" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Serialize a json 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">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">json rpc request str</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpcRequest.validate_response">
|
||
|
<tt class="descname">validate_response</tt><big>(</big><em>response</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpcRequest.validate_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcRequest.validate_response" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Validate a json rpc response.
|
||
|
Check for version / id mismatch with 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"><strong>response</strong> (<a class="reference internal" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcResponse" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcResponse"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcResponse</span></tt></a>) – json rpc response object to validate</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="class">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpcResponse">
|
||
|
<em class="property">class </em><tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">JsonRpcResponse</tt><big>(</big><em>version</em>, <em>response_id</em>, <em>result</em>, <em>error=None</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpcResponse"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcResponse" 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>Json rpc response base class</p>
|
||
|
<p>Json rpc response base class 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>version</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – json rpc response version</li>
|
||
|
<li><strong>response_id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">long</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">int</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> or None) – json rpc response id</li>
|
||
|
<li><strong>result</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – json rpc response dict</li>
|
||
|
<li><strong>error</strong> (<a class="reference internal" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcError" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcError"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcError</span></tt></a>) – json rpc error</li>
|
||
|
</ul>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.JsonRpcResponse.serialize">
|
||
|
<tt class="descname">serialize</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#JsonRpcResponse.serialize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcResponse.serialize" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Serialize a json rpc response</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">json rpc response str</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="class">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder">
|
||
|
<em class="property">class </em><tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">VAPIJsonEncoder</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#VAPIJsonEncoder"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">json.encoder.JSONEncoder</span></tt></p>
|
||
|
<p>Custom JSON encoder that converts vAPI runtime types directly
|
||
|
into JSON string representation.</p>
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.encode">
|
||
|
<tt class="descname">encode</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#VAPIJsonEncoder.encode"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.encode" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Encode a given vAPI runtime object</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>) – vAPI runtime 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_blob_value_with_type_name">
|
||
|
<tt class="descname">visit_blob_value_with_type_name</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#VAPIJsonEncoder.visit_blob_value_with_type_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_blob_value_with_type_name" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit BlobValue</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> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.BlobValue" title="vmware.vapi.data.value.BlobValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.BlobValue</span></tt></a>) – BlobValue 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_default">
|
||
|
<tt class="descname">visit_default</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#VAPIJsonEncoder.visit_default"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_default" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>This is the default visit method if the type of the input value
|
||
|
does not match any type in the keys present in dispatch map.</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>) – Python 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_dict">
|
||
|
<tt class="descname">visit_dict</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#VAPIJsonEncoder.visit_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_dict" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit a dictionary. Application context and Security Context
|
||
|
in vAPI is a free form object, so it can contain a dictionary.</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">dict</span></tt>) – Dictionary value</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">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="staticmethod">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_double_value">
|
||
|
<em class="property">static </em><tt class="descname">visit_double_value</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#VAPIJsonEncoder.visit_double_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_double_value" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit a DoubleValue object</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> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.DoubleValue" title="vmware.vapi.data.value.DoubleValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.DoubleValue</span></tt></a>) – Double value 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_execution_context">
|
||
|
<tt class="descname">visit_execution_context</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#VAPIJsonEncoder.visit_execution_context"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_execution_context" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit an ExecutionContext object</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> (<a class="reference internal" href="vmware.vapi.html#vmware.vapi.core.ExecutionContext" title="vmware.vapi.core.ExecutionContext"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.core.ExecutionContext</span></tt></a>) – ExecutionContext 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_list">
|
||
|
<tt class="descname">visit_list</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#VAPIJsonEncoder.visit_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_list" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit a ListValue object</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> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.ListValue" title="vmware.vapi.data.value.ListValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.ListValue</span></tt></a>) – List value 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_method_result">
|
||
|
<tt class="descname">visit_method_result</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#VAPIJsonEncoder.visit_method_result"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_method_result" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit a MethodResult object</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> (<a class="reference internal" href="vmware.vapi.html#vmware.vapi.core.MethodResult" title="vmware.vapi.core.MethodResult"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.core.MethodResult</span></tt></a>) – MethodResult 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_optional_value">
|
||
|
<tt class="descname">visit_optional_value</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#VAPIJsonEncoder.visit_optional_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_optional_value" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit a OptionalValue object</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> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.OptionalValue" title="vmware.vapi.data.value.OptionalValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.OptionalValue</span></tt></a>) – Optional value 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_primitive_value">
|
||
|
<tt class="descname">visit_primitive_value</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#VAPIJsonEncoder.visit_primitive_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_primitive_value" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit one of StringValue, IntegerValue, BooleanValue or VoidValue</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> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.StringValue" title="vmware.vapi.data.value.StringValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.StringValue</span></tt></a> (or)
|
||
|
<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.IntegerValue" title="vmware.vapi.data.value.IntegerValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.IntegerValue</span></tt></a> (or)
|
||
|
<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.BooleanValue" title="vmware.vapi.data.value.BooleanValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.BooleanValue</span></tt></a> (or)
|
||
|
<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.VoidValue" title="vmware.vapi.data.value.VoidValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.VoidValue</span></tt></a> (or)) – StringValue, IntegerValue, BooleanValue or VoidValue 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_primitive_value_with_type_name">
|
||
|
<tt class="descname">visit_primitive_value_with_type_name</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#VAPIJsonEncoder.visit_primitive_value_with_type_name"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_primitive_value_with_type_name" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit SecretValue</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> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.SecretValue" title="vmware.vapi.data.value.SecretValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.SecretValue</span></tt></a>) – SecretValue 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="method">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_struct_value">
|
||
|
<tt class="descname">visit_struct_value</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#VAPIJsonEncoder.visit_struct_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.VAPIJsonEncoder.visit_struct_value" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Visit a StructValue object</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> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.StructValue" title="vmware.vapi.data.value.StructValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.StructValue</span></tt></a>) – Struct value 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">str</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">JSON string</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.deserialize_request">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">deserialize_request</tt><big>(</big><em>request_str</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#deserialize_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.deserialize_request" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Deserialize a json 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"><strong>request_str</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">bytes:</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">file</span></tt>) – json rpc request str or a file like object</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.data.serializers.jsonrpc.JsonRpcRequest" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcRequest"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcRequest</span></tt></a></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">json rpc request</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.deserialize_response">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">deserialize_response</tt><big>(</big><em>response_str</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#deserialize_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.deserialize_response" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Deserialize a json rpc response</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>response_str</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">bytes</span></tt>) – json rpc response str</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.data.serializers.jsonrpc.JsonRpcResponse" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcResponse"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcResponse</span></tt></a></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">json rpc response</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.jsonrpc_request_factory">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">jsonrpc_request_factory</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#jsonrpc_request_factory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.jsonrpc_request_factory" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Json rpc request factory
|
||
|
For json 2.0: set jsonrpc to ‘2.0’
|
||
|
For json 1.1: set version to ‘1.1’
|
||
|
For json 1.0: set neither jsonrpc / version
|
||
|
The parameters accepted depends on json version
|
||
|
See corresponding json rpc request class for init parameters</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>jsonrpc</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> or None) – json rpc request version (2.0)</li>
|
||
|
<li><strong>version</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> or None) – json rpc request version (1.1)</li>
|
||
|
<li><strong>method</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – json rpc method</li>
|
||
|
<li><strong>params</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">list</span></tt> or None) – json rpc method params</li>
|
||
|
<li><strong>id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">long</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">int</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> or None) – json rpc request id. Do not set for notification</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.serializers.jsonrpc.JsonRpcRequest" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcRequest"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcRequest</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">json rpc request object</p>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.jsonrpc_response_factory">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">jsonrpc_response_factory</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#jsonrpc_response_factory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.jsonrpc_response_factory" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Json rpc response factory
|
||
|
For json 2.0: set jsonrpc to ‘2.0’
|
||
|
For json 1.1: set version to ‘1.1’
|
||
|
For json 1.0: set neither jsonrpc / version
|
||
|
The parameters accepted depends on json version
|
||
|
See corresponding json rpc response class for init parameters</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>jsonrpc</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> or None) – json rpc response version (2.0)</li>
|
||
|
<li><strong>version</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> or None) – json rpc response version (1.1)</li>
|
||
|
<li><strong>method</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – json rpc method</li>
|
||
|
<li><strong>params</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">list</span></tt> or None) – json rpc method params</li>
|
||
|
<li><strong>id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">long</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">int</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – json rpc response id</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.serializers.jsonrpc.JsonRpcResponse" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcResponse"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcResponse</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">json rpc response object</p>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.to_strkey_dict">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">to_strkey_dict</tt><big>(</big><em>dictionary</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#to_strkey_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.to_strkey_dict" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Convert a unicode key dict into str key dict</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>dictionary</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – unicode dictionary</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">dict</span></tt></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">string key dict</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_error_internal_error">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">vapi_jsonrpc_error_internal_error</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#vapi_jsonrpc_error_internal_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_error_internal_error" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>vapi json rpc internal 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"><strong>data</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – json rpc error object</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.data.serializers.jsonrpc.JsonRpcError" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcError"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcError</span></tt></a></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">json rpc error object</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_error_invalid_params">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">vapi_jsonrpc_error_invalid_params</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#vapi_jsonrpc_error_invalid_params"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_error_invalid_params" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>vapi json rpc invalid params 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"><strong>data</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – json rpc error object</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.data.serializers.jsonrpc.JsonRpcError" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcError"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcError</span></tt></a></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">json rpc error object</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_error_invalid_request">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">vapi_jsonrpc_error_invalid_request</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#vapi_jsonrpc_error_invalid_request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_error_invalid_request" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>vapi json rpc invalid request 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"><strong>data</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – json rpc error object</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.data.serializers.jsonrpc.JsonRpcError" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcError"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcError</span></tt></a></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">json rpc error object</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_error_method_not_found">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">vapi_jsonrpc_error_method_not_found</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#vapi_jsonrpc_error_method_not_found"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_error_method_not_found" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>vapi json rpc method not found 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"><strong>data</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – json rpc error object</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.data.serializers.jsonrpc.JsonRpcError" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcError"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcError</span></tt></a></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">json rpc error object</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_error_parse_error">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">vapi_jsonrpc_error_parse_error</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#vapi_jsonrpc_error_parse_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_error_parse_error" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>vapi json rpc parse 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"><strong>data</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – json rpc error object</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.data.serializers.jsonrpc.JsonRpcError" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcError"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcError</span></tt></a></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">json rpc error object</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_error_transport_error">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">vapi_jsonrpc_error_transport_error</tt><big>(</big><em>data=None</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#vapi_jsonrpc_error_transport_error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_error_transport_error" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>vapi json rpc transport 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"><strong>data</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – json rpc error object</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.data.serializers.jsonrpc.JsonRpcError" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcError"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcError</span></tt></a></td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">json rpc error object</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_notification_factory">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">vapi_jsonrpc_notification_factory</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#vapi_jsonrpc_notification_factory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_notification_factory" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>vapi json rpc notification factory</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>method</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – json rpc method</li>
|
||
|
<li><strong>params</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">list</span></tt> or None) – json rpc method params</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.serializers.jsonrpc.JsonRpcRequest" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcRequest"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcRequest</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">json rpc request object</p>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_request_factory">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">vapi_jsonrpc_request_factory</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#vapi_jsonrpc_request_factory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_request_factory" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Json rpc request factory</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>method</strong> (<tt class="xref py py-class docutils literal"><span class="pre">str</span></tt>) – json rpc method</li>
|
||
|
<li><strong>params</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">list</span></tt> or None) – json rpc method params</li>
|
||
|
<li><strong>id</strong> (<tt class="xref py py-class docutils literal"><span class="pre">long</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">int</span></tt> or <tt class="xref py py-class docutils literal"><span class="pre">str</span></tt> or None) – json rpc request id. Do not set for notification</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.serializers.jsonrpc.JsonRpcRequest" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcRequest"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcRequest</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">json rpc request object</p>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_response_factory">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.jsonrpc.</tt><tt class="descname">vapi_jsonrpc_response_factory</tt><big>(</big><em>request</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/jsonrpc.html#vapi_jsonrpc_response_factory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.jsonrpc.vapi_jsonrpc_response_factory" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>vapi json rpc response factory</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</strong> (<a class="reference internal" href="#vmware.vapi.data.serializers.jsonrpc.JsonRpcRequest" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcRequest"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcRequest</span></tt></a>) – json rpc request object</li>
|
||
|
<li><strong>kwargs</strong> (<tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt>) – See JsonRpc20Response for constructor 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.data.serializers.jsonrpc.JsonRpcResponse" title="vmware.vapi.data.serializers.jsonrpc.JsonRpcResponse"><tt class="xref py py-class docutils literal"><span class="pre">JsonRpcResponse</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">json rpc response object</p>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
</div>
|
||
|
<div class="section" id="module-vmware.vapi.data.serializers.python">
|
||
|
<span id="python-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">python</span></tt> Module<a class="headerlink" href="#module-vmware.vapi.data.serializers.python" title="Permalink to this headline">¶</a></h2>
|
||
|
<p>Convenience methods to convert to/from python native values to data values</p>
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.python.build_data_value">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.python.</tt><tt class="descname">build_data_value</tt><big>(</big><em>py_value</em>, <em>data_def</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/python.html#build_data_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.python.build_data_value" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>Converts a native python value to data value
|
||
|
using the provided data definition</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>py_value</strong> (<tt class="xref py py-class docutils literal"><span class="pre">object</span></tt>) – Python native value</li>
|
||
|
<li><strong>data_def</strong> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.definition.DataDefinition" title="vmware.vapi.data.definition.DataDefinition"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.definition.DataDefinition</span></tt></a>) – Data definition</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.DataValue" title="vmware.vapi.data.value.DataValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.DataValue</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">Data value</p>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
<dl class="function">
|
||
|
<dt id="vmware.vapi.data.serializers.python.build_py_value">
|
||
|
<tt class="descclassname">vmware.vapi.data.serializers.python.</tt><tt class="descname">build_py_value</tt><big>(</big><em>data_value</em>, <em>data_def=None</em>, <em>impl=None</em><big>)</big><a class="reference internal" href="_modules/vmware/vapi/data/serializers/python.html#build_py_value"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#vmware.vapi.data.serializers.python.build_py_value" title="Permalink to this definition">¶</a></dt>
|
||
|
<dd><p>”
|
||
|
Converts a data value to python native value
|
||
|
impl input is required to create Struct class instances</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>data_value</strong> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.value.DataValue" title="vmware.vapi.data.value.DataValue"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.value.DataValue</span></tt></a>) – Input data value</li>
|
||
|
<li><strong>data_def</strong> (<a class="reference internal" href="vmware.vapi.data.html#vmware.vapi.data.definition.DataDefinition" title="vmware.vapi.data.definition.DataDefinition"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.data.definition.DataDefinition</span></tt></a> or <tt class="docutils literal"><span class="pre">None</span></tt>) – Data definition</li>
|
||
|
<li><strong>impl</strong> (<a class="reference internal" href="vmware.vapi.bindings.html#vmware.vapi.bindings.stub.VapiInterface" title="vmware.vapi.bindings.stub.VapiInterface"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.bindings.stub.VapiInterface</span></tt></a> or
|
||
|
<a class="reference internal" href="vmware.vapi.bindings.html#vmware.vapi.bindings.skeleton.VapiInterface" title="vmware.vapi.bindings.skeleton.VapiInterface"><tt class="xref py py-class docutils literal"><span class="pre">vmware.vapi.bindings.skeleton.VapiInterface</span></tt></a> or <tt class="docutils literal"><span class="pre">None</span></tt>) – Python generated class to resolve structure classes</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">object</span></tt></p>
|
||
|
</td>
|
||
|
</tr>
|
||
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">Native python value</p>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</dd></dl>
|
||
|
|
||
|
</div>
|
||
|
<div class="section" id="subpackages">
|
||
|
<h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2>
|
||
|
<div class="toctree-wrapper compound">
|
||
|
<ul class="simple">
|
||
|
</ul>
|
||
|
</div>
|
||
|
</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="#">serializers Package</a><ul>
|
||
|
<li><a class="reference internal" href="#id1"><tt class="docutils literal"><span class="pre">serializers</span></tt> Package</a></li>
|
||
|
<li><a class="reference internal" href="#module-vmware.vapi.data.serializers.cleanjson"><tt class="docutils literal"><span class="pre">cleanjson</span></tt> Module</a></li>
|
||
|
<li><a class="reference internal" href="#module-vmware.vapi.data.serializers.introspection"><tt class="docutils literal"><span class="pre">introspection</span></tt> Module</a></li>
|
||
|
<li><a class="reference internal" href="#module-vmware.vapi.data.serializers.jsonrpc"><tt class="docutils literal"><span class="pre">jsonrpc</span></tt> Module</a></li>
|
||
|
<li><a class="reference internal" href="#module-vmware.vapi.data.serializers.python"><tt class="docutils literal"><span class="pre">python</span></tt> Module</a></li>
|
||
|
<li><a class="reference internal" href="#subpackages">Subpackages</a><ul>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ul>
|
||
|
|
||
|
<h4>Previous topic</h4>
|
||
|
<p class="topless"><a href="vmware.vapi.data.html"
|
||
|
title="previous chapter">data Package</a></p>
|
||
|
<h4>Next topic</h4>
|
||
|
<p class="topless"><a href="vmware.vapi.debug.html"
|
||
|
title="next chapter">debug Package</a></p>
|
||
|
<h3>This Page</h3>
|
||
|
<ul class="this-page-menu">
|
||
|
<li><a href="_sources/vmware.vapi.data.serializers.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.debug.html" title="debug Package"
|
||
|
>next</a> |</li>
|
||
|
<li class="right" >
|
||
|
<a href="vmware.vapi.data.html" title="data Package"
|
||
|
>previous</a> |</li>
|
||
|
<li><a href="index.html">vSphere Automation SDK for Python 6.5.0 documentation</a> »</li>
|
||
|
<li><a href="vmware.html" >vmware Package</a> »</li>
|
||
|
<li><a href="vmware.vapi.html" >vapi Package</a> »</li>
|
||
|
<li><a href="vmware.vapi.data.html" >data Package</a> »</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
<div class="footer">
|
||
|
© Copyright 2014, VMware, Inc..
|
||
|
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|