<spanid="vmware-vapi-package"></span><h1>vmware.vapi package<aclass="headerlink"href="#module-vmware.vapi"title="Permalink to this headline">¶</a></h1>
<divclass="section"id="subpackages">
<h2>Subpackages<aclass="headerlink"href="#subpackages"title="Permalink to this headline">¶</a></h2>
<h2>Submodules<aclass="headerlink"href="#submodules"title="Permalink to this headline">¶</a></h2>
</div>
<divclass="section"id="module-vmware.vapi.core">
<spanid="vmware-vapi-core-module"></span><h2>vmware.vapi.core module<aclass="headerlink"href="#module-vmware.vapi.core"title="Permalink to this headline">¶</a></h2>
<p>Core Protocol Definition classes</p>
<dlclass="class">
<dtid="vmware.vapi.core.ApiInterface">
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.core.</code><codeclass="descname">ApiInterface</code><aclass="headerlink"href="#vmware.vapi.core.ApiInterface"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_definition</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.ApiInterface.get_definition"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_identifier</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.ApiInterface.get_identifier"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_method_definition</code><spanclass="sig-paren">(</span><em>method_id</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.ApiInterface.get_method_definition"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">invoke</code><spanclass="sig-paren">(</span><em>ctx</em>, <em>method_id</em>, <em>input_value</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.ApiInterface.invoke"title="Permalink to this definition">¶</a></dt>
<dd><p>Invokes the specified method using the execution context and
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.core.</code><codeclass="descname">ApiProvider</code><aclass="headerlink"href="#vmware.vapi.core.ApiProvider"title="Permalink to this definition">¶</a></dt>
<p>The ApiProvider interface is used for invocation of operations</p>
<dlclass="method">
<dtid="vmware.vapi.core.ApiProvider.invoke">
<codeclass="descname">invoke</code><spanclass="sig-paren">(</span><em>service_id</em>, <em>operation_id</em>, <em>input_value</em>, <em>ctx</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.ApiProvider.invoke"title="Permalink to this definition">¶</a></dt>
<dd><p>Invokes the specified method using the input value and the
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.core.</code><codeclass="descname">ApplicationContext</code><spanclass="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.ApplicationContext"title="Permalink to this definition">¶</a></dt>
<p>Interface representing additional data associated with the request for
method execution represented by this ExecutionContext.
The additional data format is key-value pairs of String.</p>
<p>This additional data is provided by the client initiating the
execution, it is then transported as is over the wire and is
available for the provider-side service implementations on the server.
This extra data is completely opaque for the infrastructure, in other
words it is a contract between the client and the service implementation
only.</p>
</dd></dl>
<dlclass="class">
<dtid="vmware.vapi.core.CustomDict">
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.core.</code><codeclass="descname">CustomDict</code><aclass="headerlink"href="#vmware.vapi.core.CustomDict"title="Permalink to this definition">¶</a></dt>
<p>Interface for implementing Custom dict classes with additional constraints.</p>
<p>Overriding __setitem__ as not enough for adding additional constraints on
key/value pairs of dictionaries. We also have to override update and
setdefault, so that even they use __setitem__.</p>
<dlclass="method">
<dtid="vmware.vapi.core.CustomDict.setdefault">
<codeclass="descname">setdefault</code><spanclass="sig-paren">(</span><em>k</em><spanclass="optional">[</span>, <em>d</em><spanclass="optional">]</span><spanclass="sig-paren">)</span>→ D.get(k,d), also set D[k]=d if k not in D<aclass="headerlink"href="#vmware.vapi.core.CustomDict.setdefault"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="vmware.vapi.core.CustomDict.update">
<codeclass="descname">update</code><spanclass="sig-paren">(</span><spanclass="optional">[</span><em>E</em>, <spanclass="optional">]</span><em>**F</em><spanclass="sig-paren">)</span>→ None. Update D from dict/iterable E and F.<aclass="headerlink"href="#vmware.vapi.core.CustomDict.update"title="Permalink to this definition">¶</a></dt>
<dd><p>If E is present and has a .keys() method, then does: for k in E: D[k] = E[k]
If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v
In either case, this is followed by: for k in F: D[k] = F[k]</p>
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.core.</code><codeclass="descname">ExecutionContext</code><spanclass="sig-paren">(</span><em>application_context=None</em>, <em>security_context=None</em>, <em>runtime_data=None</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.ExecutionContext"title="Permalink to this definition">¶</a></dt>
<p>This class provides out-of-band context information that is passed along
with a method invocation</p>
<p>Initialize Execution Context</p>
</dd></dl>
<dlclass="class">
<dtid="vmware.vapi.core.InterfaceDefinition">
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.core.</code><codeclass="descname">InterfaceDefinition</code><spanclass="sig-paren">(</span><em>id_</em>, <em>method_ids</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.InterfaceDefinition"title="Permalink to this definition">¶</a></dt>
<li><p><strong>id</strong> (<aclass="reference internal"href="#vmware.vapi.core.InterfaceIdentifier"title="vmware.vapi.core.InterfaceIdentifier"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">InterfaceIdentifier</span></code></a>) – InterfaceIdentifier of this interface</p></li>
<li><p><strong>method_ids</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">list</span></code> of <aclass="reference internal"href="#vmware.vapi.core.MethodIdentifier"title="vmware.vapi.core.MethodIdentifier"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">MethodIdentifier</span></code></a>) – List of method identifiers of the methods exposed by
<codeclass="descname">get_identifier</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.InterfaceDefinition.get_identifier"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_method_identifiers</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.InterfaceDefinition.get_method_identifiers"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the list of method identifiers of the methods exposed by this
interface. Each method identifier is unique within an interface. The
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.core.</code><codeclass="descname">InterfaceIdentifier</code><spanclass="sig-paren">(</span><em>iface</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.InterfaceIdentifier"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_name</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.InterfaceIdentifier.get_name"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the string identifier of the interface</p>
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.core.</code><codeclass="descname">MethodDefinition</code><spanclass="sig-paren">(</span><em>id_</em>, <em>input_</em>, <em>output</em>, <em>errors</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.MethodDefinition"title="Permalink to this definition">¶</a></dt>
<li><p><strong>id</strong> (<aclass="reference internal"href="#vmware.vapi.core.MethodIdentifier"title="vmware.vapi.core.MethodIdentifier"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">MethodIdentifier</span></code></a>) – MethodIdentifier of this method</p></li>
<li><p><strong>input</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">vmware.vapi.data.definition.StructDefinition</span></code>) – Struct definition corresponding to the method’s input
parameters</p></li>
<li><p><strong>output</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">vmware.vapi.data.definition.DataDefinition</span></code>) – Data definition of the method’s output</p></li>
<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">vmware.vapi.data.definition.ErrorDefinition</span></code>) – Error definitions describing the errors that this method
<codeclass="descname">get_error_definition</code><spanclass="sig-paren">(</span><em>error_name</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.MethodDefinition.get_error_definition"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the error definition with the specified name reported by this
method or None if this method doesn’t report an error with the specified
<ddclass="field-odd"><p><strong>error_name</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Name of the error definition to return</p>
<codeclass="descname">get_error_definitions</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.MethodDefinition.get_error_definitions"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a set of error definitions describing the errors that this
<codeclass="descname">get_identifier</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.MethodDefinition.get_identifier"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_input_definition</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.MethodDefinition.get_input_definition"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the struct definition corresponding to the method’s input
parameters. The field names in the struct definition are the parameter
names and the field values correspond to the data definition of the
<codeclass="descname">get_output_definition</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.MethodDefinition.get_output_definition"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the data definition of the method’s output</p>
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.core.</code><codeclass="descname">MethodIdentifier</code><spanclass="sig-paren">(</span><em>iface</em>, <em>method</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.MethodIdentifier"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_interface_identifier</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.MethodIdentifier.get_interface_identifier"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the interface identifier of the method</p>
<codeclass="descname">get_name</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.MethodIdentifier.get_name"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the string identifier of the method</p>
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.core.</code><codeclass="descname">MethodResult</code><spanclass="sig-paren">(</span><em>output=None</em>, <em>error=None</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.MethodResult"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">success</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.MethodResult.success"title="Permalink to this definition">¶</a></dt>
<dd><p>Check if the method completed successfully.</p>
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.core.</code><codeclass="descname">ProviderDefinition</code><spanclass="sig-paren">(</span><em>name</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.ProviderDefinition"title="Permalink to this definition">¶</a></dt>
<ddclass="field-odd"><p><strong>name</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Name of the provider</p>
<codeclass="descname">get_identifier</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.ProviderDefinition.get_identifier"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.core.</code><codeclass="descname">RuntimeData</code><spanclass="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.RuntimeData"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.core.</code><codeclass="descname">SecurityContext</code><spanclass="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.SecurityContext"title="Permalink to this definition">¶</a></dt>
<spanid="vmware-vapi-exception-module"></span><h2>vmware.vapi.exception module<aclass="headerlink"href="#module-vmware.vapi.exception"title="Permalink to this headline">¶</a></h2>
<p>vAPI CoreException Class</p>
<dlclass="exception">
<dtid="vmware.vapi.exception.CoreException">
<emclass="property">exception </em><codeclass="descclassname">vmware.vapi.exception.</code><codeclass="descname">CoreException</code><spanclass="sig-paren">(</span><em>message</em>, <em>cause=None</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.exception.CoreException"title="Permalink to this definition">¶</a></dt>
<ddclass="field-odd"><p><aclass="reference internal"href="com.vmware.html#com.vmware.appliance_client.Health.messages"title="com.vmware.appliance_client.Health.messages"><strong>messages</strong></a>– Generator of error messages describing why the Exception
<codeclass="descname">messages</code><aclass="headerlink"href="#vmware.vapi.exception.CoreException.messages"title="Permalink to this definition">¶</a></dt>
<spanid="vmware-vapi-message-module"></span><h2>vmware.vapi.message module<aclass="headerlink"href="#module-vmware.vapi.message"title="Permalink to this headline">¶</a></h2>
<p>vAPI Message class</p>
<dlclass="class">
<dtid="vmware.vapi.message.Message">
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.message.</code><codeclass="descname">Message</code><spanclass="sig-paren">(</span><em>id_</em>, <em>def_msg</em>, <em>*args</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.message.Message"title="Permalink to this definition">¶</a></dt>
<li><p><strong>def_msg</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">string</span></code>) – An english language default</p></li>
<li><p><strong>args</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">list</span></code> of <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">string</span></code>) – The arguments to be used for the messsage</p></li>
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.message.</code><codeclass="descname">MessageBundle</code><spanclass="sig-paren">(</span><em>messages</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.message.MessageBundle"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get</code><spanclass="sig-paren">(</span><em>msg_id</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.message.MessageBundle.get"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the message template for the given message identifier</p>
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.message.</code><codeclass="descname">MessageFactory</code><spanclass="sig-paren">(</span><em>msg_bundle</em>, <em>formatter</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.message.MessageFactory"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">get_message</code><spanclass="sig-paren">(</span><em>id_</em>, <em>*args</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.message.MessageFactory.get_message"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a message object for the given id with the given args.
If the message is not found, a default unknown message is returned.</p>
<li><p><strong>id</strong> (<em>string</em>) – The unique message identifier</p></li>
<li><p><strong>args</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">list</span></code> of <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">object</span></code>) – The arguments to be used for constructing this message</p></li>
<emclass="property">class </em><codeclass="descclassname">vmware.vapi.message.</code><codeclass="descname">MessageFormatter</code><aclass="headerlink"href="#vmware.vapi.message.MessageFormatter"title="Permalink to this definition">¶</a></dt>
<emclass="property">classmethod </em><codeclass="descname">format_msg</code><spanclass="sig-paren">(</span><em>msg</em>, <em>args</em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.message.MessageFormatter.format_msg"title="Permalink to this definition">¶</a></dt>
<dd><p>Format the message using the specified arguments</p>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.