1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5 <html xmlns="http://www.w3.org/1999/xhtml">
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9 <title>nepi.util package — NEPI 3.2 documentation</title>
11 <link rel="stylesheet" href="../_static/sphinxdoc.css" type="text/css" />
12 <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {
18 COLLAPSE_INDEX: false,
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" />
32 <li class="right" style="margin-right: 10px">
33 <a href="../genindex.html" title="General Index"
34 accesskey="I">index</a></li>
36 <a href="../py-modindex.html" title="Python Module Index"
38 <li><a href="../index.html">NEPI 3.2 documentation</a> »</li>
41 <div class="sphinxsidebar">
42 <div class="sphinxsidebarwrapper">
43 <h3><a href="../index.html">Table Of Contents</a></h3>
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>
69 <ul class="this-page-menu">
70 <li><a href="../_sources/_layout/nepi.util.txt"
71 rel="nofollow">Show Source</a></li>
73 <div id="searchbox" style="display: none">
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" />
81 <p class="searchtip" style="font-size: 90%">
82 Enter search terms or a module, class or function name.
85 <script type="text/javascript">$('#searchbox').show(0);</script>
89 <div class="document">
90 <div class="documentwrapper">
91 <div class="bodywrapper">
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">
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>
109 <div class="section" id="submodules">
110 <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
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>
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>
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>
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>
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">
145 <dd>pidfile: the pidfile passed to remote_span</dd>
149 <div>A (pid, ppid) tuple useful for calling remote_status and remote_kill,
150 or None if the pidfile isn’t valid yet (maybe the process is still starting).</div></blockquote>
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">
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>
167 <div>Nothing, should have killed the process</div></blockquote>
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=<class nepi.util.sshfuncs.STDOUT at 0x7f3058d754c8></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">
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>
184 <p>stdin: path of a file with input to be piped into the command’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>
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>
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">
203 <dd>pid/ppid: pid and parent-pid of the spawned process. See remote_check_pid</dd>
207 <div>One of NOT_STARTED, RUNNING, FINISHED</div></blockquote>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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’s slice. The query needs to specify the new
281 resource plus the previous resources already in the slice.</p>
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>
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’s constraints for the experiment
296 :param fields: desire fields in the result of the query
297 :type fields: list</p>
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>
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
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’s slice.
317 return value: list of resources’ urn</p>
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’s slice. The query needs to specify the list
324 of previous resources in the slice without the one to be remove.</p>
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" />
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>) – 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>) – 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>) – 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>) – Url of the Manifold API to query SFA, TopHat, etc</li>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
408 <div><table class="docutils field-list" frame="void" rules="none">
409 <col class="field-name" />
410 <col class="field-body" />
412 <tr class="field-odd field"><th class="field-name">param network:</th><td class="field-body">Base network address used for subnetting.</td>
414 <tr class="field-even field"><th class="field-name">type network:</th><td class="field-body">str</td>
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>
418 <tr class="field-even field"><th class="field-name">type prefixt:</th><td class="field-body">int</td>
420 <tr class="field-odd field"><th class="field-name">param version:</th><td class="field-body">IP version (either 4 or 6).</td>
422 <tr class="field-even field"><th class="field-name">type version:</th><td class="field-body">int</td>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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’ urn, build the rspec string and call the allocate
751 and provision method.</p>
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’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>
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>
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>
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>
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>
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>
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>
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’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>
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’t support removing particular
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>
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>
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,
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>
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>
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>
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>
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’ urns.
864 eg. resources = [“<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>“]</p>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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
939 <table class="docutils field-list" frame="void" rules="none">
940 <col class="field-name" />
941 <col class="field-body" />
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>) – 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>) – 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>) – the ssh port</li>
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
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>
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>
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>
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>
993 <div><table class="docutils field-list" frame="void" rules="none">
994 <col class="field-name" />
995 <col class="field-body" />
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>
999 <tr class="field-even field"><th class="field-name">type home:</th><td class="field-body">str</td>
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>
1003 <tr class="field-even field"><th class="field-name">type pidfile:</th><td class="field-body">str</td>
1005 <tr class="field-odd field"><th class="field-name">rtype:</th><td class="field-body">int</td>
1009 <p>A (pid, ppid) tuple useful for calling rstatus and rkill,
1010 or None if the pidfile isn’t valid yet (can happen when process is staring up)</p>
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>
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>
1027 <tr class="field-even field"><th class="field-name">type pid:</th><td class="field-body">int</td>
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>
1031 <tr class="field-even field"><th class="field-name">type ppid:</th><td class="field-body">int</td>
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>
1035 <tr class="field-even field"><th class="field-name">type sudo:</th><td class="field-body">bool</td>
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=<class nepi.util.sshfuncs.STDOUT at 0x7f3058d754c8></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
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>
1054 <tr class="field-even field"><th class="field-name">type command:</th><td class="field-body">str</td>
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>
1059 <tr class="field-even field"><th class="field-name">type pidfile:</th><td class="field-body">str</td>
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>
1064 <tr class="field-even field"><th class="field-name">type stdout:</th><td class="field-body">str</td>
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>
1070 <tr class="field-even field"><th class="field-name">type stderr:</th><td class="field-body">str</td>
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’s standard input</td>
1074 <tr class="field-even field"><th class="field-name">type stdin:</th><td class="field-body">str</td>
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>
1079 <tr class="field-even field"><th class="field-name">type home:</th><td class="field-body">str</td>
1081 <tr class="field-odd field"><th class="field-name" colspan="2">param create_home:</th></tr>
1082 <tr class="field-odd field"><td> </td><td class="field-body">Flag to force creation of the home folder before
1083 running the command</td>
1085 <tr class="field-even field"><th class="field-name" colspan="2">type create_home:</th></tr>
1086 <tr class="field-even field"><td> </td><td class="field-body">bool</td>
1088 <tr class="field-odd field"><th class="field-name">param sudo:</th><td class="field-body">Flag forcing execution with sudo user</td>
1090 <tr class="field-even field"><th class="field-name">type sudo:</th><td class="field-body">bool</td>
1092 <tr class="field-odd field"><th class="field-name">rtype:</th><td class="field-body">tuple</td>
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>
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>
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>
1113 <tr class="field-even field"><th class="field-name">type pid:</th><td class="field-body">int</td>
1115 <tr class="field-odd field"><th class="field-name">param ppid:</th><td class="field-body">Parent process id of process</td>
1117 <tr class="field-even field"><th class="field-name">type ppid:</th><td class="field-body">int</td>
1119 <tr class="field-odd field"><th class="field-name">rtype:</th><td class="field-body">int (One of NOT_STARTED, RUNNING, FINISHED)</td>
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
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>
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>
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 ‘5m’ or ‘10s’).
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>
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>
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>
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>
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>
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>
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>
1208 <div class="clearer"></div>
1210 <div class="related">
1213 <li class="right" style="margin-right: 10px">
1214 <a href="../genindex.html" title="General Index"
1217 <a href="../py-modindex.html" title="Python Module Index"
1219 <li><a href="../index.html">NEPI 3.2 documentation</a> »</li>
1222 <div class="footer">
1223 © Copyright 2014, Alina Quereilhac, Lucia Guevgeozian Odizzio, Julien Tribino.
1224 Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.