deb-python-hplefthandclient/docs/_build/html/api/hplefthandclient/client.html

662 lines
39 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>client HPLeftHandClient &mdash; 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" />
<link rel="up" title="client HPLeftHandClient" href="index.html" />
<link rel="next" title="exceptions HTTP Exceptions" href="exceptions.html" />
<link rel="prev" title="client HPLeftHandClient" 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 class="right" >
<a href="exceptions.html" title="exceptions HTTP Exceptions"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="index.html" title="client HPLeftHandClient"
accesskey="P">previous</a> |</li>
<li><a href="../../index.html">HP LeftHand REST Client 1.0.0 documentation</a> &raquo;</li>
<li><a href="../index.html" >API Documentation</a> &raquo;</li>
<li><a href="index.html" accesskey="U"><tt class="docutils literal docutils literal"><span class="pre">client</span></tt> &#8211; HPLeftHandClient</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="module-hplefthandclient.client">
<span id="client-hplefthandclient"></span><h1><tt class="xref py py-mod docutils literal"><span class="pre">client</span></tt> &#8211; HPLeftHandClient<a class="headerlink" href="#module-hplefthandclient.client" title="Permalink to this headline"></a></h1>
<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.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>) &#8211; set to True to enable debugging</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>) &#8211; The username</li>
<li><strong>password</strong> (<em>str</em>) &#8211; 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.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.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>) &#8211; 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>) &#8211; 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.html#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&#8217;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.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>) &#8211; 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.html#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>) &#8211; 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.html#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&#8217;t exist</p>
</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>) &#8211; The name of the server to create</li>
<li><strong>iqn</strong> &#8211; The iSCSI qualified name</li>
<li><strong>optional</strong> (<em>dict</em>) &#8211; 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">&#39;description&#39;</span> <span class="p">:</span> <span class="s">&quot;some comment&quot;</span><span class="p">,</span>
<span class="s">&#39;iscsiEnabled&#39;</span> <span class="p">:</span> <span class="bp">True</span><span class="p">,</span>
<span class="s">&#39;chapName&#39;</span><span class="p">:</span> <span class="s">&quot;some chap name&quot;</span><span class="p">,</span>
<span class="s">&#39;chapAuthenticationRequired&#39;</span><span class="p">:</span> <span class="bp">False</span><span class="p">,</span>
<span class="s">&#39;chapInitiatorSecret&#39;</span><span class="p">:</span> <span class="s">&quot;initiator secret&quot;</span><span class="p">,</span>
<span class="s">&#39;chapTargetSecret&#39;</span><span class="p">:</span> <span class="s">&quot;target secret&quot;</span><span class="p">,</span>
<span class="s">&#39;iscsiLoadBalancingEnabled&#39;</span><span class="p">:</span> <span class="bp">True</span><span class="p">,</span>
<span class="s">&#39;controllingServerName&#39;</span><span class="p">:</span> <span class="s">&quot;server name&quot;</span><span class="p">,</span>
<span class="s">&#39;fibreChannelEnabled&#39;</span><span class="p">:</span> <span class="bp">False</span><span class="p">,</span>
<span class="s">&#39;inServerCluster&quot;: 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.html#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&#8217;t exist</p>
</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> &#8211; 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.html#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.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.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.html#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> &#8211; 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.html#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&#8217;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>) &#8211; Name of the Snapshot</li>
<li><strong>source_volume_id</strong> (<em>int</em>) &#8211; The volume you want to snapshot</li>
<li><strong>optional</strong> (<em>dict</em>) &#8211; 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">&#39;description&#39;</span> <span class="p">:</span> <span class="s">&quot;some comment&quot;</span><span class="p">,</span>
<span class="s">&#39;inheritAccess&#39;</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.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> &#8211; 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.html#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.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>) &#8211; Name of the Snapshot clone</li>
<li><strong>source_snapshot_id</strong> (<em>int</em>) &#8211; The snapshot you want to clone</li>
<li><strong>optional</strong> (<em>dict</em>) &#8211; 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">&#39;description&#39;</span> <span class="p">:</span> <span class="s">&quot;some comment&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</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.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>) &#8211; 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.html#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&#8217;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> &#8211; 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.html#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&#8217;t exist</p>
</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>) &#8211; the name of the volume</li>
<li><strong>cluster_id</strong> (<em>int</em>) &#8211; the cluster Id</li>
<li><strong>sizeKB</strong> (<em>int</em>) &#8211; size in KB for the volume</li>
<li><strong>optional</strong> (<em>dict</em>) &#8211; 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">&#39;description&#39;</span><span class="p">:</span> <span class="s">&#39;some comment&#39;</span><span class="p">,</span>
<span class="s">&#39;isThinProvisioned&#39;</span><span class="p">:</span> <span class="s">&#39;true&#39;</span><span class="p">,</span>
<span class="s">&#39;autogrowSeconds&#39;</span><span class="p">:</span> <span class="mi">200</span><span class="p">,</span>
<span class="s">&#39;clusterName&#39;</span><span class="p">:</span> <span class="s">&#39;somename&#39;</span><span class="p">,</span>
<span class="s">&#39;isAdaptiveOptimizationEnabled&#39;</span><span class="p">:</span> <span class="s">&#39;true&#39;</span><span class="p">,</span>
<span class="s">&#39;dataProtectionLevel&#39;</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.html#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.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>) &#8211; 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.html#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.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>) &#8211; 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.html#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&#8217;t exist</p>
</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>) &#8211; Name of the Volume clone</li>
<li><strong>source_volume_id</strong> (<em>int</em>) &#8211; The Volume you want to clone</li>
<li><strong>optional</strong> (<em>dict</em>) &#8211; 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">&#39;description&#39;</span> <span class="p">:</span> <span class="s">&quot;some comment&quot;</span>
<span class="p">}</span>
</pre></div>
</div>
</dd></dl>
<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> &#8211; Volume ID of the volume</li>
<li><strong>server_id</strong> &#8211; Server ID of the server to add the volume to</li>
<li><strong>optional</strong> (<em>dict</em>) &#8211; 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">&#39;Transport&#39;</span> <span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
<span class="s">&#39;Lun&#39;</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.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> &#8211; Volume ID of the volume</li>
<li><strong>server_id</strong> &#8211; Server ID of the server to remove the volume fom</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="index.html"
title="previous chapter"><tt class="docutils literal"><span class="pre">client</span></tt> &#8211; HPLeftHandClient</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="exceptions.html"
title="next chapter"><tt class="docutils literal"><span class="pre">exceptions</span></tt> &#8211; HTTP Exceptions</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../../_sources/api/hplefthandclient/client.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="exceptions.html" title="exceptions HTTP Exceptions"
>next</a> |</li>
<li class="right" >
<a href="index.html" title="client HPLeftHandClient"
>previous</a> |</li>
<li><a href="../../index.html">HP LeftHand REST Client 1.0.0 documentation</a> &raquo;</li>
<li><a href="../index.html" >API Documentation</a> &raquo;</li>
<li><a href="index.html" ><tt class="docutils literal docutils literal"><span class="pre">client</span></tt> &#8211; HPLeftHandClient</a> &raquo;</li>
</ul>
</div>
<div class="footer">
&copy; Copyright 2013 Hewlett Packard Development Company, L.P..
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>