1377 lines
98 KiB
HTML
1377 lines
98 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>hplefthandclient Package — HP LeftHand REST Client 1.0.0 documentation</title>
|
|
|
|
<link rel="stylesheet" href="_static/default.css" type="text/css" />
|
|
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
|
|
|
|
<script type="text/javascript">
|
|
var DOCUMENTATION_OPTIONS = {
|
|
URL_ROOT: '',
|
|
VERSION: '1.0.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="HP LeftHand REST Client 1.0.0 documentation" href="index.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><a href="index.html">HP LeftHand REST Client 1.0.0 documentation</a> »</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="document">
|
|
<div class="documentwrapper">
|
|
<div class="bodywrapper">
|
|
<div class="body">
|
|
|
|
<div class="section" id="hplefthandclient-package">
|
|
<h1>hplefthandclient Package<a class="headerlink" href="#hplefthandclient-package" title="Permalink to this headline">¶</a></h1>
|
|
<div class="section" id="id1">
|
|
<h2><a class="reference internal" href="api/hplefthandclient/index.html#module-hplefthandclient" title="hplefthandclient: HP LeftHand REST Web client"><tt class="xref py py-mod docutils literal"><span class="pre">hplefthandclient</span></tt></a> Package<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
|
|
<span class="target" id="module-hplefthandclient.__init__"></span><p>HP LeftHand REST Client</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">Author:</th><td class="field-body">Kurt Martin</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Author:</th><td class="field-body">Walter A. Boring IV</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Copyright:</th><td class="field-body">Copyright 2013, Hewlett Packard Development Company, L.P.</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">License:</th><td class="field-body">Apache v2.0</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<dl class="function">
|
|
<dt id="hplefthandclient.__init__.get_version_string">
|
|
<tt class="descclassname">hplefthandclient.__init__.</tt><tt class="descname">get_version_string</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/hplefthandclient/__init__.html#get_version_string"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.__init__.get_version_string" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="data">
|
|
<dt id="hplefthandclient.__init__.version">
|
|
<tt class="descclassname">hplefthandclient.__init__.</tt><tt class="descname">version</tt><em class="property"> = '1.0.0'</em><a class="headerlink" href="#hplefthandclient.__init__.version" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Current version of HPLeftHandClient.</p>
|
|
</dd></dl>
|
|
|
|
</div>
|
|
<div class="section" id="module-hplefthandclient.client">
|
|
<span id="client-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">client</span></tt> Module<a class="headerlink" href="#module-hplefthandclient.client" title="Permalink to this headline">¶</a></h2>
|
|
<p>HPLeftHand REST Client</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">Author:</th><td class="field-body">Kurt Martin</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Description:</th><td class="field-body">This is the LeftHand/StoreVirtual Client that talks to the</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>LeftHand OS REST Service.</p>
|
|
<p>This client requires and works with version 11.5 of the LeftHand firmware</p>
|
|
<dl class="class">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient">
|
|
<em class="property">class </em><tt class="descclassname">hplefthandclient.client.</tt><tt class="descname">HPLeftHandClient</tt><big>(</big><em>api_url</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient" title="Permalink to this definition">¶</a></dt>
|
|
<dd><dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.addServerAccess">
|
|
<tt class="descname">addServerAccess</tt><big>(</big><em>volume_id</em>, <em>server_id</em>, <em>optional=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.addServerAccess"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.addServerAccess" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Assign a Volume to a Server</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>volume_id</strong> – Volume ID of the volume</li>
|
|
<li><strong>server_id</strong> – Server ID of the server to add the volume to</li>
|
|
<li><strong>optional</strong> (<em>dict</em>) – Dictionary of optional params</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="highlight-python"><div class="highlight"><pre><span class="n">optional</span> <span class="o">=</span> <span class="p">{</span>
|
|
<span class="s">'Transport'</span> <span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
|
<span class="s">'Lun'</span> <span class="p">:</span> <span class="mi">1</span><span class="p">,</span>
|
|
<span class="p">}</span>
|
|
</pre></div>
|
|
</div>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.cloneSnapshot">
|
|
<tt class="descname">cloneSnapshot</tt><big>(</big><em>name</em>, <em>source_snapshot_id</em>, <em>optional=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.cloneSnapshot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.cloneSnapshot" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Create a clone of an existing Shapshot</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>name</strong> (<em>str</em>) – Name of the Snapshot clone</li>
|
|
<li><strong>source_snapshot_id</strong> (<em>int</em>) – The snapshot you want to clone</li>
|
|
<li><strong>optional</strong> (<em>dict</em>) – Dictionary of optional params</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="highlight-python"><div class="highlight"><pre><span class="n">optional</span> <span class="o">=</span> <span class="p">{</span>
|
|
<span class="s">'description'</span> <span class="p">:</span> <span class="s">"some comment"</span>
|
|
<span class="p">}</span>
|
|
</pre></div>
|
|
</div>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.cloneVolume">
|
|
<tt class="descname">cloneVolume</tt><big>(</big><em>name</em>, <em>source_volume_id</em>, <em>optional=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.cloneVolume"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.cloneVolume" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Create a clone of an existing Volume</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>name</strong> (<em>str</em>) – Name of the Volume clone</li>
|
|
<li><strong>source_volume_id</strong> (<em>int</em>) – The Volume you want to clone</li>
|
|
<li><strong>optional</strong> (<em>dict</em>) – Dictionary of optional params</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="highlight-python"><div class="highlight"><pre><span class="n">optional</span> <span class="o">=</span> <span class="p">{</span>
|
|
<span class="s">'description'</span> <span class="p">:</span> <span class="s">"some comment"</span>
|
|
<span class="p">}</span>
|
|
</pre></div>
|
|
</div>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.createServer">
|
|
<tt class="descname">createServer</tt><big>(</big><em>name</em>, <em>iqn</em>, <em>optional=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.createServer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.createServer" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Create a server by name</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>name</strong> (<em>str</em>) – The name of the server to create</li>
|
|
<li><strong>iqn</strong> – The iSCSI qualified name</li>
|
|
<li><strong>optional</strong> (<em>dict</em>) – Dictionary of optional params</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="highlight-python"><div class="highlight"><pre><span class="n">optional</span> <span class="o">=</span> <span class="p">{</span>
|
|
<span class="s">'description'</span> <span class="p">:</span> <span class="s">"some comment"</span><span class="p">,</span>
|
|
<span class="s">'iscsiEnabled'</span> <span class="p">:</span> <span class="bp">True</span><span class="p">,</span>
|
|
<span class="s">'chapName'</span><span class="p">:</span> <span class="s">"some chap name"</span><span class="p">,</span>
|
|
<span class="s">'chapAuthenticationRequired'</span><span class="p">:</span> <span class="bp">False</span><span class="p">,</span>
|
|
<span class="s">'chapInitiatorSecret'</span><span class="p">:</span> <span class="s">"initiator secret"</span><span class="p">,</span>
|
|
<span class="s">'chapTargetSecret'</span><span class="p">:</span> <span class="s">"target secret"</span><span class="p">,</span>
|
|
<span class="s">'iscsiLoadBalancingEnabled'</span><span class="p">:</span> <span class="bp">True</span><span class="p">,</span>
|
|
<span class="s">'controllingServerName'</span><span class="p">:</span> <span class="s">"server name"</span><span class="p">,</span>
|
|
<span class="s">'fibreChannelEnabled'</span><span class="p">:</span> <span class="bp">False</span><span class="p">,</span>
|
|
<span class="s">'inServerCluster": True</span>
|
|
<span class="p">}</span>
|
|
</pre></div>
|
|
</div>
|
|
<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">Returns:</th><td class="field-body">server</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#hplefthandclient.exceptions.HTTPNotFound" title="hplefthandclient.exceptions.HTTPNotFound"><tt class="xref py py-class docutils literal"><span class="pre">HTTPNotFound</span></tt></a> -</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>NON_EXISTENT_SERVER - server doesn’t exist</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.createSnapshot">
|
|
<tt class="descname">createSnapshot</tt><big>(</big><em>name</em>, <em>source_volume_id</em>, <em>optional=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.createSnapshot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.createSnapshot" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Create a snapshot of an existing Volume</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>name</strong> (<em>str</em>) – Name of the Snapshot</li>
|
|
<li><strong>source_volume_id</strong> (<em>int</em>) – The volume you want to snapshot</li>
|
|
<li><strong>optional</strong> (<em>dict</em>) – Dictionary of optional params</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="highlight-python"><div class="highlight"><pre><span class="n">optional</span> <span class="o">=</span> <span class="p">{</span>
|
|
<span class="s">'description'</span> <span class="p">:</span> <span class="s">"some comment"</span><span class="p">,</span>
|
|
<span class="s">'inheritAccess'</span> <span class="p">:</span> <span class="n">false</span>
|
|
<span class="p">}</span>
|
|
</pre></div>
|
|
</div>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.createVolume">
|
|
<tt class="descname">createVolume</tt><big>(</big><em>name</em>, <em>cluster_id</em>, <em>size</em>, <em>optional=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.createVolume"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.createVolume" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Create a new volume</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>name</strong> (<em>str</em>) – the name of the volume</li>
|
|
<li><strong>cluster_id</strong> (<em>int</em>) – the cluster Id</li>
|
|
<li><strong>sizeKB</strong> (<em>int</em>) – size in KB for the volume</li>
|
|
<li><strong>optional</strong> (<em>dict</em>) – dict of other optional items</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<div class="highlight-python"><div class="highlight"><pre><span class="n">optional</span> <span class="o">=</span> <span class="p">{</span>
|
|
<span class="s">'description'</span><span class="p">:</span> <span class="s">'some comment'</span><span class="p">,</span>
|
|
<span class="s">'isThinProvisioned'</span><span class="p">:</span> <span class="s">'true'</span><span class="p">,</span>
|
|
<span class="s">'autogrowSeconds'</span><span class="p">:</span> <span class="mi">200</span><span class="p">,</span>
|
|
<span class="s">'clusterName'</span><span class="p">:</span> <span class="s">'somename'</span><span class="p">,</span>
|
|
<span class="s">'isAdaptiveOptimizationEnabled'</span><span class="p">:</span> <span class="s">'true'</span><span class="p">,</span>
|
|
<span class="s">'dataProtectionLevel'</span><span class="p">:</span> <span class="mi">2</span><span class="p">,</span>
|
|
<span class="p">}</span>
|
|
</pre></div>
|
|
</div>
|
|
<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">Returns:</th><td class="field-body">List of Volumes</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#hplefthandclient.exceptions.HTTPConflict" title="hplefthandclient.exceptions.HTTPConflict"><tt class="xref py py-class docutils literal"><span class="pre">HTTPConflict</span></tt></a> -</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>EXISTENT_SV - Volume Exists already</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.debug_rest">
|
|
<tt class="descname">debug_rest</tt><big>(</big><em>flag</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.debug_rest"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.debug_rest" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>This is useful for debugging requests to LeftHand</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>flag</strong> (<em>bool</em>) – set to True to enable debugging</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.deleteServer">
|
|
<tt class="descname">deleteServer</tt><big>(</big><em>server_id</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.deleteServer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.deleteServer" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Delete a Server</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>server_id</strong> – the server ID to delete</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#hplefthandclient.exceptions.HTTPNotFound" title="hplefthandclient.exceptions.HTTPNotFound"><tt class="xref py py-class docutils literal"><span class="pre">HTTPNotFound</span></tt></a> -</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>NON_EXISTENT_SERVER - The server does not exist</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.deleteSnapshot">
|
|
<tt class="descname">deleteSnapshot</tt><big>(</big><em>snapshot_id</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.deleteSnapshot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.deleteSnapshot" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Delete a Snapshot</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>snapshot_id</strong> – the snapshot ID to delete</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#hplefthandclient.exceptions.HTTPNotFound" title="hplefthandclient.exceptions.HTTPNotFound"><tt class="xref py py-class docutils literal"><span class="pre">HTTPNotFound</span></tt></a> -</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>NON_EXISTENT_SNAPSHOT - The snapshot does not exist</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.deleteVolume">
|
|
<tt class="descname">deleteVolume</tt><big>(</big><em>volume_id</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.deleteVolume"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.deleteVolume" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Delete a volume</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>name</strong> (<em>str</em>) – the name of the volume</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#hplefthandclient.exceptions.HTTPNotFound" title="hplefthandclient.exceptions.HTTPNotFound"><tt class="xref py py-class docutils literal"><span class="pre">HTTPNotFound</span></tt></a> -</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>NON_EXISTENT_VOL - The volume does not exist</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.getCluster">
|
|
<tt class="descname">getCluster</tt><big>(</big><em>cluster_id</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.getCluster"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.getCluster" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Get information about a Cluster</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>cluster_id</strong> (<em>str</em>) – The id of the cluster to find</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">cluster</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.getClusterByName">
|
|
<tt class="descname">getClusterByName</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.getClusterByName"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.getClusterByName" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Get information about a cluster by name</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>name</strong> (<em>str</em>) – The name of the cluster to find</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">cluster</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#hplefthandclient.exceptions.HTTPNotFound" title="hplefthandclient.exceptions.HTTPNotFound"><tt class="xref py py-class docutils literal"><span class="pre">HTTPNotFound</span></tt></a> -</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>NON_EXISTENT_CLUSTER - cluster doesn’t exist</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.getClusters">
|
|
<tt class="descname">getClusters</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.getClusters"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.getClusters" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Get the list of Clusters</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">Returns:</th><td class="field-body">list of Clusters</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.getServer">
|
|
<tt class="descname">getServer</tt><big>(</big><em>server_id</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.getServer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.getServer" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Get information about a server</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>server_id</strong> (<em>str</em>) – The id of the server to find</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">server</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#hplefthandclient.exceptions.HTTPServerError" title="hplefthandclient.exceptions.HTTPServerError"><tt class="xref py py-class docutils literal"><span class="pre">HTTPServerError</span></tt></a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.getServerByName">
|
|
<tt class="descname">getServerByName</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.getServerByName"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.getServerByName" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Get information about a server by name</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>name</strong> (<em>str</em>) – The name of the server to find</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">server</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#hplefthandclient.exceptions.HTTPNotFound" title="hplefthandclient.exceptions.HTTPNotFound"><tt class="xref py py-class docutils literal"><span class="pre">HTTPNotFound</span></tt></a> -</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>NON_EXISTENT_SERVER - server doesn’t exist</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.getServers">
|
|
<tt class="descname">getServers</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.getServers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.getServers" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Get the list of Servers</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">Returns:</th><td class="field-body">list of Servers</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.getSnapshot">
|
|
<tt class="descname">getSnapshot</tt><big>(</big><em>snapshot_id</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.getSnapshot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.getSnapshot" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Get information about a Snapshot</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">Returns:</th><td class="field-body">snapshot</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#hplefthandclient.exceptions.HTTPServerError" title="hplefthandclient.exceptions.HTTPServerError"><tt class="xref py py-class docutils literal"><span class="pre">HTTPServerError</span></tt></a></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.getSnapshotByName">
|
|
<tt class="descname">getSnapshotByName</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.getSnapshotByName"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.getSnapshotByName" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Get information about a snapshot by name</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>name</strong> – The name of the snapshot to find</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">volume</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#hplefthandclient.exceptions.HTTPNotFound" title="hplefthandclient.exceptions.HTTPNotFound"><tt class="xref py py-class docutils literal"><span class="pre">HTTPNotFound</span></tt></a> -</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>NON_EXISTENT_SNAP - shapshot doesn’t exist</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.getSnapshots">
|
|
<tt class="descname">getSnapshots</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.getSnapshots"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.getSnapshots" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Get the list of Snapshots</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">Returns:</th><td class="field-body">list of Snapshots</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.getVolume">
|
|
<tt class="descname">getVolume</tt><big>(</big><em>volume_id</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.getVolume"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.getVolume" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Get information about a volume</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>volume_id</strong> (<em>str</em>) – The id of the volume to find</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">volume</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#hplefthandclient.exceptions.HTTPNotFound" title="hplefthandclient.exceptions.HTTPNotFound"><tt class="xref py py-class docutils literal"><span class="pre">HTTPNotFound</span></tt></a> -</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>NON_EXISTENT_VOL - volume doesn’t exist</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.getVolumeByName">
|
|
<tt class="descname">getVolumeByName</tt><big>(</big><em>name</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.getVolumeByName"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.getVolumeByName" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Get information about a volume by name</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>name</strong> – The name of the volume to find</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">volume</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#hplefthandclient.exceptions.HTTPNotFound" title="hplefthandclient.exceptions.HTTPNotFound"><tt class="xref py py-class docutils literal"><span class="pre">HTTPNotFound</span></tt></a> -</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>NON_EXISTENT_VOL - volume doesn’t exist</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.getVolumes">
|
|
<tt class="descname">getVolumes</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.getVolumes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.getVolumes" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Get the list of Volumes</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">Returns:</th><td class="field-body">list of Volumes</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.login">
|
|
<tt class="descname">login</tt><big>(</big><em>username</em>, <em>password</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.login"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.login" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>This authenticates against the LH OS REST server and creates a session.</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>username</strong> (<em>str</em>) – The username</li>
|
|
<li><strong>password</strong> (<em>str</em>) – The password</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">None</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.logout">
|
|
<tt class="descname">logout</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.logout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.logout" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>This destroys the session and logs out from the LH OS server</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">Returns:</th><td class="field-body">None</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.modifyVolume">
|
|
<tt class="descname">modifyVolume</tt><big>(</big><em>volume_id</em>, <em>optional</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.modifyVolume"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.modifyVolume" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Modify an existing volume.</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>volume_id</strong> (<em>str</em>) – The id of the volume to find</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">volume</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Raises :</th><td class="field-body"><a class="reference internal" href="#hplefthandclient.exceptions.HTTPNotFound" title="hplefthandclient.exceptions.HTTPNotFound"><tt class="xref py py-class docutils literal"><span class="pre">HTTPNotFound</span></tt></a> -</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>NON_EXISTENT_VOL - volume doesn’t exist</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.client.HPLeftHandClient.removeServerAccess">
|
|
<tt class="descname">removeServerAccess</tt><big>(</big><em>volume_id</em>, <em>server_id</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/client.html#HPLeftHandClient.removeServerAccess"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.client.HPLeftHandClient.removeServerAccess" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Unassign a Volume from a Server</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>volume_id</strong> – Volume ID of the volume</li>
|
|
<li><strong>server_id</strong> – Server ID of the server to remove the volume fom</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
</div>
|
|
<div class="section" id="module-hplefthandclient.exceptions">
|
|
<span id="exceptions-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">exceptions</span></tt> Module<a class="headerlink" href="#module-hplefthandclient.exceptions" title="Permalink to this headline">¶</a></h2>
|
|
<p>Exceptions for the client</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">Author:</th><td class="field-body">Walter A. Boring IV</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Description:</th><td class="field-body">This contains the HTTP exceptions that can come back from the REST calls</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.AuthorizationFailure">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">AuthorizationFailure</tt><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#AuthorizationFailure"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.AuthorizationFailure" 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>
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.ClientException">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">ClientException</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#ClientException"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.ClientException" 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>The base exception class for all exceptions this library raises.</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> (<em>array</em>) – The error array</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.exceptions.ClientException.get_code">
|
|
<tt class="descname">get_code</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#ClientException.get_code"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.ClientException.get_code" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.exceptions.ClientException.get_description">
|
|
<tt class="descname">get_description</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#ClientException.get_description"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.ClientException.get_description" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.CommandError">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">CommandError</tt><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#CommandError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.CommandError" 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>
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPBadGateway">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPBadGateway</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPBadGateway"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPBadGateway" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 502 - The server was acting as a gateway or proxy and received an invalid response from the upstream server.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPBadGateway.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 502</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPBadGateway.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPBadGateway.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Bad Gateway'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPBadGateway.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPBadRequest">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPBadRequest</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPBadRequest"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPBadRequest" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 400 - Bad request: you sent some malformed data.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPBadRequest.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 400</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPBadRequest.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPBadRequest.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Bad request'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPBadRequest.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPConflict">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPConflict</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPConflict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPConflict" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 409 - Conflict: A Conflict happened on the server</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPConflict.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 409</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPConflict.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPConflict.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Conflict'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPConflict.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPExpectationFailed">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPExpectationFailed</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPExpectationFailed"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPExpectationFailed" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 417 - The server cannot meet the requirements of the Expect request-header field.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPExpectationFailed.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 417</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPExpectationFailed.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPExpectationFailed.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Expectation Failed'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPExpectationFailed.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPForbidden">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPForbidden</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPForbidden"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPForbidden" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 403 - Forbidden: your credentials don’t give you access to this
|
|
resource.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPForbidden.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 403</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPForbidden.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPForbidden.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Forbidden'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPForbidden.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPGatewayTimeout">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPGatewayTimeout</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPGatewayTimeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPGatewayTimeout" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 504 - The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPGatewayTimeout.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 504</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPGatewayTimeout.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPGatewayTimeout.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Gateway Timeout'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPGatewayTimeout.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPGone">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPGone</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPGone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPGone" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 410 - Indicates that the resource requested is no longer available and will not be available again.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPGone.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 410</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPGone.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPGone.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Gone'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPGone.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPLengthRequired">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPLengthRequired</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPLengthRequired"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPLengthRequired" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 411 - The request did not specify the length of its content, which is required by the requested resource.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPLengthRequired.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 411</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPLengthRequired.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPLengthRequired.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Length Required'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPLengthRequired.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPMethodNotAllowed">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPMethodNotAllowed</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPMethodNotAllowed"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPMethodNotAllowed" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 405 - Method not Allowed</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPMethodNotAllowed.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 405</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPMethodNotAllowed.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPMethodNotAllowed.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Method Not Allowed'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPMethodNotAllowed.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPNotAcceptable">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPNotAcceptable</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPNotAcceptable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPNotAcceptable" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 406 - Method not Acceptable</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPNotAcceptable.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 406</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPNotAcceptable.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPNotAcceptable.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Method Not Acceptable'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPNotAcceptable.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPNotFound">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPNotFound</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPNotFound"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPNotFound" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 404 - Not found</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPNotFound.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 404</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPNotFound.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPNotFound.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Not found'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPNotFound.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPNotImplemented">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPNotImplemented</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPNotImplemented"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPNotImplemented" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 501 - Not Implemented: the server does not support this operation.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPNotImplemented.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 501</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPNotImplemented.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPNotImplemented.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Not Implemented'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPNotImplemented.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPPreconditionFailed">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPPreconditionFailed</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPPreconditionFailed"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPPreconditionFailed" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 412 - The server does not meet one of the preconditions that the requester put on the request.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPPreconditionFailed.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 412</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPPreconditionFailed.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPPreconditionFailed.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Over limit'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPPreconditionFailed.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPProxyAuthRequired">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPProxyAuthRequired</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPProxyAuthRequired"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPProxyAuthRequired" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 407 - The client must first authenticate itself with the proxy.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPProxyAuthRequired.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 407</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPProxyAuthRequired.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPProxyAuthRequired.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Proxy Authentication Required'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPProxyAuthRequired.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPRequestEntityTooLarge">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPRequestEntityTooLarge</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPRequestEntityTooLarge"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPRequestEntityTooLarge" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 413 - The request is larger than the server is willing or able to process</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPRequestEntityTooLarge.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 413</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPRequestEntityTooLarge.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPRequestEntityTooLarge.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Request Entity Too Large'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPRequestEntityTooLarge.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPRequestTimeout">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPRequestTimeout</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPRequestTimeout"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPRequestTimeout" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 408 - The server timed out waiting for the request.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPRequestTimeout.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 408</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPRequestTimeout.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPRequestTimeout.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Request Timeout'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPRequestTimeout.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPRequestURITooLong">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPRequestURITooLong</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPRequestURITooLong"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPRequestURITooLong" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 414 - The URI provided was too long for the server to process.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPRequestURITooLong.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 414</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPRequestURITooLong.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPRequestURITooLong.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Request URI Too Large'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPRequestURITooLong.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPRequestedRangeNotSatisfiable">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPRequestedRangeNotSatisfiable</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPRequestedRangeNotSatisfiable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPRequestedRangeNotSatisfiable" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 416 - The client has asked for a portion of the file, but the server cannot supply that portion.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPRequestedRangeNotSatisfiable.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 416</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPRequestedRangeNotSatisfiable.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPRequestedRangeNotSatisfiable.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Requested Range Not Satisfiable'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPRequestedRangeNotSatisfiable.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPServerError">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPServerError</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPServerError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPServerError" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 500 -</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPServerError.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 500</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPServerError.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPServerError.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Error'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPServerError.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPServiceUnavailable">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPServiceUnavailable</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPServiceUnavailable"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPServiceUnavailable" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 503 - The server is currently unavailable</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPServiceUnavailable.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 503</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPServiceUnavailable.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPServiceUnavailable.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Service Unavailable'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPServiceUnavailable.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPTeaPot">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPTeaPot</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPTeaPot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPTeaPot" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 418 - I’m a Tea Pot</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPTeaPot.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 418</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPTeaPot.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPTeaPot.message">
|
|
<tt class="descname">message</tt><em class="property"> = "I'm A Teapot. (RFC 2324)"</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPTeaPot.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPUnauthorized">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPUnauthorized</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPUnauthorized"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPUnauthorized" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 401 - Unauthorized: bad credentials.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPUnauthorized.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 401</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPUnauthorized.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPUnauthorized.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Unauthorized'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPUnauthorized.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPUnsupportedMediaType">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPUnsupportedMediaType</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPUnsupportedMediaType"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPUnsupportedMediaType" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 415 - The request entity has a media type which the server or resource does not support.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPUnsupportedMediaType.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 415</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPUnsupportedMediaType.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPUnsupportedMediaType.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Unsupported Media Type'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPUnsupportedMediaType.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.HTTPVersionNotSupported">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">HTTPVersionNotSupported</tt><big>(</big><em>error=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#HTTPVersionNotSupported"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.HTTPVersionNotSupported" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <a class="reference internal" href="#hplefthandclient.exceptions.ClientException" title="hplefthandclient.exceptions.ClientException"><tt class="xref py py-class docutils literal"><span class="pre">hplefthandclient.exceptions.ClientException</span></tt></a></p>
|
|
<p>HTTP 505 - The server does not support the HTTP protocol version used in the request.</p>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPVersionNotSupported.http_status">
|
|
<tt class="descname">http_status</tt><em class="property"> = 505</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPVersionNotSupported.http_status" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.exceptions.HTTPVersionNotSupported.message">
|
|
<tt class="descname">message</tt><em class="property"> = 'Version Not Supported'</em><a class="headerlink" href="#hplefthandclient.exceptions.HTTPVersionNotSupported.message" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.NoUniqueMatch">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">NoUniqueMatch</tt><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#NoUniqueMatch"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.NoUniqueMatch" 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>
|
|
</dd></dl>
|
|
|
|
<dl class="exception">
|
|
<dt id="hplefthandclient.exceptions.UnsupportedVersion">
|
|
<em class="property">exception </em><tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">UnsupportedVersion</tt><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#UnsupportedVersion"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.UnsupportedVersion" 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>Indicates that the user is trying to use an unsupported version of the API</p>
|
|
</dd></dl>
|
|
|
|
<dl class="function">
|
|
<dt id="hplefthandclient.exceptions.from_response">
|
|
<tt class="descclassname">hplefthandclient.exceptions.</tt><tt class="descname">from_response</tt><big>(</big><em>response</em>, <em>body</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/exceptions.html#from_response"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.exceptions.from_response" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Return an instance of an ClientException or subclass
|
|
based on an httplib2 response.</p>
|
|
<p>Usage:</p>
|
|
<div class="highlight-python"><div class="highlight"><pre><span class="n">resp</span><span class="p">,</span> <span class="n">body</span> <span class="o">=</span> <span class="n">http</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="o">...</span><span class="p">)</span>
|
|
<span class="k">if</span> <span class="n">resp</span><span class="o">.</span><span class="n">status</span> <span class="o">!=</span> <span class="mi">200</span><span class="p">:</span>
|
|
<span class="k">raise</span> <span class="n">exception_from_response</span><span class="p">(</span><span class="n">resp</span><span class="p">,</span> <span class="n">body</span><span class="p">)</span>
|
|
</pre></div>
|
|
</div>
|
|
</dd></dl>
|
|
|
|
</div>
|
|
<div class="section" id="module-hplefthandclient.http">
|
|
<span id="http-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">http</span></tt> Module<a class="headerlink" href="#module-hplefthandclient.http" title="Permalink to this headline">¶</a></h2>
|
|
<p>HPLeftHand HTTP Client
|
|
:Author: Walter A. Boring IV
|
|
:Description: This is the HTTP Client that is used to make the actual calls.</p>
|
|
<blockquote>
|
|
<div>It includes the authentication that knows the cookie name for LH.</div></blockquote>
|
|
<dl class="class">
|
|
<dt id="hplefthandclient.http.HTTPJSONRESTClient">
|
|
<em class="property">class </em><tt class="descclassname">hplefthandclient.http.</tt><tt class="descname">HTTPJSONRESTClient</tt><big>(</big><em>api_url</em>, <em>insecure=False</em>, <em>http_log_debug=False</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/http.html#HTTPJSONRESTClient"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.http.HTTPJSONRESTClient" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">httplib2.Http</span></tt></p>
|
|
<p>An HTTP REST Client that sends and recieves JSON data as the body of the
|
|
HTTP request.</p>
|
|
<table class="docutils field-list" frame="void" rules="none">
|
|
<col class="field-name" />
|
|
<col class="field-body" />
|
|
<tbody valign="top">
|
|
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
|
|
<li><strong>api_url</strong> (<em>str</em>) – The url to the LH OS REST service
|
|
ie. <a class="reference external" href="https:/">https:/</a>/<hostname or IP>:<port>/lhos</li>
|
|
<li><strong>insecure</strong> (<em>bool</em>) – Use https? requires a local certificate</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.http.HTTPJSONRESTClient.SESSION_COOKIE_NAME">
|
|
<tt class="descname">SESSION_COOKIE_NAME</tt><em class="property"> = 'Authorization'</em><a class="headerlink" href="#hplefthandclient.http.HTTPJSONRESTClient.SESSION_COOKIE_NAME" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="attribute">
|
|
<dt id="hplefthandclient.http.HTTPJSONRESTClient.USER_AGENT">
|
|
<tt class="descname">USER_AGENT</tt><em class="property"> = 'python-hplefthandclient'</em><a class="headerlink" href="#hplefthandclient.http.HTTPJSONRESTClient.USER_AGENT" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.http.HTTPJSONRESTClient.authenticate">
|
|
<tt class="descname">authenticate</tt><big>(</big><em>user</em>, <em>password</em>, <em>optional=None</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/http.html#HTTPJSONRESTClient.authenticate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.http.HTTPJSONRESTClient.authenticate" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>This tries to create an authenticated session with the LH OS server</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>user</strong> (<em>str</em>) – The username</li>
|
|
<li><strong>password</strong> (<em>str</em>) – The password</li>
|
|
</ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.http.HTTPJSONRESTClient.delete">
|
|
<tt class="descname">delete</tt><big>(</big><em>url</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/http.html#HTTPJSONRESTClient.delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.http.HTTPJSONRESTClient.delete" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Make an HTTP DELETE request to the server.</p>
|
|
<div class="highlight-python"><div class="highlight"><pre><span class="c">#example call</span>
|
|
<span class="k">try</span> <span class="p">{</span>
|
|
<span class="n">headers</span><span class="p">,</span> <span class="n">body</span> <span class="o">=</span> <span class="n">http</span><span class="o">.</span><span class="n">delete</span><span class="p">(</span><span class="s">'/volumes/</span><span class="si">%s</span><span class="s">'</span> <span class="o">%</span> <span class="n">name</span><span class="p">)</span>
|
|
<span class="p">}</span> <span class="k">except</span> <span class="n">exceptions</span><span class="o">.</span><span class="n">HTTPUnauthorized</span> <span class="k">as</span> <span class="n">ex</span><span class="p">:</span>
|
|
<span class="k">print</span> <span class="s">"Not logged in"</span>
|
|
<span class="p">}</span>
|
|
</pre></div>
|
|
</div>
|
|
<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>url</strong> (<em>str</em>) – The relative url from the LH api_url</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">headers - dict of HTTP Response headers</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">body - the body of the response. If the body was JSON,</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>it will be an object</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.http.HTTPJSONRESTClient.get">
|
|
<tt class="descname">get</tt><big>(</big><em>url</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/http.html#HTTPJSONRESTClient.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.http.HTTPJSONRESTClient.get" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Make an HTTP GET request to the server.</p>
|
|
<div class="highlight-python"><div class="highlight"><pre><span class="c">#example call</span>
|
|
<span class="k">try</span> <span class="p">{</span>
|
|
<span class="n">headers</span><span class="p">,</span> <span class="n">body</span> <span class="o">=</span> <span class="n">http</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">'/volumes'</span><span class="p">)</span>
|
|
<span class="p">}</span> <span class="k">except</span> <span class="n">exceptions</span><span class="o">.</span><span class="n">HTTPUnauthorized</span> <span class="k">as</span> <span class="n">ex</span><span class="p">:</span>
|
|
<span class="k">print</span> <span class="s">"Not logged in"</span>
|
|
<span class="p">}</span>
|
|
</pre></div>
|
|
</div>
|
|
<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>url</strong> (<em>str</em>) – The relative url from the LH api_url</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">headers - dict of HTTP Response headers</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">body - the body of the response. If the body was JSON,</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>it will be an object</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.http.HTTPJSONRESTClient.get_timings">
|
|
<tt class="descname">get_timings</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/hplefthandclient/http.html#HTTPJSONRESTClient.get_timings"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.http.HTTPJSONRESTClient.get_timings" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Ths gives an array of the request timings since last reset_timings call</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.http.HTTPJSONRESTClient.post">
|
|
<tt class="descname">post</tt><big>(</big><em>url</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/http.html#HTTPJSONRESTClient.post"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.http.HTTPJSONRESTClient.post" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Make an HTTP POST request to the server.</p>
|
|
<div class="highlight-python"><div class="highlight"><pre><span class="c">#example call</span>
|
|
<span class="k">try</span> <span class="p">{</span>
|
|
<span class="n">info</span> <span class="o">=</span> <span class="p">{</span><span class="s">'name'</span><span class="p">:</span> <span class="s">'new volume name'</span><span class="p">,</span> <span class="s">'sizeMiB'</span><span class="p">:</span> <span class="mi">300</span><span class="p">}</span>
|
|
<span class="n">headers</span><span class="p">,</span> <span class="n">body</span> <span class="o">=</span> <span class="n">http</span><span class="o">.</span><span class="n">post</span><span class="p">(</span><span class="s">'/volumes'</span><span class="p">,</span> <span class="n">body</span><span class="o">=</span><span class="n">info</span><span class="p">)</span>
|
|
<span class="p">}</span> <span class="k">except</span> <span class="n">exceptions</span><span class="o">.</span><span class="n">HTTPUnauthorized</span> <span class="k">as</span> <span class="n">ex</span><span class="p">:</span>
|
|
<span class="k">print</span> <span class="s">"Not logged in"</span>
|
|
<span class="p">}</span>
|
|
</pre></div>
|
|
</div>
|
|
<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>url</strong> (<em>str</em>) – The relative url from the LH api_url</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">headers - dict of HTTP Response headers</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">body - the body of the response. If the body was JSON,</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>it will be an object</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.http.HTTPJSONRESTClient.put">
|
|
<tt class="descname">put</tt><big>(</big><em>url</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/http.html#HTTPJSONRESTClient.put"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.http.HTTPJSONRESTClient.put" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>Make an HTTP PUT request to the server.</p>
|
|
<div class="highlight-python"><div class="highlight"><pre><span class="c">#example call</span>
|
|
<span class="k">try</span> <span class="p">{</span>
|
|
<span class="n">info</span> <span class="o">=</span> <span class="p">{</span><span class="s">'name'</span><span class="p">:</span> <span class="s">'something'</span><span class="p">}</span>
|
|
<span class="n">headers</span><span class="p">,</span> <span class="n">body</span> <span class="o">=</span> <span class="n">http</span><span class="o">.</span><span class="n">put</span><span class="p">(</span><span class="s">'/volumes'</span><span class="p">,</span> <span class="n">body</span><span class="o">=</span><span class="n">info</span><span class="p">)</span>
|
|
<span class="p">}</span> <span class="k">except</span> <span class="n">exceptions</span><span class="o">.</span><span class="n">HTTPUnauthorized</span> <span class="k">as</span> <span class="n">ex</span><span class="p">:</span>
|
|
<span class="k">print</span> <span class="s">"Not logged in"</span>
|
|
<span class="p">}</span>
|
|
</pre></div>
|
|
</div>
|
|
<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>url</strong> (<em>str</em>) – The relative url from the LH api_url</td>
|
|
</tr>
|
|
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">headers - dict of HTTP Response headers</td>
|
|
</tr>
|
|
<tr class="field-odd field"><th class="field-name">Returns:</th><td class="field-body">body - the body of the response. If the body was JSON,</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>it will be an object</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.http.HTTPJSONRESTClient.request">
|
|
<tt class="descname">request</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/http.html#HTTPJSONRESTClient.request"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.http.HTTPJSONRESTClient.request" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>This makes an HTTP Request to the LH server. You should use get, post,
|
|
delete instead.</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.http.HTTPJSONRESTClient.reset_timings">
|
|
<tt class="descname">reset_timings</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/hplefthandclient/http.html#HTTPJSONRESTClient.reset_timings"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.http.HTTPJSONRESTClient.reset_timings" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>This resets the request/response timings array</p>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.http.HTTPJSONRESTClient.set_debug_flag">
|
|
<tt class="descname">set_debug_flag</tt><big>(</big><em>flag</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/http.html#HTTPJSONRESTClient.set_debug_flag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.http.HTTPJSONRESTClient.set_debug_flag" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>This turns on/off http request/response debugging output to console</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>flag</strong> (<em>bool</em>) – Set to True to enable debugging output</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.http.HTTPJSONRESTClient.set_url">
|
|
<tt class="descname">set_url</tt><big>(</big><em>api_url</em><big>)</big><a class="reference internal" href="_modules/hplefthandclient/http.html#HTTPJSONRESTClient.set_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.http.HTTPJSONRESTClient.set_url" title="Permalink to this definition">¶</a></dt>
|
|
<dd></dd></dl>
|
|
|
|
<dl class="method">
|
|
<dt id="hplefthandclient.http.HTTPJSONRESTClient.unauthenticate">
|
|
<tt class="descname">unauthenticate</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/hplefthandclient/http.html#HTTPJSONRESTClient.unauthenticate"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#hplefthandclient.http.HTTPJSONRESTClient.unauthenticate" title="Permalink to this definition">¶</a></dt>
|
|
<dd><p>This clears the authenticated session with the LH server. It logs out.</p>
|
|
</dd></dl>
|
|
|
|
</dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="sphinxsidebar">
|
|
<div class="sphinxsidebarwrapper">
|
|
<h3><a href="index.html">Table Of Contents</a></h3>
|
|
<ul>
|
|
<li><a class="reference internal" href="#">hplefthandclient Package</a><ul>
|
|
<li><a class="reference internal" href="#id1"><tt class="docutils literal"><span class="pre">hplefthandclient</span></tt> Package</a></li>
|
|
<li><a class="reference internal" href="#module-hplefthandclient.client"><tt class="docutils literal"><span class="pre">client</span></tt> Module</a></li>
|
|
<li><a class="reference internal" href="#module-hplefthandclient.exceptions"><tt class="docutils literal"><span class="pre">exceptions</span></tt> Module</a></li>
|
|
<li><a class="reference internal" href="#module-hplefthandclient.http"><tt class="docutils literal"><span class="pre">http</span></tt> Module</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
|
|
<h3>This Page</h3>
|
|
<ul class="this-page-menu">
|
|
<li><a href="_sources/hplefthandclient.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><a href="index.html">HP LeftHand REST Client 1.0.0 documentation</a> »</li>
|
|
</ul>
|
|
</div>
|
|
<div class="footer">
|
|
© Copyright 2013 Hewlett Packard Development Company, L.P..
|
|
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
|
|
</div>
|
|
</body>
|
|
</html> |