<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>
<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="py class">
<dtid="vmware.vapi.core.ApiInterface">
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.core.</span></code><codeclass="sig-name descname"><spanclass="pre">ApiInterface</span></code><aclass="headerlink"href="#vmware.vapi.core.ApiInterface"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname"><spanclass="pre">get_definition</span></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="sig-name descname"><spanclass="pre">get_identifier</span></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="sig-name descname"><spanclass="pre">get_method_definition</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">method_id</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.ApiInterface.get_method_definition"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname"><spanclass="pre">invoke</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">ctx</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">method_id</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">input_value</span></span></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
the input provided</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>ctx</strong> (<aclass="reference internal"href="#vmware.vapi.core.ExecutionContext"title="vmware.vapi.core.ExecutionContext"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">ExecutionContext</span></code></a>) – Execution context for this method</p></li>
<ddclass="field-odd"><p>Result of the method invocation</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="vmware.vapi.core.ApiProvider">
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.core.</span></code><codeclass="sig-name descname"><spanclass="pre">ApiProvider</span></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="py method">
<dtid="vmware.vapi.core.ApiProvider.invoke">
<emclass="property"><spanclass="pre">abstract</span></em><codeclass="sig-name descname"><spanclass="pre">invoke</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">service_id</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">operation_id</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">input_value</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">ctx</span></span></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
the execution context provided</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<li><p><strong>service_id</strong> (<codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">str</span></code>) – Service identifier</p></li>
<ddclass="field-odd"><p>Result of the method invocation</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="vmware.vapi.core.ApplicationContext">
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.core.</span></code><codeclass="sig-name descname"><spanclass="pre">ApplicationContext</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o"><spanclass="pre">*</span></span><spanclass="n"><spanclass="pre">args</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.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="py class">
<dtid="vmware.vapi.core.CustomDict">
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.core.</span></code><codeclass="sig-name descname"><spanclass="pre">CustomDict</span></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="py method">
<dtid="vmware.vapi.core.CustomDict.setdefault">
<codeclass="sig-name descname"><spanclass="pre">setdefault</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="pre">k</span></em><spanclass="optional">[</span>, <emclass="sig-param"><spanclass="pre">d</span></em><spanclass="optional">]</span><spanclass="sig-paren">)</span>→<spanclass="pre">D.get(k,d),</span><spanclass="pre">also</span><spanclass="pre">set</span><spanclass="pre">D[k]=d</span><spanclass="pre">if</span><spanclass="pre">k</span><spanclass="pre">not</span><spanclass="pre">in</span><spanclass="pre">D</span><aclass="headerlink"href="#vmware.vapi.core.CustomDict.setdefault"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="py method">
<dtid="vmware.vapi.core.CustomDict.update">
<codeclass="sig-name descname"><spanclass="pre">update</span></code><spanclass="sig-paren">(</span><spanclass="optional">[</span><emclass="sig-param"><spanclass="pre">E</span></em>, <spanclass="optional">]</span><emclass="sig-param"><spanclass="pre">**F</span></em><spanclass="sig-paren">)</span>→<spanclass="pre">None.</span> <spanclass="pre">Update</span><spanclass="pre">D</span><spanclass="pre">from</span><spanclass="pre">dict/iterable</span><spanclass="pre">E</span><spanclass="pre">and</span><spanclass="pre">F.</span><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>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="vmware.vapi.core.ExecutionContext">
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.core.</span></code><codeclass="sig-name descname"><spanclass="pre">ExecutionContext</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">application_context</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">security_context</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">runtime_data</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></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="py class">
<dtid="vmware.vapi.core.InterfaceDefinition">
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.core.</span></code><codeclass="sig-name descname"><spanclass="pre">InterfaceDefinition</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">id_</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">method_ids</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.InterfaceDefinition"title="Permalink to this definition">¶</a></dt>
<p>The InterfaceDefinition class contains detailed information about a
vAPI interface. This should contain all the information required
to address an interface in the vAPI runtime.</p>
<p>Initialize the InterfaceDefinition</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<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="sig-name descname"><spanclass="pre">get_identifier</span></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="sig-name descname"><spanclass="pre">get_method_identifiers</span></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
<ddclass="field-even"><p>List of method identifiers of the methods exposed by this
interface</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="vmware.vapi.core.InterfaceIdentifier">
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.core.</span></code><codeclass="sig-name descname"><spanclass="pre">InterfaceIdentifier</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">iface</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.InterfaceIdentifier"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname"><spanclass="pre">get_name</span></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>
<ddclass="field-even"><p>String identifier of the interface</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="vmware.vapi.core.MethodDefinition">
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.core.</span></code><codeclass="sig-name descname"><spanclass="pre">MethodDefinition</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">id_</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">input_</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">output</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">errors</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.MethodDefinition"title="Permalink to this definition">¶</a></dt>
<p>This class contains detailed information about a vAPI method. This should
contain all the information required to address a method in the vAPI
runtime.</p>
<p>Initialize MethodDefinition</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<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>
<li><p><strong>errors</strong> (iterable of
<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="sig-name descname"><spanclass="pre">get_error_definition</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">error_name</span></span></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
name.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<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="sig-name descname"><spanclass="pre">get_error_definitions</span></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
method can report</p>
<dlclass="field-list simple">
<dtclass="field-odd">Return type</dt>
<ddclass="field-odd"><p><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">set</span></code> of
<codeclass="sig-name descname"><spanclass="pre">get_identifier</span></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="sig-name descname"><spanclass="pre">get_input_definition</span></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="sig-name descname"><spanclass="pre">get_output_definition</span></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>
<ddclass="field-even"><p>Data definition of the method’s output</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="vmware.vapi.core.MethodIdentifier">
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.core.</span></code><codeclass="sig-name descname"><spanclass="pre">MethodIdentifier</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">iface</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">method</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.MethodIdentifier"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname"><spanclass="pre">get_interface_identifier</span></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="sig-name descname"><spanclass="pre">get_name</span></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>
<ddclass="field-even"><p>String identifier of the method</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="vmware.vapi.core.MethodResult">
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.core.</span></code><codeclass="sig-name descname"><spanclass="pre">MethodResult</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">output</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">error</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.MethodResult"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><codeclass="sig-name descname"><spanclass="pre">error</span></code><aclass="headerlink"href="#vmware.vapi.core.MethodResult.error"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">property</span></em><codeclass="sig-name descname"><spanclass="pre">output</span></code><aclass="headerlink"href="#vmware.vapi.core.MethodResult.output"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname"><spanclass="pre">success</span></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>
<ddclass="field-even"><p>False if the method reported an error, True otherwise</p>
</dd>
</dl>
</dd></dl>
</dd></dl>
<dlclass="py class">
<dtid="vmware.vapi.core.ProviderDefinition">
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.core.</span></code><codeclass="sig-name descname"><spanclass="pre">ProviderDefinition</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">name</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.ProviderDefinition"title="Permalink to this definition">¶</a></dt>
<p>The ProviderDefinition class contains details information about a
vAPI provider</p>
<p>Initialize the ProviderDefinition</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</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="sig-name descname"><spanclass="pre">get_identifier</span></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"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.core.</span></code><codeclass="sig-name descname"><spanclass="pre">RuntimeData</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o"><spanclass="pre">*</span></span><spanclass="n"><spanclass="pre">args</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.core.RuntimeData"title="Permalink to this definition">¶</a></dt>
<p>Implementations of this interface will provide custom runtime data.</p>
</dd></dl>
<dlclass="py class">
<dtid="vmware.vapi.core.SecurityContext">
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.core.</span></code><codeclass="sig-name descname"><spanclass="pre">SecurityContext</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="o"><spanclass="pre">*</span></span><spanclass="n"><spanclass="pre">args</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">**</span></span><spanclass="n"><spanclass="pre">kwargs</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.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>
<emclass="property"><spanclass="pre">exception</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.exception.</span></code><codeclass="sig-name descname"><spanclass="pre">CoreException</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">message</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">cause</span></span><spanclass="o"><spanclass="pre">=</span></span><spanclass="default_value"><spanclass="pre">None</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.exception.CoreException"title="Permalink to this definition">¶</a></dt>
<p>This exception is raised by various components of the vAPI runtime
infrastructure to indicate failures in that infrastructure.</p>
<p>Server-side the exception is caught by specific components and an
internal_server_error is reported to the client that invoked the
request. Client-side the exception may be raised for certain failures
before a request was sent to the server or after the response was
received from the server. Similarly, server-side the exception may
be raised for failures that occur when a provider implementation
invokes the vAPI runtime.</p>
<p>This exception is not part of the vAPI message protocol, and it must
never be raised by provider implementations.</p>
<dlclass="field-list simple">
<dtclass="field-odd">Variables</dt>
<ddclass="field-odd"><p><aclass="reference internal"href="#vmware.vapi.exception.CoreException.messages"title="vmware.vapi.exception.CoreException.messages"><strong>messages</strong></a>– Generator of error messages describing why the Exception
was raised</p>
</dd>
</dl>
<p>Initialize CoreException</p>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><p><strong>message</strong> (<aclass="reference internal"href="#vmware.vapi.message.Message"title="vmware.vapi.message.Message"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">vmware.vapi.message.Message</span></code></a>) – Description regarding why the Exception was raised</p>
<emclass="property"><spanclass="pre">property</span></em><codeclass="sig-name descname"><spanclass="pre">messages</span></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>
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.message.</span></code><codeclass="sig-name descname"><spanclass="pre">Message</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">id_</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">def_msg</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">*</span></span><spanclass="n"><spanclass="pre">args</span></span></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"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.message.</span></code><codeclass="sig-name descname"><spanclass="pre">MessageBundle</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">messages</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.message.MessageBundle"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname"><spanclass="pre">get</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">msg_id</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.message.MessageBundle.get"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.message.</span></code><codeclass="sig-name descname"><spanclass="pre">MessageFactory</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">msg_bundle</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">formatter</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.message.MessageFactory"title="Permalink to this definition">¶</a></dt>
<codeclass="sig-name descname"><spanclass="pre">get_message</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">id_</span></span></em>, <emclass="sig-param"><spanclass="o"><spanclass="pre">*</span></span><spanclass="n"><spanclass="pre">args</span></span></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>
<dlclass="field-list simple">
<dtclass="field-odd">Parameters</dt>
<ddclass="field-odd"><ulclass="simple">
<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"><spanclass="pre">class</span></em><codeclass="sig-prename descclassname"><spanclass="pre">vmware.vapi.message.</span></code><codeclass="sig-name descname"><spanclass="pre">MessageFormatter</span></code><aclass="headerlink"href="#vmware.vapi.message.MessageFormatter"title="Permalink to this definition">¶</a></dt>
<emclass="property"><spanclass="pre">classmethod</span></em><codeclass="sig-name descname"><spanclass="pre">format_msg</span></code><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">msg</span></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">args</span></span></em><spanclass="sig-paren">)</span><aclass="headerlink"href="#vmware.vapi.message.MessageFormatter.format_msg"title="Permalink to this definition">¶</a></dt>