662 lines
39 KiB
HTML
662 lines
39 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>client – HPLeftHandClient — 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> »</li>
|
||
<li><a href="../index.html" >API Documentation</a> »</li>
|
||
<li><a href="index.html" accesskey="U"><tt class="docutils literal docutils literal"><span class="pre">client</span></tt> – HPLeftHandClient</a> »</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> – 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>) – 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>) – 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.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>) – 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.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’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>) – 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>) – 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’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>) – 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.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’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> – 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> – 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’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.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.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>) – 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.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>) – 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’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.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’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>) – 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.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>) – 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>) – 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’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>) – 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.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.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>
|
||
</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> – 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> – 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> »</li>
|
||
<li><a href="../index.html" >API Documentation</a> »</li>
|
||
<li><a href="index.html" ><tt class="docutils literal docutils literal"><span class="pre">client</span></tt> – HPLeftHandClient</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> |