| |
| |
| <!DOCTYPE html> |
| <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> |
| <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> |
| <head> |
| <meta charset="utf-8"> |
| |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| |
| <title>aria.orchestrator.workflows.api — ARIA TOSCA 0.1.1 documentation</title> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> |
| |
| |
| |
| |
| |
| <link rel="index" title="Index" |
| href="genindex.html"/> |
| <link rel="search" title="Search" href="search.html"/> |
| <link rel="top" title="ARIA TOSCA 0.1.1 documentation" href="index.html"/> |
| <link rel="next" title="aria.orchestrator.workflows.builtin" href="aria.orchestrator.workflows.builtin.html"/> |
| <link rel="prev" title="aria.orchestrator.workflows" href="aria.orchestrator.workflows.html"/> |
| |
| |
| <script src="_static/js/modernizr.min.js"></script> |
| |
| </head> |
| |
| <body class="wy-body-for-nav" role="document"> |
| |
| |
| <div class="wy-grid-for-nav"> |
| |
| |
| <nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
| <div class="wy-side-scroll"> |
| <div class="wy-side-nav-search"> |
| |
| |
| |
| <a href="index.html" class="icon icon-home"> ARIA TOSCA |
| |
| |
| |
| </a> |
| |
| |
| |
| |
| <div class="version"> |
| 0.1.1 |
| </div> |
| |
| |
| |
| |
| <div role="search"> |
| <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> |
| <input type="text" name="q" placeholder="Search docs" /> |
| <input type="hidden" name="check_keywords" value="yes" /> |
| <input type="hidden" name="area" value="default" /> |
| </form> |
| </div> |
| |
| |
| </div> |
| |
| <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> |
| |
| |
| |
| |
| |
| |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="cli.html">CLI</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="rest.html">REST</a></li> |
| </ul> |
| <ul class="current"> |
| <li class="toctree-l1"><a class="reference internal" href="aria.html"><code class="docutils literal"><span class="pre">aria</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.cli.html"><code class="docutils literal"><span class="pre">aria.cli</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.modeling.html"><code class="docutils literal"><span class="pre">aria.modeling</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.modeling.models.html"><code class="docutils literal"><span class="pre">aria.modeling.models</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.orchestrator.html"><code class="docutils literal"><span class="pre">aria.orchestrator</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.orchestrator.context.html"><code class="docutils literal"><span class="pre">aria.orchestrator.context</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.orchestrator.execution_plugin.html"><code class="docutils literal"><span class="pre">aria.orchestrator.execution_plugin</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.orchestrator.execution_plugin.ctx_proxy.html"><code class="docutils literal"><span class="pre">aria.orchestrator.execution_plugin.ctx_proxy</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.orchestrator.execution_plugin.ssh.html"><code class="docutils literal"><span class="pre">aria.orchestrator.execution_plugin.ssh</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.orchestrator.workflows.html"><code class="docutils literal"><span class="pre">aria.orchestrator.workflows</span></code></a></li> |
| <li class="toctree-l1 current"><a class="current reference internal" href="#"><code class="docutils literal"><span class="pre">aria.orchestrator.workflows.api</span></code></a><ul> |
| <li class="toctree-l2"><a class="reference internal" href="#module-aria.orchestrator.workflows.api.task_graph"><code class="docutils literal"><span class="pre">aria.orchestrator.workflows.api.task_graph</span></code></a></li> |
| <li class="toctree-l2"><a class="reference internal" href="#module-aria.orchestrator.workflows.api.task"><code class="docutils literal"><span class="pre">aria.orchestrator.workflows.api.task</span></code></a></li> |
| </ul> |
| </li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.orchestrator.workflows.builtin.html"><code class="docutils literal"><span class="pre">aria.orchestrator.workflows.builtin</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.orchestrator.workflows.executor.html"><code class="docutils literal"><span class="pre">aria.orchestrator.workflows.executor</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.parser.html"><code class="docutils literal"><span class="pre">aria.parser</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.parser.consumption.html"><code class="docutils literal"><span class="pre">aria.parser.consumption</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.parser.loading.html"><code class="docutils literal"><span class="pre">aria.parser.loading</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.parser.modeling.html"><code class="docutils literal"><span class="pre">aria.parser.modeling</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.parser.presentation.html"><code class="docutils literal"><span class="pre">aria.parser.presentation</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.parser.reading.html"><code class="docutils literal"><span class="pre">aria.parser.reading</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.parser.validation.html"><code class="docutils literal"><span class="pre">aria.parser.validation</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.storage.html"><code class="docutils literal"><span class="pre">aria.storage</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria.utils.html"><code class="docutils literal"><span class="pre">aria.utils</span></code></a></li> |
| </ul> |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="aria_extension_tosca.simple_v1_0.html"><code class="docutils literal"><span class="pre">aria_extension_tosca.simple_v1_0</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria_extension_tosca.simple_v1_0.modeling.html"><code class="docutils literal"><span class="pre">aria_extension_tosca.simple_v1_0.modeling</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria_extension_tosca.simple_v1_0.presentation.html"><code class="docutils literal"><span class="pre">aria_extension_tosca.simple_v1_0.presentation</span></code></a></li> |
| <li class="toctree-l1"><a class="reference internal" href="aria_extension_tosca.simple_nfv_v1_0.html"><code class="docutils literal"><span class="pre">aria_extension_tosca.simple_nfv_v1_0</span></code></a></li> |
| </ul> |
| |
| |
| |
| </div> |
| </div> |
| </nav> |
| |
| <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> |
| |
| |
| <nav class="wy-nav-top" role="navigation" aria-label="top navigation"> |
| |
| <i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
| <a href="index.html">ARIA TOSCA</a> |
| |
| </nav> |
| |
| |
| |
| <div class="wy-nav-content"> |
| <div class="rst-content"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div role="navigation" aria-label="breadcrumbs navigation"> |
| |
| <ul class="wy-breadcrumbs"> |
| |
| <li><a href="index.html">Docs</a> »</li> |
| |
| <li><code class="docutils literal"><span class="pre">aria.orchestrator.workflows.api</span></code></li> |
| |
| |
| <li class="wy-breadcrumbs-aside"> |
| |
| |
| <a href="_sources/aria.orchestrator.workflows.api.rst.txt" rel="nofollow"> View page source</a> |
| |
| |
| </li> |
| |
| </ul> |
| |
| |
| <hr/> |
| </div> |
| <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> |
| <div itemprop="articleBody"> |
| |
| <div class="section" id="module-aria.orchestrator.workflows.api"> |
| <span id="aria-orchestrator-workflows-api"></span><h1><a class="reference internal" href="#module-aria.orchestrator.workflows.api" title="aria.orchestrator.workflows.api"><code class="xref py py-mod docutils literal"><span class="pre">aria.orchestrator.workflows.api</span></code></a><a class="headerlink" href="#module-aria.orchestrator.workflows.api" title="Permalink to this headline">¶</a></h1> |
| <p>Workflow API.</p> |
| <div class="section" id="module-aria.orchestrator.workflows.api.task_graph"> |
| <span id="aria-orchestrator-workflows-api-task-graph"></span><h2><a class="reference internal" href="#module-aria.orchestrator.workflows.api.task_graph" title="aria.orchestrator.workflows.api.task_graph"><code class="xref py py-mod docutils literal"><span class="pre">aria.orchestrator.workflows.api.task_graph</span></code></a><a class="headerlink" href="#module-aria.orchestrator.workflows.api.task_graph" title="Permalink to this headline">¶</a></h2> |
| <p>Task graph.</p> |
| <dl class="class"> |
| <dt id="aria.orchestrator.workflows.api.task_graph.TaskGraph"> |
| <em class="property">class </em><code class="descclassname">aria.orchestrator.workflows.api.task_graph.</code><code class="descname">TaskGraph</code><span class="sig-paren">(</span><em>name</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task_graph.TaskGraph" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#object" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">object</span></code></a></p> |
| <p>Task graph builder.</p> |
| <dl class="method"> |
| <dt id="aria.orchestrator.workflows.api.task_graph.TaskGraph.add_dependency"> |
| <code class="descname">add_dependency</code><span class="sig-paren">(</span><em>dependent</em>, <em>dependency</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task_graph.TaskGraph.add_dependency" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Adds a dependency for one item (task, sequence or parallel) on another.</p> |
| <p>The dependent will only be executed after the dependency terminates. If either of the items |
| is either a sequence or a parallel, multiple dependencies may be added.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
| <li><strong>dependent</strong> – dependent (task, sequence or parallel)</li> |
| <li><strong>dependency</strong> – dependency (task, sequence or parallel)</li> |
| </ul> |
| </td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">True</span></code> if the dependency between the two hadn’t already existed, otherwise |
| <code class="docutils literal"><span class="pre">False</span></code></p> |
| </td> |
| </tr> |
| <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)">bool</a></p> |
| </td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#aria.orchestrator.workflows.api.task_graph.TaskNotInGraphError" title="aria.orchestrator.workflows.api.task_graph.TaskNotInGraphError"><strong>TaskNotInGraphError</strong></a> – if either the |
| dependent or dependency are tasks which are not in the graph</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="aria.orchestrator.workflows.api.task_graph.TaskGraph.add_tasks"> |
| <code class="descname">add_tasks</code><span class="sig-paren">(</span><em>task</em>, <em>*tasks</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task_graph.TaskGraph.add_tasks" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="aria.orchestrator.workflows.api.task_graph.TaskGraph.get_dependencies"> |
| <code class="descname">get_dependencies</code><span class="sig-paren">(</span><em>dependent_task</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task_graph.TaskGraph.get_dependencies" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Iterates over the task’s dependencies.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>dependent_task</strong> – task whose dependencies are requested</td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference internal" href="#aria.orchestrator.workflows.api.task_graph.TaskNotInGraphError" title="aria.orchestrator.workflows.api.task_graph.TaskNotInGraphError"><strong>TaskNotInGraphError</strong></a> – if |
| <code class="docutils literal"><span class="pre">dependent_task</span></code> is not in the graph</td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="aria.orchestrator.workflows.api.task_graph.TaskGraph.get_dependents"> |
| <code class="descname">get_dependents</code><span class="sig-paren">(</span><em>dependency_task</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task_graph.TaskGraph.get_dependents" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Iterates over the task’s dependents.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>dependency_task</strong> – task whose dependents are requested</td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference internal" href="#aria.orchestrator.workflows.api.task_graph.TaskNotInGraphError" title="aria.orchestrator.workflows.api.task_graph.TaskNotInGraphError"><strong>TaskNotInGraphError</strong></a> – if |
| <code class="docutils literal"><span class="pre">dependency_task</span></code> is not in the graph</td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="aria.orchestrator.workflows.api.task_graph.TaskGraph.get_task"> |
| <code class="descname">get_task</code><span class="sig-paren">(</span><em>task_id</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task_graph.TaskGraph.get_task" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Get a task instance that’s been inserted to the graph by the task’s ID.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>task_id</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#basestring" title="(in Python v2.7)"><em>basestring</em></a>) – task ID</td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><a class="reference internal" href="#aria.orchestrator.workflows.api.task_graph.TaskNotInGraphError" title="aria.orchestrator.workflows.api.task_graph.TaskNotInGraphError"><strong>TaskNotInGraphError</strong></a> – if no task found in |
| the graph with the given ID</td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="aria.orchestrator.workflows.api.task_graph.TaskGraph.has_dependency"> |
| <code class="descname">has_dependency</code><span class="sig-paren">(</span><em>dependent</em>, <em>dependency</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task_graph.TaskGraph.has_dependency" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Checks whether one item (task, sequence or parallel) depends on another.</p> |
| <p>Note that if either of the items is either a sequence or a parallel, and some of the |
| dependencies exist in the graph but not all of them, this method will return <code class="docutils literal"><span class="pre">False</span></code>.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
| <li><strong>dependent</strong> – dependent (task, sequence or parallel)</li> |
| <li><strong>dependency</strong> – dependency (task, sequence or parallel)</li> |
| </ul> |
| </td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">True</span></code> if the dependency between the two exists, otherwise <code class="docutils literal"><span class="pre">False</span></code></p> |
| </td> |
| </tr> |
| <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)">bool</a></p> |
| </td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#aria.orchestrator.workflows.api.task_graph.TaskNotInGraphError" title="aria.orchestrator.workflows.api.task_graph.TaskNotInGraphError"><strong>TaskNotInGraphError</strong></a> – if either the |
| dependent or dependency are tasks which are not in the graph</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="aria.orchestrator.workflows.api.task_graph.TaskGraph.has_tasks"> |
| <code class="descname">has_tasks</code><span class="sig-paren">(</span><em>task</em>, <em>*tasks</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task_graph.TaskGraph.has_tasks" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="aria.orchestrator.workflows.api.task_graph.TaskGraph.id"> |
| <code class="descname">id</code><a class="headerlink" href="#aria.orchestrator.workflows.api.task_graph.TaskGraph.id" title="Permalink to this definition">¶</a></dt> |
| <dd><p>ID of the graph</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="aria.orchestrator.workflows.api.task_graph.TaskGraph.remove_dependency"> |
| <code class="descname">remove_dependency</code><span class="sig-paren">(</span><em>dependent</em>, <em>dependency</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task_graph.TaskGraph.remove_dependency" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Removes a dependency for one item (task, sequence or parallel) on another.</p> |
| <p>Note that if either of the items is either a sequence or a parallel, and some of the |
| dependencies exist in the graph but not all of them, this method will not remove any of the |
| dependencies and return <code class="docutils literal"><span class="pre">False</span></code>.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
| <li><strong>dependent</strong> – dependent (task, sequence or parallel)</li> |
| <li><strong>dependency</strong> – dependency (task, sequence or parallel)</li> |
| </ul> |
| </td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><code class="docutils literal"><span class="pre">False</span></code> if the dependency between the two hadn’t existed, otherwise <code class="docutils literal"><span class="pre">True</span></code></p> |
| </td> |
| </tr> |
| <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first"><a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)">bool</a></p> |
| </td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference internal" href="#aria.orchestrator.workflows.api.task_graph.TaskNotInGraphError" title="aria.orchestrator.workflows.api.task_graph.TaskNotInGraphError"><strong>TaskNotInGraphError</strong></a> – if either the |
| dependent or dependency are tasks which are not in the graph</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="aria.orchestrator.workflows.api.task_graph.TaskGraph.remove_tasks"> |
| <code class="descname">remove_tasks</code><span class="sig-paren">(</span><em>task</em>, <em>*tasks</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task_graph.TaskGraph.remove_tasks" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="aria.orchestrator.workflows.api.task_graph.TaskGraph.sequence"> |
| <code class="descname">sequence</code><span class="sig-paren">(</span><em>task</em>, <em>*tasks</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task_graph.TaskGraph.sequence" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="aria.orchestrator.workflows.api.task_graph.TaskGraph.tasks"> |
| <code class="descname">tasks</code><a class="headerlink" href="#aria.orchestrator.workflows.api.task_graph.TaskGraph.tasks" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Iterator over tasks in the graph.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="aria.orchestrator.workflows.api.task_graph.TaskGraph.topological_order"> |
| <code class="descname">topological_order</code><span class="sig-paren">(</span><em>reverse=False</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task_graph.TaskGraph.topological_order" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Topological sort of the graph.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>reverse</strong> – whether to reverse the sort</td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">list which represents the topological sort</td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="exception"> |
| <dt id="aria.orchestrator.workflows.api.task_graph.TaskNotInGraphError"> |
| <em class="property">exception </em><code class="descclassname">aria.orchestrator.workflows.api.task_graph.</code><code class="descname">TaskNotInGraphError</code><a class="headerlink" href="#aria.orchestrator.workflows.api.task_graph.TaskNotInGraphError" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference external" href="https://docs.python.org/2.7/library/exceptions.html#exceptions.Exception" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></code></a></p> |
| <p>An error representing a scenario where a given task is not in the graph as expected.</p> |
| </dd></dl> |
| |
| </div> |
| <div class="section" id="module-aria.orchestrator.workflows.api.task"> |
| <span id="aria-orchestrator-workflows-api-task"></span><h2><a class="reference internal" href="#module-aria.orchestrator.workflows.api.task" title="aria.orchestrator.workflows.api.task"><code class="xref py py-mod docutils literal"><span class="pre">aria.orchestrator.workflows.api.task</span></code></a><a class="headerlink" href="#module-aria.orchestrator.workflows.api.task" title="Permalink to this headline">¶</a></h2> |
| <p>Provides the tasks to be entered into the task graph</p> |
| <dl class="class"> |
| <dt id="aria.orchestrator.workflows.api.task.BaseTask"> |
| <em class="property">class </em><code class="descclassname">aria.orchestrator.workflows.api.task.</code><code class="descname">BaseTask</code><span class="sig-paren">(</span><em>ctx=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task.BaseTask" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference external" href="https://docs.python.org/2.7/library/functions.html#object" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">object</span></code></a></p> |
| <p>Base class for tasks.</p> |
| <dl class="attribute"> |
| <dt id="aria.orchestrator.workflows.api.task.BaseTask.id"> |
| <code class="descname">id</code><a class="headerlink" href="#aria.orchestrator.workflows.api.task.BaseTask.id" title="Permalink to this definition">¶</a></dt> |
| <dd><p>UUID4 ID.</p> |
| </dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="aria.orchestrator.workflows.api.task.BaseTask.workflow_context"> |
| <code class="descname">workflow_context</code><a class="headerlink" href="#aria.orchestrator.workflows.api.task.BaseTask.workflow_context" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Context of the current workflow.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="aria.orchestrator.workflows.api.task.OperationTask"> |
| <em class="property">class </em><code class="descclassname">aria.orchestrator.workflows.api.task.</code><code class="descname">OperationTask</code><span class="sig-paren">(</span><em>actor</em>, <em>interface_name</em>, <em>operation_name</em>, <em>arguments=None</em>, <em>ignore_failure=None</em>, <em>max_attempts=None</em>, <em>retry_interval=None</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task.OperationTask" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="#aria.orchestrator.workflows.api.task.BaseTask" title="aria.orchestrator.workflows.api.task.BaseTask"><code class="xref py py-class docutils literal"><span class="pre">aria.orchestrator.workflows.api.task.BaseTask</span></code></a></p> |
| <p>Executes an operation.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Variables:</th><td class="field-body"><ul class="first simple"> |
| <li><strong>name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#basestring" title="(in Python v2.7)"><em>basestring</em></a>) – formatted name (includes actor type, actor name, and interface/operation names)</li> |
| <li><strong>actor</strong> (<a class="reference internal" href="aria.modeling.models.html#aria.modeling.models.Node" title="aria.modeling.models.Node"><code class="xref py py-class docutils literal"><span class="pre">Node</span></code></a> or |
| <a class="reference internal" href="aria.modeling.models.html#aria.modeling.models.Relationship" title="aria.modeling.models.Relationship"><code class="xref py py-class docutils literal"><span class="pre">Relationship</span></code></a>) – node or relationship</li> |
| <li><strong>interface_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#basestring" title="(in Python v2.7)"><em>basestring</em></a>) – interface name on actor</li> |
| <li><strong>operation_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#basestring" title="(in Python v2.7)"><em>basestring</em></a>) – operation name on interface</li> |
| <li><strong>plugin</strong> (<a class="reference internal" href="aria.modeling.models.html#aria.modeling.models.Plugin" title="aria.modeling.models.Plugin"><code class="xref py py-class docutils literal"><span class="pre">Plugin</span></code></a>) – plugin (or None for default plugin)</li> |
| <li><strong>function</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#basestring" title="(in Python v2.7)"><em>basestring</em></a>) – path to Python function</li> |
| <li><strong>arguments</strong> ({<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#basestring" title="(in Python v2.7)"><code class="xref py py-obj docutils literal"><span class="pre">basestring</span></code></a>: <a class="reference internal" href="aria.modeling.models.html#aria.modeling.models.Argument" title="aria.modeling.models.Argument"><code class="xref py py-class docutils literal"><span class="pre">Argument</span></code></a>}) – arguments to send to Python function</li> |
| <li><strong>ignore_failure</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><em>bool</em></a>) – whether to ignore failures</li> |
| <li><strong>max_attempts</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) – maximum number of attempts allowed in case of failure</li> |
| <li><strong>retry_interval</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><em>float</em></a>) – interval between retries (in seconds)</li> |
| </ul> |
| </td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
| <li><strong>actor</strong> (<a class="reference internal" href="aria.modeling.models.html#aria.modeling.models.Node" title="aria.modeling.models.Node"><code class="xref py py-class docutils literal"><span class="pre">Node</span></code></a> or |
| <a class="reference internal" href="aria.modeling.models.html#aria.modeling.models.Relationship" title="aria.modeling.models.Relationship"><code class="xref py py-class docutils literal"><span class="pre">Relationship</span></code></a>) – node or relationship</li> |
| <li><strong>interface_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#basestring" title="(in Python v2.7)"><em>basestring</em></a>) – interface name on actor</li> |
| <li><strong>operation_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#basestring" title="(in Python v2.7)"><em>basestring</em></a>) – operation name on interface</li> |
| <li><strong>arguments</strong> ({<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#basestring" title="(in Python v2.7)"><code class="xref py py-obj docutils literal"><span class="pre">basestring</span></code></a>: object}) – override argument values</li> |
| <li><strong>ignore_failure</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#bool" title="(in Python v2.7)"><em>bool</em></a>) – override whether to ignore failures</li> |
| <li><strong>max_attempts</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#int" title="(in Python v2.7)"><em>int</em></a>) – override maximum number of attempts allowed in case of failure</li> |
| <li><strong>retry_interval</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#float" title="(in Python v2.7)"><em>float</em></a>) – override interval between retries (in seconds)</li> |
| </ul> |
| </td> |
| </tr> |
| <tr class="field-odd field"><th class="field-name">Raises:</th><td class="field-body"><p class="first last"><a class="reference internal" href="aria.orchestrator.workflows.html#aria.orchestrator.workflows.exceptions.OperationNotFoundException" title="aria.orchestrator.workflows.exceptions.OperationNotFoundException"><strong>OperationNotFoundException</strong></a> – if |
| <code class="docutils literal"><span class="pre">interface_name</span></code> and <code class="docutils literal"><span class="pre">operation_name</span></code> do not refer to an operation on the actor</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <dl class="attribute"> |
| <dt id="aria.orchestrator.workflows.api.task.OperationTask.NAME_FORMAT"> |
| <code class="descname">NAME_FORMAT</code><em class="property"> = '{interface}:{operation}@{type}:{name}'</em><a class="headerlink" href="#aria.orchestrator.workflows.api.task.OperationTask.NAME_FORMAT" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="aria.orchestrator.workflows.api.task.StubTask"> |
| <em class="property">class </em><code class="descclassname">aria.orchestrator.workflows.api.task.</code><code class="descname">StubTask</code><span class="sig-paren">(</span><em>ctx=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task.StubTask" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="#aria.orchestrator.workflows.api.task.BaseTask" title="aria.orchestrator.workflows.api.task.BaseTask"><code class="xref py py-class docutils literal"><span class="pre">aria.orchestrator.workflows.api.task.BaseTask</span></code></a></p> |
| <p>Enables creating empty tasks.</p> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="aria.orchestrator.workflows.api.task.WorkflowTask"> |
| <em class="property">class </em><code class="descclassname">aria.orchestrator.workflows.api.task.</code><code class="descname">WorkflowTask</code><span class="sig-paren">(</span><em>workflow_func</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task.WorkflowTask" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="#aria.orchestrator.workflows.api.task.BaseTask" title="aria.orchestrator.workflows.api.task.BaseTask"><code class="xref py py-class docutils literal"><span class="pre">aria.orchestrator.workflows.api.task.BaseTask</span></code></a></p> |
| <p>Executes a complete workflow.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
| <li><strong>workflow_func</strong> – function to run</li> |
| <li><strong>kwargs</strong> – kwargs that would be passed to the workflow_func</li> |
| </ul> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| <dl class="attribute"> |
| <dt id="aria.orchestrator.workflows.api.task.WorkflowTask.graph"> |
| <code class="descname">graph</code><a class="headerlink" href="#aria.orchestrator.workflows.api.task.WorkflowTask.graph" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Graph constructed by the sub workflow.</p> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="aria.orchestrator.workflows.api.task.create_relationship_tasks"> |
| <code class="descclassname">aria.orchestrator.workflows.api.task.</code><code class="descname">create_relationship_tasks</code><span class="sig-paren">(</span><em>relationship</em>, <em>interface_name</em>, <em>source_operation_name=None</em>, <em>target_operation_name=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task.create_relationship_tasks" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Creates a relationship task (source and target).</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
| <li><strong>relationship</strong> – relationship instance itself</li> |
| <li><strong>source_operation_name</strong> – </li> |
| <li><strong>target_operation_name</strong> – </li> |
| </ul> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="aria.orchestrator.workflows.api.task.create_relationships_tasks"> |
| <code class="descclassname">aria.orchestrator.workflows.api.task.</code><code class="descname">create_relationships_tasks</code><span class="sig-paren">(</span><em>node</em>, <em>interface_name</em>, <em>source_operation_name=None</em>, <em>target_operation_name=None</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task.create_relationships_tasks" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Creates a relationship task (source and target) for all of a node relationships.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple"> |
| <li><strong>source_operation_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#basestring" title="(in Python v2.7)"><em>basestring</em></a>) – relationship operation name</li> |
| <li><strong>interface_name</strong> (<a class="reference external" href="https://docs.python.org/2.7/library/functions.html#basestring" title="(in Python v2.7)"><em>basestring</em></a>) – name of the interface</li> |
| <li><strong>source_operation_name</strong> – </li> |
| <li><strong>target_operation_name</strong> – </li> |
| <li><strong>node</strong> – source node</li> |
| </ul> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="aria.orchestrator.workflows.api.task.create_task"> |
| <code class="descclassname">aria.orchestrator.workflows.api.task.</code><code class="descname">create_task</code><span class="sig-paren">(</span><em>actor</em>, <em>interface_name</em>, <em>operation_name</em>, <em>**kwargs</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task.create_task" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Helper function that enables safe creation of <a class="reference internal" href="#aria.orchestrator.workflows.api.task.OperationTask" title="aria.orchestrator.workflows.api.task.OperationTask"><code class="xref py py-class docutils literal"><span class="pre">OperationTask</span></code></a>. If the supplied interface |
| or operation do not exist, <code class="docutils literal"><span class="pre">None</span></code> is returned.</p> |
| <table class="docutils field-list" frame="void" rules="none"> |
| <col class="field-name" /> |
| <col class="field-body" /> |
| <tbody valign="top"> |
| <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple"> |
| <li><strong>actor</strong> – actor for this task</li> |
| <li><strong>interface_name</strong> – name of the interface</li> |
| <li><strong>operation_name</strong> – name of the operation</li> |
| <li><strong>kwargs</strong> – any additional kwargs to be passed to the OperationTask</li> |
| </ul> |
| </td> |
| </tr> |
| <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first last">OperationTask or None (if the interface/operation does not exists)</p> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="aria.orchestrator.workflows.api.task.has_operation"> |
| <code class="descclassname">aria.orchestrator.workflows.api.task.</code><code class="descname">has_operation</code><span class="sig-paren">(</span><em>actor</em>, <em>interface_name</em>, <em>operation_name</em><span class="sig-paren">)</span><a class="headerlink" href="#aria.orchestrator.workflows.api.task.has_operation" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </div> |
| </div> |
| |
| |
| </div> |
| <div class="articleComments"> |
| |
| </div> |
| </div> |
| <footer> |
| |
| <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
| |
| <a href="aria.orchestrator.workflows.builtin.html" class="btn btn-neutral float-right" title="aria.orchestrator.workflows.builtin" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> |
| |
| |
| <a href="aria.orchestrator.workflows.html" class="btn btn-neutral" title="aria.orchestrator.workflows" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> |
| |
| </div> |
| |
| |
| <hr/> |
| |
| <div role="contentinfo"> |
| <p> |
| © Copyright 2016-2017, Apache Software Foundation. |
| |
| </p> |
| </div> |
| Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. |
| |
| </footer> |
| |
| </div> |
| </div> |
| |
| </section> |
| |
| </div> |
| |
| |
| |
| |
| |
| <script type="text/javascript"> |
| var DOCUMENTATION_OPTIONS = { |
| URL_ROOT:'./', |
| VERSION:'0.1.1', |
| COLLAPSE_INDEX:false, |
| FILE_SUFFIX:'.html', |
| HAS_SOURCE: true, |
| SOURCELINK_SUFFIX: '.txt' |
| }; |
| </script> |
| <script type="text/javascript" src="_static/jquery.js"></script> |
| <script type="text/javascript" src="_static/underscore.js"></script> |
| <script type="text/javascript" src="_static/doctools.js"></script> |
| |
| |
| |
| |
| |
| <script type="text/javascript" src="_static/js/theme.js"></script> |
| |
| |
| |
| |
| <script type="text/javascript"> |
| jQuery(function () { |
| SphinxRtdTheme.StickyNav.enable(); |
| }); |
| </script> |
| |
| |
| </body> |
| </html> |