update NEPI version on sphinx docs
[nepi.git] / doc / sphinx / _build / html / _layout / nepi.util.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4
5 <html xmlns="http://www.w3.org/1999/xhtml">
6   <head>
7     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8     
9     <title>nepi.util package &mdash; NEPI 3.2 documentation</title>
10     
11     <link rel="stylesheet" href="../_static/sphinxdoc.css" type="text/css" />
12     <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13     
14     <script type="text/javascript">
15       var DOCUMENTATION_OPTIONS = {
16         URL_ROOT:    '../',
17         VERSION:     '3.2',
18         COLLAPSE_INDEX: false,
19         FILE_SUFFIX: '.html',
20         HAS_SOURCE:  true
21       };
22     </script>
23     <script type="text/javascript" src="../_static/jquery.js"></script>
24     <script type="text/javascript" src="../_static/underscore.js"></script>
25     <script type="text/javascript" src="../_static/doctools.js"></script>
26     <link rel="top" title="NEPI 3.2 documentation" href="../index.html" /> 
27   </head>
28   <body>
29     <div class="related">
30       <h3>Navigation</h3>
31       <ul>
32         <li class="right" style="margin-right: 10px">
33           <a href="../genindex.html" title="General Index"
34              accesskey="I">index</a></li>
35         <li class="right" >
36           <a href="../py-modindex.html" title="Python Module Index"
37              >modules</a> |</li>
38         <li><a href="../index.html">NEPI 3.2 documentation</a> &raquo;</li> 
39       </ul>
40     </div>
41       <div class="sphinxsidebar">
42         <div class="sphinxsidebarwrapper">
43   <h3><a href="../index.html">Table Of Contents</a></h3>
44   <ul>
45 <li><a class="reference internal" href="#">nepi.util package</a><ul>
46 <li><a class="reference internal" href="#subpackages">Subpackages</a></li>
47 <li><a class="reference internal" href="#submodules">Submodules</a></li>
48 <li><a class="reference internal" href="#nepi-util-environ-module">nepi.util.environ module</a></li>
49 <li><a class="reference internal" href="#module-nepi.util.execfuncs">nepi.util.execfuncs module</a></li>
50 <li><a class="reference internal" href="#module-nepi.util.guid">nepi.util.guid module</a></li>
51 <li><a class="reference internal" href="#module-nepi.util.logger">nepi.util.logger module</a></li>
52 <li><a class="reference internal" href="#module-nepi.util.manifoldapi">nepi.util.manifoldapi module</a></li>
53 <li><a class="reference internal" href="#module-nepi.util.netgraph">nepi.util.netgraph module</a></li>
54 <li><a class="reference internal" href="#module-nepi.util.parallel">nepi.util.parallel module</a></li>
55 <li><a class="reference internal" href="#module-nepi.util.plotter">nepi.util.plotter module</a></li>
56 <li><a class="reference internal" href="#module-nepi.util.rmatcher">nepi.util.rmatcher module</a></li>
57 <li><a class="reference internal" href="#module-nepi.util.serializer">nepi.util.serializer module</a></li>
58 <li><a class="reference internal" href="#module-nepi.util.sfaapi">nepi.util.sfaapi module</a></li>
59 <li><a class="reference internal" href="#module-nepi.util.sfarspec_proc">nepi.util.sfarspec_proc module</a></li>
60 <li><a class="reference internal" href="#module-nepi.util.sshfuncs">nepi.util.sshfuncs module</a></li>
61 <li><a class="reference internal" href="#module-nepi.util.statfuncs">nepi.util.statfuncs module</a></li>
62 <li><a class="reference internal" href="#module-nepi.util.timefuncs">nepi.util.timefuncs module</a></li>
63 <li><a class="reference internal" href="#module-nepi.util">Module contents</a></li>
64 </ul>
65 </li>
66 </ul>
67
68   <h3>This Page</h3>
69   <ul class="this-page-menu">
70     <li><a href="../_sources/_layout/nepi.util.txt"
71            rel="nofollow">Show Source</a></li>
72   </ul>
73 <div id="searchbox" style="display: none">
74   <h3>Quick search</h3>
75     <form class="search" action="../search.html" method="get">
76       <input type="text" name="q" />
77       <input type="submit" value="Go" />
78       <input type="hidden" name="check_keywords" value="yes" />
79       <input type="hidden" name="area" value="default" />
80     </form>
81     <p class="searchtip" style="font-size: 90%">
82     Enter search terms or a module, class or function name.
83     </p>
84 </div>
85 <script type="text/javascript">$('#searchbox').show(0);</script>
86         </div>
87       </div>
88
89     <div class="document">
90       <div class="documentwrapper">
91         <div class="bodywrapper">
92           <div class="body">
93             
94   <div class="section" id="nepi-util-package">
95 <h1>nepi.util package<a class="headerlink" href="#nepi-util-package" title="Permalink to this headline">¶</a></h1>
96 <div class="section" id="subpackages">
97 <h2>Subpackages<a class="headerlink" href="#subpackages" title="Permalink to this headline">¶</a></h2>
98 <div class="toctree-wrapper compound">
99 <ul>
100 <li class="toctree-l1"><a class="reference internal" href="nepi.util.parsers.html">nepi.util.parsers package</a><ul>
101 <li class="toctree-l2"><a class="reference internal" href="nepi.util.parsers.html#submodules">Submodules</a></li>
102 <li class="toctree-l2"><a class="reference internal" href="nepi.util.parsers.html#module-nepi.util.parsers.xml_parser">nepi.util.parsers.xml_parser module</a></li>
103 <li class="toctree-l2"><a class="reference internal" href="nepi.util.parsers.html#module-nepi.util.parsers">Module contents</a></li>
104 </ul>
105 </li>
106 </ul>
107 </div>
108 </div>
109 <div class="section" id="submodules">
110 <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
111 </div>
112 <div class="section" id="nepi-util-environ-module">
113 <h2>nepi.util.environ module<a class="headerlink" href="#nepi-util-environ-module" title="Permalink to this headline">¶</a></h2>
114 <span class="target" id="module-nepi.util.environ"></span><dl class="function">
115 <dt id="nepi.util.environ.execute">
116 <tt class="descclassname">nepi.util.environ.</tt><tt class="descname">execute</tt><big>(</big><em>cmd</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/environ.html#execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.environ.execute" title="Permalink to this definition">¶</a></dt>
117 <dd></dd></dl>
118
119 <dl class="function">
120 <dt id="nepi.util.environ.backticks">
121 <tt class="descclassname">nepi.util.environ.</tt><tt class="descname">backticks</tt><big>(</big><em>cmd</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/environ.html#backticks"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.environ.backticks" title="Permalink to this definition">¶</a></dt>
122 <dd></dd></dl>
123
124 </div>
125 <div class="section" id="module-nepi.util.execfuncs">
126 <span id="nepi-util-execfuncs-module"></span><h2>nepi.util.execfuncs module<a class="headerlink" href="#module-nepi.util.execfuncs" title="Permalink to this headline">¶</a></h2>
127 <dl class="function">
128 <dt id="nepi.util.execfuncs.lcopy">
129 <tt class="descclassname">nepi.util.execfuncs.</tt><tt class="descname">lcopy</tt><big>(</big><em>source</em>, <em>dest</em>, <em>recursive=False</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/execfuncs.html#lcopy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.execfuncs.lcopy" title="Permalink to this definition">¶</a></dt>
130 <dd><p>Copies from/to localy.</p>
131 </dd></dl>
132
133 <dl class="function">
134 <dt id="nepi.util.execfuncs.lexec">
135 <tt class="descclassname">nepi.util.execfuncs.</tt><tt class="descname">lexec</tt><big>(</big><em>command</em>, <em>user=None</em>, <em>sudo=False</em>, <em>env=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/execfuncs.html#lexec"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.execfuncs.lexec" title="Permalink to this definition">¶</a></dt>
136 <dd><p>Executes a local command, returns ((stdout,stderr),process)</p>
137 </dd></dl>
138
139 <dl class="function">
140 <dt id="nepi.util.execfuncs.lgetpid">
141 <tt class="descclassname">nepi.util.execfuncs.</tt><tt class="descname">lgetpid</tt><big>(</big><em>pidfile</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/execfuncs.html#lgetpid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.execfuncs.lgetpid" title="Permalink to this definition">¶</a></dt>
142 <dd><p>Check the pidfile of a process spawned with remote_spawn.</p>
143 <dl class="docutils">
144 <dt>Parameters:</dt>
145 <dd>pidfile: the pidfile passed to remote_span</dd>
146 </dl>
147 <p>Returns:</p>
148 <blockquote>
149 <div>A (pid, ppid) tuple useful for calling remote_status and remote_kill,
150 or None if the pidfile isn&#8217;t valid yet (maybe the process is still starting).</div></blockquote>
151 </dd></dl>
152
153 <dl class="function">
154 <dt id="nepi.util.execfuncs.lkill">
155 <tt class="descclassname">nepi.util.execfuncs.</tt><tt class="descname">lkill</tt><big>(</big><em>pid</em>, <em>ppid</em>, <em>sudo=False</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/execfuncs.html#lkill"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.execfuncs.lkill" title="Permalink to this definition">¶</a></dt>
156 <dd><p>Kill a process spawned with lspawn.</p>
157 <p>First tries a SIGTERM, and if the process does not end in 10 seconds,
158 it sends a SIGKILL.</p>
159 <dl class="docutils">
160 <dt>Parameters:</dt>
161 <dd><p class="first">pid/ppid: pid and parent-pid of the spawned process. See remote_check_pid</p>
162 <p class="last">sudo: whether the command was run with sudo - careful killing like this.</p>
163 </dd>
164 </dl>
165 <p>Returns:</p>
166 <blockquote>
167 <div>Nothing, should have killed the process</div></blockquote>
168 </dd></dl>
169
170 <dl class="function">
171 <dt id="nepi.util.execfuncs.lspawn">
172 <tt class="descclassname">nepi.util.execfuncs.</tt><tt class="descname">lspawn</tt><big>(</big><em>command</em>, <em>pidfile</em>, <em>stdout='/dev/null'</em>, <em>stderr=&lt;class nepi.util.sshfuncs.STDOUT at 0x7f3058d754c8&gt;</em>, <em>stdin='/dev/null'</em>, <em>home=None</em>, <em>create_home=False</em>, <em>sudo=False</em>, <em>user=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/execfuncs.html#lspawn"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.execfuncs.lspawn" title="Permalink to this definition">¶</a></dt>
173 <dd><p>Spawn a local command such that it will continue working asynchronously.</p>
174 <dl class="docutils">
175 <dt>Parameters:</dt>
176 <dd><p class="first">command: the command to run - it should be a single line.</p>
177 <p>pidfile: path of a (ideally unique to this task) pidfile for tracking the process.</p>
178 <dl class="docutils">
179 <dt>stdout: path of a file to redirect standard output to - must be a string.</dt>
180 <dd>Defaults to /dev/null</dd>
181 <dt>stderr: path of a file to redirect standard error to - string or the special STDOUT value</dt>
182 <dd>to redirect to the same file stdout was redirected to. Defaults to STDOUT.</dd>
183 </dl>
184 <p>stdin: path of a file with input to be piped into the command&#8217;s standard input</p>
185 <p>home: path of a folder to use as working directory - should exist, unless you specify create_home</p>
186 <p>create_home: if True, the home folder will be created first with mkdir -p</p>
187 <p class="last">sudo: whether the command needs to be executed as root</p>
188 </dd>
189 <dt>Returns:</dt>
190 <dd><p class="first">(stdout, stderr), process</p>
191 <p class="last">Of the spawning process, which only captures errors at spawning time.
192 Usually only useful for diagnostics.</p>
193 </dd>
194 </dl>
195 </dd></dl>
196
197 <dl class="function">
198 <dt id="nepi.util.execfuncs.lstatus">
199 <tt class="descclassname">nepi.util.execfuncs.</tt><tt class="descname">lstatus</tt><big>(</big><em>pid</em>, <em>ppid</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/execfuncs.html#lstatus"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.execfuncs.lstatus" title="Permalink to this definition">¶</a></dt>
200 <dd><p>Check the status of a process spawned with remote_spawn.</p>
201 <dl class="docutils">
202 <dt>Parameters:</dt>
203 <dd>pid/ppid: pid and parent-pid of the spawned process. See remote_check_pid</dd>
204 </dl>
205 <p>Returns:</p>
206 <blockquote>
207 <div>One of NOT_STARTED, RUNNING, FINISHED</div></blockquote>
208 </dd></dl>
209
210 </div>
211 <div class="section" id="module-nepi.util.guid">
212 <span id="nepi-util-guid-module"></span><h2>nepi.util.guid module<a class="headerlink" href="#module-nepi.util.guid" title="Permalink to this headline">¶</a></h2>
213 <dl class="class">
214 <dt id="nepi.util.guid.GuidGenerator">
215 <em class="property">class </em><tt class="descclassname">nepi.util.guid.</tt><tt class="descname">GuidGenerator</tt><a class="reference internal" href="../_modules/nepi/util/guid.html#GuidGenerator"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.guid.GuidGenerator" title="Permalink to this definition">¶</a></dt>
216 <dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/functions.html#object" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></a></p>
217 <dl class="method">
218 <dt id="nepi.util.guid.GuidGenerator.next">
219 <tt class="descname">next</tt><big>(</big><em>guid=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/guid.html#GuidGenerator.next"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.guid.GuidGenerator.next" title="Permalink to this definition">¶</a></dt>
220 <dd></dd></dl>
221
222 </dd></dl>
223
224 </div>
225 <div class="section" id="module-nepi.util.logger">
226 <span id="nepi-util-logger-module"></span><h2>nepi.util.logger module<a class="headerlink" href="#module-nepi.util.logger" title="Permalink to this headline">¶</a></h2>
227 <dl class="class">
228 <dt id="nepi.util.logger.Logger">
229 <em class="property">class </em><tt class="descclassname">nepi.util.logger.</tt><tt class="descname">Logger</tt><big>(</big><em>logger_component</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/logger.html#Logger"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.logger.Logger" title="Permalink to this definition">¶</a></dt>
230 <dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/functions.html#object" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></a></p>
231 <dl class="method">
232 <dt id="nepi.util.logger.Logger.debug">
233 <tt class="descname">debug</tt><big>(</big><em>msg</em>, <em>out=None</em>, <em>err=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/logger.html#Logger.debug"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.logger.Logger.debug" title="Permalink to this definition">¶</a></dt>
234 <dd></dd></dl>
235
236 <dl class="method">
237 <dt id="nepi.util.logger.Logger.error">
238 <tt class="descname">error</tt><big>(</big><em>msg</em>, <em>out=None</em>, <em>err=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/logger.html#Logger.error"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.logger.Logger.error" title="Permalink to this definition">¶</a></dt>
239 <dd></dd></dl>
240
241 <dl class="method">
242 <dt id="nepi.util.logger.Logger.info">
243 <tt class="descname">info</tt><big>(</big><em>msg</em>, <em>out=None</em>, <em>err=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/logger.html#Logger.info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.logger.Logger.info" title="Permalink to this definition">¶</a></dt>
244 <dd></dd></dl>
245
246 <dl class="method">
247 <dt id="nepi.util.logger.Logger.log">
248 <tt class="descname">log</tt><big>(</big><em>msg</em>, <em>level</em>, <em>out=None</em>, <em>err=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/logger.html#Logger.log"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.logger.Logger.log" title="Permalink to this definition">¶</a></dt>
249 <dd></dd></dl>
250
251 <dl class="method">
252 <dt id="nepi.util.logger.Logger.log_message">
253 <tt class="descname">log_message</tt><big>(</big><em>msg</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/logger.html#Logger.log_message"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.logger.Logger.log_message" title="Permalink to this definition">¶</a></dt>
254 <dd></dd></dl>
255
256 <dl class="attribute">
257 <dt id="nepi.util.logger.Logger.logger">
258 <tt class="descname">logger</tt><a class="reference internal" href="../_modules/nepi/util/logger.html#Logger.logger"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.logger.Logger.logger" title="Permalink to this definition">¶</a></dt>
259 <dd></dd></dl>
260
261 <dl class="method">
262 <dt id="nepi.util.logger.Logger.warning">
263 <tt class="descname">warning</tt><big>(</big><em>msg</em>, <em>out=None</em>, <em>err=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/logger.html#Logger.warning"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.logger.Logger.warning" title="Permalink to this definition">¶</a></dt>
264 <dd></dd></dl>
265
266 </dd></dl>
267
268 </div>
269 <div class="section" id="module-nepi.util.manifoldapi">
270 <span id="nepi-util-manifoldapi-module"></span><h2>nepi.util.manifoldapi module<a class="headerlink" href="#module-nepi.util.manifoldapi" title="Permalink to this headline">¶</a></h2>
271 <dl class="class">
272 <dt id="nepi.util.manifoldapi.MANIFOLDAPI">
273 <em class="property">class </em><tt class="descclassname">nepi.util.manifoldapi.</tt><tt class="descname">MANIFOLDAPI</tt><big>(</big><em>username</em>, <em>password</em>, <em>hostname</em>, <em>urlpattern</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/manifoldapi.html#MANIFOLDAPI"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.manifoldapi.MANIFOLDAPI" title="Permalink to this definition">¶</a></dt>
274 <dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/functions.html#object" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></a></p>
275 <p>API to query different data platforms as SFA, TopHat, OML Central Server,
276 using Manifold Framework, the backend of MySlice.</p>
277 <dl class="method">
278 <dt id="nepi.util.manifoldapi.MANIFOLDAPI.add_resource_to_slice">
279 <tt class="descname">add_resource_to_slice</tt><big>(</big><em>slicename</em>, <em>resource_urn</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/manifoldapi.html#MANIFOLDAPI.add_resource_to_slice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.manifoldapi.MANIFOLDAPI.add_resource_to_slice" title="Permalink to this definition">¶</a></dt>
280 <dd><p>Add resource to user&#8217;s slice. The query needs to specify the new
281 resource plus the previous resources already in the slice.</p>
282 </dd></dl>
283
284 <dl class="attribute">
285 <dt id="nepi.util.manifoldapi.MANIFOLDAPI.api">
286 <tt class="descname">api</tt><a class="reference internal" href="../_modules/nepi/util/manifoldapi.html#MANIFOLDAPI.api"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.manifoldapi.MANIFOLDAPI.api" title="Permalink to this definition">¶</a></dt>
287 <dd></dd></dl>
288
289 <dl class="method">
290 <dt id="nepi.util.manifoldapi.MANIFOLDAPI.get_resource_info">
291 <tt class="descname">get_resource_info</tt><big>(</big><em>filters=None</em>, <em>fields=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/manifoldapi.html#MANIFOLDAPI.get_resource_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.manifoldapi.MANIFOLDAPI.get_resource_info" title="Permalink to this definition">¶</a></dt>
292 <dd><p>Create and execute the Manifold API Query to get the resources 
293 according fields and filters.
294 :param filters: resource&#8217;s constraints for the experiment
295 :type filters: dict
296 :param fields: desire fields in the result of the query
297 :type fields: list</p>
298 </dd></dl>
299
300 <dl class="method">
301 <dt id="nepi.util.manifoldapi.MANIFOLDAPI.get_resource_urn">
302 <tt class="descname">get_resource_urn</tt><big>(</big><em>filters=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/manifoldapi.html#MANIFOLDAPI.get_resource_urn"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.manifoldapi.MANIFOLDAPI.get_resource_urn" title="Permalink to this definition">¶</a></dt>
303 <dd><p>Retrieves the resources urn of the resources matching filters.</p>
304 </dd></dl>
305
306 <dl class="method">
307 <dt id="nepi.util.manifoldapi.MANIFOLDAPI.get_session_key">
308 <tt class="descname">get_session_key</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/manifoldapi.html#MANIFOLDAPI.get_session_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.manifoldapi.MANIFOLDAPI.get_session_key" title="Permalink to this definition">¶</a></dt>
309 <dd><p>Retrieves the session key, in order to use the same session for 
310 queries.</p>
311 </dd></dl>
312
313 <dl class="method">
314 <dt id="nepi.util.manifoldapi.MANIFOLDAPI.get_slice_resources">
315 <tt class="descname">get_slice_resources</tt><big>(</big><em>slicename</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/manifoldapi.html#MANIFOLDAPI.get_slice_resources"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.manifoldapi.MANIFOLDAPI.get_slice_resources" title="Permalink to this definition">¶</a></dt>
316 <dd><p>Retrieves resources attached to user&#8217;s slice.
317 return value: list of resources&#8217; urn</p>
318 </dd></dl>
319
320 <dl class="method">
321 <dt id="nepi.util.manifoldapi.MANIFOLDAPI.remove_resource_from_slice">
322 <tt class="descname">remove_resource_from_slice</tt><big>(</big><em>slicename</em>, <em>resource_urn</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/manifoldapi.html#MANIFOLDAPI.remove_resource_from_slice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.manifoldapi.MANIFOLDAPI.remove_resource_from_slice" title="Permalink to this definition">¶</a></dt>
323 <dd><p>Remove resource from user&#8217;s slice. The query needs to specify the list
324 of previous resources in the slice without the one to be remove.</p>
325 </dd></dl>
326
327 </dd></dl>
328
329 <dl class="class">
330 <dt id="nepi.util.manifoldapi.MANIFOLDAPIFactory">
331 <em class="property">class </em><tt class="descclassname">nepi.util.manifoldapi.</tt><tt class="descname">MANIFOLDAPIFactory</tt><a class="reference internal" href="../_modules/nepi/util/manifoldapi.html#MANIFOLDAPIFactory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.manifoldapi.MANIFOLDAPIFactory" title="Permalink to this definition">¶</a></dt>
332 <dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/functions.html#object" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></a></p>
333 <p>API Factory to manage a map of MANIFOLDAPI instances as key-value pairs, it
334 instanciate a single instance per key. The key represents the same SFA, 
335 MF (ManiFold) credentials.</p>
336 <dl class="classmethod">
337 <dt id="nepi.util.manifoldapi.MANIFOLDAPIFactory.get_api">
338 <em class="property">classmethod </em><tt class="descname">get_api</tt><big>(</big><em>username</em>, <em>password</em>, <em>hostname='test.myslice.info'</em>, <em>urlpattern='http://%(hostname)s:7080'</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/manifoldapi.html#MANIFOLDAPIFactory.get_api"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.manifoldapi.MANIFOLDAPIFactory.get_api" title="Permalink to this definition">¶</a></dt>
339 <dd><table class="docutils field-list" frame="void" rules="none">
340 <col class="field-name" />
341 <col class="field-body" />
342 <tbody valign="top">
343 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
344 <li><strong>username</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; Manifold user (also used for MySlice web login)</li>
345 <li><strong>password</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; Manifold password (also used for MySlice web login)</li>
346 <li><strong>hostname</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; Hostname of the Manifold API to query SFA, TopHat, etc</li>
347 <li><strong>urlpattern</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; Url of the Manifold API to query SFA, TopHat, etc</li>
348 </ul>
349 </td>
350 </tr>
351 </tbody>
352 </table>
353 </dd></dl>
354
355 <dl class="classmethod">
356 <dt id="nepi.util.manifoldapi.MANIFOLDAPIFactory.make_key">
357 <em class="property">classmethod </em><tt class="descname">make_key</tt><big>(</big><em>*args</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/manifoldapi.html#MANIFOLDAPIFactory.make_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.manifoldapi.MANIFOLDAPIFactory.make_key" title="Permalink to this definition">¶</a></dt>
358 <dd></dd></dl>
359
360 </dd></dl>
361
362 </div>
363 <div class="section" id="module-nepi.util.netgraph">
364 <span id="nepi-util-netgraph-module"></span><h2>nepi.util.netgraph module<a class="headerlink" href="#module-nepi.util.netgraph" title="Permalink to this headline">¶</a></h2>
365 <dl class="class">
366 <dt id="nepi.util.netgraph.NetGraph">
367 <em class="property">class </em><tt class="descclassname">nepi.util.netgraph.</tt><tt class="descname">NetGraph</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph" title="Permalink to this definition">¶</a></dt>
368 <dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/functions.html#object" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></a></p>
369 <p>NetGraph represents a network topology. 
370 Network graphs are internally using the networkx library.</p>
371 <dl class="method">
372 <dt id="nepi.util.netgraph.NetGraph.add_edge">
373 <tt class="descname">add_edge</tt><big>(</big><em>nid1</em>, <em>nid2</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.add_edge"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.add_edge" title="Permalink to this definition">¶</a></dt>
374 <dd></dd></dl>
375
376 <dl class="method">
377 <dt id="nepi.util.netgraph.NetGraph.add_node">
378 <tt class="descname">add_node</tt><big>(</big><em>nid</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.add_node"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.add_node" title="Permalink to this definition">¶</a></dt>
379 <dd></dd></dl>
380
381 <dl class="method">
382 <dt id="nepi.util.netgraph.NetGraph.annotate_edge">
383 <tt class="descname">annotate_edge</tt><big>(</big><em>nid1</em>, <em>nid2</em>, <em>name</em>, <em>value</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.annotate_edge"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.annotate_edge" title="Permalink to this definition">¶</a></dt>
384 <dd></dd></dl>
385
386 <dl class="method">
387 <dt id="nepi.util.netgraph.NetGraph.annotate_edge_net">
388 <tt class="descname">annotate_edge_net</tt><big>(</big><em>nid1</em>, <em>nid2</em>, <em>ip1</em>, <em>ip2</em>, <em>mask</em>, <em>network</em>, <em>prefixlen</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.annotate_edge_net"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.annotate_edge_net" title="Permalink to this definition">¶</a></dt>
389 <dd></dd></dl>
390
391 <dl class="method">
392 <dt id="nepi.util.netgraph.NetGraph.annotate_node">
393 <tt class="descname">annotate_node</tt><big>(</big><em>nid</em>, <em>name</em>, <em>value</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.annotate_node"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.annotate_node" title="Permalink to this definition">¶</a></dt>
394 <dd></dd></dl>
395
396 <dl class="method">
397 <dt id="nepi.util.netgraph.NetGraph.annotate_node_ip">
398 <tt class="descname">annotate_node_ip</tt><big>(</big><em>nid</em>, <em>ip</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.annotate_node_ip"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.annotate_node_ip" title="Permalink to this definition">¶</a></dt>
399 <dd></dd></dl>
400
401 <dl class="method">
402 <dt id="nepi.util.netgraph.NetGraph.assign_p2p_ips">
403 <tt class="descname">assign_p2p_ips</tt><big>(</big><em>network='10.0.0.0'</em>, <em>prefix=8</em>, <em>version=4</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.assign_p2p_ips"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.assign_p2p_ips" title="Permalink to this definition">¶</a></dt>
404 <dd><p>Assign IP addresses to each end of each edge of the network graph,
405 computing all the point to point subnets and addresses in the network
406 representation.</p>
407 <blockquote>
408 <div><table class="docutils field-list" frame="void" rules="none">
409 <col class="field-name" />
410 <col class="field-body" />
411 <tbody valign="top">
412 <tr class="field-odd field"><th class="field-name">param network:</th><td class="field-body">Base network address used for subnetting.</td>
413 </tr>
414 <tr class="field-even field"><th class="field-name">type network:</th><td class="field-body">str</td>
415 </tr>
416 <tr class="field-odd field"><th class="field-name">param prefix:</th><td class="field-body">Prefix for the base network address used for subnetting.</td>
417 </tr>
418 <tr class="field-even field"><th class="field-name">type prefixt:</th><td class="field-body">int</td>
419 </tr>
420 <tr class="field-odd field"><th class="field-name">param version:</th><td class="field-body">IP version (either 4 or 6).</td>
421 </tr>
422 <tr class="field-even field"><th class="field-name">type version:</th><td class="field-body">int</td>
423 </tr>
424 </tbody>
425 </table>
426 </div></blockquote>
427 </dd></dl>
428
429 <dl class="method">
430 <dt id="nepi.util.netgraph.NetGraph.del_edge_annotation">
431 <tt class="descname">del_edge_annotation</tt><big>(</big><em>nid1</em>, <em>nid2</em>, <em>name</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.del_edge_annotation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.del_edge_annotation" title="Permalink to this definition">¶</a></dt>
432 <dd></dd></dl>
433
434 <dl class="method">
435 <dt id="nepi.util.netgraph.NetGraph.del_node_annotation">
436 <tt class="descname">del_node_annotation</tt><big>(</big><em>nid</em>, <em>name</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.del_node_annotation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.del_node_annotation" title="Permalink to this definition">¶</a></dt>
437 <dd></dd></dl>
438
439 <dl class="method">
440 <dt id="nepi.util.netgraph.NetGraph.edge_annotation">
441 <tt class="descname">edge_annotation</tt><big>(</big><em>nid1</em>, <em>nid2</em>, <em>name</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.edge_annotation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.edge_annotation" title="Permalink to this definition">¶</a></dt>
442 <dd></dd></dl>
443
444 <dl class="method">
445 <dt id="nepi.util.netgraph.NetGraph.edge_annotations">
446 <tt class="descname">edge_annotations</tt><big>(</big><em>nid1</em>, <em>nid2</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.edge_annotations"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.edge_annotations" title="Permalink to this definition">¶</a></dt>
447 <dd></dd></dl>
448
449 <dl class="method">
450 <dt id="nepi.util.netgraph.NetGraph.edge_net_annotation">
451 <tt class="descname">edge_net_annotation</tt><big>(</big><em>nid1</em>, <em>nid2</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.edge_net_annotation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.edge_net_annotation" title="Permalink to this definition">¶</a></dt>
452 <dd></dd></dl>
453
454 <dl class="method">
455 <dt id="nepi.util.netgraph.NetGraph.edges">
456 <tt class="descname">edges</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.edges"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.edges" title="Permalink to this definition">¶</a></dt>
457 <dd></dd></dl>
458
459 <dl class="method">
460 <dt id="nepi.util.netgraph.NetGraph.generate_topology">
461 <tt class="descname">generate_topology</tt><big>(</big><em>topo_type</em>, <em>node_count</em>, <em>branches=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.generate_topology"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.generate_topology" title="Permalink to this definition">¶</a></dt>
462 <dd></dd></dl>
463
464 <dl class="method">
465 <dt id="nepi.util.netgraph.NetGraph.get_p2p_info">
466 <tt class="descname">get_p2p_info</tt><big>(</big><em>nid1</em>, <em>nid2</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.get_p2p_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.get_p2p_info" title="Permalink to this definition">¶</a></dt>
467 <dd></dd></dl>
468
469 <dl class="method">
470 <dt id="nepi.util.netgraph.NetGraph.is_source">
471 <tt class="descname">is_source</tt><big>(</big><em>nid</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.is_source"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.is_source" title="Permalink to this definition">¶</a></dt>
472 <dd></dd></dl>
473
474 <dl class="method">
475 <dt id="nepi.util.netgraph.NetGraph.is_target">
476 <tt class="descname">is_target</tt><big>(</big><em>nid</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.is_target"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.is_target" title="Permalink to this definition">¶</a></dt>
477 <dd></dd></dl>
478
479 <dl class="method">
480 <dt id="nepi.util.netgraph.NetGraph.node_annotation">
481 <tt class="descname">node_annotation</tt><big>(</big><em>nid</em>, <em>name</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.node_annotation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.node_annotation" title="Permalink to this definition">¶</a></dt>
482 <dd></dd></dl>
483
484 <dl class="method">
485 <dt id="nepi.util.netgraph.NetGraph.node_annotations">
486 <tt class="descname">node_annotations</tt><big>(</big><em>nid</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.node_annotations"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.node_annotations" title="Permalink to this definition">¶</a></dt>
487 <dd></dd></dl>
488
489 <dl class="method">
490 <dt id="nepi.util.netgraph.NetGraph.node_ip_annotations">
491 <tt class="descname">node_ip_annotations</tt><big>(</big><em>nid</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.node_ip_annotations"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.node_ip_annotations" title="Permalink to this definition">¶</a></dt>
492 <dd></dd></dl>
493
494 <dl class="method">
495 <dt id="nepi.util.netgraph.NetGraph.nodes">
496 <tt class="descname">nodes</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.nodes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.nodes" title="Permalink to this definition">¶</a></dt>
497 <dd></dd></dl>
498
499 <dl class="attribute">
500 <dt id="nepi.util.netgraph.NetGraph.order">
501 <tt class="descname">order</tt><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.order"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.order" title="Permalink to this definition">¶</a></dt>
502 <dd></dd></dl>
503
504 <dl class="method">
505 <dt id="nepi.util.netgraph.NetGraph.select_random_source">
506 <tt class="descname">select_random_source</tt><big>(</big><em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.select_random_source"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.select_random_source" title="Permalink to this definition">¶</a></dt>
507 <dd><p>Mark a random node as source.</p>
508 </dd></dl>
509
510 <dl class="method">
511 <dt id="nepi.util.netgraph.NetGraph.select_target_zero">
512 <tt class="descname">select_target_zero</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.select_target_zero"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.select_target_zero" title="Permalink to this definition">¶</a></dt>
513 <dd><p>Mark the node 0 as target</p>
514 </dd></dl>
515
516 <dl class="method">
517 <dt id="nepi.util.netgraph.NetGraph.set_source">
518 <tt class="descname">set_source</tt><big>(</big><em>nid</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.set_source"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.set_source" title="Permalink to this definition">¶</a></dt>
519 <dd></dd></dl>
520
521 <dl class="method">
522 <dt id="nepi.util.netgraph.NetGraph.set_target">
523 <tt class="descname">set_target</tt><big>(</big><em>nid</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.set_target"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.set_target" title="Permalink to this definition">¶</a></dt>
524 <dd></dd></dl>
525
526 <dl class="method">
527 <dt id="nepi.util.netgraph.NetGraph.sources">
528 <tt class="descname">sources</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.sources"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.sources" title="Permalink to this definition">¶</a></dt>
529 <dd><p>Returns the nodes that are sources</p>
530 </dd></dl>
531
532 <dl class="method">
533 <dt id="nepi.util.netgraph.NetGraph.targets">
534 <tt class="descname">targets</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.targets"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.targets" title="Permalink to this definition">¶</a></dt>
535 <dd><p>Returns the nodes that are targets</p>
536 </dd></dl>
537
538 <dl class="attribute">
539 <dt id="nepi.util.netgraph.NetGraph.topo_type">
540 <tt class="descname">topo_type</tt><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.topo_type"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.topo_type" title="Permalink to this definition">¶</a></dt>
541 <dd></dd></dl>
542
543 <dl class="attribute">
544 <dt id="nepi.util.netgraph.NetGraph.topology">
545 <tt class="descname">topology</tt><a class="reference internal" href="../_modules/nepi/util/netgraph.html#NetGraph.topology"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.NetGraph.topology" title="Permalink to this definition">¶</a></dt>
546 <dd></dd></dl>
547
548 </dd></dl>
549
550 <dl class="class">
551 <dt id="nepi.util.netgraph.TopologyType">
552 <em class="property">class </em><tt class="descclassname">nepi.util.netgraph.</tt><tt class="descname">TopologyType</tt><a class="reference internal" href="../_modules/nepi/util/netgraph.html#TopologyType"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.netgraph.TopologyType" title="Permalink to this definition">¶</a></dt>
553 <dd><dl class="attribute">
554 <dt id="nepi.util.netgraph.TopologyType.ADHOC">
555 <tt class="descname">ADHOC</tt><em class="property"> = 'adhoc'</em><a class="headerlink" href="#nepi.util.netgraph.TopologyType.ADHOC" title="Permalink to this definition">¶</a></dt>
556 <dd></dd></dl>
557
558 <dl class="attribute">
559 <dt id="nepi.util.netgraph.TopologyType.LADDER">
560 <tt class="descname">LADDER</tt><em class="property"> = 'ladder'</em><a class="headerlink" href="#nepi.util.netgraph.TopologyType.LADDER" title="Permalink to this definition">¶</a></dt>
561 <dd></dd></dl>
562
563 <dl class="attribute">
564 <dt id="nepi.util.netgraph.TopologyType.LINEAR">
565 <tt class="descname">LINEAR</tt><em class="property"> = 'linear'</em><a class="headerlink" href="#nepi.util.netgraph.TopologyType.LINEAR" title="Permalink to this definition">¶</a></dt>
566 <dd></dd></dl>
567
568 <dl class="attribute">
569 <dt id="nepi.util.netgraph.TopologyType.MESH">
570 <tt class="descname">MESH</tt><em class="property"> = 'mesh'</em><a class="headerlink" href="#nepi.util.netgraph.TopologyType.MESH" title="Permalink to this definition">¶</a></dt>
571 <dd></dd></dl>
572
573 <dl class="attribute">
574 <dt id="nepi.util.netgraph.TopologyType.STAR">
575 <tt class="descname">STAR</tt><em class="property"> = 'star'</em><a class="headerlink" href="#nepi.util.netgraph.TopologyType.STAR" title="Permalink to this definition">¶</a></dt>
576 <dd></dd></dl>
577
578 <dl class="attribute">
579 <dt id="nepi.util.netgraph.TopologyType.TREE">
580 <tt class="descname">TREE</tt><em class="property"> = 'tree'</em><a class="headerlink" href="#nepi.util.netgraph.TopologyType.TREE" title="Permalink to this definition">¶</a></dt>
581 <dd></dd></dl>
582
583 </dd></dl>
584
585 </div>
586 <div class="section" id="module-nepi.util.parallel">
587 <span id="nepi-util-parallel-module"></span><h2>nepi.util.parallel module<a class="headerlink" href="#module-nepi.util.parallel" title="Permalink to this headline">¶</a></h2>
588 <dl class="class">
589 <dt id="nepi.util.parallel.ParallelRun">
590 <em class="property">class </em><tt class="descclassname">nepi.util.parallel.</tt><tt class="descname">ParallelRun</tt><big>(</big><em>maxthreads=None</em>, <em>maxqueue=None</em>, <em>results=True</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/parallel.html#ParallelRun"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.parallel.ParallelRun" title="Permalink to this definition">¶</a></dt>
591 <dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/functions.html#object" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></a></p>
592 <dl class="method">
593 <dt id="nepi.util.parallel.ParallelRun.destroy">
594 <tt class="descname">destroy</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/parallel.html#ParallelRun.destroy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.parallel.ParallelRun.destroy" title="Permalink to this definition">¶</a></dt>
595 <dd></dd></dl>
596
597 <dl class="method">
598 <dt id="nepi.util.parallel.ParallelRun.empty">
599 <tt class="descname">empty</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/parallel.html#ParallelRun.empty"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.parallel.ParallelRun.empty" title="Permalink to this definition">¶</a></dt>
600 <dd></dd></dl>
601
602 <dl class="method">
603 <dt id="nepi.util.parallel.ParallelRun.initialize_workers">
604 <tt class="descname">initialize_workers</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/parallel.html#ParallelRun.initialize_workers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.parallel.ParallelRun.initialize_workers" title="Permalink to this definition">¶</a></dt>
605 <dd></dd></dl>
606
607 <dl class="method">
608 <dt id="nepi.util.parallel.ParallelRun.join">
609 <tt class="descname">join</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/parallel.html#ParallelRun.join"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.parallel.ParallelRun.join" title="Permalink to this definition">¶</a></dt>
610 <dd></dd></dl>
611
612 <dl class="method">
613 <dt id="nepi.util.parallel.ParallelRun.put">
614 <tt class="descname">put</tt><big>(</big><em>callable</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/parallel.html#ParallelRun.put"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.parallel.ParallelRun.put" title="Permalink to this definition">¶</a></dt>
615 <dd></dd></dl>
616
617 <dl class="method">
618 <dt id="nepi.util.parallel.ParallelRun.put_nowait">
619 <tt class="descname">put_nowait</tt><big>(</big><em>callable</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/parallel.html#ParallelRun.put_nowait"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.parallel.ParallelRun.put_nowait" title="Permalink to this definition">¶</a></dt>
620 <dd></dd></dl>
621
622 <dl class="method">
623 <dt id="nepi.util.parallel.ParallelRun.start">
624 <tt class="descname">start</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/parallel.html#ParallelRun.start"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.parallel.ParallelRun.start" title="Permalink to this definition">¶</a></dt>
625 <dd></dd></dl>
626
627 <dl class="method">
628 <dt id="nepi.util.parallel.ParallelRun.sync">
629 <tt class="descname">sync</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/parallel.html#ParallelRun.sync"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.parallel.ParallelRun.sync" title="Permalink to this definition">¶</a></dt>
630 <dd></dd></dl>
631
632 </dd></dl>
633
634 <dl class="class">
635 <dt id="nepi.util.parallel.WorkerThread">
636 <em class="property">class </em><tt class="descclassname">nepi.util.parallel.</tt><tt class="descname">WorkerThread</tt><big>(</big><em>group=None</em>, <em>target=None</em>, <em>name=None</em>, <em>args=()</em>, <em>kwargs=None</em>, <em>verbose=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/parallel.html#WorkerThread"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.parallel.WorkerThread" title="Permalink to this definition">¶</a></dt>
637 <dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/threading.html#threading.Thread" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">threading.Thread</span></tt></a></p>
638 <dl class="class">
639 <dt id="nepi.util.parallel.WorkerThread.QUIT">
640 <em class="property">class </em><tt class="descname">QUIT</tt><a class="reference internal" href="../_modules/nepi/util/parallel.html#WorkerThread.QUIT"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.parallel.WorkerThread.QUIT" title="Permalink to this definition">¶</a></dt>
641 <dd></dd></dl>
642
643 <dl class="method">
644 <dt id="nepi.util.parallel.WorkerThread.attach">
645 <tt class="descclassname">WorkerThread.</tt><tt class="descname">attach</tt><big>(</big><em>queue</em>, <em>rvqueue</em>, <em>delayed_exceptions</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/parallel.html#WorkerThread.attach"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.parallel.WorkerThread.attach" title="Permalink to this definition">¶</a></dt>
646 <dd></dd></dl>
647
648 <dl class="method">
649 <dt id="nepi.util.parallel.WorkerThread.quit">
650 <tt class="descclassname">WorkerThread.</tt><tt class="descname">quit</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/parallel.html#WorkerThread.quit"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.parallel.WorkerThread.quit" title="Permalink to this definition">¶</a></dt>
651 <dd></dd></dl>
652
653 <dl class="method">
654 <dt id="nepi.util.parallel.WorkerThread.run">
655 <tt class="descclassname">WorkerThread.</tt><tt class="descname">run</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/parallel.html#WorkerThread.run"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.parallel.WorkerThread.run" title="Permalink to this definition">¶</a></dt>
656 <dd></dd></dl>
657
658 </dd></dl>
659
660 </div>
661 <div class="section" id="module-nepi.util.plotter">
662 <span id="nepi-util-plotter-module"></span><h2>nepi.util.plotter module<a class="headerlink" href="#module-nepi.util.plotter" title="Permalink to this headline">¶</a></h2>
663 <dl class="class">
664 <dt id="nepi.util.plotter.ECPlotter">
665 <em class="property">class </em><tt class="descclassname">nepi.util.plotter.</tt><tt class="descname">ECPlotter</tt><a class="reference internal" href="../_modules/nepi/util/plotter.html#ECPlotter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.plotter.ECPlotter" title="Permalink to this definition">¶</a></dt>
666 <dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/functions.html#object" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></a></p>
667 <dl class="method">
668 <dt id="nepi.util.plotter.ECPlotter.plot">
669 <tt class="descname">plot</tt><big>(</big><em>ec</em>, <em>dirpath=None</em>, <em>format='figure'</em>, <em>show=False</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/plotter.html#ECPlotter.plot"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.plotter.ECPlotter.plot" title="Permalink to this definition">¶</a></dt>
670 <dd></dd></dl>
671
672 </dd></dl>
673
674 <dl class="class">
675 <dt id="nepi.util.plotter.PFormats">
676 <em class="property">class </em><tt class="descclassname">nepi.util.plotter.</tt><tt class="descname">PFormats</tt><a class="reference internal" href="../_modules/nepi/util/plotter.html#PFormats"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.plotter.PFormats" title="Permalink to this definition">¶</a></dt>
677 <dd><dl class="attribute">
678 <dt id="nepi.util.plotter.PFormats.DOT">
679 <tt class="descname">DOT</tt><em class="property"> = 'dot'</em><a class="headerlink" href="#nepi.util.plotter.PFormats.DOT" title="Permalink to this definition">¶</a></dt>
680 <dd></dd></dl>
681
682 <dl class="attribute">
683 <dt id="nepi.util.plotter.PFormats.FIGURE">
684 <tt class="descname">FIGURE</tt><em class="property"> = 'figure'</em><a class="headerlink" href="#nepi.util.plotter.PFormats.FIGURE" title="Permalink to this definition">¶</a></dt>
685 <dd></dd></dl>
686
687 </dd></dl>
688
689 </div>
690 <div class="section" id="module-nepi.util.rmatcher">
691 <span id="nepi-util-rmatcher-module"></span><h2>nepi.util.rmatcher module<a class="headerlink" href="#module-nepi.util.rmatcher" title="Permalink to this headline">¶</a></h2>
692 <dl class="function">
693 <dt id="nepi.util.rmatcher.find_boxes">
694 <tt class="descclassname">nepi.util.rmatcher.</tt><tt class="descname">find_boxes</tt><big>(</big><em>box</em>, <em>all_tags=None</em>, <em>exact_tags=None</em>, <em>max_depth=1</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/rmatcher.html#find_boxes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.rmatcher.find_boxes" title="Permalink to this definition">¶</a></dt>
695 <dd><p>Look for the connected boxes with the required tags, doing breath-first
696 search, until max_depth ( max_depth = None will traverse the entire graph ).</p>
697 </dd></dl>
698
699 <dl class="function">
700 <dt id="nepi.util.rmatcher.match_tags">
701 <tt class="descclassname">nepi.util.rmatcher.</tt><tt class="descname">match_tags</tt><big>(</big><em>box</em>, <em>all_tags</em>, <em>exact_tags</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/rmatcher.html#match_tags"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.rmatcher.match_tags" title="Permalink to this definition">¶</a></dt>
702 <dd><p>returns True if box has required tags</p>
703 </dd></dl>
704
705 </div>
706 <div class="section" id="module-nepi.util.serializer">
707 <span id="nepi-util-serializer-module"></span><h2>nepi.util.serializer module<a class="headerlink" href="#module-nepi.util.serializer" title="Permalink to this headline">¶</a></h2>
708 <dl class="class">
709 <dt id="nepi.util.serializer.ECSerializer">
710 <em class="property">class </em><tt class="descclassname">nepi.util.serializer.</tt><tt class="descname">ECSerializer</tt><a class="reference internal" href="../_modules/nepi/util/serializer.html#ECSerializer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.serializer.ECSerializer" title="Permalink to this definition">¶</a></dt>
711 <dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/functions.html#object" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></a></p>
712 <dl class="method">
713 <dt id="nepi.util.serializer.ECSerializer.load">
714 <tt class="descname">load</tt><big>(</big><em>filepath</em>, <em>format='xml'</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/serializer.html#ECSerializer.load"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.serializer.ECSerializer.load" title="Permalink to this definition">¶</a></dt>
715 <dd></dd></dl>
716
717 <dl class="method">
718 <dt id="nepi.util.serializer.ECSerializer.save">
719 <tt class="descname">save</tt><big>(</big><em>ec</em>, <em>dirpath</em>, <em>format='xml'</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/serializer.html#ECSerializer.save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.serializer.ECSerializer.save" title="Permalink to this definition">¶</a></dt>
720 <dd></dd></dl>
721
722 <dl class="method">
723 <dt id="nepi.util.serializer.ECSerializer.serialize">
724 <tt class="descname">serialize</tt><big>(</big><em>ec</em>, <em>format='xml'</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/serializer.html#ECSerializer.serialize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.serializer.ECSerializer.serialize" title="Permalink to this definition">¶</a></dt>
725 <dd></dd></dl>
726
727 </dd></dl>
728
729 <dl class="class">
730 <dt id="nepi.util.serializer.SFormats">
731 <em class="property">class </em><tt class="descclassname">nepi.util.serializer.</tt><tt class="descname">SFormats</tt><a class="reference internal" href="../_modules/nepi/util/serializer.html#SFormats"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.serializer.SFormats" title="Permalink to this definition">¶</a></dt>
732 <dd><dl class="attribute">
733 <dt id="nepi.util.serializer.SFormats.XML">
734 <tt class="descname">XML</tt><em class="property"> = 'xml'</em><a class="headerlink" href="#nepi.util.serializer.SFormats.XML" title="Permalink to this definition">¶</a></dt>
735 <dd></dd></dl>
736
737 </dd></dl>
738
739 </div>
740 <div class="section" id="module-nepi.util.sfaapi">
741 <span id="nepi-util-sfaapi-module"></span><h2>nepi.util.sfaapi module<a class="headerlink" href="#module-nepi.util.sfaapi" title="Permalink to this headline">¶</a></h2>
742 <dl class="class">
743 <dt id="nepi.util.sfaapi.SFAAPI">
744 <em class="property">class </em><tt class="descclassname">nepi.util.sfaapi.</tt><tt class="descname">SFAAPI</tt><big>(</big><em>sfi_user</em>, <em>sfi_auth</em>, <em>sfi_registry</em>, <em>sfi_sm</em>, <em>private_key</em>, <em>ec</em>, <em>batch</em>, <em>rtype</em>, <em>timeout</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPI"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPI" title="Permalink to this definition">¶</a></dt>
745 <dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/functions.html#object" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></a></p>
746 <p>API for quering the SFA service. It uses Sfi class from the tool sfi client.</p>
747 <dl class="method">
748 <dt id="nepi.util.sfaapi.SFAAPI.add_resource_to_slice">
749 <tt class="descname">add_resource_to_slice</tt><big>(</big><em>slicename</em>, <em>resource_hrn</em>, <em>leases=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPI.add_resource_to_slice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPI.add_resource_to_slice" title="Permalink to this definition">¶</a></dt>
750 <dd><p>Get the list of resources&#8217; urn, build the rspec string and call the allocate 
751 and provision method.</p>
752 </dd></dl>
753
754 <dl class="method">
755 <dt id="nepi.util.sfaapi.SFAAPI.add_resource_to_slice_batch">
756 <tt class="descname">add_resource_to_slice_batch</tt><big>(</big><em>slicename</em>, <em>resource_hrn</em>, <em>properties=None</em>, <em>leases=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPI.add_resource_to_slice_batch"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPI.add_resource_to_slice_batch" title="Permalink to this definition">¶</a></dt>
757 <dd><p>Method to add all resources together to the slice. Previous deletion of slivers.
758 Specially used for wilabt that doesn&#8217;t allow to add more resources to the slice
759 after some resources are added. Every sliver have to be deleted and the batch 
760 has to be added at once.</p>
761 </dd></dl>
762
763 <dl class="method">
764 <dt id="nepi.util.sfaapi.SFAAPI.blacklist_resource">
765 <tt class="descname">blacklist_resource</tt><big>(</big><em>resource_hrn</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPI.blacklist_resource"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPI.blacklist_resource" title="Permalink to this definition">¶</a></dt>
766 <dd><p>Adding resource_hrn to blacklist, and taking 
767 the resource from the reserved list.</p>
768 </dd></dl>
769
770 <dl class="method">
771 <dt id="nepi.util.sfaapi.SFAAPI.blacklisted">
772 <tt class="descname">blacklisted</tt><big>(</big><em>resource_hrn</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPI.blacklisted"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPI.blacklisted" title="Permalink to this definition">¶</a></dt>
773 <dd><p>Check if the resource is in the blacklist.</p>
774 </dd></dl>
775
776 <dl class="method">
777 <dt id="nepi.util.sfaapi.SFAAPI.get_resources_hrn">
778 <tt class="descname">get_resources_hrn</tt><big>(</big><em>resources=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPI.get_resources_hrn"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPI.get_resources_hrn" title="Permalink to this definition">¶</a></dt>
779 <dd><p>Get list of resources hrn, without the resource info.</p>
780 </dd></dl>
781
782 <dl class="method">
783 <dt id="nepi.util.sfaapi.SFAAPI.get_resources_info">
784 <tt class="descname">get_resources_info</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPI.get_resources_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPI.get_resources_info" title="Permalink to this definition">¶</a></dt>
785 <dd><p>Get all resources and its attributes from aggregate.</p>
786 </dd></dl>
787
788 <dl class="method">
789 <dt id="nepi.util.sfaapi.SFAAPI.get_slice_resources">
790 <tt class="descname">get_slice_resources</tt><big>(</big><em>slicename</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPI.get_slice_resources"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPI.get_slice_resources" title="Permalink to this definition">¶</a></dt>
791 <dd><p>Get resources and info from slice.</p>
792 </dd></dl>
793
794 <dl class="method">
795 <dt id="nepi.util.sfaapi.SFAAPI.release">
796 <tt class="descname">release</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPI.release"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPI.release" title="Permalink to this definition">¶</a></dt>
797 <dd><p>Remove hosts from the reserved and blacklist lists, and in case
798 the persist attribute is set, it saves the blacklisted hosts
799 in the blacklist file.</p>
800 </dd></dl>
801
802 <dl class="method">
803 <dt id="nepi.util.sfaapi.SFAAPI.remove_all_from_slice">
804 <tt class="descname">remove_all_from_slice</tt><big>(</big><em>slicename</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPI.remove_all_from_slice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPI.remove_all_from_slice" title="Permalink to this definition">¶</a></dt>
805 <dd><p>De-allocate and de-provision all slivers of the named slice.
806 Currently sfi doesn&#8217;t support removing particular
807 slivers, so this method works only for removing every sliver. Setting the
808 resource_hrn parameter is not necessary.</p>
809 </dd></dl>
810
811 <dl class="method">
812 <dt id="nepi.util.sfaapi.SFAAPI.remove_resource_from_slice">
813 <tt class="descname">remove_resource_from_slice</tt><big>(</big><em>slicename</em>, <em>resource_hrn</em>, <em>leases=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPI.remove_resource_from_slice"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPI.remove_resource_from_slice" title="Permalink to this definition">¶</a></dt>
814 <dd><p>Remove slivers from slice. Currently sfi doesn&#8217;t support removing particular
815 slivers.</p>
816 </dd></dl>
817
818 <dl class="method">
819 <dt id="nepi.util.sfaapi.SFAAPI.reserve_resource">
820 <tt class="descname">reserve_resource</tt><big>(</big><em>resource_hrn</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPI.reserve_resource"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPI.reserve_resource" title="Permalink to this definition">¶</a></dt>
821 <dd><p>Add resource to the reserved list.</p>
822 </dd></dl>
823
824 <dl class="method">
825 <dt id="nepi.util.sfaapi.SFAAPI.reserved">
826 <tt class="descname">reserved</tt><big>(</big><em>resource_hrn</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPI.reserved"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPI.reserved" title="Permalink to this definition">¶</a></dt>
827 <dd><p>Check that the resource in not reserved.</p>
828 </dd></dl>
829
830 </dd></dl>
831
832 <dl class="class">
833 <dt id="nepi.util.sfaapi.SFAAPIFactory">
834 <em class="property">class </em><tt class="descclassname">nepi.util.sfaapi.</tt><tt class="descname">SFAAPIFactory</tt><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPIFactory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPIFactory" title="Permalink to this definition">¶</a></dt>
835 <dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/functions.html#object" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></a></p>
836 <p>API Factory to manage a map of SFAAPI instances as key-value pairs, it
837 instanciate a single instance per key. The key represents the same SFA, 
838 credentials.</p>
839 <dl class="classmethod">
840 <dt id="nepi.util.sfaapi.SFAAPIFactory.get_api">
841 <em class="property">classmethod </em><tt class="descname">get_api</tt><big>(</big><em>sfi_user</em>, <em>sfi_auth</em>, <em>sfi_registry</em>, <em>sfi_sm</em>, <em>private_key</em>, <em>ec</em>, <em>batch=False</em>, <em>rtype=None</em>, <em>timeout=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPIFactory.get_api"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPIFactory.get_api" title="Permalink to this definition">¶</a></dt>
842 <dd></dd></dl>
843
844 <dl class="classmethod">
845 <dt id="nepi.util.sfaapi.SFAAPIFactory.make_key">
846 <em class="property">classmethod </em><tt class="descname">make_key</tt><big>(</big><em>*args</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfaapi.html#SFAAPIFactory.make_key"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfaapi.SFAAPIFactory.make_key" title="Permalink to this definition">¶</a></dt>
847 <dd></dd></dl>
848
849 </dd></dl>
850
851 </div>
852 <div class="section" id="module-nepi.util.sfarspec_proc">
853 <span id="nepi-util-sfarspec-proc-module"></span><h2>nepi.util.sfarspec_proc module<a class="headerlink" href="#module-nepi.util.sfarspec_proc" title="Permalink to this headline">¶</a></h2>
854 <dl class="class">
855 <dt id="nepi.util.sfarspec_proc.SfaRSpecProcessing">
856 <em class="property">class </em><tt class="descclassname">nepi.util.sfarspec_proc.</tt><tt class="descname">SfaRSpecProcessing</tt><big>(</big><em>config=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfarspec_proc.html#SfaRSpecProcessing"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfarspec_proc.SfaRSpecProcessing" title="Permalink to this definition">¶</a></dt>
857 <dd><p>Bases: <a class="reference external" href="http://docs.python.org/library/functions.html#object" title="(in Python v2.7)"><tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></a></p>
858 <p>Class to process SFA RSpecs, parse the RSpec replies such as Advertisement RSpecs,
859 and build in the case of Request RSpecs.</p>
860 <dl class="method">
861 <dt id="nepi.util.sfarspec_proc.SfaRSpecProcessing.build_sfa_rspec">
862 <tt class="descname">build_sfa_rspec</tt><big>(</big><em>slice_id</em>, <em>resources</em>, <em>properties</em>, <em>leases</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfarspec_proc.html#SfaRSpecProcessing.build_sfa_rspec"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfarspec_proc.SfaRSpecProcessing.build_sfa_rspec" title="Permalink to this definition">¶</a></dt>
863 <dd><p>Build the XML RSpec from list of resources&#8217; urns.
864 eg. resources = [&#8220;<a class="reference external" href="urn:publicid:IDN+ple:modenaple+node+planetlab-1.ing.unimo.it">urn:publicid:IDN+ple:modenaple+node+planetlab-1.ing.unimo.it</a>&#8220;]</p>
865 </dd></dl>
866
867 <dl class="method">
868 <dt id="nepi.util.sfarspec_proc.SfaRSpecProcessing.make_dict_rec">
869 <tt class="descname">make_dict_rec</tt><big>(</big><em>obj</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfarspec_proc.html#SfaRSpecProcessing.make_dict_rec"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfarspec_proc.SfaRSpecProcessing.make_dict_rec" title="Permalink to this definition">¶</a></dt>
870 <dd></dd></dl>
871
872 <dl class="method">
873 <dt id="nepi.util.sfarspec_proc.SfaRSpecProcessing.parse_sfa_rspec">
874 <tt class="descname">parse_sfa_rspec</tt><big>(</big><em>rspec_string</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sfarspec_proc.html#SfaRSpecProcessing.parse_sfa_rspec"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sfarspec_proc.SfaRSpecProcessing.parse_sfa_rspec" title="Permalink to this definition">¶</a></dt>
875 <dd><p>Parse the RSpec XML as a string.</p>
876 </dd></dl>
877
878 </dd></dl>
879
880 </div>
881 <div class="section" id="module-nepi.util.sshfuncs">
882 <span id="nepi-util-sshfuncs-module"></span><h2>nepi.util.sshfuncs module<a class="headerlink" href="#module-nepi.util.sshfuncs" title="Permalink to this headline">¶</a></h2>
883 <dl class="class">
884 <dt id="nepi.util.sshfuncs.ProcStatus">
885 <em class="property">class </em><tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">ProcStatus</tt><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#ProcStatus"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.ProcStatus" title="Permalink to this definition">¶</a></dt>
886 <dd><p>Codes for status of remote spawned process</p>
887 <dl class="attribute">
888 <dt id="nepi.util.sshfuncs.ProcStatus.FINISHED">
889 <tt class="descname">FINISHED</tt><em class="property"> = 2</em><a class="headerlink" href="#nepi.util.sshfuncs.ProcStatus.FINISHED" title="Permalink to this definition">¶</a></dt>
890 <dd></dd></dl>
891
892 <dl class="attribute">
893 <dt id="nepi.util.sshfuncs.ProcStatus.NOT_STARTED">
894 <tt class="descname">NOT_STARTED</tt><em class="property"> = 3</em><a class="headerlink" href="#nepi.util.sshfuncs.ProcStatus.NOT_STARTED" title="Permalink to this definition">¶</a></dt>
895 <dd></dd></dl>
896
897 <dl class="attribute">
898 <dt id="nepi.util.sshfuncs.ProcStatus.RUNNING">
899 <tt class="descname">RUNNING</tt><em class="property"> = 1</em><a class="headerlink" href="#nepi.util.sshfuncs.ProcStatus.RUNNING" title="Permalink to this definition">¶</a></dt>
900 <dd></dd></dl>
901
902 </dd></dl>
903
904 <dl class="class">
905 <dt id="nepi.util.sshfuncs.STDOUT">
906 <em class="property">class </em><tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">STDOUT</tt><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#STDOUT"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.STDOUT" title="Permalink to this definition">¶</a></dt>
907 <dd><p>Special value that when given to rspawn in stderr causes stderr to 
908 redirect to whatever stdout was redirected to.</p>
909 </dd></dl>
910
911 <dl class="function">
912 <dt id="nepi.util.sshfuncs.eintr_retry">
913 <tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">eintr_retry</tt><big>(</big><em>func</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#eintr_retry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.eintr_retry" title="Permalink to this definition">¶</a></dt>
914 <dd><p>Retries a function invocation when a EINTR occurs</p>
915 </dd></dl>
916
917 <dl class="function">
918 <dt id="nepi.util.sshfuncs.gethostbyname">
919 <tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">gethostbyname</tt><big>(</big><em>host</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#gethostbyname"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.gethostbyname" title="Permalink to this definition">¶</a></dt>
920 <dd></dd></dl>
921
922 <dl class="function">
923 <dt id="nepi.util.sshfuncs.log">
924 <tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">log</tt><big>(</big><em>msg</em>, <em>level</em>, <em>out=None</em>, <em>err=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#log"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.log" title="Permalink to this definition">¶</a></dt>
925 <dd></dd></dl>
926
927 <dl class="function">
928 <dt id="nepi.util.sshfuncs.make_control_path">
929 <tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">make_control_path</tt><big>(</big><em>agent</em>, <em>forward_x11</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#make_control_path"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.make_control_path" title="Permalink to this definition">¶</a></dt>
930 <dd></dd></dl>
931
932 <dl class="function">
933 <dt id="nepi.util.sshfuncs.make_server_key_args">
934 <tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">make_server_key_args</tt><big>(</big><em>server_key</em>, <em>host</em>, <em>port</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#make_server_key_args"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.make_server_key_args" title="Permalink to this definition">¶</a></dt>
935 <dd><p>Returns a reference to a temporary known_hosts file, to which 
936 the server key has been added.</p>
937 <p>Make sure to hold onto the temp file reference until the process is 
938 done with it</p>
939 <table class="docutils field-list" frame="void" rules="none">
940 <col class="field-name" />
941 <col class="field-body" />
942 <tbody valign="top">
943 <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
944 <li><strong>server_key</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; the server public key</li>
945 <li><strong>host</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; the hostname</li>
946 <li><strong>port</strong> (<a class="reference external" href="http://docs.python.org/library/functions.html#str" title="(in Python v2.7)"><em>str</em></a>) &#8211; the ssh port</li>
947 </ul>
948 </td>
949 </tr>
950 </tbody>
951 </table>
952 </dd></dl>
953
954 <dl class="function">
955 <dt id="nepi.util.sshfuncs.openssh_has_persist">
956 <tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">openssh_has_persist</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#openssh_has_persist"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.openssh_has_persist" title="Permalink to this definition">¶</a></dt>
957 <dd><p>The ssh_config options ControlMaster and ControlPersist allow to
958 reuse a same network connection for multiple ssh sessions. In this 
959 way limitations on number of open ssh connections can be bypassed.
960 However, older versions of openSSH do not support this feature.
961 This function is used to determine if ssh connection persist features
962 can be used.</p>
963 </dd></dl>
964
965 <dl class="function">
966 <dt id="nepi.util.sshfuncs.rcopy">
967 <tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">rcopy</tt><big>(</big><em>source</em>, <em>dest</em>, <em>port=None</em>, <em>gwuser=None</em>, <em>gw=None</em>, <em>recursive=False</em>, <em>identity=None</em>, <em>server_key=None</em>, <em>retry=3</em>, <em>strict_host_checking=True</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#rcopy"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.rcopy" title="Permalink to this definition">¶</a></dt>
968 <dd><p>Copies from/to remote sites.</p>
969 <p>Source and destination should have the user and host encoded
970 as per scp specs.</p>
971 <p>Source can be a list of files to copy to a single destination, 
972 (in which case it is advised that the destination be a folder),
973 or a single file in a string.</p>
974 </dd></dl>
975
976 <dl class="function">
977 <dt id="nepi.util.sshfuncs.resolve_hostname">
978 <tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">resolve_hostname</tt><big>(</big><em>host</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#resolve_hostname"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.resolve_hostname" title="Permalink to this definition">¶</a></dt>
979 <dd></dd></dl>
980
981 <dl class="function">
982 <dt id="nepi.util.sshfuncs.rexec">
983 <tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">rexec</tt><big>(</big><em>command</em>, <em>host</em>, <em>user</em>, <em>port=None</em>, <em>gwuser=None</em>, <em>gw=None</em>, <em>agent=True</em>, <em>sudo=False</em>, <em>identity=None</em>, <em>server_key=None</em>, <em>env=None</em>, <em>tty=False</em>, <em>connect_timeout=30</em>, <em>retry=3</em>, <em>persistent=True</em>, <em>forward_x11=False</em>, <em>blocking=True</em>, <em>strict_host_checking=True</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#rexec"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.rexec" title="Permalink to this definition">¶</a></dt>
984 <dd><p>Executes a remote command, returns ((stdout,stderr),process)</p>
985 </dd></dl>
986
987 <dl class="function">
988 <dt id="nepi.util.sshfuncs.rgetpid">
989 <tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">rgetpid</tt><big>(</big><em>*p</em>, <em>**kw</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#rgetpid"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.rgetpid" title="Permalink to this definition">¶</a></dt>
990 <dd><p>Returns the pid and ppid of a process from a remote file where the 
991 information was stored.</p>
992 <blockquote>
993 <div><table class="docutils field-list" frame="void" rules="none">
994 <col class="field-name" />
995 <col class="field-body" />
996 <tbody valign="top">
997 <tr class="field-odd field"><th class="field-name">param home:</th><td class="field-body">Path to directory where the pidfile is located</td>
998 </tr>
999 <tr class="field-even field"><th class="field-name">type home:</th><td class="field-body">str</td>
1000 </tr>
1001 <tr class="field-odd field"><th class="field-name">param pidfile:</th><td class="field-body">Name of file containing the pid information</td>
1002 </tr>
1003 <tr class="field-even field"><th class="field-name">type pidfile:</th><td class="field-body">str</td>
1004 </tr>
1005 <tr class="field-odd field"><th class="field-name">rtype:</th><td class="field-body">int</td>
1006 </tr>
1007 </tbody>
1008 </table>
1009 <p>A (pid, ppid) tuple useful for calling rstatus and rkill,
1010 or None if the pidfile isn&#8217;t valid yet (can happen when process is staring up)</p>
1011 </div></blockquote>
1012 </dd></dl>
1013
1014 <dl class="function">
1015 <dt id="nepi.util.sshfuncs.rkill">
1016 <tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">rkill</tt><big>(</big><em>*p</em>, <em>**kw</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#rkill"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.rkill" title="Permalink to this definition">¶</a></dt>
1017 <dd><p>Sends a kill signal to a remote process.</p>
1018 <p>First tries a SIGTERM, and if the process does not end in 10 seconds,
1019 it sends a SIGKILL.</p>
1020 <blockquote>
1021 <div><table class="docutils field-list" frame="void" rules="none">
1022 <col class="field-name" />
1023 <col class="field-body" />
1024 <tbody valign="top">
1025 <tr class="field-odd field"><th class="field-name">param pid:</th><td class="field-body">Process id of process to be killed</td>
1026 </tr>
1027 <tr class="field-even field"><th class="field-name">type pid:</th><td class="field-body">int</td>
1028 </tr>
1029 <tr class="field-odd field"><th class="field-name">param ppid:</th><td class="field-body">Parent process id of process to be killed</td>
1030 </tr>
1031 <tr class="field-even field"><th class="field-name">type ppid:</th><td class="field-body">int</td>
1032 </tr>
1033 <tr class="field-odd field"><th class="field-name">param sudo:</th><td class="field-body">Flag indicating if sudo should be used to kill the process</td>
1034 </tr>
1035 <tr class="field-even field"><th class="field-name">type sudo:</th><td class="field-body">bool</td>
1036 </tr>
1037 </tbody>
1038 </table>
1039 </div></blockquote>
1040 </dd></dl>
1041
1042 <dl class="function">
1043 <dt id="nepi.util.sshfuncs.rspawn">
1044 <tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">rspawn</tt><big>(</big><em>command</em>, <em>pidfile</em>, <em>stdout='/dev/null'</em>, <em>stderr=&lt;class nepi.util.sshfuncs.STDOUT at 0x7f3058d754c8&gt;</em>, <em>stdin='/dev/null'</em>, <em>home=None</em>, <em>create_home=False</em>, <em>sudo=False</em>, <em>host=None</em>, <em>port=None</em>, <em>user=None</em>, <em>gwuser=None</em>, <em>gw=None</em>, <em>agent=None</em>, <em>identity=None</em>, <em>server_key=None</em>, <em>tty=False</em>, <em>strict_host_checking=True</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#rspawn"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.rspawn" title="Permalink to this definition">¶</a></dt>
1045 <dd><p>Spawn a remote command such that it will continue working asynchronously in 
1046 background.</p>
1047 <blockquote>
1048 <div><table class="docutils field-list" frame="void" rules="none">
1049 <col class="field-name" />
1050 <col class="field-body" />
1051 <tbody valign="top">
1052 <tr class="field-odd field"><th class="field-name">param command:</th><td class="field-body">The command to run, it should be a single line.</td>
1053 </tr>
1054 <tr class="field-even field"><th class="field-name">type command:</th><td class="field-body">str</td>
1055 </tr>
1056 <tr class="field-odd field"><th class="field-name">param pidfile:</th><td class="field-body">Path to a file where to store the pid and ppid of the 
1057 spawned process</td>
1058 </tr>
1059 <tr class="field-even field"><th class="field-name">type pidfile:</th><td class="field-body">str</td>
1060 </tr>
1061 <tr class="field-odd field"><th class="field-name">param stdout:</th><td class="field-body">Path to file to redirect standard output. 
1062 The default value is /dev/null</td>
1063 </tr>
1064 <tr class="field-even field"><th class="field-name">type stdout:</th><td class="field-body">str</td>
1065 </tr>
1066 <tr class="field-odd field"><th class="field-name">param stderr:</th><td class="field-body">Path to file to redirect standard error.
1067 If the special STDOUT value is used, stderr will 
1068 be redirected to the same file as stdout</td>
1069 </tr>
1070 <tr class="field-even field"><th class="field-name">type stderr:</th><td class="field-body">str</td>
1071 </tr>
1072 <tr class="field-odd field"><th class="field-name">param stdin:</th><td class="field-body">Path to a file with input to be piped into the command&#8217;s standard input</td>
1073 </tr>
1074 <tr class="field-even field"><th class="field-name">type stdin:</th><td class="field-body">str</td>
1075 </tr>
1076 <tr class="field-odd field"><th class="field-name">param home:</th><td class="field-body">Path to working directory folder. 
1077 It is assumed to exist unless the create_home flag is set.</td>
1078 </tr>
1079 <tr class="field-even field"><th class="field-name">type home:</th><td class="field-body">str</td>
1080 </tr>
1081 <tr class="field-odd field"><th class="field-name" colspan="2">param create_home:</th></tr>
1082 <tr class="field-odd field"><td>&nbsp;</td><td class="field-body">Flag to force creation of the home folder before 
1083 running the command</td>
1084 </tr>
1085 <tr class="field-even field"><th class="field-name" colspan="2">type create_home:</th></tr>
1086 <tr class="field-even field"><td>&nbsp;</td><td class="field-body">bool</td>
1087 </tr>
1088 <tr class="field-odd field"><th class="field-name">param sudo:</th><td class="field-body">Flag forcing execution with sudo user</td>
1089 </tr>
1090 <tr class="field-even field"><th class="field-name">type sudo:</th><td class="field-body">bool</td>
1091 </tr>
1092 <tr class="field-odd field"><th class="field-name">rtype:</th><td class="field-body">tuple</td>
1093 </tr>
1094 </tbody>
1095 </table>
1096 <p>(stdout, stderr), process</p>
1097 <p>Of the spawning process, which only captures errors at spawning time.
1098 Usually only useful for diagnostics.</p>
1099 </div></blockquote>
1100 </dd></dl>
1101
1102 <dl class="function">
1103 <dt id="nepi.util.sshfuncs.rstatus">
1104 <tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">rstatus</tt><big>(</big><em>*p</em>, <em>**kw</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#rstatus"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.rstatus" title="Permalink to this definition">¶</a></dt>
1105 <dd><p>Returns a code representing the the status of a remote process</p>
1106 <blockquote>
1107 <div><table class="docutils field-list" frame="void" rules="none">
1108 <col class="field-name" />
1109 <col class="field-body" />
1110 <tbody valign="top">
1111 <tr class="field-odd field"><th class="field-name">param pid:</th><td class="field-body">Process id of the process</td>
1112 </tr>
1113 <tr class="field-even field"><th class="field-name">type pid:</th><td class="field-body">int</td>
1114 </tr>
1115 <tr class="field-odd field"><th class="field-name">param ppid:</th><td class="field-body">Parent process id of process</td>
1116 </tr>
1117 <tr class="field-even field"><th class="field-name">type ppid:</th><td class="field-body">int</td>
1118 </tr>
1119 <tr class="field-odd field"><th class="field-name">rtype:</th><td class="field-body">int (One of NOT_STARTED, RUNNING, FINISHED)</td>
1120 </tr>
1121 </tbody>
1122 </table>
1123 </div></blockquote>
1124 </dd></dl>
1125
1126 <dl class="function">
1127 <dt id="nepi.util.sshfuncs.shell_escape">
1128 <tt class="descclassname">nepi.util.sshfuncs.</tt><tt class="descname">shell_escape</tt><big>(</big><em>s</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/sshfuncs.html#shell_escape"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.sshfuncs.shell_escape" title="Permalink to this definition">¶</a></dt>
1129 <dd><p>Escapes strings so that they are safe to use as command-line 
1130 arguments</p>
1131 </dd></dl>
1132
1133 </div>
1134 <div class="section" id="module-nepi.util.statfuncs">
1135 <span id="nepi-util-statfuncs-module"></span><h2>nepi.util.statfuncs module<a class="headerlink" href="#module-nepi.util.statfuncs" title="Permalink to this headline">¶</a></h2>
1136 <dl class="function">
1137 <dt id="nepi.util.statfuncs.compute_mean">
1138 <tt class="descclassname">nepi.util.statfuncs.</tt><tt class="descname">compute_mean</tt><big>(</big><em>sample</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/statfuncs.html#compute_mean"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.statfuncs.compute_mean" title="Permalink to this definition">¶</a></dt>
1139 <dd></dd></dl>
1140
1141 </div>
1142 <div class="section" id="module-nepi.util.timefuncs">
1143 <span id="nepi-util-timefuncs-module"></span><h2>nepi.util.timefuncs module<a class="headerlink" href="#module-nepi.util.timefuncs" title="Permalink to this headline">¶</a></h2>
1144 <dl class="function">
1145 <dt id="nepi.util.timefuncs.compute_delay_ms">
1146 <tt class="descclassname">nepi.util.timefuncs.</tt><tt class="descname">compute_delay_ms</tt><big>(</big><em>timestamp2</em>, <em>timestamp1</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/timefuncs.html#compute_delay_ms"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.timefuncs.compute_delay_ms" title="Permalink to this definition">¶</a></dt>
1147 <dd></dd></dl>
1148
1149 <dl class="function">
1150 <dt id="nepi.util.timefuncs.stabsformat">
1151 <tt class="descclassname">nepi.util.timefuncs.</tt><tt class="descname">stabsformat</tt><big>(</big><em>sdate</em>, <em>dbase=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/timefuncs.html#stabsformat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.timefuncs.stabsformat" title="Permalink to this definition">¶</a></dt>
1152 <dd><p>Constructs a datetime object from a string date.
1153 The string date can be expressed as an absolute date
1154 ( i.e. format YYYYMMddHHMMSSffff ) or as a relative time
1155 ( e.g. format &#8216;5m&#8217; or &#8216;10s&#8217;). 
1156 If the date is a relative time and the dbase parameter 
1157 is given (dbase must be datetime object), the returned
1158 date will be dbase + sdate. If dbase is None, 
1159 current time will be used instead as base time.</p>
1160 <p>:param date : string date  
1161 :type date : date</p>
1162 </dd></dl>
1163
1164 <dl class="function">
1165 <dt id="nepi.util.timefuncs.stformat">
1166 <tt class="descclassname">nepi.util.timefuncs.</tt><tt class="descname">stformat</tt><big>(</big><em>sdate</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/timefuncs.html#stformat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.timefuncs.stformat" title="Permalink to this definition">¶</a></dt>
1167 <dd><p>Constructs a datetime object from a string date with
1168 format YYYYMMddHHMMSSffff</p>
1169 </dd></dl>
1170
1171 <dl class="function">
1172 <dt id="nepi.util.timefuncs.tdiff">
1173 <tt class="descclassname">nepi.util.timefuncs.</tt><tt class="descname">tdiff</tt><big>(</big><em>date1</em>, <em>date2</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/timefuncs.html#tdiff"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.timefuncs.tdiff" title="Permalink to this definition">¶</a></dt>
1174 <dd><p>Returns difference ( date1 - date2 ) as a datetime object,
1175 where date1 and date 2 are datetime objects</p>
1176 </dd></dl>
1177
1178 <dl class="function">
1179 <dt id="nepi.util.timefuncs.tdiffsec">
1180 <tt class="descclassname">nepi.util.timefuncs.</tt><tt class="descname">tdiffsec</tt><big>(</big><em>date1</em>, <em>date2</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/timefuncs.html#tdiffsec"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.timefuncs.tdiffsec" title="Permalink to this definition">¶</a></dt>
1181 <dd><p>Returns the date difference ( date1 - date2 ) in seconds,
1182 where date1 and date 2 are datetime objects</p>
1183 </dd></dl>
1184
1185 <dl class="function">
1186 <dt id="nepi.util.timefuncs.tnow">
1187 <tt class="descclassname">nepi.util.timefuncs.</tt><tt class="descname">tnow</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/nepi/util/timefuncs.html#tnow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.timefuncs.tnow" title="Permalink to this definition">¶</a></dt>
1188 <dd><p>Returns datetime object with the current time</p>
1189 </dd></dl>
1190
1191 <dl class="function">
1192 <dt id="nepi.util.timefuncs.tsformat">
1193 <tt class="descclassname">nepi.util.timefuncs.</tt><tt class="descname">tsformat</tt><big>(</big><em>date=None</em><big>)</big><a class="reference internal" href="../_modules/nepi/util/timefuncs.html#tsformat"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#nepi.util.timefuncs.tsformat" title="Permalink to this definition">¶</a></dt>
1194 <dd><p>Formats a datetime object to a string with format YYYYMMddHHMMSSffff.
1195 If no date is given, the current date is used.</p>
1196 </dd></dl>
1197
1198 </div>
1199 <div class="section" id="module-nepi.util">
1200 <span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-nepi.util" title="Permalink to this headline">¶</a></h2>
1201 </div>
1202 </div>
1203
1204
1205           </div>
1206         </div>
1207       </div>
1208       <div class="clearer"></div>
1209     </div>
1210     <div class="related">
1211       <h3>Navigation</h3>
1212       <ul>
1213         <li class="right" style="margin-right: 10px">
1214           <a href="../genindex.html" title="General Index"
1215              >index</a></li>
1216         <li class="right" >
1217           <a href="../py-modindex.html" title="Python Module Index"
1218              >modules</a> |</li>
1219         <li><a href="../index.html">NEPI 3.2 documentation</a> &raquo;</li> 
1220       </ul>
1221     </div>
1222     <div class="footer">
1223         &copy; Copyright 2014, Alina Quereilhac, Lucia Guevgeozian Odizzio, Julien Tribino.
1224       Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
1225     </div>
1226   </body>
1227 </html>