Add lorax 34.3 documentation

This commit is contained in:
Brian C. Lane 2020-10-07 10:56:09 -07:00
parent 6afdad32da
commit a4173a577b
117 changed files with 14251 additions and 15992 deletions

View File

@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: cc96a7979dd426b55b81326d60413ee2
config: d9d287449bd26afc7e34fe721edb25e6
tags: 645f666f9bcd5a90fca523b33c5a78b7

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli &mdash; Lorax 33.2 documentation</title>
<title>composer.cli &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -176,14 +175,14 @@
<span class="kn">import</span> <span class="nn">logging</span>
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;composer-cli&quot;</span><span class="p">)</span>
<span class="kn">from</span> <span class="nn">composer.cli.blueprints</span> <span class="k">import</span> <span class="n">blueprints_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.modules</span> <span class="k">import</span> <span class="n">modules_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.projects</span> <span class="k">import</span> <span class="n">projects_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.compose</span> <span class="k">import</span> <span class="n">compose_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.sources</span> <span class="k">import</span> <span class="n">sources_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.status</span> <span class="k">import</span> <span class="n">status_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.upload</span> <span class="k">import</span> <span class="n">upload_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.providers</span> <span class="k">import</span> <span class="n">providers_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.blueprints</span> <span class="kn">import</span> <span class="n">blueprints_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.modules</span> <span class="kn">import</span> <span class="n">modules_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.projects</span> <span class="kn">import</span> <span class="n">projects_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.compose</span> <span class="kn">import</span> <span class="n">compose_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.sources</span> <span class="kn">import</span> <span class="n">sources_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.status</span> <span class="kn">import</span> <span class="n">status_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.upload</span> <span class="kn">import</span> <span class="n">upload_cmd</span>
<span class="kn">from</span> <span class="nn">composer.cli.providers</span> <span class="kn">import</span> <span class="n">providers_cmd</span>
<span class="n">command_map</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;blueprints&quot;</span><span class="p">:</span> <span class="n">blueprints_cmd</span><span class="p">,</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.blueprints &mdash; Lorax 33.2 documentation</title>
<title>composer.cli.blueprints &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -178,10 +177,10 @@
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="k">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="k">import</span> <span class="n">blueprints_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="k">import</span> <span class="n">argify</span><span class="p">,</span> <span class="n">frozen_toml_filename</span><span class="p">,</span> <span class="n">toml_filename</span><span class="p">,</span> <span class="n">handle_api_result</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="k">import</span> <span class="n">packageNEVRA</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="kn">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="kn">import</span> <span class="n">blueprints_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="kn">import</span> <span class="n">argify</span><span class="p">,</span> <span class="n">frozen_toml_filename</span><span class="p">,</span> <span class="n">toml_filename</span><span class="p">,</span> <span class="n">handle_api_result</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="kn">import</span> <span class="n">packageNEVRA</span>
<div class="viewcode-block" id="blueprints_cmd"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.blueprints.blueprints_cmd">[docs]</a><span class="k">def</span> <span class="nf">blueprints_cmd</span><span class="p">(</span><span class="n">opts</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Process blueprints commands</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.cmdline &mdash; Lorax 33.2 documentation</title>
<title>composer.cli.cmdline &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -177,8 +176,8 @@
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">argparse</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="k">import</span> <span class="n">vernum</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="k">import</span> <span class="n">epilog</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="kn">import</span> <span class="n">vernum</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="kn">import</span> <span class="n">epilog</span>
<span class="n">VERSION</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="si">{0}</span><span class="s2">-</span><span class="si">{1}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mi">0</span><span class="p">]),</span> <span class="n">vernum</span><span class="p">)</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.compose &mdash; Lorax 33.2 documentation</title>
<title>composer.cli.compose &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -158,7 +157,7 @@
<h1>Source code for composer.cli.compose</h1><div class="highlight"><pre>
<span></span><span class="c1">#</span>
<span class="c1"># Copyright (C) 2018 Red Hat, Inc.</span>
<span class="c1"># Copyright (C) 2018-2020 Red Hat, Inc.</span>
<span class="c1">#</span>
<span class="c1"># This program is free software; you can redistribute it and/or modify</span>
<span class="c1"># it under the terms of the GNU General Public License as published by</span>
@ -176,14 +175,14 @@
<span class="kn">import</span> <span class="nn">logging</span>
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;composer-cli&quot;</span><span class="p">)</span>
<span class="kn">from</span> <span class="nn">datetime</span> <span class="k">import</span> <span class="n">datetime</span>
<span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">datetime</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">json</span>
<span class="kn">import</span> <span class="nn">toml</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="k">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="k">import</span> <span class="n">compose_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="k">import</span> <span class="n">argify</span><span class="p">,</span> <span class="n">handle_api_result</span><span class="p">,</span> <span class="n">packageNEVRA</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="kn">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="kn">import</span> <span class="n">compose_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="kn">import</span> <span class="n">argify</span><span class="p">,</span> <span class="n">handle_api_result</span><span class="p">,</span> <span class="n">packageNEVRA</span><span class="p">,</span> <span class="n">get_arg</span>
<div class="viewcode-block" id="compose_cmd"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_cmd">[docs]</a><span class="k">def</span> <span class="nf">compose_cmd</span><span class="p">(</span><span class="n">opts</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Process compose commands</span>
@ -194,7 +193,18 @@
<span class="sd"> :rtype: int</span>
<span class="sd"> This dispatches the compose commands to a function</span>
<span class="sd"> compose_cmd expects api to be passed. eg.</span>
<span class="sd"> {&quot;version&quot;: 1, &quot;backend&quot;: &quot;lorax-composer&quot;}</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">get_url_json</span><span class="p">(</span><span class="n">opts</span><span class="o">.</span><span class="n">socket</span><span class="p">,</span> <span class="s2">&quot;/api/status&quot;</span><span class="p">)</span>
<span class="c1"># Get the api version and fall back to 0 if it fails.</span>
<span class="n">api_version</span> <span class="o">=</span> <span class="n">result</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;api&quot;</span><span class="p">,</span> <span class="s2">&quot;0&quot;</span><span class="p">)</span>
<span class="n">backend</span> <span class="o">=</span> <span class="n">result</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;backend&quot;</span><span class="p">,</span> <span class="s2">&quot;unknown&quot;</span><span class="p">)</span>
<span class="n">api</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;version&quot;</span><span class="p">:</span> <span class="n">api_version</span><span class="p">,</span> <span class="s2">&quot;backend&quot;</span><span class="p">:</span> <span class="n">backend</span><span class="p">}</span>
<span class="n">cmd_map</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;list&quot;</span><span class="p">:</span> <span class="n">compose_list</span><span class="p">,</span>
<span class="s2">&quot;status&quot;</span><span class="p">:</span> <span class="n">compose_status</span><span class="p">,</span>
@ -208,6 +218,7 @@
<span class="s2">&quot;results&quot;</span><span class="p">:</span> <span class="n">compose_results</span><span class="p">,</span>
<span class="s2">&quot;logs&quot;</span><span class="p">:</span> <span class="n">compose_logs</span><span class="p">,</span>
<span class="s2">&quot;image&quot;</span><span class="p">:</span> <span class="n">compose_image</span><span class="p">,</span>
<span class="s2">&quot;start-ostree&quot;</span><span class="p">:</span> <span class="n">compose_ostree</span><span class="p">,</span>
<span class="p">}</span>
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;help&quot;</span> <span class="ow">or</span> <span class="n">opts</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;--help&quot;</span><span class="p">:</span>
<span class="nb">print</span><span class="p">(</span><span class="n">compose_help</span><span class="p">)</span>
@ -216,9 +227,52 @@
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;Unknown compose command: </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
<span class="k">return</span> <span class="mi">1</span>
<span class="k">return</span> <span class="n">cmd_map</span><span class="p">[</span><span class="n">opts</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">]](</span><span class="n">opts</span><span class="o">.</span><span class="n">socket</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">api_version</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="mi">2</span><span class="p">:],</span> <span class="n">opts</span><span class="o">.</span><span class="n">json</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">testmode</span><span class="p">)</span></div>
<span class="k">return</span> <span class="n">cmd_map</span><span class="p">[</span><span class="n">opts</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">]](</span><span class="n">opts</span><span class="o">.</span><span class="n">socket</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">api_version</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">args</span><span class="p">[</span><span class="mi">2</span><span class="p">:],</span> <span class="n">opts</span><span class="o">.</span><span class="n">json</span><span class="p">,</span> <span class="n">opts</span><span class="o">.</span><span class="n">testmode</span><span class="p">,</span> <span class="n">api</span><span class="o">=</span><span class="n">api</span><span class="p">)</span></div>
<div class="viewcode-block" id="compose_list"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_list">[docs]</a><span class="k">def</span> <span class="nf">compose_list</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
<div class="viewcode-block" id="get_size"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.get_size">[docs]</a><span class="k">def</span> <span class="nf">get_size</span><span class="p">(</span><span class="n">args</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return optional --size argument, and remaining args</span>
<span class="sd"> :param args: list of arguments</span>
<span class="sd"> :type args: list of strings</span>
<span class="sd"> :returns: (args, size)</span>
<span class="sd"> :rtype: tuple</span>
<span class="sd"> - check size argument for int</span>
<span class="sd"> - check other args for --size in wrong place</span>
<span class="sd"> - raise error? Or just return 0?</span>
<span class="sd"> - no size returns 0 in size</span>
<span class="sd"> - multiply by 1024**2 to make it easier on users to specify large sizes</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">args</span><span class="p">,</span> <span class="n">value</span> <span class="o">=</span> <span class="n">get_arg</span><span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="s2">&quot;--size&quot;</span><span class="p">,</span> <span class="nb">int</span><span class="p">)</span>
<span class="n">value</span> <span class="o">=</span> <span class="n">value</span> <span class="o">*</span> <span class="mi">1024</span><span class="o">**</span><span class="mi">2</span> <span class="k">if</span> <span class="n">value</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="k">else</span> <span class="mi">0</span>
<span class="k">return</span> <span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span></div>
<div class="viewcode-block" id="get_parent"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.get_parent">[docs]</a><span class="k">def</span> <span class="nf">get_parent</span><span class="p">(</span><span class="n">args</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return optional --parent argument, and remaining args</span>
<span class="sd"> :param args: list of arguments</span>
<span class="sd"> :type args: list of strings</span>
<span class="sd"> :returns: (args, parent)</span>
<span class="sd"> :rtype: tuple</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">args</span><span class="p">,</span> <span class="n">value</span> <span class="o">=</span> <span class="n">get_arg</span><span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="s2">&quot;--parent&quot;</span><span class="p">)</span>
<span class="n">value</span> <span class="o">=</span> <span class="n">value</span> <span class="k">if</span> <span class="n">value</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
<span class="k">return</span> <span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span></div>
<div class="viewcode-block" id="get_ref"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.get_ref">[docs]</a><span class="k">def</span> <span class="nf">get_ref</span><span class="p">(</span><span class="n">args</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return optional --ref argument, and remaining args</span>
<span class="sd"> :param args: list of arguments</span>
<span class="sd"> :type args: list of strings</span>
<span class="sd"> :returns: (args, parent)</span>
<span class="sd"> :rtype: tuple</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">args</span><span class="p">,</span> <span class="n">value</span> <span class="o">=</span> <span class="n">get_arg</span><span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="s2">&quot;--ref&quot;</span><span class="p">)</span>
<span class="n">value</span> <span class="o">=</span> <span class="n">value</span> <span class="k">if</span> <span class="n">value</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="k">else</span> <span class="s2">&quot;&quot;</span>
<span class="k">return</span> <span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="n">value</span><span class="p">)</span></div>
<div class="viewcode-block" id="compose_list"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_list">[docs]</a><span class="k">def</span> <span class="nf">compose_list</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">api</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return a simple list of compose identifiers&quot;&quot;&quot;</span>
<span class="n">states</span> <span class="o">=</span> <span class="p">(</span><span class="s2">&quot;running&quot;</span><span class="p">,</span> <span class="s2">&quot;waiting&quot;</span><span class="p">,</span> <span class="s2">&quot;finished&quot;</span><span class="p">,</span> <span class="s2">&quot;failed&quot;</span><span class="p">)</span>
@ -262,7 +316,7 @@
<span class="k">return</span> <span class="mi">0</span></div>
<div class="viewcode-block" id="compose_status"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_status">[docs]</a><span class="k">def</span> <span class="nf">compose_status</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
<div class="viewcode-block" id="compose_status"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_status">[docs]</a><span class="k">def</span> <span class="nf">compose_status</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">api</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return the status of all known composes</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
@ -332,7 +386,7 @@
<span class="n">c</span><span class="p">[</span><span class="s2">&quot;version&quot;</span><span class="p">],</span> <span class="n">c</span><span class="p">[</span><span class="s2">&quot;compose_type&quot;</span><span class="p">],</span> <span class="n">image_size</span><span class="p">))</span></div>
<div class="viewcode-block" id="compose_types"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_types">[docs]</a><span class="k">def</span> <span class="nf">compose_types</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
<div class="viewcode-block" id="compose_types"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_types">[docs]</a><span class="k">def</span> <span class="nf">compose_types</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">api</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return information about the supported compose types</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
@ -358,7 +412,7 @@
<span class="c1"># output a plain list of identifiers, one per line</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">t</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">]</span> <span class="k">for</span> <span class="n">t</span> <span class="ow">in</span> <span class="n">result</span><span class="p">[</span><span class="s2">&quot;types&quot;</span><span class="p">]</span> <span class="k">if</span> <span class="n">t</span><span class="p">[</span><span class="s2">&quot;enabled&quot;</span><span class="p">]))</span></div>
<div class="viewcode-block" id="compose_start"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_start">[docs]</a><span class="k">def</span> <span class="nf">compose_start</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
<div class="viewcode-block" id="compose_start"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_start">[docs]</a><span class="k">def</span> <span class="nf">compose_start</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">api</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Start a new compose using the selected blueprint and type</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
@ -371,9 +425,22 @@
<span class="sd"> :type show_json: bool</span>
<span class="sd"> :param testmode: Set to 1 to simulate a failed compose, set to 2 to simulate a finished one.</span>
<span class="sd"> :type testmode: int</span>
<span class="sd"> :param api: Details about the API server, &quot;version&quot; and &quot;backend&quot;</span>
<span class="sd"> :type api: dict</span>
<span class="sd"> compose start &lt;blueprint-name&gt; &lt;compose-type&gt; [&lt;image-name&gt; &lt;provider&gt; &lt;profile&gt; | &lt;image-name&gt; &lt;profile.toml&gt;]</span>
<span class="sd"> compose start [--size XXX] &lt;blueprint-name&gt; &lt;compose-type&gt; [&lt;image-name&gt; &lt;provider&gt; &lt;profile&gt; | &lt;image-name&gt; &lt;profile.toml&gt;]</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">api</span> <span class="o">==</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;Missing api version/backend&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="mi">1</span>
<span class="c1"># Get the optional size before checking other parameters</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">args</span><span class="p">,</span> <span class="n">size</span> <span class="o">=</span> <span class="n">get_size</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
<span class="k">except</span> <span class="p">(</span><span class="ne">RuntimeError</span><span class="p">,</span> <span class="ne">ValueError</span><span class="p">)</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="k">return</span> <span class="mi">1</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;start is missing the blueprint name and output type&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="mi">1</span>
@ -389,6 +456,12 @@
<span class="s2">&quot;compose_type&quot;</span><span class="p">:</span> <span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span>
<span class="s2">&quot;branch&quot;</span><span class="p">:</span> <span class="s2">&quot;master&quot;</span>
<span class="p">}</span>
<span class="k">if</span> <span class="n">size</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
<span class="k">if</span> <span class="n">api</span><span class="p">[</span><span class="s2">&quot;backend&quot;</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;lorax-composer&quot;</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="s2">&quot;lorax-composer does not support --size, it will be ignored.&quot;</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">config</span><span class="p">[</span><span class="s2">&quot;size&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">size</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>
<span class="n">config</span><span class="p">[</span><span class="s2">&quot;upload&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;image_name&quot;</span><span class="p">:</span> <span class="n">args</span><span class="p">[</span><span class="mi">2</span><span class="p">]}</span>
<span class="c1"># profile TOML file (maybe)</span>
@ -421,7 +494,87 @@
<span class="k">return</span> <span class="n">rc</span></div>
<div class="viewcode-block" id="compose_log"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_log">[docs]</a><span class="k">def</span> <span class="nf">compose_log</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
<div class="viewcode-block" id="compose_ostree"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_ostree">[docs]</a><span class="k">def</span> <span class="nf">compose_ostree</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">api</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Start a new ostree compose using the selected blueprint and type</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
<span class="sd"> :type socket_path: str</span>
<span class="sd"> :param api_version: Version of the API to talk to. eg. &quot;0&quot;</span>
<span class="sd"> :type api_version: str</span>
<span class="sd"> :param args: List of remaining arguments from the cmdline</span>
<span class="sd"> :type args: list of str</span>
<span class="sd"> :param show_json: Set to True to show the JSON output instead of the human readable output</span>
<span class="sd"> :type show_json: bool</span>
<span class="sd"> :param testmode: Set to 1 to simulate a failed compose, set to 2 to simulate a finished one.</span>
<span class="sd"> :type testmode: int</span>
<span class="sd"> :param api: Details about the API server, &quot;version&quot; and &quot;backend&quot;</span>
<span class="sd"> :type api: dict</span>
<span class="sd"> compose start-ostree [--size XXXX] [--parent PARENT] [--ref REF] &lt;BLUEPRINT&gt; &lt;TYPE&gt; [&lt;IMAGE-NAME&gt; &lt;PROFILE.TOML&gt;]</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="n">api</span> <span class="o">==</span> <span class="kc">None</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;Missing api version/backend&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="mi">1</span>
<span class="k">if</span> <span class="n">api</span><span class="p">[</span><span class="s2">&quot;backend&quot;</span><span class="p">]</span> <span class="o">==</span> <span class="s2">&quot;lorax-composer&quot;</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="s2">&quot;lorax-composer doesn not support start-ostree.&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="mi">1</span>
<span class="c1"># Get the optional size before checking other parameters</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">args</span><span class="p">,</span> <span class="n">size</span> <span class="o">=</span> <span class="n">get_size</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
<span class="n">args</span><span class="p">,</span> <span class="n">parent</span> <span class="o">=</span> <span class="n">get_parent</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
<span class="n">args</span><span class="p">,</span> <span class="n">ref</span> <span class="o">=</span> <span class="n">get_ref</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>
<span class="k">except</span> <span class="p">(</span><span class="ne">RuntimeError</span><span class="p">,</span> <span class="ne">ValueError</span><span class="p">)</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="k">return</span> <span class="mi">1</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;start-ostree is missing the blueprint name, output type, and ostree details&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="mi">1</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;start-ostree is missing the output type&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="mi">1</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="o">==</span> <span class="mi">3</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;start-ostree is missing the provider TOML file&quot;</span><span class="p">)</span>
<span class="k">return</span> <span class="mi">1</span>
<span class="n">config</span> <span class="o">=</span> <span class="p">{</span>
<span class="s2">&quot;blueprint_name&quot;</span><span class="p">:</span> <span class="n">args</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span>
<span class="s2">&quot;compose_type&quot;</span><span class="p">:</span> <span class="n">args</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span>
<span class="s2">&quot;branch&quot;</span><span class="p">:</span> <span class="s2">&quot;master&quot;</span><span class="p">,</span>
<span class="s2">&quot;ostree&quot;</span><span class="p">:</span> <span class="p">{</span><span class="s2">&quot;ref&quot;</span><span class="p">:</span> <span class="n">ref</span><span class="p">,</span> <span class="s2">&quot;parent&quot;</span><span class="p">:</span> <span class="n">parent</span><span class="p">},</span>
<span class="p">}</span>
<span class="k">if</span> <span class="n">size</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">config</span><span class="p">[</span><span class="s2">&quot;size&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="n">size</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="o">==</span> <span class="mi">4</span><span class="p">:</span>
<span class="n">config</span><span class="p">[</span><span class="s2">&quot;upload&quot;</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;image_name&quot;</span><span class="p">:</span> <span class="n">args</span><span class="p">[</span><span class="mi">2</span><span class="p">]}</span>
<span class="c1"># profile TOML file (maybe)</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">config</span><span class="p">[</span><span class="s2">&quot;upload&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">update</span><span class="p">(</span><span class="n">toml</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">args</span><span class="p">[</span><span class="mi">3</span><span class="p">]))</span>
<span class="k">except</span> <span class="n">toml</span><span class="o">.</span><span class="n">TomlDecodeError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
<span class="k">return</span> <span class="mi">1</span>
<span class="k">if</span> <span class="n">testmode</span><span class="p">:</span>
<span class="n">test_url</span> <span class="o">=</span> <span class="s2">&quot;?test=</span><span class="si">%d</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">testmode</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">test_url</span> <span class="o">=</span> <span class="s2">&quot;&quot;</span>
<span class="n">api_route</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">api_url</span><span class="p">(</span><span class="n">api_version</span><span class="p">,</span> <span class="s2">&quot;/compose&quot;</span> <span class="o">+</span> <span class="n">test_url</span><span class="p">)</span>
<span class="n">result</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">post_url_json</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_route</span><span class="p">,</span> <span class="n">json</span><span class="o">.</span><span class="n">dumps</span><span class="p">(</span><span class="n">config</span><span class="p">))</span>
<span class="p">(</span><span class="n">rc</span><span class="p">,</span> <span class="n">exit_now</span><span class="p">)</span> <span class="o">=</span> <span class="n">handle_api_result</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">show_json</span><span class="p">)</span>
<span class="k">if</span> <span class="n">exit_now</span><span class="p">:</span>
<span class="k">return</span> <span class="n">rc</span>
<span class="nb">print</span><span class="p">(</span><span class="s2">&quot;Compose </span><span class="si">%s</span><span class="s2"> added to the queue&quot;</span> <span class="o">%</span> <span class="n">result</span><span class="p">[</span><span class="s2">&quot;build_id&quot;</span><span class="p">])</span>
<span class="k">if</span> <span class="s2">&quot;upload_id&quot;</span> <span class="ow">in</span> <span class="n">result</span> <span class="ow">and</span> <span class="n">result</span><span class="p">[</span><span class="s2">&quot;upload_id&quot;</span><span class="p">]:</span>
<span class="nb">print</span> <span class="p">(</span><span class="s2">&quot;Upload </span><span class="si">%s</span><span class="s2"> added to the upload queue&quot;</span> <span class="o">%</span> <span class="n">result</span><span class="p">[</span><span class="s2">&quot;upload_id&quot;</span><span class="p">])</span>
<span class="k">return</span> <span class="n">rc</span></div>
<div class="viewcode-block" id="compose_log"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_log">[docs]</a><span class="k">def</span> <span class="nf">compose_log</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">api</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Show the last part of the compose log</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
@ -462,7 +615,7 @@
<span class="nb">print</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
<span class="k">return</span> <span class="mi">0</span></div>
<div class="viewcode-block" id="compose_cancel"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_cancel">[docs]</a><span class="k">def</span> <span class="nf">compose_cancel</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
<div class="viewcode-block" id="compose_cancel"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_cancel">[docs]</a><span class="k">def</span> <span class="nf">compose_cancel</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">api</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Cancel a running compose</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
@ -488,7 +641,7 @@
<span class="n">result</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">delete_url_json</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_route</span><span class="p">)</span>
<span class="k">return</span> <span class="n">handle_api_result</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">show_json</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span></div>
<div class="viewcode-block" id="compose_delete"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_delete">[docs]</a><span class="k">def</span> <span class="nf">compose_delete</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
<div class="viewcode-block" id="compose_delete"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_delete">[docs]</a><span class="k">def</span> <span class="nf">compose_delete</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">api</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Delete a finished compose&#39;s results</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
@ -515,7 +668,7 @@
<span class="n">result</span> <span class="o">=</span> <span class="n">client</span><span class="o">.</span><span class="n">delete_url_json</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_route</span><span class="p">)</span>
<span class="k">return</span> <span class="n">handle_api_result</span><span class="p">(</span><span class="n">result</span><span class="p">,</span> <span class="n">show_json</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span></div>
<div class="viewcode-block" id="compose_info"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_info">[docs]</a><span class="k">def</span> <span class="nf">compose_info</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
<div class="viewcode-block" id="compose_info"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_info">[docs]</a><span class="k">def</span> <span class="nf">compose_info</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">api</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return detailed information about the compose</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
@ -569,7 +722,7 @@
<span class="k">return</span> <span class="n">rc</span></div>
<div class="viewcode-block" id="compose_metadata"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_metadata">[docs]</a><span class="k">def</span> <span class="nf">compose_metadata</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
<div class="viewcode-block" id="compose_metadata"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_metadata">[docs]</a><span class="k">def</span> <span class="nf">compose_metadata</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">api</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Download a tar file of the compose&#39;s metadata</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
@ -600,7 +753,7 @@
<span class="k">return</span> <span class="n">rc</span></div>
<div class="viewcode-block" id="compose_results"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_results">[docs]</a><span class="k">def</span> <span class="nf">compose_results</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
<div class="viewcode-block" id="compose_results"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_results">[docs]</a><span class="k">def</span> <span class="nf">compose_results</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">api</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Download a tar file of the compose&#39;s results</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
@ -632,7 +785,7 @@
<span class="k">return</span> <span class="n">rc</span></div>
<div class="viewcode-block" id="compose_logs"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_logs">[docs]</a><span class="k">def</span> <span class="nf">compose_logs</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
<div class="viewcode-block" id="compose_logs"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_logs">[docs]</a><span class="k">def</span> <span class="nf">compose_logs</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">api</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Download a tar of the compose&#39;s logs</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
@ -663,7 +816,7 @@
<span class="k">return</span> <span class="n">rc</span></div>
<div class="viewcode-block" id="compose_image"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_image">[docs]</a><span class="k">def</span> <span class="nf">compose_image</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">):</span>
<div class="viewcode-block" id="compose_image"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.compose.compose_image">[docs]</a><span class="k">def</span> <span class="nf">compose_image</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">api_version</span><span class="p">,</span> <span class="n">args</span><span class="p">,</span> <span class="n">show_json</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">testmode</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">api</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Download the compose&#39;s output image</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.modules &mdash; Lorax 33.2 documentation</title>
<title>composer.cli.modules &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -176,9 +175,9 @@
<span class="kn">import</span> <span class="nn">logging</span>
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;composer-cli&quot;</span><span class="p">)</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="k">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="k">import</span> <span class="n">modules_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="k">import</span> <span class="n">handle_api_result</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="kn">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="kn">import</span> <span class="n">modules_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="kn">import</span> <span class="n">handle_api_result</span>
<div class="viewcode-block" id="modules_cmd"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.modules.modules_cmd">[docs]</a><span class="k">def</span> <span class="nf">modules_cmd</span><span class="p">(</span><span class="n">opts</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Process modules commands</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.projects &mdash; Lorax 33.2 documentation</title>
<title>composer.cli.projects &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -178,9 +177,9 @@
<span class="kn">import</span> <span class="nn">textwrap</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="k">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="k">import</span> <span class="n">projects_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="k">import</span> <span class="n">handle_api_result</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="kn">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="kn">import</span> <span class="n">projects_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="kn">import</span> <span class="n">handle_api_result</span>
<div class="viewcode-block" id="projects_cmd"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.projects.projects_cmd">[docs]</a><span class="k">def</span> <span class="nf">projects_cmd</span><span class="p">(</span><span class="n">opts</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Process projects commands</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.providers &mdash; Lorax 33.2 documentation</title>
<title>composer.cli.providers &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -180,9 +179,9 @@
<span class="kn">import</span> <span class="nn">toml</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="k">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="k">import</span> <span class="n">providers_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="k">import</span> <span class="n">handle_api_result</span><span class="p">,</span> <span class="n">toml_filename</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="kn">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="kn">import</span> <span class="n">providers_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="kn">import</span> <span class="n">handle_api_result</span><span class="p">,</span> <span class="n">toml_filename</span>
<div class="viewcode-block" id="providers_cmd"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.providers.providers_cmd">[docs]</a><span class="k">def</span> <span class="nf">providers_cmd</span><span class="p">(</span><span class="n">opts</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Process providers commands</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.sources &mdash; Lorax 33.2 documentation</title>
<title>composer.cli.sources &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -178,9 +177,9 @@
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="k">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="k">import</span> <span class="n">sources_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="k">import</span> <span class="n">argify</span><span class="p">,</span> <span class="n">handle_api_result</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="kn">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="kn">import</span> <span class="n">sources_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="kn">import</span> <span class="n">argify</span><span class="p">,</span> <span class="n">handle_api_result</span>
<div class="viewcode-block" id="sources_cmd"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.sources.sources_cmd">[docs]</a><span class="k">def</span> <span class="nf">sources_cmd</span><span class="p">(</span><span class="n">opts</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Process sources commands</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.status &mdash; Lorax 33.2 documentation</title>
<title>composer.cli.status &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -176,9 +175,9 @@
<span class="kn">import</span> <span class="nn">logging</span>
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;composer-cli&quot;</span><span class="p">)</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="k">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="k">import</span> <span class="n">status_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="k">import</span> <span class="n">handle_api_result</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="kn">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="kn">import</span> <span class="n">status_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="kn">import</span> <span class="n">handle_api_result</span>
<div class="viewcode-block" id="status_cmd"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.status.status_cmd">[docs]</a><span class="k">def</span> <span class="nf">status_cmd</span><span class="p">(</span><span class="n">opts</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Process status commands</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.upload &mdash; Lorax 33.2 documentation</title>
<title>composer.cli.upload &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -180,9 +179,9 @@
<span class="kn">import</span> <span class="nn">toml</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="k">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="k">import</span> <span class="n">upload_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="k">import</span> <span class="n">handle_api_result</span>
<span class="kn">from</span> <span class="nn">composer</span> <span class="kn">import</span> <span class="n">http_client</span> <span class="k">as</span> <span class="n">client</span>
<span class="kn">from</span> <span class="nn">composer.cli.help</span> <span class="kn">import</span> <span class="n">upload_help</span>
<span class="kn">from</span> <span class="nn">composer.cli.utilities</span> <span class="kn">import</span> <span class="n">handle_api_result</span>
<div class="viewcode-block" id="upload_cmd"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.upload.upload_cmd">[docs]</a><span class="k">def</span> <span class="nf">upload_cmd</span><span class="p">(</span><span class="n">opts</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Process upload commands</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli.utilities &mdash; Lorax 33.2 documentation</title>
<title>composer.cli.utilities &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -252,6 +251,34 @@
<span class="k">return</span> <span class="s2">&quot;</span><span class="si">%s</span><span class="s2">-</span><span class="si">%s</span><span class="s2">:</span><span class="si">%s</span><span class="s2">-</span><span class="si">%s</span><span class="s2">.</span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">pkg</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">],</span> <span class="n">pkg</span><span class="p">[</span><span class="s2">&quot;epoch&quot;</span><span class="p">],</span> <span class="n">pkg</span><span class="p">[</span><span class="s2">&quot;version&quot;</span><span class="p">],</span> <span class="n">pkg</span><span class="p">[</span><span class="s2">&quot;release&quot;</span><span class="p">],</span> <span class="n">pkg</span><span class="p">[</span><span class="s2">&quot;arch&quot;</span><span class="p">])</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">return</span> <span class="s2">&quot;</span><span class="si">%s</span><span class="s2">-</span><span class="si">%s</span><span class="s2">-</span><span class="si">%s</span><span class="s2">.</span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">pkg</span><span class="p">[</span><span class="s2">&quot;name&quot;</span><span class="p">],</span> <span class="n">pkg</span><span class="p">[</span><span class="s2">&quot;version&quot;</span><span class="p">],</span> <span class="n">pkg</span><span class="p">[</span><span class="s2">&quot;release&quot;</span><span class="p">],</span> <span class="n">pkg</span><span class="p">[</span><span class="s2">&quot;arch&quot;</span><span class="p">])</span></div>
<div class="viewcode-block" id="get_arg"><a class="viewcode-back" href="../../../composer.cli.html#composer.cli.utilities.get_arg">[docs]</a><span class="k">def</span> <span class="nf">get_arg</span><span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">argtype</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return optional value from args, and remaining args</span>
<span class="sd"> :param args: list of arguments</span>
<span class="sd"> :type args: list of strings</span>
<span class="sd"> :param name: The argument to remove from the args list</span>
<span class="sd"> :type name: string</span>
<span class="sd"> :param argtype: Type to use for checking the argument value</span>
<span class="sd"> :type argtype: type</span>
<span class="sd"> :returns: (args, value)</span>
<span class="sd"> :rtype: tuple</span>
<span class="sd"> This removes the optional argument and value from the argument list, returns the new list,</span>
<span class="sd"> and the value of the argument.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">idx</span> <span class="o">=</span> <span class="n">args</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
<span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">args</span><span class="p">)</span> <span class="o">&lt;</span> <span class="n">idx</span><span class="o">+</span><span class="mi">2</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">name</span><span class="si">}</span><span class="s2"> is missing the value&quot;</span><span class="p">)</span>
<span class="n">value</span> <span class="o">=</span> <span class="n">args</span><span class="p">[</span><span class="n">idx</span><span class="o">+</span><span class="mi">1</span><span class="p">]</span>
<span class="k">except</span> <span class="ne">ValueError</span><span class="p">:</span>
<span class="k">return</span> <span class="p">(</span><span class="n">args</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
<span class="k">if</span> <span class="n">argtype</span><span class="p">:</span>
<span class="n">value</span> <span class="o">=</span> <span class="n">argtype</span><span class="p">(</span><span class="n">value</span><span class="p">)</span>
<span class="k">return</span> <span class="p">(</span><span class="n">args</span><span class="p">[:</span><span class="n">idx</span><span class="p">]</span><span class="o">+</span><span class="n">args</span><span class="p">[</span><span class="n">idx</span><span class="o">+</span><span class="mi">2</span><span class="p">:],</span> <span class="n">value</span><span class="p">)</span></div>
</pre></div>
</div>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.http_client &mdash; Lorax 33.2 documentation</title>
<title>composer.http_client &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -177,9 +176,9 @@
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">json</span>
<span class="kn">from</span> <span class="nn">urllib.parse</span> <span class="k">import</span> <span class="n">urlparse</span><span class="p">,</span> <span class="n">urlunparse</span>
<span class="kn">from</span> <span class="nn">urllib.parse</span> <span class="kn">import</span> <span class="n">urlparse</span><span class="p">,</span> <span class="n">urlunparse</span>
<span class="kn">from</span> <span class="nn">composer.unix_socket</span> <span class="k">import</span> <span class="n">UnixHTTPConnectionPool</span>
<span class="kn">from</span> <span class="nn">composer.unix_socket</span> <span class="kn">import</span> <span class="n">UnixHTTPConnectionPool</span>
<div class="viewcode-block" id="api_url"><a class="viewcode-back" href="../../composer.html#composer.http_client.api_url">[docs]</a><span class="k">def</span> <span class="nf">api_url</span><span class="p">(</span><span class="n">api_version</span><span class="p">,</span> <span class="n">url</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return the versioned path to the API route</span>
@ -283,7 +282,7 @@
<span class="n">r_unlimited</span> <span class="o">=</span> <span class="n">http</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="s2">&quot;GET&quot;</span><span class="p">,</span> <span class="n">unlimited_url</span><span class="p">)</span>
<span class="k">return</span> <span class="n">json</span><span class="o">.</span><span class="n">loads</span><span class="p">(</span><span class="n">r_unlimited</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s1">&#39;utf-8&#39;</span><span class="p">))</span></div>
<div class="viewcode-block" id="delete_url_json"><a class="viewcode-back" href="../../composer.html#composer.http_client.delete_url_json">[docs]</a><span class="k">def</span> <span class="nf">delete_url_json</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">url</span><span class="p">,</span> <span class="n">timeout</span><span class="o">=</span><span class="mi">120</span><span class="p">):</span>
<div class="viewcode-block" id="delete_url_json"><a class="viewcode-back" href="../../composer.html#composer.http_client.delete_url_json">[docs]</a><span class="k">def</span> <span class="nf">delete_url_json</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">url</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Send a DELETE request to the url and return JSON response</span>
<span class="sd"> :param socket_path: Path to the Unix socket to use for API communication</span>
@ -293,7 +292,7 @@
<span class="sd"> :returns: The json response from the server</span>
<span class="sd"> :rtype: dict</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">http</span> <span class="o">=</span> <span class="n">UnixHTTPConnectionPool</span><span class="p">(</span><span class="n">socket_path</span><span class="p">,</span> <span class="n">timeout</span><span class="o">=</span><span class="n">timeout</span><span class="p">)</span>
<span class="n">http</span> <span class="o">=</span> <span class="n">UnixHTTPConnectionPool</span><span class="p">(</span><span class="n">socket_path</span><span class="p">)</span>
<span class="n">r</span> <span class="o">=</span> <span class="n">http</span><span class="o">.</span><span class="n">request</span><span class="p">(</span><span class="s2">&quot;DELETE&quot;</span><span class="p">,</span> <span class="n">url</span><span class="p">)</span>
<span class="k">return</span> <span class="n">json</span><span class="o">.</span><span class="n">loads</span><span class="p">(</span><span class="n">r</span><span class="o">.</span><span class="n">data</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">))</span></div>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.unix_socket &mdash; Lorax 33.2 documentation</title>
<title>composer.unix_socket &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -183,7 +182,7 @@
<span class="c1"># https://github.com/docker/docker-py/blob/master/docker/transport/unixconn.py</span>
<div class="viewcode-block" id="UnixHTTPConnection"><a class="viewcode-back" href="../../composer.html#composer.unix_socket.UnixHTTPConnection">[docs]</a><span class="k">class</span> <span class="nc">UnixHTTPConnection</span><span class="p">(</span><span class="n">http</span><span class="o">.</span><span class="n">client</span><span class="o">.</span><span class="n">HTTPConnection</span><span class="p">,</span> <span class="nb">object</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">socket_path</span><span class="p">,</span> <span class="n">timeout</span><span class="o">=</span><span class="mi">60</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">socket_path</span><span class="p">,</span> <span class="n">timeout</span><span class="o">=</span><span class="mi">60</span><span class="o">*</span><span class="mi">5</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Create an HTTP connection to a unix domain socket</span>
<span class="sd"> :param socket_path: The path to the Unix domain socket</span>
@ -193,7 +192,7 @@
<span class="bp">self</span><span class="o">.</span><span class="n">socket_path</span> <span class="o">=</span> <span class="n">socket_path</span>
<span class="bp">self</span><span class="o">.</span><span class="n">sock</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">def</span> <span class="nf">__del__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <span class="c1"># base class does not have d&#39;tor</span>
<span class="k">def</span> <span class="fm">__del__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span> <span class="c1"># base class does not have d&#39;tor</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">sock</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">sock</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
@ -205,13 +204,15 @@
<div class="viewcode-block" id="UnixHTTPConnectionPool"><a class="viewcode-back" href="../../composer.html#composer.unix_socket.UnixHTTPConnectionPool">[docs]</a><span class="k">class</span> <span class="nc">UnixHTTPConnectionPool</span><span class="p">(</span><span class="n">urllib3</span><span class="o">.</span><span class="n">connectionpool</span><span class="o">.</span><span class="n">HTTPConnectionPool</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">socket_path</span><span class="p">,</span> <span class="n">timeout</span><span class="o">=</span><span class="mi">60</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">socket_path</span><span class="p">,</span> <span class="n">timeout</span><span class="o">=</span><span class="mi">60</span><span class="o">*</span><span class="mi">5</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Create a connection pool using a Unix domain socket</span>
<span class="sd"> :param socket_path: The path to the Unix domain socket</span>
<span class="sd"> :param timeout: Number of seconds to timeout the connection</span>
<span class="sd"> NOTE: retries are disabled for these connections, they are never useful</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="nb">super</span><span class="p">(</span><span class="n">UnixHTTPConnectionPool</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="s1">&#39;localhost&#39;</span><span class="p">,</span> <span class="n">timeout</span><span class="o">=</span><span class="n">timeout</span><span class="p">)</span>
<span class="nb">super</span><span class="p">(</span><span class="n">UnixHTTPConnectionPool</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="s1">&#39;localhost&#39;</span><span class="p">,</span> <span class="n">timeout</span><span class="o">=</span><span class="n">timeout</span><span class="p">,</span> <span class="n">retries</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">socket_path</span> <span class="o">=</span> <span class="n">socket_path</span>
<span class="k">def</span> <span class="nf">_new_conn</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Overview: module code &mdash; Lorax 33.2 documentation</title>
<title>Overview: module code &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../product-images.html">Product and Updates Images</a></li>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>lifted.config &mdash; Lorax 33.2 documentation</title>
<title>lifted.config &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -171,7 +170,7 @@
<span class="c1"># You should have received a copy of the GNU General Public License</span>
<span class="c1"># along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<span class="c1">#</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span>
<div class="viewcode-block" id="configure"><a class="viewcode-back" href="../../lifted.html#lifted.config.configure">[docs]</a><span class="k">def</span> <span class="nf">configure</span><span class="p">(</span><span class="n">conf</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Add lifted settings to the configuration</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>lifted.providers &mdash; Lorax 33.2 documentation</title>
<title>lifted.providers &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -172,7 +171,7 @@
<span class="c1"># along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<span class="c1">#</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="k">import</span> <span class="n">glob</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="kn">import</span> <span class="n">glob</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">re</span>
<span class="kn">import</span> <span class="nn">stat</span>
@ -206,9 +205,9 @@
<span class="c1"># create the settings directory if it doesn&#39;t exist</span>
<span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">directory</span><span class="p">,</span> <span class="n">exist_ok</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
<span class="n">path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">directory</span><span class="p">,</span> <span class="n">f</span><span class="s2">&quot;</span><span class="si">{profile}</span><span class="s2">.toml&quot;</span><span class="p">)</span>
<span class="n">path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">directory</span><span class="p">,</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">profile</span><span class="si">}</span><span class="s2">.toml&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">exists</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">path</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">f</span><span class="s1">&#39;Couldn</span><span class="se">\&#39;</span><span class="s1">t find profile &quot;</span><span class="si">{profile}</span><span class="s1">&quot;!&#39;</span><span class="p">)</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Couldn</span><span class="se">\&#39;</span><span class="s1">t find profile &quot;</span><span class="si">{</span><span class="n">profile</span><span class="si">}</span><span class="s1">&quot;!&#39;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">abspath</span><span class="p">(</span><span class="n">path</span><span class="p">)</span>
@ -238,7 +237,7 @@
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="n">path</span><span class="p">)</span> <span class="k">as</span> <span class="n">provider_file</span><span class="p">:</span>
<span class="n">provider</span> <span class="o">=</span> <span class="n">toml</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">provider_file</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">OSError</span> <span class="k">as</span> <span class="n">error</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">f</span><span class="s1">&#39;Couldn</span><span class="se">\&#39;</span><span class="s1">t find provider &quot;</span><span class="si">{provider_name}</span><span class="s1">&quot;!&#39;</span><span class="p">)</span> <span class="kn">from</span> <span class="nn">error</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Couldn</span><span class="se">\&#39;</span><span class="s1">t find provider &quot;</span><span class="si">{</span><span class="n">provider_name</span><span class="si">}</span><span class="s1">&quot;!&#39;</span><span class="p">)</span> <span class="kn">from</span> <span class="nn">error</span>
<span class="k">return</span> <span class="n">provider</span></div>
@ -283,7 +282,7 @@
<span class="n">path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">ucfg</span><span class="p">[</span><span class="s2">&quot;providers_dir&quot;</span><span class="p">],</span> <span class="n">provider_name</span><span class="p">,</span> <span class="s2">&quot;playbook.yaml&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isfile</span><span class="p">(</span><span class="n">path</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">f</span><span class="s1">&#39;Couldn</span><span class="se">\&#39;</span><span class="s1">t find playbook for &quot;</span><span class="si">{provider_name}</span><span class="s1">&quot;!&#39;</span><span class="p">)</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Couldn</span><span class="se">\&#39;</span><span class="s1">t find playbook for &quot;</span><span class="si">{</span><span class="n">provider_name</span><span class="si">}</span><span class="s1">&quot;!&#39;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">path</span></div>
@ -319,16 +318,16 @@
<span class="n">settings_info</span> <span class="o">=</span> <span class="n">resolve_provider</span><span class="p">(</span><span class="n">ucfg</span><span class="p">,</span> <span class="n">provider_name</span><span class="p">)[</span><span class="s2">&quot;settings-info&quot;</span><span class="p">]</span>
<span class="k">for</span> <span class="n">key</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">settings</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="k">if</span> <span class="n">key</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">settings_info</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="n">f</span><span class="s1">&#39;Received unexpected setting: &quot;</span><span class="si">{key}</span><span class="s1">&quot;!&#39;</span><span class="p">)</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Received unexpected setting: &quot;</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s1">&quot;!&#39;</span><span class="p">)</span>
<span class="n">setting_type</span> <span class="o">=</span> <span class="n">settings_info</span><span class="p">[</span><span class="n">key</span><span class="p">][</span><span class="s2">&quot;type&quot;</span><span class="p">]</span>
<span class="n">correct_type</span> <span class="o">=</span> <span class="n">type_map</span><span class="p">[</span><span class="n">setting_type</span><span class="p">]</span>
<span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="n">correct_type</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span>
<span class="n">f</span><span class="s1">&#39;Expected a </span><span class="si">{correct_type}</span><span class="s1"> for &quot;</span><span class="si">{key}</span><span class="s1">&quot;, received a {type(value)}!&#39;</span>
<span class="sa">f</span><span class="s1">&#39;Expected a </span><span class="si">{</span><span class="n">correct_type</span><span class="si">}</span><span class="s1"> for &quot;</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s1">&quot;, received a </span><span class="si">{</span><span class="nb">type</span><span class="p">(</span><span class="n">value</span><span class="p">)</span><span class="si">}</span><span class="s1">!&#39;</span>
<span class="p">)</span>
<span class="k">if</span> <span class="n">setting_type</span> <span class="o">==</span> <span class="s2">&quot;string&quot;</span> <span class="ow">and</span> <span class="s2">&quot;regex&quot;</span> <span class="ow">in</span> <span class="n">settings_info</span><span class="p">[</span><span class="n">key</span><span class="p">]:</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">re</span><span class="o">.</span><span class="n">match</span><span class="p">(</span><span class="n">settings_info</span><span class="p">[</span><span class="n">key</span><span class="p">][</span><span class="s2">&quot;regex&quot;</span><span class="p">],</span> <span class="n">value</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="n">f</span><span class="s1">&#39;Value &quot;</span><span class="si">{value}</span><span class="s1">&quot; is invalid for setting &quot;</span><span class="si">{key}</span><span class="s1">&quot;!&#39;</span><span class="p">)</span></div>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Value &quot;</span><span class="si">{</span><span class="n">value</span><span class="si">}</span><span class="s1">&quot; is invalid for setting &quot;</span><span class="si">{</span><span class="n">key</span><span class="si">}</span><span class="s1">&quot;!&#39;</span><span class="p">)</span></div>
<div class="viewcode-block" id="save_settings"><a class="viewcode-back" href="../../lifted.html#lifted.providers.save_settings">[docs]</a><span class="k">def</span> <span class="nf">save_settings</span><span class="p">(</span><span class="n">ucfg</span><span class="p">,</span> <span class="n">provider_name</span><span class="p">,</span> <span class="n">profile</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>lifted.queue &mdash; Lorax 33.2 documentation</title>
<title>lifted.queue &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -172,29 +171,29 @@
<span class="c1"># along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<span class="c1">#</span>
<span class="kn">from</span> <span class="nn">functools</span> <span class="k">import</span> <span class="n">partial</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="k">import</span> <span class="n">glob</span>
<span class="kn">from</span> <span class="nn">functools</span> <span class="kn">import</span> <span class="n">partial</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="kn">import</span> <span class="n">glob</span>
<span class="kn">import</span> <span class="nn">logging</span>
<span class="kn">import</span> <span class="nn">multiprocessing</span>
<span class="c1"># We use a multiprocessing Pool for uploads so that we can cancel them with a</span>
<span class="c1"># simple SIGINT, which should bubble down to subprocesses.</span>
<span class="kn">from</span> <span class="nn">multiprocessing</span> <span class="k">import</span> <span class="n">Pool</span>
<span class="kn">from</span> <span class="nn">multiprocessing</span> <span class="kn">import</span> <span class="n">Pool</span>
<span class="c1"># multiprocessing.dummy is to threads as multiprocessing is to processes.</span>
<span class="c1"># Since daemonic processes can&#39;t have children, we use a thread to monitor the</span>
<span class="c1"># upload pool.</span>
<span class="kn">from</span> <span class="nn">multiprocessing.dummy</span> <span class="k">import</span> <span class="n">Process</span>
<span class="kn">from</span> <span class="nn">multiprocessing.dummy</span> <span class="kn">import</span> <span class="n">Process</span>
<span class="kn">from</span> <span class="nn">operator</span> <span class="k">import</span> <span class="n">attrgetter</span>
<span class="kn">from</span> <span class="nn">operator</span> <span class="kn">import</span> <span class="n">attrgetter</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">stat</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="kn">import</span> <span class="nn">pylorax.api.toml</span> <span class="k">as</span> <span class="nn">toml</span>
<span class="kn">from</span> <span class="nn">lifted.upload</span> <span class="k">import</span> <span class="n">Upload</span>
<span class="kn">from</span> <span class="nn">lifted.providers</span> <span class="k">import</span> <span class="n">resolve_playbook_path</span><span class="p">,</span> <span class="n">validate_settings</span>
<span class="kn">from</span> <span class="nn">lifted.upload</span> <span class="kn">import</span> <span class="n">Upload</span>
<span class="kn">from</span> <span class="nn">lifted.providers</span> <span class="kn">import</span> <span class="n">resolve_playbook_path</span><span class="p">,</span> <span class="n">validate_settings</span>
<span class="c1"># the maximum number of simultaneous uploads</span>
<span class="n">SIMULTANEOUS_UPLOADS</span> <span class="o">=</span> <span class="mi">1</span>
@ -216,7 +215,7 @@
<span class="c1"># Make sure no path elements are present</span>
<span class="n">uuid</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">uuid</span><span class="p">)</span>
<span class="n">path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">_get_queue_path</span><span class="p">(</span><span class="n">ucfg</span><span class="p">),</span> <span class="n">f</span><span class="s2">&quot;</span><span class="si">{uuid}</span><span class="s2">.toml&quot;</span><span class="p">)</span>
<span class="n">path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">_get_queue_path</span><span class="p">(</span><span class="n">ucfg</span><span class="p">),</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">uuid</span><span class="si">}</span><span class="s2">.toml&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">write</span> <span class="ow">and</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">path</span><span class="p">):</span>
<span class="nb">open</span><span class="p">(</span><span class="n">path</span><span class="p">,</span> <span class="s2">&quot;a&quot;</span><span class="p">)</span><span class="o">.</span><span class="n">close</span><span class="p">()</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">path</span><span class="p">):</span>
@ -261,10 +260,10 @@
<span class="k">return</span> <span class="n">Upload</span><span class="p">(</span><span class="o">**</span><span class="n">toml</span><span class="o">.</span><span class="n">load</span><span class="p">(</span><span class="n">upload_file</span><span class="p">))</span>
<span class="k">except</span> <span class="ne">FileNotFoundError</span> <span class="k">as</span> <span class="n">error</span><span class="p">:</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">ignore_missing</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;Could not find upload </span><span class="si">{uuid}</span><span class="s2">!&quot;</span><span class="p">)</span> <span class="kn">from</span> <span class="nn">error</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Could not find upload </span><span class="si">{</span><span class="n">uuid</span><span class="si">}</span><span class="s2">!&quot;</span><span class="p">)</span> <span class="kn">from</span> <span class="nn">error</span>
<span class="k">except</span> <span class="n">toml</span><span class="o">.</span><span class="n">TomlError</span> <span class="k">as</span> <span class="n">error</span><span class="p">:</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">ignore_corrupt</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;Could not parse upload </span><span class="si">{uuid}</span><span class="s2">!&quot;</span><span class="p">)</span> <span class="kn">from</span> <span class="nn">error</span></div>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Could not parse upload </span><span class="si">{</span><span class="n">uuid</span><span class="si">}</span><span class="s2">!&quot;</span><span class="p">)</span> <span class="kn">from</span> <span class="nn">error</span></div>
<div class="viewcode-block" id="get_uploads"><a class="viewcode-back" href="../../lifted.html#lifted.queue.get_uploads">[docs]</a><span class="k">def</span> <span class="nf">get_uploads</span><span class="p">(</span><span class="n">ucfg</span><span class="p">,</span> <span class="n">uuids</span><span class="p">):</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>lifted.upload &mdash; Lorax 33.2 documentation</title>
<title>lifted.upload &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -172,15 +171,15 @@
<span class="c1"># along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<span class="c1">#</span>
<span class="kn">from</span> <span class="nn">datetime</span> <span class="k">import</span> <span class="n">datetime</span>
<span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">datetime</span>
<span class="kn">import</span> <span class="nn">logging</span>
<span class="kn">from</span> <span class="nn">multiprocessing</span> <span class="k">import</span> <span class="n">current_process</span>
<span class="kn">from</span> <span class="nn">multiprocessing</span> <span class="kn">import</span> <span class="n">current_process</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">signal</span>
<span class="kn">from</span> <span class="nn">uuid</span> <span class="k">import</span> <span class="n">uuid4</span>
<span class="kn">from</span> <span class="nn">uuid</span> <span class="kn">import</span> <span class="n">uuid4</span>
<span class="kn">from</span> <span class="nn">ansible_runner.interface</span> <span class="k">import</span> <span class="n">run</span> <span class="k">as</span> <span class="n">ansible_run</span>
<span class="kn">from</span> <span class="nn">ansible_runner.exceptions</span> <span class="k">import</span> <span class="n">AnsibleRunnerException</span>
<span class="kn">from</span> <span class="nn">ansible_runner.interface</span> <span class="kn">import</span> <span class="n">run</span> <span class="k">as</span> <span class="n">ansible_run</span>
<span class="kn">from</span> <span class="nn">ansible_runner.exceptions</span> <span class="kn">import</span> <span class="n">AnsibleRunnerException</span>
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;lifted&quot;</span><span class="p">)</span>
@ -190,7 +189,7 @@
<span class="sd"> class are serialized as TOML and stored in the upload queue directory,</span>
<span class="sd"> which is /var/lib/lorax/upload/queue/ by default&quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span>
<span class="bp">self</span><span class="p">,</span>
<span class="n">uuid</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">provider_name</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
@ -232,7 +231,7 @@
<span class="c1"># Log multi-line messages as individual log lines</span>
<span class="k">for</span> <span class="n">m</span> <span class="ow">in</span> <span class="n">messages</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="n">m</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">upload_log</span> <span class="o">+=</span> <span class="n">f</span><span class="s2">&quot;</span><span class="si">{message}</span><span class="se">\n</span><span class="s2">&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">upload_log</span> <span class="o">+=</span> <span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">message</span><span class="si">}</span><span class="se">\n</span><span class="s2">&quot;</span>
<span class="k">if</span> <span class="n">callback</span><span class="p">:</span>
<span class="n">callback</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
@ -294,9 +293,9 @@
<span class="sd"> :type status_callback: function</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_cancellable</span><span class="p">():</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;Can&#39;t reset, status is </span><span class="si">{self.status}</span><span class="s2">!&quot;</span><span class="p">)</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Can&#39;t reset, status is </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">status</span><span class="si">}</span><span class="s2">!&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">image_path</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;Can&#39;t reset, no image supplied yet!&quot;</span><span class="p">)</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;Can&#39;t reset, no image supplied yet!&quot;</span><span class="p">)</span>
<span class="c1"># self.error = None</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_log</span><span class="p">(</span><span class="s2">&quot;Resetting state&quot;</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">set_status</span><span class="p">(</span><span class="s2">&quot;READY&quot;</span><span class="p">,</span> <span class="n">status_callback</span><span class="p">)</span></div>
@ -316,7 +315,7 @@
<span class="sd"> :type status_callback: function</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">is_cancellable</span><span class="p">():</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;Can&#39;t cancel, status is already </span><span class="si">{self.status}</span><span class="s2">!&quot;</span><span class="p">)</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Can&#39;t cancel, status is already </span><span class="si">{</span><span class="bp">self</span><span class="o">.</span><span class="n">status</span><span class="si">}</span><span class="s2">!&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">upload_pid</span><span class="p">:</span>
<span class="n">os</span><span class="o">.</span><span class="n">kill</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">upload_pid</span><span class="p">,</span> <span class="n">signal</span><span class="o">.</span><span class="n">SIGINT</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">set_status</span><span class="p">(</span><span class="s2">&quot;CANCELLED&quot;</span><span class="p">,</span> <span class="n">status_callback</span><span class="p">)</span></div>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax &mdash; Lorax 33.2 documentation</title>
<title>pylorax &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../product-images.html">Product and Updates Images</a></li>
@ -189,22 +188,22 @@
<span class="kn">import</span> <span class="nn">configparser</span>
<span class="kn">import</span> <span class="nn">tempfile</span>
<span class="kn">import</span> <span class="nn">locale</span>
<span class="kn">from</span> <span class="nn">subprocess</span> <span class="k">import</span> <span class="n">CalledProcessError</span>
<span class="kn">from</span> <span class="nn">subprocess</span> <span class="kn">import</span> <span class="n">CalledProcessError</span>
<span class="kn">import</span> <span class="nn">selinux</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="k">import</span> <span class="n">glob</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="kn">import</span> <span class="n">glob</span>
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="k">import</span> <span class="n">BaseLoraxClass</span><span class="p">,</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="kn">import</span> <span class="n">BaseLoraxClass</span><span class="p">,</span> <span class="n">DataHolder</span>
<span class="kn">import</span> <span class="nn">pylorax.output</span> <span class="k">as</span> <span class="nn">output</span>
<span class="kn">import</span> <span class="nn">dnf</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span><span class="p">,</span> <span class="n">remove</span><span class="p">,</span> <span class="n">linktree</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span><span class="p">,</span> <span class="n">remove</span><span class="p">,</span> <span class="n">linktree</span>
<span class="kn">from</span> <span class="nn">pylorax.treebuilder</span> <span class="k">import</span> <span class="n">RuntimeBuilder</span><span class="p">,</span> <span class="n">TreeBuilder</span>
<span class="kn">from</span> <span class="nn">pylorax.buildstamp</span> <span class="k">import</span> <span class="n">BuildStamp</span>
<span class="kn">from</span> <span class="nn">pylorax.treeinfo</span> <span class="k">import</span> <span class="n">TreeInfo</span>
<span class="kn">from</span> <span class="nn">pylorax.discinfo</span> <span class="k">import</span> <span class="n">DiscInfo</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="k">import</span> <span class="n">runcmd</span><span class="p">,</span> <span class="n">runcmd_output</span>
<span class="kn">from</span> <span class="nn">pylorax.treebuilder</span> <span class="kn">import</span> <span class="n">RuntimeBuilder</span><span class="p">,</span> <span class="n">TreeBuilder</span>
<span class="kn">from</span> <span class="nn">pylorax.buildstamp</span> <span class="kn">import</span> <span class="n">BuildStamp</span>
<span class="kn">from</span> <span class="nn">pylorax.treeinfo</span> <span class="kn">import</span> <span class="n">TreeInfo</span>
<span class="kn">from</span> <span class="nn">pylorax.discinfo</span> <span class="kn">import</span> <span class="n">DiscInfo</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="kn">import</span> <span class="n">runcmd</span><span class="p">,</span> <span class="n">runcmd_output</span>
<span class="c1"># get lorax version</span>
@ -226,7 +225,7 @@
<span class="n">ppc64le</span><span class="o">=</span><span class="s2">&quot;powerpc&quot;</span><span class="p">,</span>
<span class="n">arm</span><span class="o">=</span><span class="s2">&quot;arm&quot;</span><span class="p">,</span> <span class="n">armhfp</span><span class="o">=</span><span class="s2">&quot;arm&quot;</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">buildarch</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">buildarch</span><span class="p">):</span>
<span class="nb">super</span><span class="p">(</span><span class="n">ArchData</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">buildarch</span> <span class="o">=</span> <span class="n">buildarch</span>
<span class="bp">self</span><span class="o">.</span><span class="n">basearch</span> <span class="o">=</span> <span class="n">dnf</span><span class="o">.</span><span class="n">rpm</span><span class="o">.</span><span class="n">basearch</span><span class="p">(</span><span class="n">buildarch</span><span class="p">)</span>
@ -235,7 +234,7 @@
<div class="viewcode-block" id="Lorax"><a class="viewcode-back" href="../pylorax.html#pylorax.Lorax">[docs]</a><span class="k">class</span> <span class="nc">Lorax</span><span class="p">(</span><span class="n">BaseLoraxClass</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">BaseLoraxClass</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_configured</span> <span class="o">=</span> <span class="kc">False</span>
<span class="bp">self</span><span class="o">.</span><span class="n">product</span> <span class="o">=</span> <span class="kc">None</span>
@ -476,14 +475,18 @@
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;no BCJ filter for arch </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">arch</span><span class="o">.</span><span class="n">basearch</span><span class="p">)</span>
<span class="k">if</span> <span class="n">squashfs_only</span><span class="p">:</span>
<span class="c1"># Create an ext4 rootfs.img and compress it with squashfs</span>
<span class="n">rb</span><span class="o">.</span><span class="n">create_squashfs_runtime</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">installroot</span><span class="p">,</span><span class="n">runtime</span><span class="p">),</span>
<span class="n">compression</span><span class="o">=</span><span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="n">compressargs</span><span class="p">,</span>
<span class="n">size</span><span class="o">=</span><span class="n">size</span><span class="p">)</span>
<span class="n">rc</span> <span class="o">=</span> <span class="n">rb</span><span class="o">.</span><span class="n">create_squashfs_runtime</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">installroot</span><span class="p">,</span><span class="n">runtime</span><span class="p">),</span>
<span class="n">compression</span><span class="o">=</span><span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="n">compressargs</span><span class="p">,</span>
<span class="n">size</span><span class="o">=</span><span class="n">size</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="c1"># Create an ext4 rootfs.img and compress it with squashfs</span>
<span class="n">rb</span><span class="o">.</span><span class="n">create_ext4_runtime</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">installroot</span><span class="p">,</span><span class="n">runtime</span><span class="p">),</span>
<span class="n">compression</span><span class="o">=</span><span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="n">compressargs</span><span class="p">,</span>
<span class="n">size</span><span class="o">=</span><span class="n">size</span><span class="p">)</span>
<span class="n">rc</span> <span class="o">=</span> <span class="n">rb</span><span class="o">.</span><span class="n">create_ext4_runtime</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">installroot</span><span class="p">,</span><span class="n">runtime</span><span class="p">),</span>
<span class="n">compression</span><span class="o">=</span><span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="n">compressargs</span><span class="p">,</span>
<span class="n">size</span><span class="o">=</span><span class="n">size</span><span class="p">)</span>
<span class="k">if</span> <span class="n">rc</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">logger</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;rootfs.img creation failed. See program.log&quot;</span><span class="p">)</span>
<span class="n">sys</span><span class="o">.</span><span class="n">exit</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="n">rb</span><span class="o">.</span><span class="n">finished</span><span class="p">()</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;preparing to build output tree and boot images&quot;</span><span class="p">)</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.bisect &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.bisect &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.checkparams &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.checkparams &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -177,8 +176,8 @@
<span class="kn">import</span> <span class="nn">logging</span>
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;lorax-composer&quot;</span><span class="p">)</span>
<span class="kn">from</span> <span class="nn">flask</span> <span class="k">import</span> <span class="n">jsonify</span>
<span class="kn">from</span> <span class="nn">functools</span> <span class="k">import</span> <span class="n">update_wrapper</span>
<span class="kn">from</span> <span class="nn">flask</span> <span class="kn">import</span> <span class="n">jsonify</span>
<span class="kn">from</span> <span class="nn">functools</span> <span class="kn">import</span> <span class="n">update_wrapper</span>
<span class="c1"># A decorator for checking the parameters provided to the API route implementing</span>
<span class="c1"># functions. The tuples parameter is a list of tuples. Each tuple is the string</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.cmdline &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.cmdline &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -179,7 +178,7 @@
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">argparse</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="k">import</span> <span class="n">vernum</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="kn">import</span> <span class="n">vernum</span>
<span class="n">DEFAULT_USER</span> <span class="o">=</span> <span class="s2">&quot;root&quot;</span>
<span class="n">DEFAULT_GROUP</span> <span class="o">=</span> <span class="s2">&quot;weldr&quot;</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.compose &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.compose &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -193,27 +192,27 @@
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;lorax-composer&quot;</span><span class="p">)</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="k">import</span> <span class="n">glob</span>
<span class="kn">from</span> <span class="nn">io</span> <span class="k">import</span> <span class="n">StringIO</span>
<span class="kn">from</span> <span class="nn">math</span> <span class="k">import</span> <span class="n">ceil</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="kn">import</span> <span class="n">glob</span>
<span class="kn">from</span> <span class="nn">io</span> <span class="kn">import</span> <span class="n">StringIO</span>
<span class="kn">from</span> <span class="nn">math</span> <span class="kn">import</span> <span class="n">ceil</span>
<span class="kn">import</span> <span class="nn">shutil</span>
<span class="kn">from</span> <span class="nn">uuid</span> <span class="k">import</span> <span class="n">uuid4</span>
<span class="kn">from</span> <span class="nn">uuid</span> <span class="kn">import</span> <span class="n">uuid4</span>
<span class="c1"># Use pykickstart to calculate disk image size</span>
<span class="kn">from</span> <span class="nn">pykickstart.parser</span> <span class="k">import</span> <span class="n">KickstartParser</span>
<span class="kn">from</span> <span class="nn">pykickstart.version</span> <span class="k">import</span> <span class="n">makeVersion</span>
<span class="kn">from</span> <span class="nn">pykickstart.parser</span> <span class="kn">import</span> <span class="n">KickstartParser</span>
<span class="kn">from</span> <span class="nn">pykickstart.version</span> <span class="kn">import</span> <span class="n">makeVersion</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="k">import</span> <span class="n">ArchData</span><span class="p">,</span> <span class="n">find_templates</span><span class="p">,</span> <span class="n">get_buildarch</span>
<span class="kn">from</span> <span class="nn">pylorax.api.gitrpm</span> <span class="k">import</span> <span class="n">create_gitrpm_repo</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="k">import</span> <span class="n">projects_depsolve</span><span class="p">,</span> <span class="n">projects_depsolve_with_size</span><span class="p">,</span> <span class="n">dep_nevra</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="k">import</span> <span class="n">ProjectsError</span>
<span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="k">import</span> <span class="n">read_recipe_and_id</span>
<span class="kn">from</span> <span class="nn">pylorax.api.timestamp</span> <span class="k">import</span> <span class="n">TS_CREATED</span><span class="p">,</span> <span class="n">write_timestamp</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="kn">import</span> <span class="n">ArchData</span><span class="p">,</span> <span class="n">find_templates</span><span class="p">,</span> <span class="n">get_buildarch</span>
<span class="kn">from</span> <span class="nn">pylorax.api.gitrpm</span> <span class="kn">import</span> <span class="n">create_gitrpm_repo</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="kn">import</span> <span class="n">projects_depsolve</span><span class="p">,</span> <span class="n">projects_depsolve_with_size</span><span class="p">,</span> <span class="n">dep_nevra</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="kn">import</span> <span class="n">ProjectsError</span>
<span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="kn">import</span> <span class="n">read_recipe_and_id</span>
<span class="kn">from</span> <span class="nn">pylorax.api.timestamp</span> <span class="kn">import</span> <span class="n">TS_CREATED</span><span class="p">,</span> <span class="n">write_timestamp</span>
<span class="kn">import</span> <span class="nn">pylorax.api.toml</span> <span class="k">as</span> <span class="nn">toml</span>
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="k">import</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="k">import</span> <span class="n">default_image_name</span>
<span class="kn">from</span> <span class="nn">pylorax.ltmpl</span> <span class="k">import</span> <span class="n">LiveTemplateRunner</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span><span class="p">,</span> <span class="n">flatconfig</span>
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="kn">import</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">default_image_name</span>
<span class="kn">from</span> <span class="nn">pylorax.ltmpl</span> <span class="kn">import</span> <span class="n">LiveTemplateRunner</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span><span class="p">,</span> <span class="n">flatconfig</span>
<div class="viewcode-block" id="test_templates"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.compose.test_templates">[docs]</a><span class="k">def</span> <span class="nf">test_templates</span><span class="p">(</span><span class="n">dbo</span><span class="p">,</span> <span class="n">share_dir</span><span class="p">):</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.config &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.config &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -178,7 +177,7 @@
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">pwd</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span>
<div class="viewcode-block" id="ComposerConfig"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.config.ComposerConfig">[docs]</a><span class="k">class</span> <span class="nc">ComposerConfig</span><span class="p">(</span><span class="n">configparser</span><span class="o">.</span><span class="n">ConfigParser</span><span class="p">):</span>
<div class="viewcode-block" id="ComposerConfig.get_default"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.config.ComposerConfig.get_default">[docs]</a> <span class="k">def</span> <span class="nf">get_default</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">section</span><span class="p">,</span> <span class="n">option</span><span class="p">,</span> <span class="n">default</span><span class="p">):</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.dnfbase &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.dnfbase &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -180,14 +179,14 @@
<span class="kn">import</span> <span class="nn">dnf</span>
<span class="kn">import</span> <span class="nn">dnf.logging</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="k">import</span> <span class="n">glob</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="kn">import</span> <span class="n">glob</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">shutil</span>
<span class="kn">from</span> <span class="nn">threading</span> <span class="k">import</span> <span class="n">Lock</span>
<span class="kn">from</span> <span class="nn">threading</span> <span class="kn">import</span> <span class="n">Lock</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="k">import</span> <span class="n">DEFAULT_PLATFORM_ID</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">flatconfig</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="kn">import</span> <span class="n">DEFAULT_PLATFORM_ID</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">flatconfig</span>
<div class="viewcode-block" id="DNFLock"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.dnfbase.DNFLock">[docs]</a><span class="k">class</span> <span class="nc">DNFLock</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Hold the dnf.Base object and a Lock to control access to it.</span>
@ -195,7 +194,7 @@
<span class="sd"> self.dbo is a property that returns the dnf.Base object, but it *may* change</span>
<span class="sd"> from one call to the next if the upstream repositories have changed.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">conf</span><span class="p">,</span> <span class="n">expire_secs</span><span class="o">=</span><span class="mi">6</span><span class="o">*</span><span class="mi">60</span><span class="o">*</span><span class="mi">60</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">conf</span><span class="p">,</span> <span class="n">expire_secs</span><span class="o">=</span><span class="mi">6</span><span class="o">*</span><span class="mi">60</span><span class="o">*</span><span class="mi">60</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_conf</span> <span class="o">=</span> <span class="n">conf</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_lock</span> <span class="o">=</span> <span class="n">Lock</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">dbo</span> <span class="o">=</span> <span class="n">get_base_object</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_conf</span><span class="p">)</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.flask_blueprint &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.flask_blueprint &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -192,11 +191,11 @@
<span class="sd">and then register v1&#39;s version of `/blueprints/list` under `/api/v1`</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="kn">from</span> <span class="nn">flask</span> <span class="k">import</span> <span class="n">Blueprint</span>
<span class="kn">from</span> <span class="nn">flask.blueprints</span> <span class="k">import</span> <span class="n">BlueprintSetupState</span>
<span class="kn">from</span> <span class="nn">flask</span> <span class="kn">import</span> <span class="n">Blueprint</span>
<span class="kn">from</span> <span class="nn">flask.blueprints</span> <span class="kn">import</span> <span class="n">BlueprintSetupState</span>
<div class="viewcode-block" id="BlueprintSetupStateSkip"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.flask_blueprint.BlueprintSetupStateSkip">[docs]</a><span class="k">class</span> <span class="nc">BlueprintSetupStateSkip</span><span class="p">(</span><span class="n">BlueprintSetupState</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">blueprint</span><span class="p">,</span> <span class="n">app</span><span class="p">,</span> <span class="n">options</span><span class="p">,</span> <span class="n">first_registration</span><span class="p">,</span> <span class="n">skip_rules</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">blueprint</span><span class="p">,</span> <span class="n">app</span><span class="p">,</span> <span class="n">options</span><span class="p">,</span> <span class="n">first_registration</span><span class="p">,</span> <span class="n">skip_rules</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_skip_rules</span> <span class="o">=</span> <span class="n">skip_rules</span>
<span class="nb">super</span><span class="p">(</span><span class="n">BlueprintSetupStateSkip</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="n">blueprint</span><span class="p">,</span> <span class="n">app</span><span class="p">,</span> <span class="n">options</span><span class="p">,</span> <span class="n">first_registration</span><span class="p">)</span>
@ -205,7 +204,7 @@
<span class="nb">super</span><span class="p">(</span><span class="n">BlueprintSetupStateSkip</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="n">add_url_rule</span><span class="p">(</span><span class="n">rule</span><span class="p">,</span> <span class="n">endpoint</span><span class="p">,</span> <span class="n">view_func</span><span class="p">,</span> <span class="o">**</span><span class="n">options</span><span class="p">)</span></div></div>
<div class="viewcode-block" id="BlueprintSkip"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.flask_blueprint.BlueprintSkip">[docs]</a><span class="k">class</span> <span class="nc">BlueprintSkip</span><span class="p">(</span><span class="n">Blueprint</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="nb">super</span><span class="p">(</span><span class="n">BlueprintSkip</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>
<div class="viewcode-block" id="BlueprintSkip.make_setup_state"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.flask_blueprint.BlueprintSkip.make_setup_state">[docs]</a> <span class="k">def</span> <span class="nf">make_setup_state</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">app</span><span class="p">,</span> <span class="n">options</span><span class="p">,</span> <span class="n">first_registration</span><span class="o">=</span><span class="kc">False</span><span class="p">):</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.gitrpm &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.gitrpm &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -182,13 +181,13 @@
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;lorax-composer&quot;</span><span class="p">)</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">rpmfluff</span> <span class="k">import</span> <span class="n">SimpleRpmBuild</span>
<span class="kn">from</span> <span class="nn">rpmfluff</span> <span class="kn">import</span> <span class="n">SimpleRpmBuild</span>
<span class="kn">import</span> <span class="nn">shutil</span>
<span class="kn">import</span> <span class="nn">subprocess</span>
<span class="kn">import</span> <span class="nn">tempfile</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span>
<div class="viewcode-block" id="get_repo_description"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.gitrpm.get_repo_description">[docs]</a><span class="k">def</span> <span class="nf">get_repo_description</span><span class="p">(</span><span class="n">gitRepo</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot; Return a description including the git repo and reference</span>
@ -202,7 +201,7 @@
<div class="viewcode-block" id="GitArchiveTarball"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.gitrpm.GitArchiveTarball">[docs]</a><span class="k">class</span> <span class="nc">GitArchiveTarball</span><span class="p">:</span>
<span class="sd">&quot;&quot;&quot;Create a git archive of the selected git repo and reference&quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">gitRepo</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">gitRepo</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_gitRepo</span> <span class="o">=</span> <span class="n">gitRepo</span>
<span class="bp">self</span><span class="o">.</span><span class="n">sourceName</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_gitRepo</span><span class="p">[</span><span class="s2">&quot;rpmname&quot;</span><span class="p">]</span><span class="o">+</span><span class="s2">&quot;.tar.xz&quot;</span>
@ -248,7 +247,7 @@
<div class="viewcode-block" id="GitRpmBuild"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.gitrpm.GitRpmBuild">[docs]</a><span class="k">class</span> <span class="nc">GitRpmBuild</span><span class="p">(</span><span class="n">SimpleRpmBuild</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Build an rpm containing files from a git repository&quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_base_dir</span> <span class="o">=</span> <span class="kc">None</span>
<span class="nb">super</span><span class="p">()</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.projects &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.projects &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -176,14 +175,14 @@
<span class="kn">import</span> <span class="nn">logging</span>
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;lorax-composer&quot;</span><span class="p">)</span>
<span class="kn">from</span> <span class="nn">configparser</span> <span class="k">import</span> <span class="n">ConfigParser</span>
<span class="kn">from</span> <span class="nn">configparser</span> <span class="kn">import</span> <span class="n">ConfigParser</span>
<span class="kn">import</span> <span class="nn">dnf</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="k">import</span> <span class="n">glob</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="kn">import</span> <span class="n">glob</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="kn">from</span> <span class="nn">pylorax.api.bisect</span> <span class="k">import</span> <span class="n">insort_left</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span>
<span class="kn">from</span> <span class="nn">pylorax.api.bisect</span> <span class="kn">import</span> <span class="n">insort_left</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span>
<span class="n">TIME_FORMAT</span> <span class="o">=</span> <span class="s2">&quot;%Y-%m-</span><span class="si">%d</span><span class="s2">T%H:%M:%S&quot;</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.queue &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.queue &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -180,24 +179,24 @@
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">grp</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="k">import</span> <span class="n">glob</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="kn">import</span> <span class="n">glob</span>
<span class="kn">import</span> <span class="nn">multiprocessing</span> <span class="k">as</span> <span class="nn">mp</span>
<span class="kn">import</span> <span class="nn">pwd</span>
<span class="kn">import</span> <span class="nn">shutil</span>
<span class="kn">import</span> <span class="nn">subprocess</span>
<span class="kn">from</span> <span class="nn">subprocess</span> <span class="k">import</span> <span class="n">Popen</span><span class="p">,</span> <span class="n">PIPE</span>
<span class="kn">from</span> <span class="nn">subprocess</span> <span class="kn">import</span> <span class="n">Popen</span><span class="p">,</span> <span class="n">PIPE</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="k">import</span> <span class="n">find_templates</span>
<span class="kn">from</span> <span class="nn">pylorax.api.compose</span> <span class="k">import</span> <span class="n">move_compose_results</span>
<span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="k">import</span> <span class="n">recipe_from_file</span>
<span class="kn">from</span> <span class="nn">pylorax.api.timestamp</span> <span class="k">import</span> <span class="n">TS_CREATED</span><span class="p">,</span> <span class="n">TS_STARTED</span><span class="p">,</span> <span class="n">TS_FINISHED</span><span class="p">,</span> <span class="n">write_timestamp</span><span class="p">,</span> <span class="n">timestamp_dict</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="kn">import</span> <span class="n">find_templates</span>
<span class="kn">from</span> <span class="nn">pylorax.api.compose</span> <span class="kn">import</span> <span class="n">move_compose_results</span>
<span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="kn">import</span> <span class="n">recipe_from_file</span>
<span class="kn">from</span> <span class="nn">pylorax.api.timestamp</span> <span class="kn">import</span> <span class="n">TS_CREATED</span><span class="p">,</span> <span class="n">TS_STARTED</span><span class="p">,</span> <span class="n">TS_FINISHED</span><span class="p">,</span> <span class="n">write_timestamp</span><span class="p">,</span> <span class="n">timestamp_dict</span>
<span class="kn">import</span> <span class="nn">pylorax.api.toml</span> <span class="k">as</span> <span class="nn">toml</span>
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="k">import</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.creator</span> <span class="k">import</span> <span class="n">run_creator</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span><span class="p">,</span> <span class="n">read_tail</span>
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="kn">import</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.creator</span> <span class="kn">import</span> <span class="n">run_creator</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span><span class="p">,</span> <span class="n">read_tail</span>
<span class="kn">from</span> <span class="nn">lifted.queue</span> <span class="k">import</span> <span class="n">create_upload</span><span class="p">,</span> <span class="n">get_uploads</span><span class="p">,</span> <span class="n">ready_upload</span><span class="p">,</span> <span class="n">delete_upload</span>
<span class="kn">from</span> <span class="nn">lifted.queue</span> <span class="kn">import</span> <span class="n">create_upload</span><span class="p">,</span> <span class="n">get_uploads</span><span class="p">,</span> <span class="n">ready_upload</span><span class="p">,</span> <span class="n">delete_upload</span>
<div class="viewcode-block" id="check_queues"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.queue.check_queues">[docs]</a><span class="k">def</span> <span class="nf">check_queues</span><span class="p">(</span><span class="n">cfg</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Check to make sure the new and run queue symlinks are correct</span>
@ -634,7 +633,7 @@
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">results_dir</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">cfg</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;composer&quot;</span><span class="p">,</span> <span class="s2">&quot;lib_dir&quot;</span><span class="p">),</span> <span class="s2">&quot;results&quot;</span><span class="p">,</span> <span class="n">uuid</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">isdir</span><span class="p">(</span><span class="n">results_dir</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">f</span><span class="s1">&#39;&quot;</span><span class="si">{uuid}</span><span class="s1">&quot; is not a valid build uuid!&#39;</span><span class="p">)</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;&quot;</span><span class="si">{</span><span class="n">uuid</span><span class="si">}</span><span class="s1">&quot; is not a valid build uuid!&#39;</span><span class="p">)</span>
<span class="k">return</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">results_dir</span><span class="p">,</span> <span class="s2">&quot;UPLOADS&quot;</span><span class="p">)</span>
<div class="viewcode-block" id="uuid_schedule_upload"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.queue.uuid_schedule_upload">[docs]</a><span class="k">def</span> <span class="nf">uuid_schedule_upload</span><span class="p">(</span><span class="n">cfg</span><span class="p">,</span> <span class="n">uuid</span><span class="p">,</span> <span class="n">provider_name</span><span class="p">,</span> <span class="n">image_name</span><span class="p">,</span> <span class="n">settings</span><span class="p">):</span>
@ -656,7 +655,7 @@
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">status</span> <span class="o">=</span> <span class="n">uuid_status</span><span class="p">(</span><span class="n">cfg</span><span class="p">,</span> <span class="n">uuid</span><span class="p">)</span>
<span class="k">if</span> <span class="n">status</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">f</span><span class="s1">&#39;&quot;</span><span class="si">{uuid}</span><span class="s1">&quot; is not a valid build uuid!&#39;</span><span class="p">)</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;&quot;</span><span class="si">{</span><span class="n">uuid</span><span class="si">}</span><span class="s1">&quot; is not a valid build uuid!&#39;</span><span class="p">)</span>
<span class="n">upload</span> <span class="o">=</span> <span class="n">create_upload</span><span class="p">(</span><span class="n">cfg</span><span class="p">[</span><span class="s2">&quot;upload&quot;</span><span class="p">],</span> <span class="n">provider_name</span><span class="p">,</span> <span class="n">image_name</span><span class="p">,</span> <span class="n">settings</span><span class="p">)</span>
<span class="n">uuid_add_upload</span><span class="p">(</span><span class="n">cfg</span><span class="p">,</span> <span class="n">uuid</span><span class="p">,</span> <span class="n">upload</span><span class="o">.</span><span class="n">uuid</span><span class="p">)</span>
@ -719,7 +718,7 @@
<span class="nb">print</span><span class="p">(</span><span class="n">upload</span><span class="p">,</span> <span class="n">file</span><span class="o">=</span><span class="n">uploads_file</span><span class="p">)</span>
<span class="k">return</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;</span><span class="si">{upload_uuid}</span><span class="s2"> is not a valid upload id!&quot;</span><span class="p">)</span></div>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">upload_uuid</span><span class="si">}</span><span class="s2"> is not a valid upload id!&quot;</span><span class="p">)</span></div>
<div class="viewcode-block" id="uuid_ready_upload"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.queue.uuid_ready_upload">[docs]</a><span class="k">def</span> <span class="nf">uuid_ready_upload</span><span class="p">(</span><span class="n">cfg</span><span class="p">,</span> <span class="n">uuid</span><span class="p">,</span> <span class="n">upload_uuid</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Set an upload to READY if the build is in FINISHED state</span>
@ -736,9 +735,9 @@
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">status</span> <span class="o">=</span> <span class="n">uuid_status</span><span class="p">(</span><span class="n">cfg</span><span class="p">,</span> <span class="n">uuid</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">status</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;</span><span class="si">{uuid}</span><span class="s2"> is not a valid build id!&quot;</span><span class="p">)</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">uuid</span><span class="si">}</span><span class="s2"> is not a valid build id!&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">status</span><span class="p">[</span><span class="s2">&quot;queue_status&quot;</span><span class="p">]</span> <span class="o">!=</span> <span class="s2">&quot;FINISHED&quot;</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;Build </span><span class="si">{uuid}</span><span class="s2"> is not finished!&quot;</span><span class="p">)</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Build </span><span class="si">{</span><span class="n">uuid</span><span class="si">}</span><span class="s2"> is not finished!&quot;</span><span class="p">)</span>
<span class="n">_</span><span class="p">,</span> <span class="n">image_path</span> <span class="o">=</span> <span class="n">uuid_image</span><span class="p">(</span><span class="n">cfg</span><span class="p">,</span> <span class="n">uuid</span><span class="p">)</span>
<span class="n">ready_upload</span><span class="p">(</span><span class="n">cfg</span><span class="p">[</span><span class="s2">&quot;upload&quot;</span><span class="p">],</span> <span class="n">upload_uuid</span><span class="p">,</span> <span class="n">image_path</span><span class="p">)</span></div>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.recipes &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.recipes &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -176,16 +175,16 @@
<span class="kn">import</span> <span class="nn">gi</span>
<span class="n">gi</span><span class="o">.</span><span class="n">require_version</span><span class="p">(</span><span class="s2">&quot;Ggit&quot;</span><span class="p">,</span> <span class="s2">&quot;1.0&quot;</span><span class="p">)</span>
<span class="kn">from</span> <span class="nn">gi.repository</span> <span class="k">import</span> <span class="n">Ggit</span> <span class="k">as</span> <span class="n">Git</span>
<span class="kn">from</span> <span class="nn">gi.repository</span> <span class="k">import</span> <span class="n">Gio</span>
<span class="kn">from</span> <span class="nn">gi.repository</span> <span class="k">import</span> <span class="n">GLib</span>
<span class="kn">from</span> <span class="nn">gi.repository</span> <span class="kn">import</span> <span class="n">Ggit</span> <span class="k">as</span> <span class="n">Git</span>
<span class="kn">from</span> <span class="nn">gi.repository</span> <span class="kn">import</span> <span class="n">Gio</span>
<span class="kn">from</span> <span class="nn">gi.repository</span> <span class="kn">import</span> <span class="n">GLib</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">semantic_version</span> <span class="k">as</span> <span class="nn">semver</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="k">import</span> <span class="n">dep_evra</span>
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="k">import</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="kn">import</span> <span class="n">dep_evra</span>
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="kn">import</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span>
<span class="kn">import</span> <span class="nn">pylorax.api.toml</span> <span class="k">as</span> <span class="nn">toml</span>
@ -206,7 +205,7 @@
<span class="sd"> and adds a .filename property to return the recipe&#39;s filename,</span>
<span class="sd"> and a .toml() function to return the recipe as a TOML string.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">description</span><span class="p">,</span> <span class="n">version</span><span class="p">,</span> <span class="n">modules</span><span class="p">,</span> <span class="n">packages</span><span class="p">,</span> <span class="n">groups</span><span class="p">,</span> <span class="n">customizations</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">gitrepos</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">description</span><span class="p">,</span> <span class="n">version</span><span class="p">,</span> <span class="n">modules</span><span class="p">,</span> <span class="n">packages</span><span class="p">,</span> <span class="n">groups</span><span class="p">,</span> <span class="n">customizations</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">gitrepos</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="c1"># Check that version is empty or semver compatible</span>
<span class="k">if</span> <span class="n">version</span><span class="p">:</span>
<span class="n">semver</span><span class="o">.</span><span class="n">Version</span><span class="p">(</span><span class="n">version</span><span class="p">)</span>
@ -347,14 +346,14 @@
<span class="n">new_modules</span><span class="p">,</span> <span class="n">new_packages</span><span class="p">,</span> <span class="n">new_groups</span><span class="p">,</span> <span class="n">customizations</span><span class="p">,</span> <span class="n">gitrepos</span><span class="p">)</span></div></div>
<div class="viewcode-block" id="RecipeModule"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.recipes.RecipeModule">[docs]</a><span class="k">class</span> <span class="nc">RecipeModule</span><span class="p">(</span><span class="nb">dict</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">version</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">,</span> <span class="n">version</span><span class="p">):</span>
<span class="nb">dict</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="n">name</span><span class="p">,</span> <span class="n">version</span><span class="o">=</span><span class="n">version</span><span class="p">)</span></div>
<div class="viewcode-block" id="RecipePackage"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.recipes.RecipePackage">[docs]</a><span class="k">class</span> <span class="nc">RecipePackage</span><span class="p">(</span><span class="n">RecipeModule</span><span class="p">):</span>
<span class="k">pass</span></div>
<div class="viewcode-block" id="RecipeGroup"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.recipes.RecipeGroup">[docs]</a><span class="k">class</span> <span class="nc">RecipeGroup</span><span class="p">(</span><span class="nb">dict</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="p">):</span>
<span class="nb">dict</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="n">name</span><span class="p">)</span></div>
<div class="viewcode-block" id="NewRecipeGit"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.recipes.NewRecipeGit">[docs]</a><span class="k">def</span> <span class="nf">NewRecipeGit</span><span class="p">(</span><span class="n">toml_dict</span><span class="p">):</span>
@ -401,7 +400,7 @@
<span class="n">toml_dict</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;destination&quot;</span><span class="p">))</span></div>
<div class="viewcode-block" id="RecipeGit"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.recipes.RecipeGit">[docs]</a><span class="k">class</span> <span class="nc">RecipeGit</span><span class="p">(</span><span class="nb">dict</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">rpmname</span><span class="p">,</span> <span class="n">rpmversion</span><span class="p">,</span> <span class="n">rpmrelease</span><span class="p">,</span> <span class="n">summary</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="n">ref</span><span class="p">,</span> <span class="n">destination</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">rpmname</span><span class="p">,</span> <span class="n">rpmversion</span><span class="p">,</span> <span class="n">rpmrelease</span><span class="p">,</span> <span class="n">summary</span><span class="p">,</span> <span class="n">repo</span><span class="p">,</span> <span class="n">ref</span><span class="p">,</span> <span class="n">destination</span><span class="p">):</span>
<span class="nb">dict</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">rpmname</span><span class="o">=</span><span class="n">rpmname</span><span class="p">,</span> <span class="n">rpmversion</span><span class="o">=</span><span class="n">rpmversion</span><span class="p">,</span> <span class="n">rpmrelease</span><span class="o">=</span><span class="n">rpmrelease</span><span class="p">,</span>
<span class="n">summary</span><span class="o">=</span><span class="n">summary</span><span class="p">,</span> <span class="n">repo</span><span class="o">=</span><span class="n">repo</span><span class="p">,</span> <span class="n">ref</span><span class="o">=</span><span class="n">ref</span><span class="p">,</span> <span class="n">destination</span><span class="o">=</span><span class="n">destination</span><span class="p">)</span></div>
@ -1121,7 +1120,7 @@
<span class="k">return</span> <span class="kc">None</span></div>
<div class="viewcode-block" id="CommitDetails"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.recipes.CommitDetails">[docs]</a><span class="k">class</span> <span class="nc">CommitDetails</span><span class="p">(</span><span class="n">DataHolder</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">commit</span><span class="p">,</span> <span class="n">timestamp</span><span class="p">,</span> <span class="n">message</span><span class="p">,</span> <span class="n">revision</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">commit</span><span class="p">,</span> <span class="n">timestamp</span><span class="p">,</span> <span class="n">message</span><span class="p">,</span> <span class="n">revision</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="n">DataHolder</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span>
<span class="n">commit</span> <span class="o">=</span> <span class="n">commit</span><span class="p">,</span>
<span class="n">timestamp</span> <span class="o">=</span> <span class="n">timestamp</span><span class="p">,</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.server &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.server &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -176,17 +175,17 @@
<span class="kn">import</span> <span class="nn">logging</span>
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;lorax-composer&quot;</span><span class="p">)</span>
<span class="kn">from</span> <span class="nn">collections</span> <span class="k">import</span> <span class="n">namedtuple</span>
<span class="kn">from</span> <span class="nn">flask</span> <span class="k">import</span> <span class="n">Flask</span><span class="p">,</span> <span class="n">jsonify</span><span class="p">,</span> <span class="n">redirect</span><span class="p">,</span> <span class="n">send_from_directory</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="k">import</span> <span class="n">glob</span>
<span class="kn">from</span> <span class="nn">collections</span> <span class="kn">import</span> <span class="n">namedtuple</span>
<span class="kn">from</span> <span class="nn">flask</span> <span class="kn">import</span> <span class="n">Flask</span><span class="p">,</span> <span class="n">jsonify</span><span class="p">,</span> <span class="n">redirect</span><span class="p">,</span> <span class="n">send_from_directory</span>
<span class="kn">from</span> <span class="nn">glob</span> <span class="kn">import</span> <span class="n">glob</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">werkzeug</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="k">import</span> <span class="n">vernum</span>
<span class="kn">from</span> <span class="nn">pylorax.api.errors</span> <span class="k">import</span> <span class="n">HTTP_ERROR</span>
<span class="kn">from</span> <span class="nn">pylorax.api.v0</span> <span class="k">import</span> <span class="n">v0_api</span>
<span class="kn">from</span> <span class="nn">pylorax.api.v1</span> <span class="k">import</span> <span class="n">v1_api</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="kn">import</span> <span class="n">vernum</span>
<span class="kn">from</span> <span class="nn">pylorax.api.errors</span> <span class="kn">import</span> <span class="n">HTTP_ERROR</span>
<span class="kn">from</span> <span class="nn">pylorax.api.v0</span> <span class="kn">import</span> <span class="n">v0_api</span>
<span class="kn">from</span> <span class="nn">pylorax.api.v1</span> <span class="kn">import</span> <span class="n">v1_api</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span>
<span class="n">GitLock</span> <span class="o">=</span> <span class="n">namedtuple</span><span class="p">(</span><span class="s2">&quot;GitLock&quot;</span><span class="p">,</span> <span class="p">[</span><span class="s2">&quot;repo&quot;</span><span class="p">,</span> <span class="s2">&quot;lock&quot;</span><span class="p">,</span> <span class="s2">&quot;dir&quot;</span><span class="p">])</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.timestamp &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.timestamp &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -176,7 +175,7 @@
<span class="kn">import</span> <span class="nn">time</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span>
<span class="kn">import</span> <span class="nn">pylorax.api.toml</span> <span class="k">as</span> <span class="nn">toml</span>
<span class="n">TS_CREATED</span> <span class="o">=</span> <span class="s2">&quot;created&quot;</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.toml &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.toml &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.utils &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.utils &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -174,7 +173,7 @@
<span class="c1"># along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<span class="sd">&quot;&quot;&quot; API utility functions</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="k">import</span> <span class="n">RecipeError</span><span class="p">,</span> <span class="n">RecipeFileError</span><span class="p">,</span> <span class="n">read_recipe_commit</span>
<span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="kn">import</span> <span class="n">RecipeError</span><span class="p">,</span> <span class="n">RecipeFileError</span><span class="p">,</span> <span class="n">read_recipe_commit</span>
<div class="viewcode-block" id="take_limits"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.utils.take_limits">[docs]</a><span class="k">def</span> <span class="nf">take_limits</span><span class="p">(</span><span class="n">iterable</span><span class="p">,</span> <span class="n">offset</span><span class="p">,</span> <span class="n">limit</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot; Apply offset and limit to an iterable object</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.v0 &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.v0 &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -211,26 +210,26 @@
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;lorax-composer&quot;</span><span class="p">)</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">flask</span> <span class="k">import</span> <span class="n">jsonify</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">Response</span><span class="p">,</span> <span class="n">send_file</span>
<span class="kn">from</span> <span class="nn">flask</span> <span class="k">import</span> <span class="n">current_app</span> <span class="k">as</span> <span class="n">api</span>
<span class="kn">from</span> <span class="nn">flask</span> <span class="kn">import</span> <span class="n">jsonify</span><span class="p">,</span> <span class="n">request</span><span class="p">,</span> <span class="n">Response</span><span class="p">,</span> <span class="n">send_file</span>
<span class="kn">from</span> <span class="nn">flask</span> <span class="kn">import</span> <span class="n">current_app</span> <span class="k">as</span> <span class="n">api</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span>
<span class="kn">from</span> <span class="nn">pylorax.api.checkparams</span> <span class="k">import</span> <span class="n">checkparams</span>
<span class="kn">from</span> <span class="nn">pylorax.api.compose</span> <span class="k">import</span> <span class="n">start_build</span><span class="p">,</span> <span class="n">compose_types</span>
<span class="kn">from</span> <span class="nn">pylorax.api.errors</span> <span class="k">import</span> <span class="o">*</span> <span class="c1"># pylint: disable=wildcard-import,unused-wildcard-import</span>
<span class="kn">from</span> <span class="nn">pylorax.api.flask_blueprint</span> <span class="k">import</span> <span class="n">BlueprintSkip</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="k">import</span> <span class="n">projects_list</span><span class="p">,</span> <span class="n">projects_info</span><span class="p">,</span> <span class="n">projects_depsolve</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="k">import</span> <span class="n">modules_list</span><span class="p">,</span> <span class="n">modules_info</span><span class="p">,</span> <span class="n">ProjectsError</span><span class="p">,</span> <span class="n">repo_to_source</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="k">import</span> <span class="n">get_repo_sources</span><span class="p">,</span> <span class="n">delete_repo_source</span><span class="p">,</span> <span class="n">new_repo_source</span>
<span class="kn">from</span> <span class="nn">pylorax.api.queue</span> <span class="k">import</span> <span class="n">queue_status</span><span class="p">,</span> <span class="n">build_status</span><span class="p">,</span> <span class="n">uuid_delete</span><span class="p">,</span> <span class="n">uuid_status</span><span class="p">,</span> <span class="n">uuid_info</span>
<span class="kn">from</span> <span class="nn">pylorax.api.queue</span> <span class="k">import</span> <span class="n">uuid_tar</span><span class="p">,</span> <span class="n">uuid_image</span><span class="p">,</span> <span class="n">uuid_cancel</span><span class="p">,</span> <span class="n">uuid_log</span>
<span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="k">import</span> <span class="n">list_branch_files</span><span class="p">,</span> <span class="n">read_recipe_commit</span><span class="p">,</span> <span class="n">recipe_filename</span><span class="p">,</span> <span class="n">list_commits</span>
<span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="k">import</span> <span class="n">recipe_from_dict</span><span class="p">,</span> <span class="n">recipe_from_toml</span><span class="p">,</span> <span class="n">commit_recipe</span><span class="p">,</span> <span class="n">delete_recipe</span><span class="p">,</span> <span class="n">revert_recipe</span>
<span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="k">import</span> <span class="n">tag_recipe_commit</span><span class="p">,</span> <span class="n">recipe_diff</span><span class="p">,</span> <span class="n">RecipeFileError</span>
<span class="kn">from</span> <span class="nn">pylorax.api.regexes</span> <span class="k">import</span> <span class="n">VALID_API_STRING</span><span class="p">,</span> <span class="n">VALID_BLUEPRINT_NAME</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span>
<span class="kn">from</span> <span class="nn">pylorax.api.checkparams</span> <span class="kn">import</span> <span class="n">checkparams</span>
<span class="kn">from</span> <span class="nn">pylorax.api.compose</span> <span class="kn">import</span> <span class="n">start_build</span><span class="p">,</span> <span class="n">compose_types</span>
<span class="kn">from</span> <span class="nn">pylorax.api.errors</span> <span class="kn">import</span> <span class="o">*</span> <span class="c1"># pylint: disable=wildcard-import,unused-wildcard-import</span>
<span class="kn">from</span> <span class="nn">pylorax.api.flask_blueprint</span> <span class="kn">import</span> <span class="n">BlueprintSkip</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="kn">import</span> <span class="n">projects_list</span><span class="p">,</span> <span class="n">projects_info</span><span class="p">,</span> <span class="n">projects_depsolve</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="kn">import</span> <span class="n">modules_list</span><span class="p">,</span> <span class="n">modules_info</span><span class="p">,</span> <span class="n">ProjectsError</span><span class="p">,</span> <span class="n">repo_to_source</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="kn">import</span> <span class="n">get_repo_sources</span><span class="p">,</span> <span class="n">delete_repo_source</span><span class="p">,</span> <span class="n">new_repo_source</span>
<span class="kn">from</span> <span class="nn">pylorax.api.queue</span> <span class="kn">import</span> <span class="n">queue_status</span><span class="p">,</span> <span class="n">build_status</span><span class="p">,</span> <span class="n">uuid_delete</span><span class="p">,</span> <span class="n">uuid_status</span><span class="p">,</span> <span class="n">uuid_info</span>
<span class="kn">from</span> <span class="nn">pylorax.api.queue</span> <span class="kn">import</span> <span class="n">uuid_tar</span><span class="p">,</span> <span class="n">uuid_image</span><span class="p">,</span> <span class="n">uuid_cancel</span><span class="p">,</span> <span class="n">uuid_log</span>
<span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="kn">import</span> <span class="n">list_branch_files</span><span class="p">,</span> <span class="n">read_recipe_commit</span><span class="p">,</span> <span class="n">recipe_filename</span><span class="p">,</span> <span class="n">list_commits</span>
<span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="kn">import</span> <span class="n">recipe_from_dict</span><span class="p">,</span> <span class="n">recipe_from_toml</span><span class="p">,</span> <span class="n">commit_recipe</span><span class="p">,</span> <span class="n">delete_recipe</span><span class="p">,</span> <span class="n">revert_recipe</span>
<span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="kn">import</span> <span class="n">tag_recipe_commit</span><span class="p">,</span> <span class="n">recipe_diff</span><span class="p">,</span> <span class="n">RecipeFileError</span>
<span class="kn">from</span> <span class="nn">pylorax.api.regexes</span> <span class="kn">import</span> <span class="n">VALID_API_STRING</span><span class="p">,</span> <span class="n">VALID_BLUEPRINT_NAME</span>
<span class="kn">import</span> <span class="nn">pylorax.api.toml</span> <span class="k">as</span> <span class="nn">toml</span>
<span class="kn">from</span> <span class="nn">pylorax.api.utils</span> <span class="k">import</span> <span class="n">take_limits</span><span class="p">,</span> <span class="n">blueprint_exists</span>
<span class="kn">from</span> <span class="nn">pylorax.api.workspace</span> <span class="k">import</span> <span class="n">workspace_read</span><span class="p">,</span> <span class="n">workspace_write</span><span class="p">,</span> <span class="n">workspace_delete</span>
<span class="kn">from</span> <span class="nn">pylorax.api.utils</span> <span class="kn">import</span> <span class="n">take_limits</span><span class="p">,</span> <span class="n">blueprint_exists</span>
<span class="kn">from</span> <span class="nn">pylorax.api.workspace</span> <span class="kn">import</span> <span class="n">workspace_read</span><span class="p">,</span> <span class="n">workspace_write</span><span class="p">,</span> <span class="n">workspace_delete</span><span class="p">,</span> <span class="n">workspace_exists</span>
<span class="c1"># The API functions don&#39;t actually get called by any code here</span>
<span class="c1"># pylint: disable=unused-variable</span>
@ -640,6 +639,9 @@
<span class="k">try</span><span class="p">:</span>
<span class="k">with</span> <span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;GITLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">lock</span><span class="p">:</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">workspace_exists</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;GITLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">repo</span><span class="p">,</span> <span class="n">branch</span><span class="p">,</span> <span class="n">blueprint_name</span><span class="p">):</span>
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s2">&quot;Unknown blueprint: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">blueprint_name</span><span class="p">)</span>
<span class="n">workspace_delete</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;GITLOCK&quot;</span><span class="p">]</span><span class="o">.</span><span class="n">repo</span><span class="p">,</span> <span class="n">branch</span><span class="p">,</span> <span class="n">blueprint_name</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;(v0_blueprints_delete_workspace) </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">))</span>
@ -666,6 +668,9 @@
<span class="k">if</span> <span class="n">VALID_BLUEPRINT_NAME</span><span class="o">.</span><span class="n">match</span><span class="p">(</span><span class="n">blueprint_name</span><span class="p">)</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="p">[{</span><span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="n">INVALID_CHARS</span><span class="p">,</span> <span class="s2">&quot;msg&quot;</span><span class="p">:</span> <span class="s2">&quot;Invalid characters in API path&quot;</span><span class="p">}]),</span> <span class="mi">400</span>
<span class="k">if</span> <span class="n">VALID_BLUEPRINT_NAME</span><span class="o">.</span><span class="n">match</span><span class="p">(</span><span class="n">commit</span><span class="p">)</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="p">[{</span><span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="n">INVALID_CHARS</span><span class="p">,</span> <span class="s2">&quot;msg&quot;</span><span class="p">:</span> <span class="s2">&quot;Invalid characters in API path&quot;</span><span class="p">}]),</span> <span class="mi">400</span>
<span class="n">branch</span> <span class="o">=</span> <span class="n">request</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;branch&quot;</span><span class="p">,</span> <span class="s2">&quot;master&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">VALID_API_STRING</span><span class="o">.</span><span class="n">match</span><span class="p">(</span><span class="n">branch</span><span class="p">)</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="p">[{</span><span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="n">INVALID_CHARS</span><span class="p">,</span> <span class="s2">&quot;msg&quot;</span><span class="p">:</span> <span class="s2">&quot;Invalid characters in branch argument&quot;</span><span class="p">}]),</span> <span class="mi">400</span>
@ -1802,6 +1807,11 @@
<span class="n">status</span> <span class="o">=</span> <span class="n">request</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;status&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
<span class="n">compose_type</span> <span class="o">=</span> <span class="n">request</span><span class="o">.</span><span class="n">args</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;type&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span>
<span class="c1"># Check the arguments for invalid characters</span>
<span class="k">for</span> <span class="n">a</span> <span class="ow">in</span> <span class="p">[</span><span class="n">blueprint</span><span class="p">,</span> <span class="n">status</span><span class="p">,</span> <span class="n">compose_type</span><span class="p">]:</span>
<span class="k">if</span> <span class="n">a</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span> <span class="ow">and</span> <span class="n">VALID_API_STRING</span><span class="o">.</span><span class="n">match</span><span class="p">(</span><span class="n">a</span><span class="p">)</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="p">[{</span><span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="n">INVALID_CHARS</span><span class="p">,</span> <span class="s2">&quot;msg&quot;</span><span class="p">:</span> <span class="s2">&quot;Invalid characters in API path&quot;</span><span class="p">}]),</span> <span class="mi">400</span>
<span class="n">results</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">errors</span> <span class="o">=</span> <span class="p">[]</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.v1 &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.v1 &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -179,25 +178,25 @@
<span class="kn">import</span> <span class="nn">logging</span>
<span class="n">log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;lorax-composer&quot;</span><span class="p">)</span>
<span class="kn">from</span> <span class="nn">flask</span> <span class="k">import</span> <span class="n">jsonify</span><span class="p">,</span> <span class="n">request</span>
<span class="kn">from</span> <span class="nn">flask</span> <span class="k">import</span> <span class="n">current_app</span> <span class="k">as</span> <span class="n">api</span>
<span class="kn">from</span> <span class="nn">flask</span> <span class="kn">import</span> <span class="n">jsonify</span><span class="p">,</span> <span class="n">request</span>
<span class="kn">from</span> <span class="nn">flask</span> <span class="kn">import</span> <span class="n">current_app</span> <span class="k">as</span> <span class="n">api</span>
<span class="kn">from</span> <span class="nn">lifted.queue</span> <span class="k">import</span> <span class="n">get_upload</span><span class="p">,</span> <span class="n">reset_upload</span><span class="p">,</span> <span class="n">cancel_upload</span><span class="p">,</span> <span class="n">delete_upload</span>
<span class="kn">from</span> <span class="nn">lifted.providers</span> <span class="k">import</span> <span class="n">list_providers</span><span class="p">,</span> <span class="n">resolve_provider</span><span class="p">,</span> <span class="n">load_profiles</span><span class="p">,</span> <span class="n">validate_settings</span><span class="p">,</span> <span class="n">save_settings</span>
<span class="kn">from</span> <span class="nn">lifted.providers</span> <span class="k">import</span> <span class="n">load_settings</span><span class="p">,</span> <span class="n">delete_profile</span>
<span class="kn">from</span> <span class="nn">pylorax.api.checkparams</span> <span class="k">import</span> <span class="n">checkparams</span>
<span class="kn">from</span> <span class="nn">pylorax.api.compose</span> <span class="k">import</span> <span class="n">start_build</span>
<span class="kn">from</span> <span class="nn">pylorax.api.errors</span> <span class="k">import</span> <span class="n">BAD_COMPOSE_TYPE</span><span class="p">,</span> <span class="n">BUILD_FAILED</span><span class="p">,</span> <span class="n">INVALID_CHARS</span><span class="p">,</span> <span class="n">MISSING_POST</span><span class="p">,</span> <span class="n">PROJECTS_ERROR</span>
<span class="kn">from</span> <span class="nn">pylorax.api.errors</span> <span class="k">import</span> <span class="n">SYSTEM_SOURCE</span><span class="p">,</span> <span class="n">UNKNOWN_BLUEPRINT</span><span class="p">,</span> <span class="n">UNKNOWN_SOURCE</span><span class="p">,</span> <span class="n">UNKNOWN_UUID</span><span class="p">,</span> <span class="n">UPLOAD_ERROR</span>
<span class="kn">from</span> <span class="nn">pylorax.api.errors</span> <span class="k">import</span> <span class="n">COMPOSE_ERROR</span>
<span class="kn">from</span> <span class="nn">pylorax.api.flask_blueprint</span> <span class="k">import</span> <span class="n">BlueprintSkip</span>
<span class="kn">from</span> <span class="nn">pylorax.api.queue</span> <span class="k">import</span> <span class="n">queue_status</span><span class="p">,</span> <span class="n">build_status</span><span class="p">,</span> <span class="n">uuid_status</span><span class="p">,</span> <span class="n">uuid_schedule_upload</span><span class="p">,</span> <span class="n">uuid_remove_upload</span>
<span class="kn">from</span> <span class="nn">pylorax.api.queue</span> <span class="k">import</span> <span class="n">uuid_info</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="k">import</span> <span class="n">get_repo_sources</span><span class="p">,</span> <span class="n">repo_to_source</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="k">import</span> <span class="n">new_repo_source</span>
<span class="kn">from</span> <span class="nn">pylorax.api.regexes</span> <span class="k">import</span> <span class="n">VALID_API_STRING</span><span class="p">,</span> <span class="n">VALID_BLUEPRINT_NAME</span>
<span class="kn">from</span> <span class="nn">lifted.queue</span> <span class="kn">import</span> <span class="n">get_upload</span><span class="p">,</span> <span class="n">reset_upload</span><span class="p">,</span> <span class="n">cancel_upload</span><span class="p">,</span> <span class="n">delete_upload</span>
<span class="kn">from</span> <span class="nn">lifted.providers</span> <span class="kn">import</span> <span class="n">list_providers</span><span class="p">,</span> <span class="n">resolve_provider</span><span class="p">,</span> <span class="n">load_profiles</span><span class="p">,</span> <span class="n">validate_settings</span><span class="p">,</span> <span class="n">save_settings</span>
<span class="kn">from</span> <span class="nn">lifted.providers</span> <span class="kn">import</span> <span class="n">load_settings</span><span class="p">,</span> <span class="n">delete_profile</span>
<span class="kn">from</span> <span class="nn">pylorax.api.checkparams</span> <span class="kn">import</span> <span class="n">checkparams</span>
<span class="kn">from</span> <span class="nn">pylorax.api.compose</span> <span class="kn">import</span> <span class="n">start_build</span>
<span class="kn">from</span> <span class="nn">pylorax.api.errors</span> <span class="kn">import</span> <span class="n">BAD_COMPOSE_TYPE</span><span class="p">,</span> <span class="n">BUILD_FAILED</span><span class="p">,</span> <span class="n">INVALID_CHARS</span><span class="p">,</span> <span class="n">MISSING_POST</span><span class="p">,</span> <span class="n">PROJECTS_ERROR</span>
<span class="kn">from</span> <span class="nn">pylorax.api.errors</span> <span class="kn">import</span> <span class="n">SYSTEM_SOURCE</span><span class="p">,</span> <span class="n">UNKNOWN_BLUEPRINT</span><span class="p">,</span> <span class="n">UNKNOWN_SOURCE</span><span class="p">,</span> <span class="n">UNKNOWN_UUID</span><span class="p">,</span> <span class="n">UPLOAD_ERROR</span>
<span class="kn">from</span> <span class="nn">pylorax.api.errors</span> <span class="kn">import</span> <span class="n">COMPOSE_ERROR</span>
<span class="kn">from</span> <span class="nn">pylorax.api.flask_blueprint</span> <span class="kn">import</span> <span class="n">BlueprintSkip</span>
<span class="kn">from</span> <span class="nn">pylorax.api.queue</span> <span class="kn">import</span> <span class="n">queue_status</span><span class="p">,</span> <span class="n">build_status</span><span class="p">,</span> <span class="n">uuid_status</span><span class="p">,</span> <span class="n">uuid_schedule_upload</span><span class="p">,</span> <span class="n">uuid_remove_upload</span>
<span class="kn">from</span> <span class="nn">pylorax.api.queue</span> <span class="kn">import</span> <span class="n">uuid_info</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="kn">import</span> <span class="n">get_repo_sources</span><span class="p">,</span> <span class="n">repo_to_source</span>
<span class="kn">from</span> <span class="nn">pylorax.api.projects</span> <span class="kn">import</span> <span class="n">new_repo_source</span>
<span class="kn">from</span> <span class="nn">pylorax.api.regexes</span> <span class="kn">import</span> <span class="n">VALID_API_STRING</span><span class="p">,</span> <span class="n">VALID_BLUEPRINT_NAME</span>
<span class="kn">import</span> <span class="nn">pylorax.api.toml</span> <span class="k">as</span> <span class="nn">toml</span>
<span class="kn">from</span> <span class="nn">pylorax.api.utils</span> <span class="k">import</span> <span class="n">blueprint_exists</span>
<span class="kn">from</span> <span class="nn">pylorax.api.utils</span> <span class="kn">import</span> <span class="n">blueprint_exists</span>
<span class="c1"># Create the v1 routes Blueprint with skip_routes support</span>
@ -451,11 +450,11 @@
<span class="n">provider_name</span> <span class="o">=</span> <span class="n">compose</span><span class="p">[</span><span class="s2">&quot;upload&quot;</span><span class="p">][</span><span class="s2">&quot;provider&quot;</span><span class="p">]</span>
<span class="n">settings</span> <span class="o">=</span> <span class="n">compose</span><span class="p">[</span><span class="s2">&quot;upload&quot;</span><span class="p">][</span><span class="s2">&quot;settings&quot;</span><span class="p">]</span>
<span class="k">except</span> <span class="ne">KeyError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">errors</span><span class="o">.</span><span class="n">append</span><span class="p">({</span><span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="n">UPLOAD_ERROR</span><span class="p">,</span> <span class="s2">&quot;msg&quot;</span><span class="p">:</span> <span class="n">f</span><span class="s1">&#39;Missing parameter {str(e)}!&#39;</span><span class="p">})</span>
<span class="n">errors</span><span class="o">.</span><span class="n">append</span><span class="p">({</span><span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="n">UPLOAD_ERROR</span><span class="p">,</span> <span class="s2">&quot;msg&quot;</span><span class="p">:</span> <span class="sa">f</span><span class="s1">&#39;Missing parameter </span><span class="si">{</span><span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)</span><span class="si">}</span><span class="s1">!&#39;</span><span class="p">})</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">provider</span> <span class="o">=</span> <span class="n">resolve_provider</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;COMPOSER_CFG&quot;</span><span class="p">][</span><span class="s2">&quot;upload&quot;</span><span class="p">],</span> <span class="n">provider_name</span><span class="p">)</span>
<span class="k">if</span> <span class="s2">&quot;supported_types&quot;</span> <span class="ow">in</span> <span class="n">provider</span> <span class="ow">and</span> <span class="n">compose_type</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">provider</span><span class="p">[</span><span class="s2">&quot;supported_types&quot;</span><span class="p">]:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="n">f</span><span class="s1">&#39;Type &quot;</span><span class="si">{compose_type}</span><span class="s1">&quot; is not supported by provider &quot;</span><span class="si">{provider_name}</span><span class="s1">&quot;!&#39;</span><span class="p">)</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s1">&#39;Type &quot;</span><span class="si">{</span><span class="n">compose_type</span><span class="si">}</span><span class="s1">&quot; is not supported by provider &quot;</span><span class="si">{</span><span class="n">provider_name</span><span class="si">}</span><span class="s1">&quot;!&#39;</span><span class="p">)</span>
<span class="n">validate_settings</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;COMPOSER_CFG&quot;</span><span class="p">][</span><span class="s2">&quot;upload&quot;</span><span class="p">],</span> <span class="n">provider_name</span><span class="p">,</span> <span class="n">settings</span><span class="p">,</span> <span class="n">image_name</span><span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">errors</span><span class="o">.</span><span class="n">append</span><span class="p">({</span><span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="n">UPLOAD_ERROR</span><span class="p">,</span> <span class="s2">&quot;msg&quot;</span><span class="p">:</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)})</span>
@ -887,14 +886,14 @@
<span class="k">else</span><span class="p">:</span>
<span class="n">settings</span> <span class="o">=</span> <span class="n">parsed</span><span class="p">[</span><span class="s2">&quot;settings&quot;</span><span class="p">]</span>
<span class="k">except</span> <span class="ne">KeyError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">error</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="n">UPLOAD_ERROR</span><span class="p">,</span> <span class="s2">&quot;msg&quot;</span><span class="p">:</span> <span class="n">f</span><span class="s1">&#39;Missing parameter {str(e)}!&#39;</span><span class="p">}</span>
<span class="n">error</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="n">UPLOAD_ERROR</span><span class="p">,</span> <span class="s2">&quot;msg&quot;</span><span class="p">:</span> <span class="sa">f</span><span class="s1">&#39;Missing parameter </span><span class="si">{</span><span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)</span><span class="si">}</span><span class="s1">!&#39;</span><span class="p">}</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="p">[</span><span class="n">error</span><span class="p">]),</span> <span class="mi">400</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">compose_type</span> <span class="o">=</span> <span class="n">uuid_status</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;COMPOSER_CFG&quot;</span><span class="p">],</span> <span class="n">compose_uuid</span><span class="p">)[</span><span class="s2">&quot;compose_type&quot;</span><span class="p">]</span>
<span class="n">provider</span> <span class="o">=</span> <span class="n">resolve_provider</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;COMPOSER_CFG&quot;</span><span class="p">][</span><span class="s2">&quot;upload&quot;</span><span class="p">],</span> <span class="n">provider_name</span><span class="p">)</span>
<span class="k">if</span> <span class="s2">&quot;supported_types&quot;</span> <span class="ow">in</span> <span class="n">provider</span> <span class="ow">and</span> <span class="n">compose_type</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">provider</span><span class="p">[</span><span class="s2">&quot;supported_types&quot;</span><span class="p">]:</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span>
<span class="n">f</span><span class="s1">&#39;Type &quot;</span><span class="si">{compose_type}</span><span class="s1">&quot; is not supported by provider &quot;</span><span class="si">{provider_name}</span><span class="s1">&quot;!&#39;</span>
<span class="sa">f</span><span class="s1">&#39;Type &quot;</span><span class="si">{</span><span class="n">compose_type</span><span class="si">}</span><span class="s1">&quot; is not supported by provider &quot;</span><span class="si">{</span><span class="n">provider_name</span><span class="si">}</span><span class="s1">&quot;!&#39;</span>
<span class="p">)</span>
<span class="k">except</span> <span class="ne">Exception</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="p">[{</span><span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="n">UPLOAD_ERROR</span><span class="p">,</span> <span class="s2">&quot;msg&quot;</span><span class="p">:</span> <span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)}]),</span> <span class="mi">400</span>
@ -1166,7 +1165,7 @@
<span class="n">profile</span> <span class="o">=</span> <span class="n">parsed</span><span class="p">[</span><span class="s2">&quot;profile&quot;</span><span class="p">]</span>
<span class="n">settings</span> <span class="o">=</span> <span class="n">parsed</span><span class="p">[</span><span class="s2">&quot;settings&quot;</span><span class="p">]</span>
<span class="k">except</span> <span class="ne">KeyError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="n">error</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="n">UPLOAD_ERROR</span><span class="p">,</span> <span class="s2">&quot;msg&quot;</span><span class="p">:</span> <span class="n">f</span><span class="s1">&#39;Missing parameter {str(e)}!&#39;</span><span class="p">}</span>
<span class="n">error</span> <span class="o">=</span> <span class="p">{</span><span class="s2">&quot;id&quot;</span><span class="p">:</span> <span class="n">UPLOAD_ERROR</span><span class="p">,</span> <span class="s2">&quot;msg&quot;</span><span class="p">:</span> <span class="sa">f</span><span class="s1">&#39;Missing parameter </span><span class="si">{</span><span class="nb">str</span><span class="p">(</span><span class="n">e</span><span class="p">)</span><span class="si">}</span><span class="s1">!&#39;</span><span class="p">}</span>
<span class="k">return</span> <span class="n">jsonify</span><span class="p">(</span><span class="n">status</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">errors</span><span class="o">=</span><span class="p">[</span><span class="n">error</span><span class="p">]),</span> <span class="mi">400</span>
<span class="k">try</span><span class="p">:</span>
<span class="n">save_settings</span><span class="p">(</span><span class="n">api</span><span class="o">.</span><span class="n">config</span><span class="p">[</span><span class="s2">&quot;COMPOSER_CFG&quot;</span><span class="p">][</span><span class="s2">&quot;upload&quot;</span><span class="p">],</span> <span class="n">provider_name</span><span class="p">,</span> <span class="n">profile</span><span class="p">,</span> <span class="n">settings</span><span class="p">)</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.api.workspace &mdash; Lorax 33.2 documentation</title>
<title>pylorax.api.workspace &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../../" src="../../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../../_static/jquery.js"></script>
<script src="../../../_static/underscore.js"></script>
<script src="../../../_static/doctools.js"></script>
<script src="../../../_static/language_data.js"></script>
<script type="text/javascript" src="../../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../../product-images.html">Product and Updates Images</a></li>
@ -175,8 +174,8 @@
<span class="c1">#</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="k">import</span> <span class="n">recipe_filename</span><span class="p">,</span> <span class="n">recipe_from_toml</span><span class="p">,</span> <span class="n">RecipeFileError</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span>
<span class="kn">from</span> <span class="nn">pylorax.api.recipes</span> <span class="kn">import</span> <span class="n">recipe_filename</span><span class="p">,</span> <span class="n">recipe_from_toml</span><span class="p">,</span> <span class="n">RecipeFileError</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span>
<div class="viewcode-block" id="workspace_dir"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.workspace.workspace_dir">[docs]</a><span class="k">def</span> <span class="nf">workspace_dir</span><span class="p">(</span><span class="n">repo</span><span class="p">,</span> <span class="n">branch</span><span class="p">):</span>
@ -240,6 +239,37 @@
<span class="nb">open</span><span class="p">(</span><span class="n">filename</span><span class="p">,</span> <span class="s1">&#39;wb&#39;</span><span class="p">)</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="n">recipe</span><span class="o">.</span><span class="n">toml</span><span class="p">()</span><span class="o">.</span><span class="n">encode</span><span class="p">(</span><span class="s2">&quot;UTF-8&quot;</span><span class="p">))</span></div>
<div class="viewcode-block" id="workspace_filename"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.workspace.workspace_filename">[docs]</a><span class="k">def</span> <span class="nf">workspace_filename</span><span class="p">(</span><span class="n">repo</span><span class="p">,</span> <span class="n">branch</span><span class="p">,</span> <span class="n">recipe_name</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return the path and filename of the workspace recipe</span>
<span class="sd"> :param repo: Open repository</span>
<span class="sd"> :type repo: Git.Repository</span>
<span class="sd"> :param branch: Branch name</span>
<span class="sd"> :type branch: str</span>
<span class="sd"> :param recipe_name: The name of the recipe</span>
<span class="sd"> :type recipe_name: str</span>
<span class="sd"> :returns: workspace recipe path and filename</span>
<span class="sd"> :rtype: str</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">ws_dir</span> <span class="o">=</span> <span class="n">workspace_dir</span><span class="p">(</span><span class="n">repo</span><span class="p">,</span> <span class="n">branch</span><span class="p">)</span>
<span class="k">return</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">ws_dir</span><span class="p">,</span> <span class="n">recipe_filename</span><span class="p">(</span><span class="n">recipe_name</span><span class="p">))</span></div>
<div class="viewcode-block" id="workspace_exists"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.workspace.workspace_exists">[docs]</a><span class="k">def</span> <span class="nf">workspace_exists</span><span class="p">(</span><span class="n">repo</span><span class="p">,</span> <span class="n">branch</span><span class="p">,</span> <span class="n">recipe_name</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Return true of the workspace recipe exists</span>
<span class="sd"> :param repo: Open repository</span>
<span class="sd"> :type repo: Git.Repository</span>
<span class="sd"> :param branch: Branch name</span>
<span class="sd"> :type branch: str</span>
<span class="sd"> :param recipe_name: The name of the recipe</span>
<span class="sd"> :type recipe_name: str</span>
<span class="sd"> :returns: True if the file exists</span>
<span class="sd"> :rtype: bool</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">return</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">workspace_filename</span><span class="p">(</span><span class="n">repo</span><span class="p">,</span> <span class="n">branch</span><span class="p">,</span> <span class="n">recipe_name</span><span class="p">))</span></div>
<div class="viewcode-block" id="workspace_delete"><a class="viewcode-back" href="../../../pylorax.api.html#pylorax.api.workspace.workspace_delete">[docs]</a><span class="k">def</span> <span class="nf">workspace_delete</span><span class="p">(</span><span class="n">repo</span><span class="p">,</span> <span class="n">branch</span><span class="p">,</span> <span class="n">recipe_name</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Delete the recipe from the workspace</span>
@ -252,8 +282,7 @@
<span class="sd"> :returns: None</span>
<span class="sd"> :raises: IO related errors</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">ws_dir</span> <span class="o">=</span> <span class="n">workspace_dir</span><span class="p">(</span><span class="n">repo</span><span class="p">,</span> <span class="n">branch</span><span class="p">)</span>
<span class="n">filename</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">ws_dir</span><span class="p">,</span> <span class="n">recipe_filename</span><span class="p">(</span><span class="n">recipe_name</span><span class="p">))</span>
<span class="n">filename</span> <span class="o">=</span> <span class="n">workspace_filename</span><span class="p">(</span><span class="n">repo</span><span class="p">,</span> <span class="n">branch</span><span class="p">,</span> <span class="n">recipe_name</span><span class="p">)</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">filename</span><span class="p">):</span>
<span class="n">os</span><span class="o">.</span><span class="n">unlink</span><span class="p">(</span><span class="n">filename</span><span class="p">)</span></div>
</pre></div>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.base &mdash; Lorax 33.2 documentation</title>
<title>pylorax.base &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -178,7 +177,7 @@
<span class="c1"># Red Hat Author(s): Martin Gracik &lt;mgracik@redhat.com&gt;</span>
<span class="c1">#</span>
<span class="kn">from</span> <span class="nn">abc</span> <span class="k">import</span> <span class="n">ABCMeta</span><span class="p">,</span> <span class="n">abstractmethod</span>
<span class="kn">from</span> <span class="nn">abc</span> <span class="kn">import</span> <span class="n">ABCMeta</span><span class="p">,</span> <span class="n">abstractmethod</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">pylorax.output</span> <span class="k">as</span> <span class="nn">output</span>
@ -186,7 +185,7 @@
<div class="viewcode-block" id="BaseLoraxClass"><a class="viewcode-back" href="../../pylorax.html#pylorax.base.BaseLoraxClass">[docs]</a><span class="k">class</span> <span class="nc">BaseLoraxClass</span><span class="p">(</span><span class="nb">object</span><span class="p">,</span> <span class="n">metaclass</span><span class="o">=</span><span class="n">ABCMeta</span><span class="p">):</span>
<span class="nd">@abstractmethod</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">output</span> <span class="o">=</span> <span class="n">output</span><span class="o">.</span><span class="n">LoraxOutput</span><span class="p">()</span>
<div class="viewcode-block" id="BaseLoraxClass.pcritical"><a class="viewcode-back" href="../../pylorax.html#pylorax.base.BaseLoraxClass.pcritical">[docs]</a> <span class="k">def</span> <span class="nf">pcritical</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">msg</span><span class="p">,</span> <span class="n">fobj</span><span class="o">=</span><span class="n">sys</span><span class="o">.</span><span class="n">stdout</span><span class="p">):</span>
@ -207,19 +206,19 @@
<div class="viewcode-block" id="DataHolder"><a class="viewcode-back" href="../../pylorax.html#pylorax.base.DataHolder">[docs]</a><span class="k">class</span> <span class="nc">DataHolder</span><span class="p">(</span><span class="nb">dict</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="nb">dict</span><span class="o">.</span><span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span>
<span class="k">for</span> <span class="n">attr</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">kwargs</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="bp">self</span><span class="p">[</span><span class="n">attr</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span>
<span class="k">def</span> <span class="nf">__getattr__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">attr</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__getattr__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">attr</span><span class="p">):</span>
<span class="k">if</span> <span class="n">attr</span> <span class="ow">in</span> <span class="bp">self</span><span class="p">:</span>
<span class="k">return</span> <span class="bp">self</span><span class="p">[</span><span class="n">attr</span><span class="p">]</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">AttributeError</span>
<span class="k">def</span> <span class="nf">__setattr__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">attr</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__setattr__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">attr</span><span class="p">,</span> <span class="n">value</span><span class="p">):</span>
<span class="bp">self</span><span class="p">[</span><span class="n">attr</span><span class="p">]</span> <span class="o">=</span> <span class="n">value</span>
<div class="viewcode-block" id="DataHolder.copy"><a class="viewcode-back" href="../../pylorax.html#pylorax.base.DataHolder.copy">[docs]</a> <span class="k">def</span> <span class="nf">copy</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.buildstamp &mdash; Lorax 33.2 documentation</title>
<title>pylorax.buildstamp &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -187,7 +186,7 @@
<div class="viewcode-block" id="BuildStamp"><a class="viewcode-back" href="../../pylorax.html#pylorax.buildstamp.BuildStamp">[docs]</a><span class="k">class</span> <span class="nc">BuildStamp</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">product</span><span class="p">,</span> <span class="n">version</span><span class="p">,</span> <span class="n">bugurl</span><span class="p">,</span> <span class="n">isfinal</span><span class="p">,</span> <span class="n">buildarch</span><span class="p">,</span> <span class="n">variant</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">product</span><span class="p">,</span> <span class="n">version</span><span class="p">,</span> <span class="n">bugurl</span><span class="p">,</span> <span class="n">isfinal</span><span class="p">,</span> <span class="n">buildarch</span><span class="p">,</span> <span class="n">variant</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">product</span> <span class="o">=</span> <span class="n">product</span>
<span class="bp">self</span><span class="o">.</span><span class="n">version</span> <span class="o">=</span> <span class="n">version</span>
<span class="bp">self</span><span class="o">.</span><span class="n">bugurl</span> <span class="o">=</span> <span class="n">bugurl</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.cmdline &mdash; Lorax 33.2 documentation</title>
<title>pylorax.cmdline &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -181,7 +180,7 @@
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">argparse</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="k">import</span> <span class="n">vernum</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="kn">import</span> <span class="n">vernum</span>
<span class="n">version</span> <span class="o">=</span> <span class="s2">&quot;</span><span class="si">{0}</span><span class="s2">-</span><span class="si">{1}</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">format</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mi">0</span><span class="p">]),</span> <span class="n">vernum</span><span class="p">)</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.creator &mdash; Lorax 33.2 documentation</title>
<title>pylorax.creator &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -184,26 +183,26 @@
<span class="kn">import</span> <span class="nn">glob</span>
<span class="c1"># Use Mako templates for appliance builder descriptions</span>
<span class="kn">from</span> <span class="nn">mako.template</span> <span class="k">import</span> <span class="n">Template</span>
<span class="kn">from</span> <span class="nn">mako.exceptions</span> <span class="k">import</span> <span class="n">text_error_template</span>
<span class="kn">from</span> <span class="nn">mako.template</span> <span class="kn">import</span> <span class="n">Template</span>
<span class="kn">from</span> <span class="nn">mako.exceptions</span> <span class="kn">import</span> <span class="n">text_error_template</span>
<span class="c1"># Use pykickstart to calculate disk image size</span>
<span class="kn">from</span> <span class="nn">pykickstart.parser</span> <span class="k">import</span> <span class="n">KickstartParser</span>
<span class="kn">from</span> <span class="nn">pykickstart.constants</span> <span class="k">import</span> <span class="n">KS_SHUTDOWN</span>
<span class="kn">from</span> <span class="nn">pykickstart.version</span> <span class="k">import</span> <span class="n">makeVersion</span>
<span class="kn">from</span> <span class="nn">pykickstart.parser</span> <span class="kn">import</span> <span class="n">KickstartParser</span>
<span class="kn">from</span> <span class="nn">pykickstart.constants</span> <span class="kn">import</span> <span class="n">KS_SHUTDOWN</span>
<span class="kn">from</span> <span class="nn">pykickstart.version</span> <span class="kn">import</span> <span class="n">makeVersion</span>
<span class="c1"># Use the Lorax treebuilder branch for iso creation</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="k">import</span> <span class="n">ArchData</span>
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="k">import</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="k">import</span> <span class="n">execWithRedirect</span><span class="p">,</span> <span class="n">runcmd</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="k">import</span> <span class="n">PartitionMount</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="k">import</span> <span class="n">mount</span><span class="p">,</span> <span class="n">umount</span><span class="p">,</span> <span class="n">Mount</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="k">import</span> <span class="n">mksquashfs</span><span class="p">,</span> <span class="n">mkrootfsimg</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="k">import</span> <span class="n">copytree</span>
<span class="kn">from</span> <span class="nn">pylorax.installer</span> <span class="k">import</span> <span class="n">novirt_install</span><span class="p">,</span> <span class="n">virt_install</span><span class="p">,</span> <span class="n">InstallError</span>
<span class="kn">from</span> <span class="nn">pylorax.treebuilder</span> <span class="k">import</span> <span class="n">TreeBuilder</span><span class="p">,</span> <span class="n">RuntimeBuilder</span>
<span class="kn">from</span> <span class="nn">pylorax.treebuilder</span> <span class="k">import</span> <span class="n">findkernels</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span><span class="p">,</span> <span class="n">remove</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="kn">import</span> <span class="n">ArchData</span>
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="kn">import</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="kn">import</span> <span class="n">execWithRedirect</span><span class="p">,</span> <span class="n">runcmd</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">PartitionMount</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">mount</span><span class="p">,</span> <span class="n">umount</span><span class="p">,</span> <span class="n">Mount</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">mksquashfs</span><span class="p">,</span> <span class="n">mkrootfsimg</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">copytree</span>
<span class="kn">from</span> <span class="nn">pylorax.installer</span> <span class="kn">import</span> <span class="n">novirt_install</span><span class="p">,</span> <span class="n">virt_install</span><span class="p">,</span> <span class="n">InstallError</span>
<span class="kn">from</span> <span class="nn">pylorax.treebuilder</span> <span class="kn">import</span> <span class="n">TreeBuilder</span><span class="p">,</span> <span class="n">RuntimeBuilder</span>
<span class="kn">from</span> <span class="nn">pylorax.treebuilder</span> <span class="kn">import</span> <span class="n">findkernels</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span><span class="p">,</span> <span class="n">remove</span>
<span class="c1"># Default parameters for rebuilding initramfs, override with --dracut-arg or --dracut-conf</span>
@ -220,7 +219,7 @@
<span class="sd"> templates, so the the installroot config value is the important part of</span>
<span class="sd"> this. Everything else should be a nop.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">conf</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">conf</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">conf</span> <span class="o">=</span> <span class="n">conf</span>
<div class="viewcode-block" id="FakeDNF.reset"><a class="viewcode-back" href="../../pylorax.html#pylorax.creator.FakeDNF.reset">[docs]</a> <span class="k">def</span> <span class="nf">reset</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
@ -364,6 +363,8 @@
<span class="sd"> :param str mount_dir: Directory tree to compress</span>
<span class="sd"> :param str work_dir: Output compressed image to work_dir+images/install.img</span>
<span class="sd"> :param int size: Size of disk image, in GiB</span>
<span class="sd"> :returns: rc of squashfs creation</span>
<span class="sd"> :rtype: int</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="n">kernel_arch</span> <span class="o">=</span> <span class="n">get_arch</span><span class="p">(</span><span class="n">mount_dir</span><span class="p">)</span>
@ -380,12 +381,12 @@
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">squashfs_only</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;Creating a squashfs only runtime&quot;</span><span class="p">)</span>
<span class="n">rb</span><span class="o">.</span><span class="n">create_squashfs_runtime</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">work_dir</span><span class="p">,</span> <span class="n">RUNTIME</span><span class="p">),</span> <span class="n">size</span><span class="o">=</span><span class="n">size</span><span class="p">,</span>
<span class="n">compression</span><span class="o">=</span><span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="n">compressargs</span><span class="p">)</span>
<span class="k">return</span> <span class="n">rb</span><span class="o">.</span><span class="n">create_squashfs_runtime</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">work_dir</span><span class="p">,</span> <span class="n">RUNTIME</span><span class="p">),</span> <span class="n">size</span><span class="o">=</span><span class="n">size</span><span class="p">,</span>
<span class="n">compression</span><span class="o">=</span><span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="n">compressargs</span><span class="p">)</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;Creating a squashfs+ext4 runtime&quot;</span><span class="p">)</span>
<span class="n">rb</span><span class="o">.</span><span class="n">create_ext4_runtime</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">work_dir</span><span class="p">,</span> <span class="n">RUNTIME</span><span class="p">),</span> <span class="n">size</span><span class="o">=</span><span class="n">size</span><span class="p">,</span>
<span class="n">compression</span><span class="o">=</span><span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="n">compressargs</span><span class="p">)</span></div>
<span class="k">return</span> <span class="n">rb</span><span class="o">.</span><span class="n">create_ext4_runtime</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">work_dir</span><span class="p">,</span> <span class="n">RUNTIME</span><span class="p">),</span> <span class="n">size</span><span class="o">=</span><span class="n">size</span><span class="p">,</span>
<span class="n">compression</span><span class="o">=</span><span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="n">compressargs</span><span class="p">)</span></div>
<div class="viewcode-block" id="rebuild_initrds_for_live"><a class="viewcode-back" href="../../pylorax.html#pylorax.creator.rebuild_initrds_for_live">[docs]</a><span class="k">def</span> <span class="nf">rebuild_initrds_for_live</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">sys_root_dir</span><span class="p">,</span> <span class="n">results_dir</span><span class="p">):</span>
@ -412,9 +413,6 @@
<span class="k">if</span> <span class="ow">not</span> <span class="n">kernels</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s2">&quot;No initrds found, cannot rebuild_initrds&quot;</span><span class="p">)</span>
<span class="c1"># Hush some dracut warnings. TODO: bind-mount proc in place?</span>
<span class="nb">open</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">sys_root_dir</span><span class="p">,</span><span class="s2">&quot;/proc/modules&quot;</span><span class="p">),</span><span class="s2">&quot;w&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">opts</span><span class="o">.</span><span class="n">ostree</span><span class="p">:</span>
<span class="c1"># Dracut assumes to have some dirs in disk image</span>
<span class="c1"># /var/tmp for temp files</span>
@ -442,16 +440,15 @@
<span class="c1"># Construct an initrd from the kernel name</span>
<span class="n">outfile</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">basename</span><span class="p">(</span><span class="n">kernel</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">&quot;vmlinuz-&quot;</span><span class="p">,</span> <span class="s2">&quot;initrd-&quot;</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;.img&quot;</span><span class="p">)</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;rebuilding </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">outfile</span><span class="p">)</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;dracut warnings about /proc are safe to ignore&quot;</span><span class="p">)</span>
<span class="n">kver</span> <span class="o">=</span> <span class="n">kernel</span><span class="o">.</span><span class="n">version</span>
<span class="n">cmd</span> <span class="o">=</span> <span class="n">dracut</span> <span class="o">+</span> <span class="p">[</span><span class="s2">&quot;/results/&quot;</span><span class="o">+</span><span class="n">outfile</span><span class="p">,</span> <span class="n">kver</span><span class="p">]</span>
<span class="n">runcmd</span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span> <span class="n">root</span><span class="o">=</span><span class="n">sys_root_dir</span><span class="p">)</span>
<span class="n">shutil</span><span class="o">.</span><span class="n">copy2</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">sys_root_dir</span><span class="p">,</span> <span class="n">kernel</span><span class="o">.</span><span class="n">path</span><span class="p">),</span> <span class="n">results_dir</span><span class="p">)</span>
<span class="n">umount</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">sys_root_dir</span><span class="p">,</span> <span class="s2">&quot;var/tmp&quot;</span><span class="p">),</span> <span class="n">delete</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">umount</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">sys_root_dir</span><span class="p">,</span> <span class="s2">&quot;results&quot;</span><span class="p">),</span> <span class="n">delete</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
<span class="n">os</span><span class="o">.</span><span class="n">unlink</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">sys_root_dir</span><span class="p">,</span><span class="s2">&quot;/proc/modules&quot;</span><span class="p">))</span></div>
<span class="n">umount</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="n">sys_root_dir</span><span class="p">,</span> <span class="s2">&quot;results&quot;</span><span class="p">),</span> <span class="n">delete</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span></div>
<div class="viewcode-block" id="create_pxe_config"><a class="viewcode-back" href="../../pylorax.html#pylorax.creator.create_pxe_config">[docs]</a><span class="k">def</span> <span class="nf">create_pxe_config</span><span class="p">(</span><span class="n">template</span><span class="p">,</span> <span class="n">images_dir</span><span class="p">,</span> <span class="n">live_image_name</span><span class="p">,</span> <span class="n">add_args</span> <span class="o">=</span> <span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
@ -732,7 +729,10 @@
<span class="n">add_pxe_args</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">live_image_name</span> <span class="o">=</span> <span class="s2">&quot;live-rootfs.squashfs.img&quot;</span>
<span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span> <span class="o">=</span> <span class="n">squashfs_args</span><span class="p">(</span><span class="n">opts</span><span class="p">)</span>
<span class="n">mksquashfs</span><span class="p">(</span><span class="n">squashfs_root_dir</span><span class="p">,</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">work_dir</span><span class="p">,</span> <span class="n">live_image_name</span><span class="p">),</span> <span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="p">)</span>
<span class="n">rc</span> <span class="o">=</span> <span class="n">mksquashfs</span><span class="p">(</span><span class="n">squashfs_root_dir</span><span class="p">,</span> <span class="n">joinpaths</span><span class="p">(</span><span class="n">work_dir</span><span class="p">,</span> <span class="n">live_image_name</span><span class="p">),</span> <span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="p">)</span>
<span class="k">if</span> <span class="n">rc</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;mksquashfs failed to create </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">live_image_name</span><span class="p">)</span>
<span class="k">return</span> <span class="kc">None</span>
<span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;Rebuilding initramfs for live&quot;</span><span class="p">)</span>
<span class="k">with</span> <span class="n">Mount</span><span class="p">(</span><span class="n">rootfs_img</span><span class="p">,</span> <span class="n">opts</span><span class="o">=</span><span class="s2">&quot;loop&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">mnt_dir</span><span class="p">:</span>
@ -850,9 +850,10 @@
<span class="c1"># Create iso from a filesystem image</span>
<span class="n">disk_img</span> <span class="o">=</span> <span class="n">opts</span><span class="o">.</span><span class="n">fs_image</span> <span class="ow">or</span> <span class="n">disk_img</span>
<span class="k">with</span> <span class="n">Mount</span><span class="p">(</span><span class="n">disk_img</span><span class="p">,</span> <span class="n">opts</span><span class="o">=</span><span class="s2">&quot;loop&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">mount_dir</span><span class="p">:</span>
<span class="c1"># TODO check rc</span>
<span class="n">make_runtime</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">mount_dir</span><span class="p">,</span> <span class="n">work_dir</span><span class="p">,</span> <span class="n">calculate_disk_size</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">ks</span><span class="p">)</span><span class="o">/</span><span class="mf">1024.0</span><span class="p">)</span>
<span class="n">rc</span> <span class="o">=</span> <span class="n">make_runtime</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">mount_dir</span><span class="p">,</span> <span class="n">work_dir</span><span class="p">,</span> <span class="n">calculate_disk_size</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">ks</span><span class="p">)</span><span class="o">/</span><span class="mf">1024.0</span><span class="p">)</span>
<span class="k">if</span> <span class="n">rc</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;make_runtime failed with rc = </span><span class="si">%d</span><span class="s2">. See program.log&quot;</span><span class="p">,</span> <span class="n">rc</span><span class="p">)</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;make_runtime failed with rc = </span><span class="si">%d</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">rc</span><span class="p">)</span>
<span class="k">if</span> <span class="n">cancel_func</span> <span class="ow">and</span> <span class="n">cancel_func</span><span class="p">():</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;ISO creation canceled&quot;</span><span class="p">)</span>
@ -862,7 +863,10 @@
<span class="n">disk_img</span> <span class="o">=</span> <span class="n">opts</span><span class="o">.</span><span class="n">disk_image</span> <span class="ow">or</span> <span class="n">disk_img</span>
<span class="k">with</span> <span class="n">PartitionMount</span><span class="p">(</span><span class="n">disk_img</span><span class="p">)</span> <span class="k">as</span> <span class="n">img_mount</span><span class="p">:</span>
<span class="k">if</span> <span class="n">img_mount</span> <span class="ow">and</span> <span class="n">img_mount</span><span class="o">.</span><span class="n">mount_dir</span><span class="p">:</span>
<span class="n">make_runtime</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">img_mount</span><span class="o">.</span><span class="n">mount_dir</span><span class="p">,</span> <span class="n">work_dir</span><span class="p">,</span> <span class="n">calculate_disk_size</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">ks</span><span class="p">)</span><span class="o">/</span><span class="mf">1024.0</span><span class="p">)</span>
<span class="n">rc</span> <span class="o">=</span> <span class="n">make_runtime</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">img_mount</span><span class="o">.</span><span class="n">mount_dir</span><span class="p">,</span> <span class="n">work_dir</span><span class="p">,</span> <span class="n">calculate_disk_size</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">ks</span><span class="p">)</span><span class="o">/</span><span class="mf">1024.0</span><span class="p">)</span>
<span class="k">if</span> <span class="n">rc</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">:</span>
<span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">&quot;make_runtime failed with rc = </span><span class="si">%d</span><span class="s2">. See program.log&quot;</span><span class="p">,</span> <span class="n">rc</span><span class="p">)</span>
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="s2">&quot;make_runtime failed with rc = </span><span class="si">%d</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">rc</span><span class="p">)</span>
<span class="n">result_dir</span> <span class="o">=</span> <span class="n">make_livecd</span><span class="p">(</span><span class="n">opts</span><span class="p">,</span> <span class="n">img_mount</span><span class="o">.</span><span class="n">mount_dir</span><span class="p">,</span> <span class="n">work_dir</span><span class="p">)</span>
<span class="c1"># --iso-only removes the extra build artifacts, keeping only the boot.iso</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.decorators &mdash; Lorax 33.2 documentation</title>
<title>pylorax.decorators &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.discinfo &mdash; Lorax 33.2 documentation</title>
<title>pylorax.discinfo &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -187,7 +186,7 @@
<div class="viewcode-block" id="DiscInfo"><a class="viewcode-back" href="../../pylorax.html#pylorax.discinfo.DiscInfo">[docs]</a><span class="k">class</span> <span class="nc">DiscInfo</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">release</span><span class="p">,</span> <span class="n">basearch</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">release</span><span class="p">,</span> <span class="n">basearch</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">release</span> <span class="o">=</span> <span class="n">release</span>
<span class="bp">self</span><span class="o">.</span><span class="n">basearch</span> <span class="o">=</span> <span class="n">basearch</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.dnfbase &mdash; Lorax 33.2 documentation</title>
<title>pylorax.dnfbase &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -179,8 +178,8 @@
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">shutil</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="k">import</span> <span class="n">DEFAULT_PLATFORM_ID</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">flatconfig</span>
<span class="kn">from</span> <span class="nn">pylorax</span> <span class="kn">import</span> <span class="n">DEFAULT_PLATFORM_ID</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">flatconfig</span>
<div class="viewcode-block" id="get_dnf_base_object"><a class="viewcode-back" href="../../pylorax.html#pylorax.dnfbase.get_dnf_base_object">[docs]</a><span class="k">def</span> <span class="nf">get_dnf_base_object</span><span class="p">(</span><span class="n">installroot</span><span class="p">,</span> <span class="n">sources</span><span class="p">,</span> <span class="n">mirrorlists</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">repos</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">enablerepos</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">disablerepos</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.dnfhelper &mdash; Lorax 33.2 documentation</title>
<title>pylorax.dnfhelper &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -201,7 +200,7 @@
<div class="viewcode-block" id="LoraxDownloadCallback"><a class="viewcode-back" href="../../pylorax.html#pylorax.dnfhelper.LoraxDownloadCallback">[docs]</a><span class="k">class</span> <span class="nc">LoraxDownloadCallback</span><span class="p">(</span><span class="n">dnf</span><span class="o">.</span><span class="n">callback</span><span class="o">.</span><span class="n">DownloadProgress</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">downloads</span> <span class="o">=</span> <span class="n">collections</span><span class="o">.</span><span class="n">defaultdict</span><span class="p">(</span><span class="nb">int</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">last_time</span> <span class="o">=</span> <span class="n">time</span><span class="o">.</span><span class="n">time</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">total_files</span> <span class="o">=</span> <span class="mi">0</span>
@ -248,7 +247,7 @@
<div class="viewcode-block" id="LoraxRpmCallback"><a class="viewcode-back" href="../../pylorax.html#pylorax.dnfhelper.LoraxRpmCallback">[docs]</a><span class="k">class</span> <span class="nc">LoraxRpmCallback</span><span class="p">(</span><span class="n">dnf</span><span class="o">.</span><span class="n">callback</span><span class="o">.</span><span class="n">TransactionProgress</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="nb">super</span><span class="p">(</span><span class="n">LoraxRpmCallback</span><span class="p">,</span> <span class="bp">self</span><span class="p">)</span><span class="o">.</span><span class="fm">__init__</span><span class="p">()</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_last_ts</span> <span class="o">=</span> <span class="kc">None</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.executils &mdash; Lorax 33.2 documentation</title>
<title>pylorax.executils &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -179,7 +178,7 @@
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">subprocess</span>
<span class="kn">from</span> <span class="nn">subprocess</span> <span class="k">import</span> <span class="n">TimeoutExpired</span>
<span class="kn">from</span> <span class="nn">subprocess</span> <span class="kn">import</span> <span class="n">TimeoutExpired</span>
<span class="kn">import</span> <span class="nn">signal</span>
<span class="kn">import</span> <span class="nn">logging</span>
@ -187,7 +186,7 @@
<span class="n">program_log</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;program&quot;</span><span class="p">)</span>
<span class="c1"># pylint: disable=not-context-manager</span>
<span class="kn">from</span> <span class="nn">threading</span> <span class="k">import</span> <span class="n">Lock</span>
<span class="kn">from</span> <span class="nn">threading</span> <span class="kn">import</span> <span class="n">Lock</span>
<span class="n">program_log_lock</span> <span class="o">=</span> <span class="n">Lock</span><span class="p">()</span>
<span class="n">_child_env</span> <span class="o">=</span> <span class="p">{}</span>
@ -211,7 +210,7 @@
<span class="k">return</span> <span class="n">env</span></div>
<div class="viewcode-block" id="ExecProduct"><a class="viewcode-back" href="../../pylorax.html#pylorax.executils.ExecProduct">[docs]</a><span class="k">class</span> <span class="nc">ExecProduct</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">rc</span><span class="p">,</span> <span class="n">stdout</span><span class="p">,</span> <span class="n">stderr</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">rc</span><span class="p">,</span> <span class="n">stdout</span><span class="p">,</span> <span class="n">stderr</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">rc</span> <span class="o">=</span> <span class="n">rc</span>
<span class="bp">self</span><span class="o">.</span><span class="n">stdout</span> <span class="o">=</span> <span class="n">stdout</span>
<span class="bp">self</span><span class="o">.</span><span class="n">stderr</span> <span class="o">=</span> <span class="n">stderr</span></div>
@ -443,15 +442,15 @@
<span class="sd"> up the process when the output is no longer needed.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">proc</span><span class="p">,</span> <span class="n">argv</span><span class="p">,</span> <span class="n">callback</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">proc</span><span class="p">,</span> <span class="n">argv</span><span class="p">,</span> <span class="n">callback</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_proc</span> <span class="o">=</span> <span class="n">proc</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_argv</span> <span class="o">=</span> <span class="n">argv</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_callback</span> <span class="o">=</span> <span class="n">callback</span>
<span class="k">def</span> <span class="nf">__iter__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__iter__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">return</span> <span class="bp">self</span>
<span class="k">def</span> <span class="nf">__del__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__del__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="c1"># See if the process is still running</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_proc</span><span class="o">.</span><span class="n">poll</span><span class="p">()</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="c1"># Stop the process and ignore any problems that might arise</span>
@ -460,7 +459,7 @@
<span class="k">except</span> <span class="ne">OSError</span><span class="p">:</span>
<span class="k">pass</span>
<span class="k">def</span> <span class="nf">__next__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__next__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="c1"># Read the next line, blocking if a line is not yet available</span>
<span class="n">line</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_proc</span><span class="o">.</span><span class="n">stdout</span><span class="o">.</span><span class="n">readline</span><span class="p">()</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s2">&quot;utf-8&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">line</span> <span class="o">==</span> <span class="s1">&#39;&#39;</span> <span class="ow">or</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">_callback</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_proc</span><span class="p">):</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.imgutils &mdash; Lorax 33.2 documentation</title>
<title>pylorax.imgutils &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -180,18 +179,18 @@
<span class="n">logger</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;pylorax.imgutils&quot;</span><span class="p">)</span>
<span class="kn">import</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">tempfile</span>
<span class="kn">from</span> <span class="nn">os.path</span> <span class="k">import</span> <span class="n">join</span><span class="p">,</span> <span class="n">dirname</span>
<span class="kn">from</span> <span class="nn">subprocess</span> <span class="k">import</span> <span class="n">Popen</span><span class="p">,</span> <span class="n">PIPE</span><span class="p">,</span> <span class="n">CalledProcessError</span>
<span class="kn">from</span> <span class="nn">os.path</span> <span class="kn">import</span> <span class="n">join</span><span class="p">,</span> <span class="n">dirname</span>
<span class="kn">from</span> <span class="nn">subprocess</span> <span class="kn">import</span> <span class="n">Popen</span><span class="p">,</span> <span class="n">PIPE</span><span class="p">,</span> <span class="n">CalledProcessError</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="kn">import</span> <span class="nn">time</span>
<span class="kn">import</span> <span class="nn">traceback</span>
<span class="kn">import</span> <span class="nn">multiprocessing</span>
<span class="kn">from</span> <span class="nn">time</span> <span class="k">import</span> <span class="n">sleep</span>
<span class="kn">from</span> <span class="nn">time</span> <span class="kn">import</span> <span class="n">sleep</span>
<span class="kn">import</span> <span class="nn">shutil</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">cpfile</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="k">import</span> <span class="n">execWithRedirect</span><span class="p">,</span> <span class="n">execWithCapture</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="k">import</span> <span class="n">runcmd</span><span class="p">,</span> <span class="n">runcmd_output</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">cpfile</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="kn">import</span> <span class="n">execWithRedirect</span><span class="p">,</span> <span class="n">execWithCapture</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="kn">import</span> <span class="n">runcmd</span><span class="p">,</span> <span class="n">runcmd_output</span>
<span class="c1">######## Functions for making container images (cpio, tar, squashfs) ##########</span>
@ -496,34 +495,34 @@
<span class="c1">######## Execution contexts - use with the &#39;with&#39; statement ##############</span>
<div class="viewcode-block" id="LoopDev"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.LoopDev">[docs]</a><span class="k">class</span> <span class="nc">LoopDev</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filename</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">filename</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">loopdev</span> <span class="o">=</span> <span class="kc">None</span>
<span class="bp">self</span><span class="o">.</span><span class="n">filename</span> <span class="o">=</span> <span class="n">filename</span>
<span class="k">if</span> <span class="n">size</span><span class="p">:</span>
<span class="n">mksparse</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">filename</span><span class="p">,</span> <span class="n">size</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">__enter__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__enter__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">loopdev</span> <span class="o">=</span> <span class="n">loop_attach</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">filename</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">loopdev</span>
<span class="k">def</span> <span class="nf">__exit__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exc_type</span><span class="p">,</span> <span class="n">exc_value</span><span class="p">,</span> <span class="n">tracebk</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__exit__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exc_type</span><span class="p">,</span> <span class="n">exc_value</span><span class="p">,</span> <span class="n">tracebk</span><span class="p">):</span>
<span class="n">loop_detach</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">loopdev</span><span class="p">)</span></div>
<div class="viewcode-block" id="DMDev"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.DMDev">[docs]</a><span class="k">class</span> <span class="nc">DMDev</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dev</span><span class="p">,</span> <span class="n">size</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dev</span><span class="p">,</span> <span class="n">size</span><span class="p">,</span> <span class="n">name</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mapperdev</span> <span class="o">=</span> <span class="kc">None</span>
<span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">dev</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">)</span> <span class="o">=</span> <span class="p">(</span><span class="n">dev</span><span class="p">,</span> <span class="n">size</span><span class="p">,</span> <span class="n">name</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">__enter__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__enter__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mapperdev</span> <span class="o">=</span> <span class="n">dm_attach</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">dev</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">size</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">name</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mapperdev</span>
<span class="k">def</span> <span class="nf">__exit__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exc_type</span><span class="p">,</span> <span class="n">exc_value</span><span class="p">,</span> <span class="n">tracebk</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__exit__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exc_type</span><span class="p">,</span> <span class="n">exc_value</span><span class="p">,</span> <span class="n">tracebk</span><span class="p">):</span>
<span class="n">dm_detach</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mapperdev</span><span class="p">)</span></div>
<div class="viewcode-block" id="Mount"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.Mount">[docs]</a><span class="k">class</span> <span class="nc">Mount</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dev</span><span class="p">,</span> <span class="n">opts</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">mnt</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dev</span><span class="p">,</span> <span class="n">opts</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">,</span> <span class="n">mnt</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">dev</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">opts</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">mnt</span><span class="p">)</span> <span class="o">=</span> <span class="p">(</span><span class="n">dev</span><span class="p">,</span> <span class="n">opts</span><span class="p">,</span> <span class="n">mnt</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">__enter__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__enter__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">mnt</span> <span class="o">=</span> <span class="n">mount</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">dev</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">opts</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">mnt</span><span class="p">)</span>
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">mnt</span>
<span class="k">def</span> <span class="nf">__exit__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exc_type</span><span class="p">,</span> <span class="n">exc_value</span><span class="p">,</span> <span class="n">tracebk</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__exit__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exc_type</span><span class="p">,</span> <span class="n">exc_value</span><span class="p">,</span> <span class="n">tracebk</span><span class="p">):</span>
<span class="n">umount</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mnt</span><span class="p">)</span></div>
<div class="viewcode-block" id="kpartx_disk_img"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.kpartx_disk_img">[docs]</a><span class="k">def</span> <span class="nf">kpartx_disk_img</span><span class="p">(</span><span class="n">disk_img</span><span class="p">):</span>
@ -553,7 +552,7 @@
<div class="viewcode-block" id="PartitionMount"><a class="viewcode-back" href="../../pylorax.html#pylorax.imgutils.PartitionMount">[docs]</a><span class="k">class</span> <span class="nc">PartitionMount</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot; Mount a partitioned image file using kpartx &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">,</span> <span class="n">mount_ok</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">submount</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">,</span> <span class="n">mount_ok</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">submount</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> :param str disk_img: The full path to a partitioned disk image</span>
<span class="sd"> :param mount_ok: A function that is passed the mount point and</span>
@ -585,7 +584,7 @@
<span class="c1"># list of (deviceName, sizeInBytes)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">loop_devices</span> <span class="o">=</span> <span class="n">kpartx_disk_img</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">disk_img</span><span class="p">)</span>
<span class="k">def</span> <span class="nf">__enter__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__enter__</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="c1"># Mount the device selected by mount_ok, if possible</span>
<span class="bp">self</span><span class="o">.</span><span class="n">temp_dir</span> <span class="o">=</span> <span class="n">tempfile</span><span class="o">.</span><span class="n">mkdtemp</span><span class="p">()</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">submount</span><span class="p">:</span>
@ -612,7 +611,7 @@
<span class="bp">self</span><span class="o">.</span><span class="n">temp_dir</span> <span class="o">=</span> <span class="kc">None</span>
<span class="k">return</span> <span class="bp">self</span>
<span class="k">def</span> <span class="nf">__exit__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exc_type</span><span class="p">,</span> <span class="n">exc_value</span><span class="p">,</span> <span class="n">tracebk</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__exit__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">exc_type</span><span class="p">,</span> <span class="n">exc_value</span><span class="p">,</span> <span class="n">tracebk</span><span class="p">):</span>
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">temp_dir</span><span class="p">:</span>
<span class="n">umount</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">mount_dir</span><span class="p">)</span>
<span class="n">shutil</span><span class="o">.</span><span class="n">rmtree</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">temp_dir</span><span class="p">)</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.installer &mdash; Lorax 33.2 documentation</title>
<title>pylorax.installer &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -178,7 +177,7 @@
<span class="kn">import</span> <span class="nn">glob</span>
<span class="kn">import</span> <span class="nn">json</span>
<span class="kn">from</span> <span class="nn">math</span> <span class="k">import</span> <span class="n">ceil</span>
<span class="kn">from</span> <span class="nn">math</span> <span class="kn">import</span> <span class="n">ceil</span>
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">subprocess</span>
<span class="kn">import</span> <span class="nn">shutil</span>
@ -186,14 +185,14 @@
<span class="kn">import</span> <span class="nn">tempfile</span>
<span class="c1"># Use the Lorax treebuilder branch for iso creation</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="k">import</span> <span class="n">execWithRedirect</span><span class="p">,</span> <span class="n">execReadlines</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="k">import</span> <span class="n">PartitionMount</span><span class="p">,</span> <span class="n">mksparse</span><span class="p">,</span> <span class="n">mkext4img</span><span class="p">,</span> <span class="n">loop_detach</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="k">import</span> <span class="n">get_loop_name</span><span class="p">,</span> <span class="n">dm_detach</span><span class="p">,</span> <span class="n">mount</span><span class="p">,</span> <span class="n">umount</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="k">import</span> <span class="n">mkqemu_img</span><span class="p">,</span> <span class="n">mktar</span><span class="p">,</span> <span class="n">mkcpio</span><span class="p">,</span> <span class="n">mkfsimage_from_disk</span>
<span class="kn">from</span> <span class="nn">pylorax.monitor</span> <span class="k">import</span> <span class="n">LogMonitor</span>
<span class="kn">from</span> <span class="nn">pylorax.mount</span> <span class="k">import</span> <span class="n">IsoMountpoint</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span>
<span class="kn">from</span> <span class="nn">pylorax.treebuilder</span> <span class="k">import</span> <span class="n">udev_escape</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="kn">import</span> <span class="n">execWithRedirect</span><span class="p">,</span> <span class="n">execReadlines</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">PartitionMount</span><span class="p">,</span> <span class="n">mksparse</span><span class="p">,</span> <span class="n">mkext4img</span><span class="p">,</span> <span class="n">loop_detach</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">get_loop_name</span><span class="p">,</span> <span class="n">dm_detach</span><span class="p">,</span> <span class="n">mount</span><span class="p">,</span> <span class="n">umount</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">mkqemu_img</span><span class="p">,</span> <span class="n">mktar</span><span class="p">,</span> <span class="n">mkcpio</span><span class="p">,</span> <span class="n">mkfsimage_from_disk</span>
<span class="kn">from</span> <span class="nn">pylorax.monitor</span> <span class="kn">import</span> <span class="n">LogMonitor</span>
<span class="kn">from</span> <span class="nn">pylorax.mount</span> <span class="kn">import</span> <span class="n">IsoMountpoint</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span>
<span class="kn">from</span> <span class="nn">pylorax.treebuilder</span> <span class="kn">import</span> <span class="n">udev_escape</span>
<span class="n">ROOT_PATH</span> <span class="o">=</span> <span class="s2">&quot;/mnt/sysimage/&quot;</span>
@ -302,7 +301,7 @@
<span class="s2">&quot;ppc64le&quot;</span><span class="p">:</span> <span class="s2">&quot;qemu-system-ppc64&quot;</span>
<span class="p">}</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">opts</span><span class="p">,</span> <span class="n">iso</span><span class="p">,</span> <span class="n">ks_paths</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">,</span> <span class="n">img_size</span><span class="o">=</span><span class="mi">2048</span><span class="p">,</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">opts</span><span class="p">,</span> <span class="n">iso</span><span class="p">,</span> <span class="n">ks_paths</span><span class="p">,</span> <span class="n">disk_img</span><span class="p">,</span> <span class="n">img_size</span><span class="o">=</span><span class="mi">2048</span><span class="p">,</span>
<span class="n">kernel_args</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">memory</span><span class="o">=</span><span class="mi">1024</span><span class="p">,</span> <span class="n">vcpus</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">vnc</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">arch</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">cancel_func</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">virtio_host</span><span class="o">=</span><span class="s2">&quot;127.0.0.1&quot;</span><span class="p">,</span> <span class="n">virtio_port</span><span class="o">=</span><span class="mi">6080</span><span class="p">,</span>
<span class="n">image_type</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">boot_uefi</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="n">ovmf_path</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.ltmpl &mdash; Lorax 33.2 documentation</title>
<title>pylorax.ltmpl &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -183,25 +182,25 @@
<span class="n">logger</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;pylorax.ltmpl&quot;</span><span class="p">)</span>
<span class="kn">import</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">re</span><span class="o">,</span> <span class="nn">glob</span><span class="o">,</span> <span class="nn">shlex</span><span class="o">,</span> <span class="nn">fnmatch</span>
<span class="kn">from</span> <span class="nn">os.path</span> <span class="k">import</span> <span class="n">basename</span><span class="p">,</span> <span class="n">isdir</span>
<span class="kn">from</span> <span class="nn">subprocess</span> <span class="k">import</span> <span class="n">CalledProcessError</span>
<span class="kn">from</span> <span class="nn">os.path</span> <span class="kn">import</span> <span class="n">basename</span><span class="p">,</span> <span class="n">isdir</span>
<span class="kn">from</span> <span class="nn">subprocess</span> <span class="kn">import</span> <span class="n">CalledProcessError</span>
<span class="kn">import</span> <span class="nn">shutil</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span><span class="p">,</span> <span class="n">cpfile</span><span class="p">,</span> <span class="n">mvfile</span><span class="p">,</span> <span class="n">replace</span><span class="p">,</span> <span class="n">remove</span>
<span class="kn">from</span> <span class="nn">pylorax.dnfhelper</span> <span class="k">import</span> <span class="n">LoraxDownloadCallback</span><span class="p">,</span> <span class="n">LoraxRpmCallback</span>
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="k">import</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="k">import</span> <span class="n">runcmd</span><span class="p">,</span> <span class="n">runcmd_output</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="k">import</span> <span class="n">mkcpio</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span><span class="p">,</span> <span class="n">cpfile</span><span class="p">,</span> <span class="n">mvfile</span><span class="p">,</span> <span class="n">replace</span><span class="p">,</span> <span class="n">remove</span>
<span class="kn">from</span> <span class="nn">pylorax.dnfhelper</span> <span class="kn">import</span> <span class="n">LoraxDownloadCallback</span><span class="p">,</span> <span class="n">LoraxRpmCallback</span>
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="kn">import</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="kn">import</span> <span class="n">runcmd</span><span class="p">,</span> <span class="n">runcmd_output</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">mkcpio</span>
<span class="kn">from</span> <span class="nn">mako.lookup</span> <span class="k">import</span> <span class="n">TemplateLookup</span>
<span class="kn">from</span> <span class="nn">mako.exceptions</span> <span class="k">import</span> <span class="n">text_error_template</span>
<span class="kn">from</span> <span class="nn">mako.lookup</span> <span class="kn">import</span> <span class="n">TemplateLookup</span>
<span class="kn">from</span> <span class="nn">mako.exceptions</span> <span class="kn">import</span> <span class="n">text_error_template</span>
<span class="kn">import</span> <span class="nn">sys</span><span class="o">,</span> <span class="nn">traceback</span>
<span class="kn">import</span> <span class="nn">struct</span>
<span class="kn">import</span> <span class="nn">dnf</span>
<span class="kn">import</span> <span class="nn">collections.abc</span>
<div class="viewcode-block" id="LoraxTemplate"><a class="viewcode-back" href="../../pylorax.html#pylorax.ltmpl.LoraxTemplate">[docs]</a><span class="k">class</span> <span class="nc">LoraxTemplate</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">directories</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">directories</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="n">directories</span> <span class="o">=</span> <span class="n">directories</span> <span class="ow">or</span> <span class="p">[</span><span class="s2">&quot;/usr/share/lorax&quot;</span><span class="p">]</span>
<span class="c1"># we have to add [&quot;/&quot;] to the template lookup directories or the</span>
<span class="c1"># file includes won&#39;t work properly for absolute paths</span>
@ -290,7 +289,7 @@
<span class="sd"> * Parsing and execution are *separate* passes - so you can&#39;t use the result</span>
<span class="sd"> of a command in an %if statement (or any other control statements)!</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">fatalerrors</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">templatedir</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">defaults</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">builtins</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">fatalerrors</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">templatedir</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">defaults</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">builtins</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">fatalerrors</span> <span class="o">=</span> <span class="n">fatalerrors</span>
<span class="bp">self</span><span class="o">.</span><span class="n">templatedir</span> <span class="o">=</span> <span class="n">templatedir</span> <span class="ow">or</span> <span class="s2">&quot;/usr/share/lorax&quot;</span>
<span class="bp">self</span><span class="o">.</span><span class="n">templatefile</span> <span class="o">=</span> <span class="kc">None</span>
@ -376,7 +375,7 @@
<span class="sd"> * Commands should raise exceptions for errors - don&#39;t use sys.exit()</span>
<span class="sd"> &#39;&#39;&#39;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inroot</span><span class="p">,</span> <span class="n">outroot</span><span class="p">,</span> <span class="n">dbo</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">fatalerrors</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">inroot</span><span class="p">,</span> <span class="n">outroot</span><span class="p">,</span> <span class="n">dbo</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">fatalerrors</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">templatedir</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">defaults</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">inroot</span> <span class="o">=</span> <span class="n">inroot</span>
<span class="bp">self</span><span class="o">.</span><span class="n">outroot</span> <span class="o">=</span> <span class="n">outroot</span>
@ -419,9 +418,9 @@
<span class="n">pkgs</span> <span class="o">=</span> <span class="p">[]</span>
<span class="n">debug_pkgs</span> <span class="o">=</span> <span class="p">[]</span>
<span class="k">for</span> <span class="n">p</span> <span class="ow">in</span> <span class="nb">list</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">dbo</span><span class="o">.</span><span class="n">transaction</span><span class="o">.</span><span class="n">install_set</span><span class="p">):</span>
<span class="n">pkgs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;</span><span class="si">{p.name}</span><span class="s2">-</span><span class="si">{p.version}</span><span class="s2">-</span><span class="si">{p.release}</span><span class="s2">.</span><span class="si">{p.arch}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="n">pkgs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">p</span><span class="o">.</span><span class="n">name</span><span class="si">}</span><span class="s2">-</span><span class="si">{</span><span class="n">p</span><span class="o">.</span><span class="n">version</span><span class="si">}</span><span class="s2">-</span><span class="si">{</span><span class="n">p</span><span class="o">.</span><span class="n">release</span><span class="si">}</span><span class="s2">.</span><span class="si">{</span><span class="n">p</span><span class="o">.</span><span class="n">arch</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">available</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">name</span><span class="o">=</span><span class="n">p</span><span class="o">.</span><span class="n">name</span><span class="o">+</span><span class="s2">&quot;-debuginfo&quot;</span><span class="p">):</span>
<span class="n">debug_pkgs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="n">f</span><span class="s2">&quot;</span><span class="si">{p.name}</span><span class="s2">-debuginfo-</span><span class="si">{p.epoch}</span><span class="s2">:</span><span class="si">{p.version}</span><span class="s2">-</span><span class="si">{p.release}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="n">debug_pkgs</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;</span><span class="si">{</span><span class="n">p</span><span class="o">.</span><span class="n">name</span><span class="si">}</span><span class="s2">-debuginfo-</span><span class="si">{</span><span class="n">p</span><span class="o">.</span><span class="n">epoch</span><span class="si">}</span><span class="s2">:</span><span class="si">{</span><span class="n">p</span><span class="o">.</span><span class="n">version</span><span class="si">}</span><span class="s2">-</span><span class="si">{</span><span class="n">p</span><span class="o">.</span><span class="n">release</span><span class="si">}</span><span class="s2">&quot;</span><span class="p">)</span>
<span class="k">with</span> <span class="nb">open</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_out</span><span class="p">(</span><span class="s2">&quot;root/lorax-packages.log&quot;</span><span class="p">),</span> <span class="s2">&quot;w&quot;</span><span class="p">)</span> <span class="k">as</span> <span class="n">f</span><span class="p">:</span>
<span class="n">f</span><span class="o">.</span><span class="n">write</span><span class="p">(</span><span class="s2">&quot;</span><span class="se">\n</span><span class="s2">&quot;</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="nb">sorted</span><span class="p">(</span><span class="n">pkgs</span><span class="p">)))</span>
@ -970,7 +969,7 @@
<span class="sd"> It is meant to be used with the live-install.tmpl which lists the per-arch</span>
<span class="sd"> pacages needed to build the live-iso output.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dbo</span><span class="p">,</span> <span class="n">fatalerrors</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">templatedir</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">defaults</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">dbo</span><span class="p">,</span> <span class="n">fatalerrors</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">templatedir</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">defaults</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">dbo</span> <span class="o">=</span> <span class="n">dbo</span>
<span class="bp">self</span><span class="o">.</span><span class="n">pkgs</span> <span class="o">=</span> <span class="p">[]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">pkgnames</span> <span class="o">=</span> <span class="p">[]</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.monitor &mdash; Lorax 33.2 documentation</title>
<title>pylorax.monitor &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -297,7 +296,7 @@
<span class="c1"># Number of seconds to wait for a connection after startup</span>
<span class="n">timeout</span> <span class="o">=</span> <span class="mi">60</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">log_path</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">log_path</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Setup the log server</span>
@ -335,7 +334,7 @@
<span class="sd"> This needs to be running before the virt-install runs, it expects</span>
<span class="sd"> there to be a listener on the port used for the virtio log port.</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">log_path</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">host</span><span class="o">=</span><span class="s2">&quot;localhost&quot;</span><span class="p">,</span> <span class="n">port</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">timeout</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">log_request_handler_class</span><span class="o">=</span><span class="n">LogRequestHandler</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">log_path</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">host</span><span class="o">=</span><span class="s2">&quot;localhost&quot;</span><span class="p">,</span> <span class="n">port</span><span class="o">=</span><span class="mi">0</span><span class="p">,</span> <span class="n">timeout</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">log_request_handler_class</span><span class="o">=</span><span class="n">LogRequestHandler</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Start a thread to monitor the logs.</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.mount &mdash; Lorax 33.2 documentation</title>
<title>pylorax.mount &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -181,9 +180,9 @@
<span class="kn">import</span> <span class="nn">os</span>
<span class="kn">import</span> <span class="nn">pycdlib</span>
<span class="kn">from</span> <span class="nn">pycdlib.pycdlibexception</span> <span class="k">import</span> <span class="n">PyCdlibException</span>
<span class="kn">from</span> <span class="nn">pycdlib.pycdlibexception</span> <span class="kn">import</span> <span class="n">PyCdlibException</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="k">import</span> <span class="n">mount</span><span class="p">,</span> <span class="n">umount</span>
<span class="kn">from</span> <span class="nn">pylorax.imgutils</span> <span class="kn">import</span> <span class="n">mount</span><span class="p">,</span> <span class="n">umount</span>
<div class="viewcode-block" id="IsoMountpoint"><a class="viewcode-back" href="../../pylorax.html#pylorax.mount.IsoMountpoint">[docs]</a><span class="k">class</span> <span class="nc">IsoMountpoint</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
@ -194,7 +193,7 @@
<span class="sd"> stage2 can be either LiveOS/squashfs.img or images/install.img</span>
<span class="sd"> &quot;&quot;&quot;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">iso_path</span><span class="p">,</span> <span class="n">initrd_path</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">iso_path</span><span class="p">,</span> <span class="n">initrd_path</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Mount the iso</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.sysutils &mdash; Lorax 33.2 documentation</title>
<title>pylorax.sysutils &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -190,9 +189,9 @@
<span class="kn">import</span> <span class="nn">glob</span>
<span class="kn">import</span> <span class="nn">shutil</span>
<span class="kn">import</span> <span class="nn">shlex</span>
<span class="kn">from</span> <span class="nn">configparser</span> <span class="k">import</span> <span class="n">ConfigParser</span>
<span class="kn">from</span> <span class="nn">configparser</span> <span class="kn">import</span> <span class="n">ConfigParser</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="k">import</span> <span class="n">runcmd</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="kn">import</span> <span class="n">runcmd</span>
<div class="viewcode-block" id="joinpaths"><a class="viewcode-back" href="../../pylorax.html#pylorax.sysutils.joinpaths">[docs]</a><span class="k">def</span> <span class="nf">joinpaths</span><span class="p">(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span>
<span class="n">path</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">sep</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">args</span><span class="p">)</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.treebuilder &mdash; Lorax 33.2 documentation</title>
<title>pylorax.treebuilder &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -180,17 +179,17 @@
<span class="n">logger</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="s2">&quot;pylorax.treebuilder&quot;</span><span class="p">)</span>
<span class="kn">import</span> <span class="nn">os</span><span class="o">,</span> <span class="nn">re</span>
<span class="kn">from</span> <span class="nn">os.path</span> <span class="k">import</span> <span class="n">basename</span>
<span class="kn">from</span> <span class="nn">shutil</span> <span class="k">import</span> <span class="n">copytree</span><span class="p">,</span> <span class="n">copy2</span>
<span class="kn">from</span> <span class="nn">subprocess</span> <span class="k">import</span> <span class="n">CalledProcessError</span>
<span class="kn">from</span> <span class="nn">pathlib</span> <span class="k">import</span> <span class="n">Path</span>
<span class="kn">from</span> <span class="nn">os.path</span> <span class="kn">import</span> <span class="n">basename</span>
<span class="kn">from</span> <span class="nn">shutil</span> <span class="kn">import</span> <span class="n">copytree</span><span class="p">,</span> <span class="n">copy2</span>
<span class="kn">from</span> <span class="nn">subprocess</span> <span class="kn">import</span> <span class="n">CalledProcessError</span>
<span class="kn">from</span> <span class="nn">pathlib</span> <span class="kn">import</span> <span class="n">Path</span>
<span class="kn">import</span> <span class="nn">itertools</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="k">import</span> <span class="n">joinpaths</span><span class="p">,</span> <span class="n">remove</span>
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="k">import</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.ltmpl</span> <span class="k">import</span> <span class="n">LoraxTemplateRunner</span>
<span class="kn">from</span> <span class="nn">pylorax.sysutils</span> <span class="kn">import</span> <span class="n">joinpaths</span><span class="p">,</span> <span class="n">remove</span>
<span class="kn">from</span> <span class="nn">pylorax.base</span> <span class="kn">import</span> <span class="n">DataHolder</span>
<span class="kn">from</span> <span class="nn">pylorax.ltmpl</span> <span class="kn">import</span> <span class="n">LoraxTemplateRunner</span>
<span class="kn">import</span> <span class="nn">pylorax.imgutils</span> <span class="k">as</span> <span class="nn">imgutils</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="k">import</span> <span class="n">runcmd</span><span class="p">,</span> <span class="n">runcmd_output</span><span class="p">,</span> <span class="n">execWithCapture</span>
<span class="kn">from</span> <span class="nn">pylorax.executils</span> <span class="kn">import</span> <span class="n">runcmd</span><span class="p">,</span> <span class="n">runcmd_output</span><span class="p">,</span> <span class="n">execWithCapture</span>
<span class="n">templatemap</span> <span class="o">=</span> <span class="p">{</span>
<span class="s1">&#39;i386&#39;</span><span class="p">:</span> <span class="s1">&#39;x86.tmpl&#39;</span><span class="p">,</span>
@ -227,7 +226,7 @@
<div class="viewcode-block" id="RuntimeBuilder"><a class="viewcode-back" href="../../pylorax.html#pylorax.treebuilder.RuntimeBuilder">[docs]</a><span class="k">class</span> <span class="nc">RuntimeBuilder</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;Builds the anaconda runtime image.&#39;&#39;&#39;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">product</span><span class="p">,</span> <span class="n">arch</span><span class="p">,</span> <span class="n">dbo</span><span class="p">,</span> <span class="n">templatedir</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">product</span><span class="p">,</span> <span class="n">arch</span><span class="p">,</span> <span class="n">dbo</span><span class="p">,</span> <span class="n">templatedir</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">installpkgs</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">excludepkgs</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">add_templates</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
<span class="n">add_template_vars</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span>
@ -393,7 +392,7 @@
<span class="n">os</span><span class="o">.</span><span class="n">makedirs</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">outfile</span><span class="p">))</span>
<span class="c1"># squash the rootfs</span>
<span class="n">imgutils</span><span class="o">.</span><span class="n">mksquashfs</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">root</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="p">)</span></div>
<span class="k">return</span> <span class="n">imgutils</span><span class="o">.</span><span class="n">mksquashfs</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">root</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="p">)</span></div>
<div class="viewcode-block" id="RuntimeBuilder.create_ext4_runtime"><a class="viewcode-back" href="../../pylorax.html#pylorax.treebuilder.RuntimeBuilder.create_ext4_runtime">[docs]</a> <span class="k">def</span> <span class="nf">create_ext4_runtime</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">outfile</span><span class="o">=</span><span class="s2">&quot;/var/tmp/squashfs.img&quot;</span><span class="p">,</span> <span class="n">compression</span><span class="o">=</span><span class="s2">&quot;xz&quot;</span><span class="p">,</span> <span class="n">compressargs</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">size</span><span class="o">=</span><span class="mi">2</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot;Create a squashfs compressed ext4 runtime&quot;&quot;&quot;</span>
@ -412,8 +411,9 @@
<span class="k">raise</span>
<span class="c1"># squash the live rootfs and clean up workdir</span>
<span class="n">imgutils</span><span class="o">.</span><span class="n">mksquashfs</span><span class="p">(</span><span class="n">workdir</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="p">)</span>
<span class="n">remove</span><span class="p">(</span><span class="n">workdir</span><span class="p">)</span></div>
<span class="n">rc</span> <span class="o">=</span> <span class="n">imgutils</span><span class="o">.</span><span class="n">mksquashfs</span><span class="p">(</span><span class="n">workdir</span><span class="p">,</span> <span class="n">outfile</span><span class="p">,</span> <span class="n">compression</span><span class="p">,</span> <span class="n">compressargs</span><span class="p">)</span>
<span class="n">remove</span><span class="p">(</span><span class="n">workdir</span><span class="p">)</span>
<span class="k">return</span> <span class="n">rc</span></div>
<div class="viewcode-block" id="RuntimeBuilder.finished"><a class="viewcode-back" href="../../pylorax.html#pylorax.treebuilder.RuntimeBuilder.finished">[docs]</a> <span class="k">def</span> <span class="nf">finished</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="sd">&quot;&quot;&quot; Done using RuntimeBuilder</span>
@ -425,7 +425,7 @@
<div class="viewcode-block" id="TreeBuilder"><a class="viewcode-back" href="../../pylorax.html#pylorax.treebuilder.TreeBuilder">[docs]</a><span class="k">class</span> <span class="nc">TreeBuilder</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="sd">&#39;&#39;&#39;Builds the arch-specific boot images.</span>
<span class="sd"> inroot should be the installtree root (the newly-built runtime dir)&#39;&#39;&#39;</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">product</span><span class="p">,</span> <span class="n">arch</span><span class="p">,</span> <span class="n">inroot</span><span class="p">,</span> <span class="n">outroot</span><span class="p">,</span> <span class="n">runtime</span><span class="p">,</span> <span class="n">isolabel</span><span class="p">,</span> <span class="n">domacboot</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">doupgrade</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">product</span><span class="p">,</span> <span class="n">arch</span><span class="p">,</span> <span class="n">inroot</span><span class="p">,</span> <span class="n">outroot</span><span class="p">,</span> <span class="n">runtime</span><span class="p">,</span> <span class="n">isolabel</span><span class="p">,</span> <span class="n">domacboot</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">doupgrade</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">templatedir</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">add_templates</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">add_template_vars</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">workdir</span><span class="o">=</span><span class="kc">None</span><span class="p">,</span> <span class="n">extra_boot_args</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">):</span>
<span class="c1"># NOTE: if you pass an arg named &quot;runtime&quot; to a mako template it&#39;ll</span>
@ -466,8 +466,6 @@
<span class="k">if</span> <span class="ow">not</span> <span class="bp">self</span><span class="o">.</span><span class="n">kernels</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">Exception</span><span class="p">(</span><span class="s2">&quot;No kernels found, cannot rebuild_initrds&quot;</span><span class="p">)</span>
<span class="c1"># Hush some dracut warnings. TODO: bind-mount proc in place?</span>
<span class="nb">open</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">inroot</span><span class="p">,</span><span class="s2">&quot;/proc/modules&quot;</span><span class="p">),</span><span class="s2">&quot;w&quot;</span><span class="p">)</span>
<span class="k">for</span> <span class="n">kernel</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">kernels</span><span class="p">:</span>
<span class="k">if</span> <span class="n">prefix</span><span class="p">:</span>
<span class="n">idir</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">dirname</span><span class="p">(</span><span class="n">kernel</span><span class="o">.</span><span class="n">path</span><span class="p">)</span>
@ -479,14 +477,14 @@
<span class="c1"># Construct an initrd from the kernel name</span>
<span class="n">outfile</span> <span class="o">=</span> <span class="n">kernel</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s2">&quot;vmlinuz-&quot;</span><span class="p">,</span> <span class="s2">&quot;initrd-&quot;</span><span class="p">)</span> <span class="o">+</span> <span class="s2">&quot;.img&quot;</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;rebuilding </span><span class="si">%s</span><span class="s2">&quot;</span><span class="p">,</span> <span class="n">outfile</span><span class="p">)</span>
<span class="n">logger</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">&quot;dracut warnings about /proc are safe to ignore&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">backup</span><span class="p">:</span>
<span class="n">initrd</span> <span class="o">=</span> <span class="n">joinpaths</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">inroot</span><span class="p">,</span> <span class="n">outfile</span><span class="p">)</span>
<span class="k">if</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">exists</span><span class="p">(</span><span class="n">initrd</span><span class="p">):</span>
<span class="n">os</span><span class="o">.</span><span class="n">rename</span><span class="p">(</span><span class="n">initrd</span><span class="p">,</span> <span class="n">initrd</span> <span class="o">+</span> <span class="n">backup</span><span class="p">)</span>
<span class="n">cmd</span> <span class="o">=</span> <span class="n">dracut</span> <span class="o">+</span> <span class="p">[</span><span class="n">outfile</span><span class="p">,</span> <span class="n">kernel</span><span class="o">.</span><span class="n">version</span><span class="p">]</span>
<span class="n">runcmd</span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span> <span class="n">root</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">inroot</span><span class="p">)</span>
<span class="n">os</span><span class="o">.</span><span class="n">unlink</span><span class="p">(</span><span class="n">joinpaths</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">inroot</span><span class="p">,</span><span class="s2">&quot;/proc/modules&quot;</span><span class="p">))</span></div>
<span class="n">runcmd</span><span class="p">(</span><span class="n">cmd</span><span class="p">,</span> <span class="n">root</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">inroot</span><span class="p">)</span></div>
<div class="viewcode-block" id="TreeBuilder.build"><a class="viewcode-back" href="../../pylorax.html#pylorax.treebuilder.TreeBuilder.build">[docs]</a> <span class="k">def</span> <span class="nf">build</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="n">templatefile</span> <span class="o">=</span> <span class="n">templatemap</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">vars</span><span class="o">.</span><span class="n">arch</span><span class="o">.</span><span class="n">basearch</span><span class="p">]</span>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>pylorax.treeinfo &mdash; Lorax 33.2 documentation</title>
<title>pylorax.treeinfo &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></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/language_data.js"></script>
<script src="../../_static/jquery.js"></script>
<script src="../../_static/underscore.js"></script>
<script src="../../_static/doctools.js"></script>
<script src="../../_static/language_data.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
@ -58,7 +58,7 @@
<div class="version">
33.2
34.3
</div>
@ -87,7 +87,6 @@
<li class="toctree-l1"><a class="reference internal" href="../../intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../product-images.html">Product and Updates Images</a></li>
@ -188,7 +187,7 @@
<div class="viewcode-block" id="TreeInfo"><a class="viewcode-back" href="../../pylorax.html#pylorax.treeinfo.TreeInfo">[docs]</a><span class="k">class</span> <span class="nc">TreeInfo</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
<span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">product</span><span class="p">,</span> <span class="n">version</span><span class="p">,</span> <span class="n">variant</span><span class="p">,</span> <span class="n">basearch</span><span class="p">,</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">product</span><span class="p">,</span> <span class="n">version</span><span class="p">,</span> <span class="n">variant</span><span class="p">,</span> <span class="n">basearch</span><span class="p">,</span>
<span class="n">packagedir</span><span class="o">=</span><span class="s2">&quot;&quot;</span><span class="p">):</span>
<span class="bp">self</span><span class="o">.</span><span class="n">c</span> <span class="o">=</span> <span class="n">configparser</span><span class="o">.</span><span class="n">ConfigParser</span><span class="p">()</span>

View File

@ -4,12 +4,13 @@ composer-cli
:Authors:
Brian C. Lane <bcl@redhat.com>
``composer-cli`` is used to interact with the ``lorax-composer`` API server, managing blueprints, exploring available packages, and building new images.
``composer-cli`` is an interactive tool for use with a WELDR API server,
managing blueprints, exploring available packages, and building new images. As
of Fedora 34, `osbuild-composer <https://osbuild.org>` is the recommended
server.
It requires `lorax-composer <lorax-composer.html>`_ to be installed on the
local system, and the user running it needs to be a member of the ``weldr``
group. They do not need to be root, but all of the `security precautions
<lorax-composer.html#security>`_ apply.
It requires the server to be installed on the local system, and the user
running it needs to be a member of the ``weldr`` group.
composer-cli cmdline arguments
------------------------------
@ -23,15 +24,15 @@ Edit a Blueprint
Start out by listing the available blueprints using ``composer-cli blueprints
list``, pick one and save it to the local directory by running ``composer-cli
blueprints save http-server``. If there are no blueprints available you can
copy one of the examples `from the test suite
<https://github.com/weldr/lorax/tree/master/tests/pylorax/blueprints/>`_.
blueprints save http-server``.
Edit the file (it will be saved with a .toml extension) and change the
description, add a package or module to it. Send it back to the server by
running ``composer-cli blueprints push http-server.toml``. You can verify that it was
saved by viewing the changelog - ``composer-cli blueprints changes http-server``.
See the `Example Blueprint`_ for an example.
Build an image
----------------
@ -76,6 +77,10 @@ with ``composer-cli upload start ...``. In order to access the service you need
to pass authentication details to composer-cli using a TOML file, or reference
a previously saved profile.
.. note::
With ``osbuild-composer`` you can only specify upload targets during
the compose process.
Providers
---------
@ -176,3 +181,362 @@ Or if you have the settings stored in a TOML file::
This will output the UUID of the upload, which can then be used to monitor the status in the same way
described above.
Debugging
---------
There are a couple of arguments that can be helpful when debugging problems.
These are only meant for debugging and should not be used to script access to
the API. If you need to do that you can communicate with it directly in the
language of your choice.
``--json`` will return the server's response as a nicely formatted json output
instead of printing what the command would usually print.
``--test=1`` will cause a compose start to start creating an image, and then
end with a failed state.
``--test=2`` will cause a compose to start and then end with a finished state,
without actually composing anything.
Blueprint Reference
-------------------
Blueprints are simple text files in `TOML <https://github.com/toml-lang/toml>`_ format that describe
which packages, and what versions, to install into the image. They can also define a limited set
of customizations to make to the final image.
A basic blueprint looks like this::
name = "base"
description = "A base system with bash"
version = "0.0.1"
[[packages]]
name = "bash"
version = "4.4.*"
The ``name`` field is the name of the blueprint. It can contain spaces, but they will be converted to ``-``
when it is written to disk. It should be short and descriptive.
``description`` can be a longer description of the blueprint, it is only used for display purposes.
``version`` is a `semver compatible <https://semver.org/>`_ version number. If
a new blueprint is uploaded with the same ``version`` the server will
automatically bump the PATCH level of the ``version``. If the ``version``
doesn't match it will be used as is. eg. Uploading a blueprint with ``version``
set to ``0.1.0`` when the existing blueprint ``version`` is ``0.0.1`` will
result in the new blueprint being stored as ``version 0.1.0``.
[[packages]] and [[modules]]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
These entries describe the package names and matching version glob to be installed into the image.
The names must match the names exactly, and the versions can be an exact match
or a filesystem-like glob of the version using ``*`` wildcards and ``?``
character matching.
.. note::
Currently there are no differences between ``packages`` and ``modules``
in ``osbuild-composer``. Both are treated like an rpm package dependency.
For example, to install ``tmux-2.9a`` and ``openssh-server-8.*``, you would add
this to your blueprint::
[[packages]]
name = "tmux"
version = "2.9a"
[[packages]]
name = "openssh-server"
version = "8.*"
[[groups]]
^^^^^^^^^^
The ``groups`` entries describe a group of packages to be installed into the image. Package groups are
defined in the repository metadata. Each group has a descriptive name used primarily for display
in user interfaces and an ID more commonly used in kickstart files. Here, the ID is the expected
way of listing a group.
Groups have three different ways of categorizing their packages: mandatory, default, and optional.
For purposes of blueprints, mandatory and default packages will be installed. There is no mechanism
for selecting optional packages.
For example, if you want to install the ``anaconda-tools`` group you would add this to your
blueprint::
[[groups]]
name="anaconda-tools"
``groups`` is a TOML list, so each group needs to be listed separately, like ``packages`` but with
no version number.
Customizations
^^^^^^^^^^^^^^
The ``[customizations]`` section can be used to configure the hostname of the final image. eg.::
[customizations]
hostname = "baseimage"
This is optional and may be left out to use the defaults.
[customizations.kernel]
***********************
This allows you to append arguments to the bootloader's kernel commandline. This will not have any
effect on ``tar`` or ``ext4-filesystem`` images since they do not include a bootloader.
For example::
[customizations.kernel]
append = "nosmt=force"
[[customizations.sshkey]]
*************************
Set an existing user's ssh key in the final image::
[[customizations.sshkey]]
user = "root"
key = "PUBLIC SSH KEY"
The key will be added to the user's authorized_keys file.
.. warning::
``key`` expects the entire content of ``~/.ssh/id_rsa.pub``
[[customizations.user]]
***********************
Add a user to the image, and/or set their ssh key.
All fields for this section are optional except for the ``name``, here is a complete example::
[[customizations.user]]
name = "admin"
description = "Administrator account"
password = "$6$CHO2$3rN8eviE2t50lmVyBYihTgVRHcaecmeCk31L..."
key = "PUBLIC SSH KEY"
home = "/srv/widget/"
shell = "/usr/bin/bash"
groups = ["widget", "users", "wheel"]
uid = 1200
gid = 1200
If the password starts with ``$6$``, ``$5$``, or ``$2b$`` it will be stored as
an encrypted password. Otherwise it will be treated as a plain text password.
.. warning::
``key`` expects the entire content of ``~/.ssh/id_rsa.pub``
[[customizations.group]]
************************
Add a group to the image. ``name`` is required and ``gid`` is optional::
[[customizations.group]]
name = "widget"
gid = 1130
[customizations.timezone]
*************************
Customizing the timezone and the NTP servers to use for the system::
[customizations.timezone]
timezone = "US/Eastern"
ntpservers = ["0.north-america.pool.ntp.org", "1.north-america.pool.ntp.org"]
The values supported by ``timezone`` can be listed by running ``timedatectl list-timezones``.
If no timezone is setup the system will default to using `UTC`. The ntp servers are also
optional and will default to using the distribution defaults which are fine for most uses.
In some image types there are already NTP servers setup, eg. Google cloud image, and they
cannot be overridden because they are required to boot in the selected environment. But the
timezone will be updated to the one selected in the blueprint.
[customizations.locale]
***********************
Customize the locale settings for the system::
[customizations.locale]
languages = ["en_US.UTF-8"]
keyboard = "us"
The values supported by ``languages`` can be listed by running ``localectl list-locales`` from
the command line.
The values supported by ``keyboard`` can be listed by running ``localectl list-keymaps`` from
the command line.
Multiple languages can be added. The first one becomes the
primary, and the others are added as secondary. One or the other of ``languages``
or ``keyboard`` must be included (or both) in the section.
[customizations.firewall]
*************************
By default the firewall blocks all access except for services that enable their ports explicitly,
like ``sshd``. This command can be used to open other ports or services. Ports are configured using
the port:protocol format::
[customizations.firewall]
ports = ["22:tcp", "80:tcp", "imap:tcp", "53:tcp", "53:udp"]
Numeric ports, or their names from ``/etc/services`` can be used in the ``ports`` enabled/disabled lists.
The blueprint settings extend any existing settings in the image templates, so if ``sshd`` is
already enabled it will extend the list of ports with the ones listed by the blueprint.
If the distribution uses ``firewalld`` you can specify services listed by ``firewall-cmd --get-services``
in a ``customizations.firewall.services`` section::
[customizations.firewall.services]
enabled = ["ftp", "ntp", "dhcp"]
disabled = ["telnet"]
Remember that the ``firewall.services`` are different from the names in ``/etc/services``.
Both are optional, if they are not used leave them out or set them to an empty list ``[]``. If you
only want the default firewall setup this section can be omitted from the blueprint.
NOTE: The ``Google`` and ``OpenStack`` templates explicitly disable the firewall for their environment.
This cannot be overridden by the blueprint.
[customizations.services]
*************************
This section can be used to control which services are enabled at boot time.
Some image types already have services enabled or disabled in order for the
image to work correctly, and cannot be overridden. eg. ``ami`` requires
``sshd``, ``chronyd``, and ``cloud-init``. Without them the image will not
boot. Blueprint services are added to, not replacing, the list already in the
templates, if any.
The service names are systemd service units. You may specify any systemd unit
file accepted by ``systemctl enable`` eg. ``cockpit.socket``::
[customizations.services]
enabled = ["sshd", "cockpit.socket", "httpd"]
disabled = ["postfix", "telnetd"]
[[repos.git]]
~~~~~~~~~~~~~
.. note::
Currently ``osbuild-composer`` does not support ``repos.git``
The ``[[repos.git]]`` entries are used to add files from a `git repository <https://git-scm.com/>`_
repository to the created image. The repository is cloned, the specified ``ref`` is checked out
and an rpm is created to install the files to a ``destination`` path. The rpm includes a summary
with the details of the repository and reference used to create it. The rpm is also included in the
image build metadata.
To create an rpm named ``server-config-1.0-1.noarch.rpm`` you would add this to your blueprint::
[[repos.git]]
rpmname="server-config"
rpmversion="1.0"
rpmrelease="1"
summary="Setup files for server deployment"
repo="PATH OF GIT REPO TO CLONE"
ref="v1.0"
destination="/opt/server/"
* rpmname: Name of the rpm to create, also used as the prefix name in the tar archive
* rpmversion: Version of the rpm, eg. "1.0.0"
* rpmrelease: Release of the rpm, eg. "1"
* summary: Summary string for the rpm
* repo: URL of the get repo to clone and create the archive from
* ref: Git reference to check out. eg. origin/branch-name, git tag, or git commit hash
* destination: Path to install the / of the git repo at when installing the rpm
An rpm will be created with the contents of the git repository referenced, with the files
being installed under ``/opt/server/`` in this case.
``ref`` can be any valid git reference for use with ``git archive``. eg. to use the head
of a branch set it to ``origin/branch-name``, a tag name, or a commit hash.
Note that the repository is cloned in full each time a build is started, so pointing to a
repository with a large amount of history may take a while to clone and use a significant
amount of disk space. The clone is temporary and is removed once the rpm is created.
Example Blueprint
-----------------
This example blueprint will install the ``tmux``, ``git``, and ``vim-enhanced``
packages. It will set the ``root`` ssh key, add the ``widget`` and ``admin``
users as well as a ``students`` group::
name = "example-custom-base"
description = "A base system with customizations"
version = "0.0.1"
[[packages]]
name = "tmux"
version = "*"
[[packages]]
name = "git"
version = "*"
[[packages]]
name = "vim-enhanced"
version = "*"
[customizations]
hostname = "custombase"
[[customizations.sshkey]]
user = "root"
key = "A SSH KEY FOR ROOT"
[[customizations.user]]
name = "widget"
description = "Widget process user account"
home = "/srv/widget/"
shell = "/usr/bin/false"
groups = ["dialout", "users"]
[[customizations.user]]
name = "admin"
description = "Widget admin account"
password = "$6$CHO2$3rN8eviE2t50lmVyBYihTgVRHcaecmeCk31LeOUleVK/R/aeWVHVZDi26zAH.o0ywBKH9Tc0/wm7sW/q39uyd1"
home = "/srv/widget/"
shell = "/usr/bin/bash"
groups = ["widget", "users", "students"]
uid = 1200
[[customizations.user]]
name = "plain"
password = "simple plain password"
[[customizations.user]]
name = "bart"
key = "SSH KEY FOR BART"
groups = ["students"]
[[customizations.group]]
name = "widget"
[[customizations.group]]
name = "students"

View File

@ -92,7 +92,6 @@ composer.cli.utilities module
:undoc-members:
:show-inheritance:
Module contents
---------------

View File

@ -5,6 +5,7 @@ Subpackages
-----------
.. toctree::
:maxdepth: 4
composer.cli
@ -27,7 +28,6 @@ composer.unix\_socket module
:undoc-members:
:show-inheritance:
Module contents
---------------

View File

@ -14,7 +14,6 @@ Contents:
intro
lorax
livemedia-creator
lorax-composer
composer-cli
mkksiso
product-images
@ -23,10 +22,10 @@ Contents:
Documentation for other Lorax Branches
======================================
* `Fedora 33 <f33-branch/>`_
* `Fedora 32 <f32-branch/>`_
* `Fedora 31 <f31-branch/>`_
* `Fedora 30 <f30-branch/>`_
* `Fedora 29 <f29-branch/>`_
* `Fedora 28 <f28-branch/>`_
* `RHEL8 lorax-composer <rhel8-branch/>`_
* `RHEL7 lorax-composer <lorax-composer/>`_

View File

@ -1,27 +0,0 @@
.. Lorax documentation master file, created by
sphinx-quickstart on Wed Apr 8 13:46:00 2015.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to Lorax's documentation!
=================================
Contents:
.. toctree::
:maxdepth: 1
intro
lorax
livemedia-creator
product-images
modules
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@ -1,67 +0,0 @@
Introduction to Lorax
=====================
I am the Lorax. I speak for the trees [and images].
Lorax is used to build the Anaconda Installer boot.iso, it consists of a
library, pylorax, a set of templates, and the lorax script. Its operation
is driven by a customized set of Mako templates that lists the packages
to be installed, steps to execute to remove unneeded files, and creation
of the iso for all of the supported architectures.
Before Lorax
============
Tree building tools such as pungi and revisor rely on 'buildinstall' in
anaconda/scripts/ to produce the boot images and other such control files
in the final tree. The existing buildinstall scripts written in a mix of
bash and Python are unmaintainable. Lorax is an attempt to replace them
with something more flexible.
EXISTING WORKFLOW:
pungi and other tools call scripts/buildinstall, which in turn call other
scripts to do the image building and data generation. Here's how it
currently looks:
-> buildinstall
* process command line options
* write temporary yum.conf to point to correct repo
* find anaconda release RPM
* unpack RPM, pull in those versions of upd-instroot, mk-images,
maketreeinfo.py, makestamp.py, and buildinstall
-> call upd-instroot
-> call maketreeinfo.py
-> call mk-images (which figures out which mk-images.ARCH to call)
-> call makestamp.py
* clean up
PROBLEMS:
The existing workflow presents some problems with maintaining the scripts.
First, almost all knowledge of what goes in to the stage 1 and stage 2
images lives in upd-instroot. The mk-images* scripts copy things from the
root created by upd-instroot in order to build the stage 1 image, though
it's not completely clear from reading the scripts.
NEW IDEAS:
Create a new central driver with all information living in Python modules.
Configuration files will provide the knowledge previously contained in the
upd-instroot and mk-images* scripts.

View File

@ -1,638 +0,0 @@
livemedia-creator
=================
:Authors:
Brian C. Lane <bcl@redhat.com>
livemedia-creator uses `Anaconda <https://github.com/rhinstaller/anaconda>`_,
`kickstart <https://github.com/rhinstaller/pykickstart>`_ and `Lorax
<https://github.com/rhinstaller/lorax>`_ to create bootable media that use the
same install path as a normal system installation. It can be used to make live
isos, bootable (partitioned) disk images, tarfiles, and filesystem images for
use with virtualization and container solutions like libvirt, docker, and
OpenStack.
The general idea is to use qemu with kickstart and an Anaconda boot.iso to
install into a disk image and then use the disk image to create the bootable
media.
livemedia-creator --help will describe all of the options available. At the
minimum you need:
``--make-iso`` to create a final bootable .iso or one of the other ``--make-*`` options.
``--iso`` to specify the Anaconda install media to use with qemu.
``--ks`` to select the kickstart file describing what to install.
To use livemedia-creator with virtualization you will need to have qemu installed.
If you are going to be using Anaconda directly, with ``--no-virt`` mode, make sure
you have the anaconda-tui package installed.
Conventions used in this document:
``lmc`` is an abbreviation for livemedia-creator.
``builder`` is the system where livemedia-creator is being run
``image`` is the disk image being created by running livemedia-creator
livemedia-creator cmdline arguments
-----------------------------------
.. argparse::
:ref: pylorax.cmdline.lmc_parser
:prog: livemedia-creator
Quickstart
----------
Run this to create a bootable live iso::
sudo livemedia-creator --make-iso \
--iso=/extra/iso/boot.iso --ks=./docs/fedora-livemedia.ks
You can run it directly from the lorax git repo like this::
sudo PATH=./src/sbin/:$PATH PYTHONPATH=./src/ ./src/sbin/livemedia-creator \
--make-iso --iso=/extra/iso/boot.iso \
--ks=./docs/fedora-livemedia.ks --lorax-templates=./share/
You can observe the installation using vnc. The logs will show what port was
chosen, or you can use a specific port by passing it. eg. ``--vnc vnc:127.0.0.1:5``
This is usually a good idea when testing changes to the kickstart. lmc tries
to monitor the logs for fatal errors, but may not catch everything.
How ISO creation works
----------------------
There are 2 stages, the install stage which produces a disk or filesystem image
as its output, and the boot media creation which uses the image as its input.
Normally you would run both stages, but it is possible to stop after the
install stage, by using ``--image-only``, or to skip the install stage and use
a previously created disk image by passing ``--disk-image`` or ``--fs-image``
When creating an iso qemu boots using the passed Anaconda installer iso
and installs the system based on the kickstart. The ``%post`` section of the
kickstart is used to customize the installed system in the same way that
current spin-kickstarts do.
livemedia-creator monitors the install process for problems by watching the
install logs. They are written to the current directory or to the base
directory specified by the --logfile command. You can also monitor the install
by using a vnc client. This is recommended when first modifying a kickstart,
since there are still places where Anaconda may get stuck without the log
monitor catching it.
The output from this process is a partitioned disk image. kpartx can be used
to mount and examine it when there is a problem with the install. It can also
be booted using kvm.
When creating an iso the disk image's / partition is copied into a formatted
filesystem image which is then used as the input to lorax for creation of the
final media.
The final image is created by lorax, using the templates in /usr/share/lorax/live/
or the live directory below the directory specified by ``--lorax-templates``. The
templates are written using the Mako template system with some extra commands
added by lorax.
.. note::
The output from --make-iso includes the artifacts used to create the boot.iso;
the kernel, initrd, the squashfs filesystem, etc. If you only want the
boot.iso you can pass ``--iso-only`` and the other files will be removed. You
can also name the iso by using ``--iso-name my-live.iso``.
Kickstarts
----------
The docs/ directory includes several example kickstarts, one to create a live
desktop iso using GNOME, and another to create a minimal disk image. When
creating your own kickstarts you should start with the minimal example, it
includes several needed packages that are not always included by dependencies.
Or you can use existing spin kickstarts to create live media with a few
changes. Here are the steps I used to convert the Fedora XFCE spin.
1. Flatten the xfce kickstart using ksflatten
2. Add zerombr so you don't get the disk init dialog
3. Add clearpart --all
4. Add swap partition
5. bootloader target
6. Add shutdown to the kickstart
7. Add network --bootproto=dhcp --activate to activate the network
This works for F16 builds but for F15 and before you need to pass
something on the cmdline that activate the network, like sshd:
``livemedia-creator --kernel-args="sshd"``
8. Add a root password::
rootpw rootme
network --bootproto=dhcp --activate
zerombr
clearpart --all
bootloader --location=mbr
part swap --size=512
shutdown
9. In the livesys script section of the %post remove the root password. This
really depends on how the spin wants to work. You could add the live user
that you create to the %wheel group so that sudo works if you wanted to.
``passwd -d root > /dev/null``
10. Remove /etc/fstab in %post, dracut handles mounting the rootfs
``cat /dev/null > /dev/fstab``
Do this only for live iso's, the filesystem will be mounted read only if
there is no /etc/fstab
11. Don't delete initramfs files from /boot in %post
12. When creating live iso's you need to have, at least, these packages in the %package section::
dracut-config-generic
dracut-live
-dracut-config-rescue
grub-efi
memtest86+
syslinux
One drawback to using qemu is that it pulls the packages from the repo each
time you run it. To speed things up you either need a local mirror of the
packages, or you can use a caching proxy. When using a proxy you pass it to
livemedia-creator like this:
``--proxy=http://proxy.yourdomain.com:3128``
You also need to use a specific mirror instead of mirrormanager so that the
packages will get cached, so your kickstart url would look like:
``url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/x86_64/os/"``
You can also add an update repo, but don't name it updates. Add --proxy to it
as well.
Anaconda image install (no-virt)
--------------------------------
You can create images without using qemu by passing ``--no-virt`` on the
cmdline. This will use Anaconda's directory install feature to handle the
install. There are a couple of things to keep in mind when doing this:
1. It will be most reliable when building images for the same release that the
host is running. Because Anaconda has expectations about the system it is
running under you may encounter strange bugs if you try to build newer or
older releases.
2. Make sure selinux is set to permissive or disabled. It won't install
correctly with selinux set to enforcing yet.
3. It may totally trash your host. So far I haven't had this happen, but the
possibility exists that a bug in Anaconda could result in it operating on
real devices. I recommend running it in a virt or on a system that you can
afford to lose all data from.
The logs from anaconda will be placed in an ./anaconda/ directory in either
the current directory or in the directory used for --logfile
Example cmdline:
``sudo livemedia-creator --make-iso --no-virt --ks=./fedora-livemedia.ks``
.. note::
Using no-virt to create a partitioned disk image (eg. --make-disk or
--make-vagrant) will only create disks usable on the host platform (BIOS
or UEFI). You can create BIOS partitioned disk images on UEFI by using
virt.
AMI Images
----------
Amazon EC2 images can be created by using the --make-ami switch and an appropriate
kickstart file. All of the work to customize the image is handled by the kickstart.
The example currently included was modified from the cloud-kickstarts version so
that it would work with livemedia-creator.
Example cmdline:
``sudo livemedia-creator --make-ami --iso=/path/to/boot.iso --ks=./docs/fedora-livemedia-ec2.ks``
This will produce an ami-root.img file in the working directory.
At this time I have not tested the image with EC2. Feedback would be welcome.
Appliance Creation
------------------
livemedia-creator can now replace appliance-tools by using the --make-appliance
switch. This will create the partitioned disk image and an XML file that can be
used with virt-image to setup a virtual system.
The XML is generated using the Mako template from
/usr/share/lorax/appliance/libvirt.xml You can use a different template by
passing ``--app-template <template path>``
Documentation on the Mako template system can be found at the `Mako site
<http://docs.makotemplates.org/en/latest/index.html>`_
The name of the final output XML is appliance.xml, this can be changed with
``--app-file <file path>``
The following variables are passed to the template:
``disks``
A list of disk_info about each disk.
Each entry has the following attributes:
``name``
base name of the disk image file
``format``
"raw"
``checksum_type``
"sha256"
``checksum``
sha256 checksum of the disk image
``name``
Name of appliance, from --app-name argument
``arch``
Architecture
``memory``
Memory in KB (from ``--ram``)
``vcpus``
from ``--vcpus``
``networks``
list of networks from the kickstart or []
``title``
from ``--title``
``project``
from ``--project``
``releasever``
from ``--releasever``
The created image can be imported into libvirt using:
``virt-image appliance.xml``
You can also create qcow2 appliance images using ``--image-type=qcow2``, for example::
sudo livemedia-creator --make-appliance --iso=/path/to/boot.iso --ks=./docs/fedora-minimal.ks \
--image-type=qcow2 --app-file=minimal-test.xml --image-name=minimal-test.img
Filesystem Image Creation
-------------------------
livemedia-creator can be used to create un-partitined filesystem images using
the ``--make-fsimage`` option. As of version 21.8 this works with both qemu and
no-virt modes of operation. Previously it was only available with no-virt.
Kickstarts should have a single / partition with no extra mountpoints.
``livemedia-creator --make-fsimage --iso=/path/to/boot.iso --ks=./docs/fedora-minimal.ks``
You can name the output image with ``--image-name`` and set a label on the filesystem with ``--fs-label``
TAR File Creation
-----------------
The ``--make-tar`` command can be used to create a tar of the root filesystem. By
default it is compressed using xz, but this can be changed using the
``--compression`` and ``--compress-arg`` options. This option works with both virt and
no-virt install methods.
As with ``--make-fsimage`` the kickstart should be limited to a single / partition.
For example::
livemedia-creator --make-tar --iso=/path/to/boot.iso --ks=./docs/fedora-minimal.ks \
--image-name=fedora-root.tar.xz
Live Image for PXE Boot
-----------------------
The ``--make-pxe-live`` command will produce squashfs image containing live root
filesystem that can be used for pxe boot. Directory with results will contain
the live image, kernel image, initrd image and template of pxe configuration
for the images.
Atomic Live Image for PXE Boot
------------------------------
The ``--make-ostree-live`` command will produce the same result as ``--make-pxe-live``
for installations of Atomic Host. Example kickstart for such an installation
using Atomic installer iso with local repo included in the image can be found
in docs/rhel-atomic-pxe-live.ks.
The PXE images can also be created with ``--no-virt`` by using the example
kickstart in docs/fedora-atomic-pxe-live-novirt.ks. This also works inside the
mock environment.
Using Mock and --no-virt to Create Images
-----------------------------------------
As of lorax version 22.2 you can use livemedia-creator and anaconda version
22.15 inside of a mock chroot with --make-iso and --make-fsimage.
.. note::
As of mock 1.2.12 you no longer need to bind mount ``/dev/``, loop devices are setup
as part of the standard mock ``/dev/`` creation.
On the host system:
1. yum install -y mock
2. Add a user to the mock group to use for running mock. eg. builder
3. Create a new /etc/mock/ config file based on the rawhide one, or modify the
existing one so that the following options are setup::
config_opts['chroot_setup_cmd'] = 'install @buildsys-build anaconda-tui lorax'
# build results go into /home/builder/results/
config_opts['plugin_conf']['bind_mount_opts']['dirs'].append(('/home/builder/results','/results/'))
If you are creating images for a branched release of Fedora you should also enable
the updates-testing repository so that you get the latest builds in your mock chroot.
The following steps are run as the builder user who is a member of the mock
group.
4. Make a directory for results matching the bind mount above
``mkdir ~/results/``
5. Copy the example kickstarts
``cp /usr/share/docs/lorax/*ks .``
6. Make sure tar and dracut-network are in the %packages section and that the
``url points to the correct repo``
7. Init the mock
``mock -r fedora-rawhide-x86_64 --init``
8. Copy the kickstart inside the mock
``mock -r fedora-rawhide-x86_64 --copyin ./fedora-minimal.ks /root/``
9. Make a minimal iso::
mock -r fedora-rawhide-x86_64 --chroot -- livemedia-creator --no-virt \
--resultdir=/results/try-1 --logfile=/results/logs/try-1/try-1.log \
--make-iso --ks /root/fedora-minimal.ks
Results will be in ./results/try-1 and logs under /results/logs/try-1/
including anaconda logs and livemedia-creator logs. The new iso will be
located at ~/results/try-1/images/boot.iso, and the ~/results/try-1/
directory tree will also contain the vmlinuz, initrd, etc.
Using Mock and qemu to Create Images
------------------------------------
Version 25.0 of livemedia-creator switches to using qemu for virtualization.
This allows creation of all image types, and use of the KVM on the host if
/dev/kvm is present in the mock environment.
On the host system:
1. yum install -y mock
2. Add a user to the mock group to use for running mock. eg. builder
3. Create a new /etc/mock/ config file based on the rawhide one, or modify the
existing one so that the following options are setup::
config_opts['chroot_setup_cmd'] = 'install @buildsys-build lorax qemu'
# build results go into /home/builder/results/
config_opts['plugin_conf']['bind_mount_opts']['dirs'].append(('/home/builder/results','/results/'))
If you are creating images for a branched release of Fedora you should also enable
the updates-testing repository so that you get the latest builds in your mock chroot.
The following steps are run as the builder user who is a member of the mock
group.
4. Make a directory for results matching the bind mount above
``mkdir ~/results/``
5. Copy the example kickstarts
``cp /usr/share/docs/lorax/*ks .``
6. Make sure tar and dracut-network are in the %packages section and that the
``url points to the correct repo``
7. Init the mock
``mock -r fedora-rawhide-x86_64 --init``
8. Copy the kickstart inside the mock
``mock -r fedora-rawhide-x86_64 --copyin ./fedora-minimal.ks /root/``
9. Copy the Anaconda boot.iso inside the mock
``mock -r fedora-rawhide-x86_64 --copyin ./boot.iso /root/``
10. Make a minimal iso::
mock -r fedora-rawhide-x86_64 --chroot -- livemedia-creator \
--resultdir=/results/try-1 --logfile=/results/logs/try-1/try-1.log \
--make-iso --ks /root/fedora-minimal.ks --iso /root/boot.iso
Results will be in ./results/try-1 and logs under /results/logs/try-1/
including anaconda logs and livemedia-creator logs. The new iso will be
located at ~/results/try-1/images/boot.iso, and the ~/results/try-1/
directory tree will also contain the vmlinuz, initrd, etc.
This will run qemu without kvm support, which is going to be very slow. You can
add ``mknod /dev/kvm c 10 232;`` to create the device node before running lmc.
OpenStack Image Creation
------------------------
OpenStack supports partitioned disk images so ``--make-disk`` can be used to
create images for importing into glance, OpenStack's image storage component.
You need to have access to an OpenStack provider that allows image uploads, or
setup your own using the instructions from the `RDO Project
<https://www.rdoproject.org/Quickstart>`_.
The example kickstart, fedora-openstack.ks, is only slightly different than the
fedora-minimal.ks one. It adds the cloud-init and cloud-utils-growpart
packages. OpenStack supports setting up the image using cloud-init, and
cloud-utils-growpart will grow the image to fit the instance's disk size.
Create a qcow2 image using the kickstart like this:
``sudo livemedia-creator --make-disk --iso=/path/to/boot.iso --ks=/path/to/fedora-openstack.ks --image-type=qcow2``
.. note::
On the RHEL7 version of lmc ``--image-type`` isn't supported. You can only create a bare partitioned disk image.
Import the resulting disk image into the OpenStack system, either via the web UI, or glance on the cmdline::
glance image-create --name "fedora-openstack" --is-public true --disk-format qcow2 \
--container-format bare --file ./fedora-openstack.qcow2
If qcow2 wasn't used then ``--disk-format`` should be set to raw.
Docker Image Creation
---------------------
Use lmc to create a tarfile as described in the `TAR File Creation`_ section, but substitute the
fedora-docker.ks example kickstart which removes the requirement for core files and the kernel.
You can then import the tarfile into docker like this (as root):
``cat /var/tmp/fedora-root.tar.xz | docker import - fedora-root``
And then run bash inside of it:
``sudo docker run -i -t fedora-root /bin/bash``
Open Container Initiative Image Creation
----------------------------------------
The OCI is a new specification that is still being worked on. You can read more about it at
`the Open Container Initiative website <https://www.opencontainers.org/>`_. You can create
OCI images using the following command::
sudo livemedia-creator --make-oci --oci-config /path/to/config.json --oci-runtime /path/to/runtime.json \
--iso=/path/to/boot.iso --ks=/path/to/fedora-minimal.ks
You must provide the config.json and runtime.json files to be included in the bundle,
their specifications can be found `on the OCI github project <https://github.com/opencontainers/specs>`_
output will be in the results directory with a default name of bundle.tar.xz
This will work with ``--no-virt`` and inside a mock since it doesn't use any
partitioned disk images.
Vagrant Image Creation
----------------------
`Vagrant <https://www.vagrantup.com/>`_ images can be created using the following command::
sudo livemedia-creator --make-vagrant --vagrant-metadata /path/to/metadata.json \
--iso=/path/to/boot.iso --ks=/path/to/fedora-vagrant.ks
The image created is a `vagrant-libvirt
<https://github.com/pradels/vagrant-libvirt>`_ provider image and needs to have
vagrant setup with libvirt before you can use it.
The ``--vagrant-metadata`` file is optional, it will create a minimal one by
default, and if one is passed it will make sure the disk size is setup
correctly. If you pass a ``--vagrant-vagrantfile`` it will be included in the
image verbatim. By default no vagrantfile is created.
There is an example Vagrant kickstart file in the docs directory that sets up
the vagrant user with the default insecure SSH pubkey and a few useful
utilities.
This also works with ``--no-virt``, but will not work inside a mock due to its
use of partitioned disk images and qcow2.
Creating UEFI disk images with virt
-----------------------------------
Partitioned disk images can only be created for the same platform as the host system (BIOS or
UEFI). You can use virt to create BIOS images on UEFI systems, and it is also possible
to create UEFI images on BIOS systems using OVMF. You first need to setup your system with
the OVMF firmware. The details can be `found here linux-kvm OVMF page <http://www.linux-kvm.org/page/OVMF>`_
but it amounts to:
1. Download the firmware.repo from `Gerd Hoffmann <https://www.kraxel.org/repos/>`_ and install it
in /etc/yum.repos.d/
2. Install the edk2.git-ovmf-x64 package
3. Copy /usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd to /usr/share/OVMF/OVMF_CODE.fd
4. Copy /usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd to /usr/share/OVMF/OVMF_VARS.fd
Now you can run livemedia-creator with ``--virt-uefi`` to boot and install using UEFI::
sudo livemedia-creator --make-disk --virt-uefi --iso=/path/to/boot.iso \
--ks=/path/to/fedora-minimal.ks
Make sure that the kickstart you are using creates a /boot/efi partition by including this::
part /boot/efi --fstype="efi" --size=500
.. note::
When using the resulting image with the current version of OVMF (edk2.git-ovmf-x64-0-20151103.b1295.ge5cffca)
it will not boot automatically because there is a problem with the fallback path.
You can boot it by entering the UEFI shell and running EFI/fedora/shim.efi and
then using efibootmgr to setup the correct boot entry.
Debugging problems
------------------
Sometimes an installation will get stuck. When using qemu the logs will
be written to ./virt-install.log and most of the time any problems that happen
will be near the end of the file. lmc tries to detect common errors and will
cancel the installation when they happen. But not everything can be caught.
When creating a new kickstart it is helpful to use vnc so that you can monitor
the installation as it happens, and if it gets stuck without lmc detecting the
problem you can switch to tty1 and examine the system directly.
If it does get stuck the best way to cancel is to use kill -9 on the qemu pid,
lmc will detect that the process died and cleanup.
If lmc didn't handle the cleanup for some reason you can do this:
1. ``sudo umount /tmp/lmc-XXXX`` to unmount the iso from its mountpoint.
2. ``sudo rm -rf /tmp/lmc-XXXX``
3. ``sudo rm /var/tmp/lmc-disk-XXXXX`` to remove the disk image.
Note that lmc uses the lmc- prefix for all of its temporary files and
directories to make it easier to find and clean up leftovers.
The logs from the qemu run are stored in virt-install.log, logs from
livemedia-creator are in livemedia.log and program.log
You can add ``--image-only`` to skip the .iso creation and examine the resulting
disk image. Or you can pass ``--keep-image`` to keep it around after the iso has
been created.
Cleaning up aborted ``--no-virt`` installs can sometimes be accomplished by
running the ``anaconda-cleanup`` script. As of Fedora 18 anaconda is
multi-threaded and it can sometimes become stuck and refuse to exit. When this
happens you can usually clean up by first killing the anaconda process then
running ``anaconda-cleanup``.
Hacking
-------
Development on this will take place as part of the lorax project, and on the
anaconda-devel-list mailing list, and `on github <https://github.com/rhinstaller/lorax>`_
Feedback, enhancements and bugs are welcome. You can use `bugzilla
<https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=lorax>`_ to
report bugs against the lorax component.

View File

@ -1,526 +1,8 @@
lorax-composer
==============
:Authors:
Brian C. Lane <bcl@redhat.com>
``lorax-composer`` is an API server that allows you to build disk images using
`Blueprints`_ to describe the package versions to be installed into the image.
It is compatible with the Weldr project's bdcs-api REST protocol. More
information on Weldr can be found `on the Weldr blog <http://www.weldr.io>`_.
Behind the scenes it uses `livemedia-creator <livemedia-creator.html>`_ and
`Anaconda <https://anaconda-installer.readthedocs.io/en/latest/>`_ to handle the
installation and configuration of the images.
Important Things To Note
------------------------
* As of version 30.7 SELinux can be set to Enforcing. The current state is
logged for debugging purposes and if there are SELinux denials they should
be reported as a bug.
* All image types lock the root account, except for live-iso. You will need to either
use one of the `Customizations`_ methods for setting a ssh key/password, install a
package that creates a user, or use something like `cloud-init` to setup access at
boot time.
Installation
------------
The best way to install ``lorax-composer`` is to use ``sudo dnf install
lorax-composer composer-cli``, this will setup the weldr user and install the
systemd socket activation service. You will then need to enable it with ``sudo
systemctl enable lorax-composer.socket && sudo systemctl start
lorax-composer.socket``. This will leave the server off until the first request
is made. Systemd will then launch the server and it will remain running until
the system is rebooted. This will cause some delay in responding to the first
request from the UI or `composer-cli`.
.. note::
If you want lorax-composer to respond immediately to the first request you can
start and enable `lorax-composer.service` instead of `lorax-composer.socket`
Quickstart
----------
1. Create a ``weldr`` user and group by running ``useradd weldr``
2. Remove any pre-existing socket directory with ``rm -rf /run/weldr/``
A new directory with correct permissions will be created the first time the server runs.
3. Enable the socket activation with ``systemctl enable lorax-composer.socket
&& sudo systemctl start lorax-composer.socket``.
NOTE: You can also run it directly with ``lorax-composer /path/to/blueprints``. However,
``lorax-composer`` does not react well to being started both on the command line and via
socket activation at the same time. It is therefore recommended that you run it directly
on the command line only for testing or development purposes. For real use or development
of other projects that simply use the API, you should stick to socket activation only.
The ``/path/to/blueprints/`` directory is where the blueprints' git repo will
be created, and all the blueprints created with the ``/api/v0/blueprints/new``
route will be stored. If there are blueprint ``.toml`` files in the top level
of the directory they will be imported into the blueprint git storage when
``lorax-composer`` starts.
Logs
----
Logs are stored under ``/var/log/lorax-composer/`` and include all console
messages as well as extra debugging info and API requests.
Security
--------
Some security related issues that you should be aware of before running ``lorax-composer``:
* One of the API server threads needs to retain root privileges in order to run Anaconda.
* Only allow authorized users access to the ``weldr`` group and socket.
Since Anaconda kickstarts are used there is the possibility that a user could
inject commands into a blueprint that would result in the kickstart executing
arbitrary code on the host. Only authorized users should be allowed to build
images using ``lorax-composer``.
lorax-composer cmdline arguments
--------------------------------
.. argparse::
:ref: pylorax.api.cmdline.lorax_composer_parser
:prog: lorax-composer
How it Works
------------
The server runs as root, and as ``weldr``. Communication with it is via a unix
domain socket (``/run/weldr/api.socket`` by default). The directory and socket
are owned by ``root:weldr`` so that any user in the ``weldr`` group can use the API
to control ``lorax-composer``.
At startup the server will check for the correct permissions and
ownership of a pre-existing directory, or it will create a new one if it
doesn't exist. The socket path and group owner's name can be changed from the
cmdline by passing it the ``--socket`` and ``--group`` arguments.
It will then drop root privileges for the API thread and run as the ``weldr``
user. The queue and compose thread still runs as root because it needs to be
able to mount/umount files and run Anaconda.
Composing Images
----------------
The `welder-web <https://github.com/weldr/welder-web/>`_ GUI project can be used to construct
blueprints and create composes using a web browser.
Or use the command line with `composer-cli <composer-cli.html>`_.
Blueprints
----------
Blueprints are simple text files in `TOML <https://github.com/toml-lang/toml>`_ format that describe
which packages, and what versions, to install into the image. They can also define a limited set
of customizations to make to the final image.
Example blueprints can be found in the ``lorax-composer`` `test suite
<https://github.com/weldr/lorax/tree/master/tests/pylorax/blueprints/>`_, with a simple one
looking like this::
name = "base"
description = "A base system with bash"
version = "0.0.1"
[[packages]]
name = "bash"
version = "4.4.*"
The ``name`` field is the name of the blueprint. It can contain spaces, but they will be converted to ``-``
when it is written to disk. It should be short and descriptive.
``description`` can be a longer description of the blueprint, it is only used for display purposes.
``version`` is a `semver compatible <https://semver.org/>`_ version number. If
a new blueprint is uploaded with the same ``version`` the server will
automatically bump the PATCH level of the ``version``. If the ``version``
doesn't match it will be used as is. eg. Uploading a blueprint with ``version``
set to ``0.1.0`` when the existing blueprint ``version`` is ``0.0.1`` will
result in the new blueprint being stored as ``version 0.1.0``.
[[packages]] and [[modules]]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
These entries describe the package names and matching version glob to be installed into the image.
The names must match the names exactly, and the versions can be an exact match
or a filesystem-like glob of the version using ``*`` wildcards and ``?``
character matching.
NOTE: Currently there are no differences between ``packages`` and ``modules``
in ``lorax-composer``. Both are treated like an rpm package dependency.
For example, to install ``tmux-2.9a`` and ``openssh-server-8.*``, you would add
this to your blueprint::
[[packages]]
name = "tmux"
version = "2.9a"
[[packages]]
name = "openssh-server"
version = "8.*"
[[groups]]
~~~~~~~~~~
The ``groups`` entries describe a group of packages to be installed into the image. Package groups are
defined in the repository metadata. Each group has a descriptive name used primarily for display
in user interfaces and an ID more commonly used in kickstart files. Here, the ID is the expected
way of listing a group.
Groups have three different ways of categorizing their packages: mandatory, default, and optional.
For purposes of blueprints, mandatory and default packages will be installed. There is no mechanism
for selecting optional packages.
For example, if you want to install the ``anaconda-tools`` group you would add this to your
blueprint::
[[groups]]
name="anaconda-tools"
``groups`` is a TOML list, so each group needs to be listed separately, like ``packages`` but with
no version number.
Customizations
~~~~~~~~~~~~~~
The ``[customizations]`` section can be used to configure the hostname of the final image. eg.::
[customizations]
hostname = "baseimage"
This is optional and may be left out to use the defaults.
[customizations.kernel]
***********************
This allows you to append arguments to the bootloader's kernel commandline. This will not have any
effect on ``tar`` or ``ext4-filesystem`` images since they do not include a bootloader.
For example::
[customizations.kernel]
append = "nosmt=force"
[[customizations.sshkey]]
*************************
Set an existing user's ssh key in the final image::
[[customizations.sshkey]]
user = "root"
key = "PUBLIC SSH KEY"
The key will be added to the user's authorized_keys file.
.. warning::
``key`` expects the entire content of ``~/.ssh/id_rsa.pub``
[[customizations.user]]
***********************
Add a user to the image, and/or set their ssh key.
All fields for this section are optional except for the ``name``, here is a complete example::
[[customizations.user]]
name = "admin"
description = "Administrator account"
password = "$6$CHO2$3rN8eviE2t50lmVyBYihTgVRHcaecmeCk31L..."
key = "PUBLIC SSH KEY"
home = "/srv/widget/"
shell = "/usr/bin/bash"
groups = ["widget", "users", "wheel"]
uid = 1200
gid = 1200
If the password starts with ``$6$``, ``$5$``, or ``$2b$`` it will be stored as
an encrypted password. Otherwise it will be treated as a plain text password.
.. warning::
``key`` expects the entire content of ``~/.ssh/id_rsa.pub``
[[customizations.group]]
************************
Add a group to the image. ``name`` is required and ``gid`` is optional::
[[customizations.group]]
name = "widget"
gid = 1130
[customizations.timezone]
*************************
Customizing the timezone and the NTP servers to use for the system::
[customizations.timezone]
timezone = "US/Eastern"
ntpservers = ["0.north-america.pool.ntp.org", "1.north-america.pool.ntp.org"]
The values supported by ``timezone`` can be listed by running ``timedatectl list-timezones``.
If no timezone is setup the system will default to using `UTC`. The ntp servers are also
optional and will default to using the distribution defaults which are fine for most uses.
In some image types there are already NTP servers setup, eg. Google cloud image, and they
cannot be overridden because they are required to boot in the selected environment. But the
timezone will be updated to the one selected in the blueprint.
[customizations.locale]
***********************
Customize the locale settings for the system::
[customizations.locale]
languages = ["en_US.UTF-8"]
keyboard = "us"
The values supported by ``languages`` can be listed by running ``localectl list-locales`` from
the command line.
The values supported by ``keyboard`` can be listed by running ``localectl list-keymaps`` from
the command line.
Multiple languages can be added. The first one becomes the
primary, and the others are added as secondary. One or the other of ``languages``
or ``keyboard`` must be included (or both) in the section.
[customizations.firewall]
*************************
By default the firewall blocks all access except for services that enable their ports explicitly,
like ``sshd``. This command can be used to open other ports or services. Ports are configured using
the port:protocol format::
[customizations.firewall]
ports = ["22:tcp", "80:tcp", "imap:tcp", "53:tcp", "53:udp"]
Numeric ports, or their names from ``/etc/services`` can be used in the ``ports`` enabled/disabled lists.
The blueprint settings extend any existing settings in the image templates, so if ``sshd`` is
already enabled it will extend the list of ports with the ones listed by the blueprint.
If the distribution uses ``firewalld`` you can specify services listed by ``firewall-cmd --get-services``
in a ``customizations.firewall.services`` section::
[customizations.firewall.services]
enabled = ["ftp", "ntp", "dhcp"]
disabled = ["telnet"]
Remember that the ``firewall.services`` are different from the names in ``/etc/services``.
Both are optional, if they are not used leave them out or set them to an empty list ``[]``. If you
only want the default firewall setup this section can be omitted from the blueprint.
NOTE: The ``Google`` and ``OpenStack`` templates explicitly disable the firewall for their environment.
This cannot be overridden by the blueprint.
[customizations.services]
*************************
This section can be used to control which services are enabled at boot time.
Some image types already have services enabled or disabled in order for the
image to work correctly, and cannot be overridden. eg. ``ami`` requires
``sshd``, ``chronyd``, and ``cloud-init``. Without them the image will not
boot. Blueprint services are added to, not replacing, the list already in the
templates, if any.
The service names are systemd service units. You may specify any systemd unit
file accepted by ``systemctl enable`` eg. ``cockpit.socket``::
[customizations.services]
enabled = ["sshd", "cockpit.socket", "httpd"]
disabled = ["postfix", "telnetd"]
[[repos.git]]
~~~~~~~~~~~~~
The ``[[repos.git]]`` entries are used to add files from a `git repository <https://git-scm.com/>`_
repository to the created image. The repository is cloned, the specified ``ref`` is checked out
and an rpm is created to install the files to a ``destination`` path. The rpm includes a summary
with the details of the repository and reference used to create it. The rpm is also included in the
image build metadata.
To create an rpm named ``server-config-1.0-1.noarch.rpm`` you would add this to your blueprint::
[[repos.git]]
rpmname="server-config"
rpmversion="1.0"
rpmrelease="1"
summary="Setup files for server deployment"
repo="PATH OF GIT REPO TO CLONE"
ref="v1.0"
destination="/opt/server/"
* rpmname: Name of the rpm to create, also used as the prefix name in the tar archive
* rpmversion: Version of the rpm, eg. "1.0.0"
* rpmrelease: Release of the rpm, eg. "1"
* summary: Summary string for the rpm
* repo: URL of the get repo to clone and create the archive from
* ref: Git reference to check out. eg. origin/branch-name, git tag, or git commit hash
* destination: Path to install the / of the git repo at when installing the rpm
An rpm will be created with the contents of the git repository referenced, with the files
being installed under ``/opt/server/`` in this case.
``ref`` can be any valid git reference for use with ``git archive``. eg. to use the head
of a branch set it to ``origin/branch-name``, a tag name, or a commit hash.
Note that the repository is cloned in full each time a build is started, so pointing to a
repository with a large amount of history may take a while to clone and use a significant
amount of disk space. The clone is temporary and is removed once the rpm is created.
Adding Output Types
-------------------
``livemedia-creator`` supports a large number of output types, and only some of
these are currently available via ``lorax-composer``. To add a new output type to
lorax-composer a kickstart file needs to be added to ``./share/composer/``. The
name of the kickstart is what will be used by the ``/compose/types`` route, and the
``compose_type`` field of the POST to start a compose. It also needs to have
code added to the :py:func:`pylorax.api.compose.compose_args` function. The
``_MAP`` entry in this function defines what lorax-composer will pass to
:py:func:`pylorax.installer.novirt_install` when it runs the compose. When the
compose is finished the output files need to be copied out of the build
directory (``/var/lib/lorax/composer/results/<UUID>/compose/``),
:py:func:`pylorax.api.compose.move_compose_results` handles this for each type.
You should move them instead of copying to save space.
If the new output type does not have support in livemedia-creator it should be
added there first. This will make the output available to the widest number of
users.
Example: Add partitioned disk support
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Partitioned disk support is something that livemedia-creator already supports
via the ``--make-disk`` cmdline argument. To add this to lorax-composer it
needs 3 things:
* A ``partitioned-disk.ks`` file in ``./share/composer/``
* A new entry in the _MAP in :py:func:`pylorax.api.compose.compose_args`
* Add a bit of code to :py:func:`pylorax.api.compose.move_compose_results` to move the disk image from
the compose directory to the results directory.
The ``partitioned-disk.ks`` is pretty similar to the example minimal kickstart
in ``./docs/fedora-minimal.ks``. You should remove the ``url`` and ``repo``
commands, they will be added by the compose process. Make sure the bootloader
packages are included in the ``%packages`` section at the end of the kickstart,
and you will want to leave off the ``%end`` so that the compose can append the
list of packages from the blueprint.
The new ``_MAP`` entry should be a copy of one of the existing entries, but with ``make_disk`` set
to ``True``. Make sure that none of the other ``make_*`` options are ``True``. The ``image_name`` is
what the name of the final image will be.
``move_compose_results()`` can be as simple as moving the output file into
the results directory, or it could do some post-processing on it. The end of
the function should always clean up the ``./compose/`` directory, removing any
unneeded extra files. This is especially true for the ``live-iso`` since it produces
the contents of the iso as well as the boot.iso itself.
Package Sources
---------------
By default lorax-composer uses the host's configured repositories. It copies
the ``*.repo`` files from ``/etc/yum.repos.d/`` into
``/var/lib/lorax/composer/repos.d/`` at startup, these are immutable system
repositories and cannot be deleted or changed. If you want to add additional
repos you can put them into ``/var/lib/lorax/composer/repos.d/`` or use the
``/api/v0/projects/source/*`` API routes to create them.
The new source can be added by doing a POST to the ``/api/v0/projects/source/new``
route using JSON (with `Content-Type` header set to `application/json`) or TOML
(with it set to `text/x-toml`). The format of the source looks like this (in
TOML)::
name = "custom-source-1"
url = "https://url/path/to/repository/"
type = "yum-baseurl"
proxy = "https://proxy-url/"
check_ssl = true
check_gpg = true
gpgkey_urls = ["https://url/path/to/gpg-key"]
The ``proxy`` and ``gpgkey_urls`` entries are optional. All of the others are required. The supported
types for the urls are:
* ``yum-baseurl`` is a URL to a yum repository.
* ``yum-mirrorlist`` is a URL for a mirrorlist.
* ``yum-metalink`` is a URL for a metalink.
If ``check_ssl`` is true the https certificates must be valid. If they are self-signed you can either set
this to false, or add your Certificate Authority to the host system.
If ``check_gpg`` is true the GPG key must either be installed on the host system, or ``gpgkey_urls``
should point to it.
You can edit an existing source (other than system sources), by doing a POST to the ``new`` route
with the new version of the source. It will overwrite the previous one.
A list of existing sources is available from ``/api/v0/projects/source/list``, and detailed info
on a source can be retrieved with the ``/api/v0/projects/source/info/<source-name>`` route. By default
it returns JSON but it can also return TOML if ``?format=toml`` is added to the request.
Non-system sources can be deleted by doing a ``DELETE`` request to the
``/api/v0/projects/source/delete/<source-name>`` route.
The documentation for the source API routes can be `found here <pylorax.api.html#api-v0-projects-source-list>`_
The configured sources are used for all blueprint depsolve operations, and for composing images.
When adding additional sources you must make sure that the packages in the source do not
conflict with any other package sources, otherwise depsolving will fail.
DVD ISO Package Source
~~~~~~~~~~~~~~~~~~~~~~
In some situations the system may want to *only* use a DVD iso as the package
source, not the repos from the network. ``lorax-composer`` and ``anaconda``
understand ``file://`` URLs so you can mount an iso on the host, and replace the
system repo files with a configuration file pointing to the DVD.
* Stop the ``lorax-composer.service`` if it is running
* Move the repo files in ``/etc/yum.repos.d/`` someplace safe
* Create a new ``iso.repo`` file in ``/etc/yum.repos.d/``::
[iso]
name=iso
baseurl=file:///mnt/iso/
enabled=1
gpgcheck=1
gpgkey=file:///mnt/iso/RPM-GPG-KEY-redhat-release
* Remove all the cached repo files from ``/var/lib/lorax/composer/repos/``
* Restart the ``lorax-composer.service``
* Check the output of ``composer-cli status show`` for any output specific depsolve errors.
For example, the DVD usually does not include ``grub2-efi-*-cdboot-*`` so the live-iso image
type will not be available.
If you want to *add* the DVD source to the existing sources you can do that by
mounting the iso and creating a source file to point to it as described in the
`Package Sources`_ documentation. In that case there is no need to remove the other
sources from ``/etc/yum.repos.d/`` or clear the cached repos.
``lorax-composer`` has been replaced by the ``osbuild-composer`` WELDR API
server which implements more features (eg. ostree, image uploads, etc.) You
can still use ``composer-cli`` and ``cockpit-composer`` with
``osbuild-composer``. See the documentation or the `osbuild website
<https://www.osbuild.org/>`_ for more information.

View File

@ -1,144 +0,0 @@
Lorax
=====
:Authors:
Brian C. Lane <bcl@redhat.com>
"I am the Lorax. I speak for the trees [and images]."
The `lorax <https://github.com/rhinstaller/lorax>`_ tool is used to create the
`Anaconda <https://github.com/rhinstaller/anaconda>`_ installer boot.iso as
well as the basic release tree, and .treeinfo metadata file. Its dependencies
are fairly light-weight because it needs to be able to run in a mock chroot
environment. It is best to run lorax from the same release as is being targeted
because the templates may have release specific logic in them. eg. Use the
rawhide version to build the boot.iso for rawhide, along with the rawhide
repositories.
lorax cmdline arguments
-----------------------
.. argparse::
:ref: pylorax.cmdline.lorax_parser
:prog: lorax
Quickstart
----------
Run this as root to create a boot.iso in ``./results/``::
dnf install lorax
setenforce 0
lorax -p Fedora -v 23 -r 23 \
-s http://dl.fedoraproject.org/pub/fedora/linux/releases/23/Everything/x86_64/os/ \
-s http://dl.fedoraproject.org/pub/fedora/linux/updates/23/x86_64/ \
./results/
setenforce 1
You can add your own repos with ``-s`` and packages with higher NVRs will
override the ones in the distribution repositories.
Under ``./results/`` will be the release tree files: .discinfo, .treeinfo, everything that
goes onto the boot.iso, the pxeboot directory, and the boot.iso under ``./images/``.
How it works
------------
Lorax uses `dnf <https://github.com/rpm-software-management/dnf>`_ to install
packages into a temporary directory, sets up configuration files, it then
removes unneeded files to save space, and creates a squashfs filesystem of the
files. The iso is then built using a generic initramfs and the kernel from the
selected repositories.
To drive these processes Lorax uses a custom template system, based on `Mako
templates <http://www.makotemplates.org/>`_ with the addition of custom
commands (documented in :class:`pylorax.ltmpl.LoraxTemplateRunner`). Mako
supports ``%if/%endif`` blocks as well as free-form python code inside ``<%
%>`` tags and variable substitution with ``${}``. The default templates are
shipped with lorax in ``/usr/share/lorax/templates.d/99-generic/`` and use the
``.tmpl`` extension.
runtime-install.tmpl
~~~~~~~~~~~~~~~~~~~~
The ``runtime-install.tmpl`` template lists packages to be installed using the
``installpkg`` command. This template is fairly simple, installing common packages and
architecture specific packages. It must end with the ``run_pkg_transaction``
command which tells dnf to download and install the packages.
runtime-postinstall.tmpl
~~~~~~~~~~~~~~~~~~~~~~~~
The ``runtime-postinstall.tmpl`` template is where the system configuration
happens. The installer environment is similar to a normal running system, but
needs some special handling. Configuration files are setup, systemd is told to
start the anaconda.target instead of a default system target, and a number of
unneeded services are disabled, some of which can interfere with the
installation. A number of template commands are used here:
* :func:`append <pylorax.ltmpl.LoraxTemplateRunner.append>` to add text to a file.
* :func:`chmod <pylorax.ltmpl.LoraxTemplateRunner.chmod>` changes the file's mode.
* :func:`gconfset <pylorax.ltmpl.LoraxTemplateRunner.gconfset>` runs gconfset.
* :func:`install <pylorax.ltmpl.LoraxTemplateRunner.install>` to install a file into the installroot.
* :func:`mkdir <pylorax.ltmpl.LoraxTemplateRunner.mkdir>` makes a new directory.
* :func:`move <pylorax.ltmpl.LoraxTemplateRunner.move>` to move a file into the installroot
* :func:`replace <pylorax.ltmpl.LoraxTemplateRunner.replace>` does text substitution in a file
* :func:`remove <pylorax.ltmpl.LoraxTemplateRunner.remove>` deletes a file
* :func:`runcmd <pylorax.ltmpl.LoraxTemplateRunner.runcmd>` run arbitrary commands.
* :func:`symlink <pylorax.ltmpl.LoraxTemplateRunner.symlink>` creates a symlink
* :func:`systemctl <pylorax.ltmpl.LoraxTemplateRunner.systemctl>` runs systemctl in the installroot
runtime-cleanup.tmpl
~~~~~~~~~~~~~~~~~~~~
The ``runtime-cleanup.tmpl`` template is used to remove files that aren't strictly needed
by the installation environment. In addition to the ``remove`` template command it uses:
* :func:`removepkg <pylorax.ltmpl.LoraxTemplateRunner.removepkg>`
remove all of a specific package's contents. A package may be pulled in as a dependency, but
not really used. eg. sound support.
* :func:`removefrom <pylorax.ltmpl.LoraxTemplateRunner.removefrom>`
Removes some files from a package. A file glob can be used, or the --allbut option to
remove everything except a select few.
* :func:`removekmod <pylorax.ltmpl.LoraxTemplateRunner.removekmod>`
Removes kernel modules
The squashfs filesystem
~~~~~~~~~~~~~~~~~~~~~~~
After ``runtime-*.tmpl`` templates have finished their work lorax creates an
empty ext4 filesystem, copies the remaining files to it, and makes a squashfs
filesystem of it. This file is the / of the boot.iso's installer environment
and is what is in the LiveOS/squashfs.img file on the iso.
iso creation
~~~~~~~~~~~~
The iso creation is handled by another set of templates. The one used depends
on the architecture that the iso is being created for. They are also stored in
``/usr/share/lorax/templates.d/99-generic`` and are named after the arch, like
``x86.tmpl`` and ``aarch64.tmpl``. They handle creation of the tree, copying
configuration template files, configuration variable substitution, treeinfo
metadata (via the :func:`treeinfo <pylorax.ltmpl.LoraxTemplateRunner.treeinfo>`
template command). Kernel and initrd are copied from the installroot to their
final locations and then mkisofs is run to create the boot.iso
Custom Templates
----------------
The default set of templates and configuration files from the lorax-generic-templates package
are shipped in the ``/usr/share/lorax/templates.d/99-generic/`` directory. You can
make a copy of them and place them into another directory under ``templates.d``
and they will be used instead if their sort order is below all other directories. This
allows multiple packages to ship lorax templates without conflict. You can (and probably
should) select the specific template directory by passing ``--sharedir`` to lorax.

View File

@ -90,10 +90,11 @@ You can use the kickstart `liveimg command
to install a pre-generated disk image or tar to the system the iso is booting
on.
Create a disk image or tar with ``lorax-composer`` or ``livemedia-creator``,
Create a disk image or tar with ``osbuild-composer`` or ``livemedia-creator``,
make sure the image includes tools expected by ``anaconda``, as well as the
kernel and bootloader support. In ``lorax-composer`` use the ``liveimg-tar``
image type. If you plan to install it to a UEFI machine make sure to include
kernel and bootloader support. In ``osbuild-composer`` use the ``tar`` image
type and make sure to include the ``kernel``, ``grub2``, and ``grub2-tools``
packages. If you plan to install it to a UEFI machine make sure to include
``grub2-efi`` and ``efibootmgr`` in the blueprint.
Add the ``root.tar.xz`` file to the iso using ``--add /PATH/TO/ROOT.TAR.XZ``,

View File

@ -5,5 +5,4 @@ src
:maxdepth: 4
composer
lifted
pylorax

View File

@ -1,7 +0,0 @@
pylorax
=======
.. toctree::
:maxdepth: 4
pylorax

View File

@ -1,27 +0,0 @@
Product and Updates Images
==========================
Lorax now supports creation of product.img and updates.img as part of the build
process. This is implemented using the installimg template command which will
take the contents of a directory and create a compressed archive from it. The
directory must be created by one of the packages installed by
runtime-install.tmpl or by passing ``--installpkgs <pkgname>`` to lorax at
runtime. The x86, ppc, ppc64le and aarch64 templates all look for
/usr/share/lorax/product/ and /usr/share/lorax/updates/ directories in the
install chroot while creating the final install tree. If there are files in
those directories lorax will create images/product.img and/or
images/updates.img
These archives are just like an anaconda updates image -- their contents are
copied over the top of the filesystem at boot time so that you can drop in
files to add to or replace anything on the filesystem.
Anaconda has several places that it looks for updates, the one for product.img
is in /run/install/product. So for example, to add an installclass to Anaconda
you would put your custom class here:
``/usr/share/lorax/product/run/install/product/pyanaconda/installclasses/custom.py``
If the packages containing the product/updates files are not included as part
of normal dependencies you can add specific packages with the ``--installpkgs``
command or the installpkgs paramater of :class:`pylorax.treebuilder.RuntimeBuilder`

View File

@ -164,7 +164,6 @@ pylorax.api.workspace module
:undoc-members:
:show-inheritance:
Module contents
---------------

View File

@ -1,13 +1,6 @@
pylorax package
===============
Subpackages
-----------
.. toctree::
pylorax.api
Submodules
----------
@ -155,7 +148,6 @@ pylorax.treeinfo module
:undoc-members:
:show-inheritance:
Module contents
---------------

View File

@ -1,134 +0,0 @@
pylorax package
===============
Submodules
----------
pylorax.base module
-------------------
.. automodule:: pylorax.base
:members:
:undoc-members:
:show-inheritance:
pylorax.buildstamp module
-------------------------
.. automodule:: pylorax.buildstamp
:members:
:undoc-members:
:show-inheritance:
pylorax.cmdline module
----------------------
.. automodule:: pylorax.cmdline
:members:
:undoc-members:
:show-inheritance:
pylorax.decorators module
-------------------------
.. automodule:: pylorax.decorators
:members:
:undoc-members:
:show-inheritance:
pylorax.discinfo module
-----------------------
.. automodule:: pylorax.discinfo
:members:
:undoc-members:
:show-inheritance:
pylorax.dnfhelper module
------------------------
.. automodule:: pylorax.dnfhelper
:members:
:undoc-members:
:show-inheritance:
pylorax.executils module
------------------------
.. automodule:: pylorax.executils
:members:
:undoc-members:
:show-inheritance:
pylorax.imgutils module
-----------------------
.. automodule:: pylorax.imgutils
:members:
:undoc-members:
:show-inheritance:
pylorax.ltmpl module
--------------------
.. automodule:: pylorax.ltmpl
:members:
:undoc-members:
:show-inheritance:
pylorax.monitor module
----------------------
.. automodule:: pylorax.monitor
:members:
:undoc-members:
:show-inheritance:
pylorax.mount module
--------------------
.. automodule:: pylorax.mount
:members:
:undoc-members:
:show-inheritance:
pylorax.output module
---------------------
.. automodule:: pylorax.output
:members:
:undoc-members:
:show-inheritance:
pylorax.sysutils module
-----------------------
.. automodule:: pylorax.sysutils
:members:
:undoc-members:
:show-inheritance:
pylorax.treebuilder module
--------------------------
.. automodule:: pylorax.treebuilder
:members:
:undoc-members:
:show-inheritance:
pylorax.treeinfo module
-----------------------
.. automodule:: pylorax.treeinfo
:members:
:undoc-members:
:show-inheritance:
Module contents
---------------
.. automodule:: pylorax
:members:
:undoc-members:
:show-inheritance:

View File

@ -1,22 +0,0 @@
.. lorax documentation master file, created by
sphinx-quickstart on Mon May 11 15:06:14 2015.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to lorax's documentation!
=================================
Contents:
.. toctree::
:maxdepth: 2
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -15,6 +15,12 @@ div.clearer {
clear: both;
}
div.section::after {
display: block;
content: '';
clear: left;
}
/* -- relbar ---------------------------------------------------------------- */
div.related {
@ -316,21 +322,27 @@ img.align-default, .figure.align-default {
div.sidebar {
margin: 0 0 0.5em 1em;
border: 1px solid #ddb;
padding: 7px 7px 0 7px;
padding: 7px;
background-color: #ffe;
width: 40%;
float: right;
clear: right;
overflow-x: auto;
}
p.sidebar-title {
font-weight: bold;
}
div.admonition, div.topic, blockquote {
clear: left;
}
/* -- topics ---------------------------------------------------------------- */
div.topic {
border: 1px solid #ccc;
padding: 7px 7px 0 7px;
padding: 7px;
margin: 10px 0 10px 0;
}
@ -352,10 +364,6 @@ div.admonition dt {
font-weight: bold;
}
div.admonition dl {
margin-bottom: 0;
}
p.admonition-title {
margin: 0px 10px 5px 0px;
font-weight: bold;
@ -366,9 +374,28 @@ div.body p.centered {
margin-top: 25px;
}
/* -- content of sidebars/topics/admonitions -------------------------------- */
div.sidebar > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}
div.sidebar::after,
div.topic::after,
div.admonition::after,
blockquote::after {
display: block;
content: '';
clear: both;
}
/* -- tables ---------------------------------------------------------------- */
table.docutils {
margin-top: 10px;
margin-bottom: 10px;
border: 0;
border-collapse: collapse;
}
@ -416,13 +443,13 @@ table.citation td {
border-bottom: none;
}
th > p:first-child,
td > p:first-child {
th > :first-child,
td > :first-child {
margin-top: 0px;
}
th > p:last-child,
td > p:last-child {
th > :last-child,
td > :last-child {
margin-bottom: 0px;
}
@ -468,6 +495,10 @@ table.field-list td, table.field-list th {
/* -- hlist styles ---------------------------------------------------------- */
table.hlist {
margin: 1em 0;
}
table.hlist td {
vertical-align: top;
}
@ -495,17 +526,37 @@ ol.upperroman {
list-style: upper-roman;
}
li > p:first-child {
:not(li) > ol > li:first-child > :first-child,
:not(li) > ul > li:first-child > :first-child {
margin-top: 0px;
}
li > p:last-child {
:not(li) > ol > li:last-child > :last-child,
:not(li) > ul > li:last-child > :last-child {
margin-bottom: 0px;
}
ol.simple ol p,
ol.simple ul p,
ul.simple ol p,
ul.simple ul p {
margin-top: 0;
}
ol.simple > li:not(:first-child) > p,
ul.simple > li:not(:first-child) > p {
margin-top: 0;
}
ol.simple p,
ul.simple p {
margin-bottom: 0;
}
dl.footnote > dt,
dl.citation > dt {
float: left;
margin-right: 0.5em;
}
dl.footnote > dd,
@ -520,14 +571,15 @@ dl.citation > dd:after {
}
dl.field-list {
display: flex;
flex-wrap: wrap;
display: grid;
grid-template-columns: fit-content(30%) auto;
}
dl.field-list > dt {
flex-basis: 20%;
font-weight: bold;
word-break: break-word;
padding-left: 0.5em;
padding-right: 5px;
}
dl.field-list > dt:after {
@ -535,8 +587,8 @@ dl.field-list > dt:after {
}
dl.field-list > dd {
flex-basis: 70%;
padding-left: 1em;
padding-left: 0.5em;
margin-top: 0em;
margin-left: 0em;
margin-bottom: 0em;
}
@ -545,7 +597,7 @@ dl {
margin-bottom: 15px;
}
dd > p:first-child {
dd > :first-child {
margin-top: 0px;
}
@ -559,6 +611,11 @@ dd {
margin-left: 30px;
}
dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
}
dt:target, span.highlighted {
background-color: #fbe54e;
}
@ -636,6 +693,10 @@ pre {
overflow-y: hidden; /* fixes display issues on Chrome browsers */
}
pre, div[class*="highlight-"] {
clear: both;
}
span.pre {
-moz-hyphens: none;
-ms-hyphens: none;
@ -643,22 +704,57 @@ span.pre {
hyphens: none;
}
div[class*="highlight-"] {
margin: 1em 0;
}
td.linenos pre {
padding: 5px 0px;
border: 0;
background-color: transparent;
color: #aaa;
}
table.highlighttable {
margin-left: 0.5em;
display: block;
}
table.highlighttable tbody {
display: block;
}
table.highlighttable tr {
display: flex;
}
table.highlighttable td {
padding: 0 0.5em 0 0.5em;
margin: 0;
padding: 0;
}
table.highlighttable td.linenos {
padding-right: 0.5em;
}
table.highlighttable td.code {
flex: 1;
overflow: hidden;
}
.highlight .hll {
display: block;
}
div.highlight pre,
table.highlighttable pre {
margin: 0;
}
div.code-block-caption + div {
margin-top: 0;
}
div.code-block-caption {
margin-top: 1em;
padding: 2px 5px;
font-size: small;
}
@ -667,8 +763,9 @@ div.code-block-caption code {
background-color: transparent;
}
div.code-block-caption + div > div.highlight > pre {
margin-top: 0;
table.highlighttable td.linenos,
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
user-select: none;
}
div.code-block-caption span.caption-number {
@ -680,11 +777,7 @@ div.code-block-caption span.caption-text {
}
div.literal-block-wrapper {
padding: 1em 1em 0;
}
div.literal-block-wrapper div.highlight {
margin: 0;
margin: 1em 0;
}
code.descname {
@ -735,8 +828,7 @@ span.eqno {
}
span.eqno a.headerlink {
position: relative;
left: 0px;
position: absolute;
z-index: 1;
}

View File

@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for all documentation.
*
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -283,10 +283,11 @@ var Documentation = {
},
initOnKeyListeners: function() {
$(document).keyup(function(event) {
$(document).keydown(function(event) {
var activeElementType = document.activeElement.tagName;
// don't navigate when in search box or textarea
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT') {
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
&& !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) {
switch (event.keyCode) {
case 37: // left
var prevHref = $('link[rel="prev"]').prop('href');

View File

@ -1,9 +1,11 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '33.2',
VERSION: '34.3',
LANGUAGE: 'None',
COLLAPSE_INDEX: false,
BUILDER: 'html',
FILE_SUFFIX: '.html',
LINK_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt',
NAVIGATION_WITH_KEYS: false

Binary file not shown.

10308
_static/jquery-1.11.1.js vendored

File diff suppressed because it is too large Load Diff

10872
_static/jquery-3.5.1.js vendored Normal file

File diff suppressed because it is too large Load Diff

6
_static/jquery.js vendored

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
* This script contains the language-specific data used by searchtools.js,
* namely the list of stopwords, stemmer, scorer and splitter.
*
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/

View File

@ -4,7 +4,7 @@
*
* Sphinx JavaScript utilities for the full-text search.
*
* :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
@ -63,6 +63,11 @@ var Search = {
htmlElement.innerHTML = htmlString;
$(htmlElement).find('.headerlink').remove();
docContent = $(htmlElement).find('[role=main]')[0];
if(docContent === undefined) {
console.warn("Content block not found. Sphinx search tries to obtain it " +
"via '[role=main]'. Could you check your theme or template.");
return "";
}
return docContent.textContent || docContent.innerText;
},
@ -161,8 +166,7 @@ var Search = {
objectterms.push(tmp[i].toLowerCase());
}
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i].match(/^\d+$/) ||
tmp[i] === "") {
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i] === "") {
// skip this "word"
continue;
}
@ -245,7 +249,9 @@ var Search = {
if (results.length) {
var item = results.pop();
var listItem = $('<li style="display:none"></li>');
if (DOCUMENTATION_OPTIONS.FILE_SUFFIX === '') {
var requestUrl = "";
var linkUrl = "";
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
// dirhtml builder
var dirname = item[0] + '/';
if (dirname.match(/\/index\/$/)) {
@ -253,15 +259,17 @@ var Search = {
} else if (dirname == 'index/') {
dirname = '';
}
listItem.append($('<a/>').attr('href',
DOCUMENTATION_OPTIONS.URL_ROOT + dirname +
highlightstring + item[2]).html(item[1]));
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
listItem.append($('<a/>').attr('href',
item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX +
highlightstring + item[2]).html(item[1]));
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
linkUrl = item[0] + DOCUMENTATION_OPTIONS.LINK_SUFFIX;
}
listItem.append($('<a/>').attr('href',
linkUrl +
highlightstring + item[2]).html(item[1]));
if (item[3]) {
listItem.append($('<span> (' + item[3] + ')</span>'));
Search.output.append(listItem);
@ -269,7 +277,7 @@ var Search = {
displayNextItem();
});
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
$.ajax({url: DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX,
$.ajax({url: requestUrl,
dataType: "text",
complete: function(jqxhr, textstatus) {
var data = jqxhr.responseText;
@ -424,7 +432,7 @@ var Search = {
for (j = 0; j < _files.length; j++) {
file = _files[j];
if (!(file in scoreMap))
scoreMap[file] = {}
scoreMap[file] = {};
scoreMap[file][word] = o.score;
}
});
@ -432,7 +440,7 @@ var Search = {
// create the mapping
for (j = 0; j < files.length; j++) {
file = files[j];
if (file in fileMap)
if (file in fileMap && fileMap[file].indexOf(word) === -1)
fileMap[file].push(word);
else
fileMap[file] = [word];

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer-cli &mdash; Lorax 33.2 documentation</title>
<title>composer-cli &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></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/language_data.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -36,7 +36,7 @@
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="mkksiso" href="mkksiso.html" />
<link rel="prev" title="lorax-composer" href="lorax-composer.html" />
<link rel="prev" title="livemedia-creator" href="livemedia-creator.html" />
</head>
<body class="wy-body-for-nav">
@ -60,7 +60,7 @@
<div class="version">
33.2
34.3
</div>
@ -89,7 +89,6 @@
<li class="toctree-l1"><a class="reference internal" href="intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">composer-cli</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#composer-cli-cmdline-arguments">composer-cli cmdline arguments</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#Positional Arguments">Positional Arguments</a></li>
@ -108,6 +107,24 @@
<li class="toctree-l2"><a class="reference internal" href="#profiles">Profiles</a></li>
<li class="toctree-l2"><a class="reference internal" href="#build-an-image-and-upload-results">Build an image and upload results</a></li>
<li class="toctree-l2"><a class="reference internal" href="#upload-an-existing-image">Upload an existing image</a></li>
<li class="toctree-l2"><a class="reference internal" href="#debugging">Debugging</a></li>
<li class="toctree-l2"><a class="reference internal" href="#blueprint-reference">Blueprint Reference</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#packages-and-modules">[[packages]] and [[modules]]</a></li>
<li class="toctree-l3"><a class="reference internal" href="#groups">[[groups]]</a></li>
<li class="toctree-l3"><a class="reference internal" href="#customizations">Customizations</a><ul>
<li class="toctree-l4"><a class="reference internal" href="#customizations-kernel">[customizations.kernel]</a></li>
<li class="toctree-l4"><a class="reference internal" href="#customizations-sshkey">[[customizations.sshkey]]</a></li>
<li class="toctree-l4"><a class="reference internal" href="#customizations-user">[[customizations.user]]</a></li>
<li class="toctree-l4"><a class="reference internal" href="#customizations-group">[[customizations.group]]</a></li>
<li class="toctree-l4"><a class="reference internal" href="#customizations-timezone">[customizations.timezone]</a></li>
<li class="toctree-l4"><a class="reference internal" href="#customizations-locale">[customizations.locale]</a></li>
<li class="toctree-l4"><a class="reference internal" href="#customizations-firewall">[customizations.firewall]</a></li>
<li class="toctree-l4"><a class="reference internal" href="#customizations-services">[customizations.services]</a></li>
</ul>
</li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="#example-blueprint">Example Blueprint</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="mkksiso.html">mkksiso</a></li>
@ -184,17 +201,17 @@
<dd class="field-odd"><p>Brian C. Lane &lt;<a class="reference external" href="mailto:bcl&#37;&#52;&#48;redhat&#46;com">bcl<span>&#64;</span>redhat<span>&#46;</span>com</a>&gt;</p>
</dd>
</dl>
<p><code class="docutils literal notranslate"><span class="pre">composer-cli</span></code> is used to interact with the <code class="docutils literal notranslate"><span class="pre">lorax-composer</span></code> API server, managing blueprints, exploring available packages, and building new images.</p>
<p>It requires <a class="reference external" href="lorax-composer.html">lorax-composer</a> to be installed on the
local system, and the user running it needs to be a member of the <code class="docutils literal notranslate"><span class="pre">weldr</span></code>
group. They do not need to be root, but all of the <a class="reference external" href="lorax-composer.html#security">security precautions</a> apply.</p>
<p><code class="docutils literal notranslate"><span class="pre">composer-cli</span></code> is an interactive tool for use with a WELDR API server,
managing blueprints, exploring available packages, and building new images. As
of Fedora 34, <cite>osbuild-composer &lt;https://osbuild.org&gt;</cite> is the recommended
server.</p>
<p>It requires the server to be installed on the local system, and the user
running it needs to be a member of the <code class="docutils literal notranslate"><span class="pre">weldr</span></code> group.</p>
<div class="section" id="composer-cli-cmdline-arguments">
<h2>composer-cli cmdline arguments<a class="headerlink" href="#composer-cli-cmdline-arguments" title="Permalink to this headline"></a></h2>
<p><p>Lorax Composer commandline tool</p>
</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">usage</span><span class="p">:</span> <span class="n">composer</span><span class="o">-</span><span class="n">cli</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">j</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">s</span> <span class="n">SOCKET</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">log</span> <span class="n">LOG</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">a</span> <span class="n">APIVER</span><span class="p">]</span>
<span class="p">[</span><span class="o">--</span><span class="n">test</span> <span class="n">TESTMODE</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">V</span><span class="p">]</span>
<span class="o">...</span>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">usage</span><span class="p">:</span> <span class="n">composer</span><span class="o">-</span><span class="n">cli</span> <span class="p">[</span><span class="o">-</span><span class="n">h</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">j</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">s</span> <span class="n">SOCKET</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">log</span> <span class="n">LOG</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">a</span> <span class="n">APIVER</span><span class="p">]</span> <span class="p">[</span><span class="o">--</span><span class="n">test</span> <span class="n">TESTMODE</span><span class="p">]</span> <span class="p">[</span><span class="o">-</span><span class="n">V</span><span class="p">]</span> <span class="o">...</span>
</pre></div>
</div>
<div class="section" id="Positional Arguments">
@ -233,7 +250,11 @@ group. They do not need to be root, but all of the <a class="reference external"
</dl>
</div>
<p><dl class="simple">
<dt>compose start &lt;BLUEPRINT&gt; &lt;TYPE&gt; [&lt;IMAGE-NAME&gt; &lt;PROVIDER&gt; &lt;PROFILE&gt; | &lt;IMAGE-NAME&gt; &lt;PROFILE.TOML&gt;]</dt><dd><p>Start a compose using the selected blueprint and output type. Optionally start an upload.</p>
<dt>compose start [--size XXXX] &lt;BLUEPRINT&gt; &lt;TYPE&gt; [&lt;IMAGE-NAME&gt; &lt;PROVIDER&gt; &lt;PROFILE&gt; | &lt;IMAGE-NAME&gt; &lt;PROFILE.TOML&gt;]</dt><dd><p>Start a compose using the selected blueprint and output type. Optionally start an upload.
--size is supported by osbuild-composer, and is in MiB.</p>
</dd>
<dt>compose start-ostree [--size XXXX] [--parent PARENT] [--ref REF] &lt;BLUEPRINT&gt; &lt;TYPE&gt; [&lt;IMAGE-NAME&gt; &lt;PROFILE.TOML&gt;]</dt><dd><p>Start an ostree compose using the selected blueprint and output type. Optionally start an upload. This command
is only supported by osbuild-composer. --size is in MiB.</p>
</dd>
<dt>compose types</dt><dd><p>List the supported output types.</p>
</dd>
@ -335,12 +356,12 @@ TO-COMMIT can be a commit hash, NEWEST, or WORKSPACE</p>
<h2>Edit a Blueprint<a class="headerlink" href="#edit-a-blueprint" title="Permalink to this headline"></a></h2>
<p>Start out by listing the available blueprints using <code class="docutils literal notranslate"><span class="pre">composer-cli</span> <span class="pre">blueprints</span>
<span class="pre">list</span></code>, pick one and save it to the local directory by running <code class="docutils literal notranslate"><span class="pre">composer-cli</span>
<span class="pre">blueprints</span> <span class="pre">save</span> <span class="pre">http-server</span></code>. If there are no blueprints available you can
copy one of the examples <a class="reference external" href="https://github.com/weldr/lorax/tree/master/tests/pylorax/blueprints/">from the test suite</a>.</p>
<span class="pre">blueprints</span> <span class="pre">save</span> <span class="pre">http-server</span></code>.</p>
<p>Edit the file (it will be saved with a .toml extension) and change the
description, add a package or module to it. Send it back to the server by
running <code class="docutils literal notranslate"><span class="pre">composer-cli</span> <span class="pre">blueprints</span> <span class="pre">push</span> <span class="pre">http-server.toml</span></code>. You can verify that it was
saved by viewing the changelog - <code class="docutils literal notranslate"><span class="pre">composer-cli</span> <span class="pre">blueprints</span> <span class="pre">changes</span> <span class="pre">http-server</span></code>.</p>
<p>See the <a class="reference internal" href="#example-blueprint">Example Blueprint</a> for an example.</p>
</div>
<div class="section" id="build-an-image">
<h2>Build an image<a class="headerlink" href="#build-an-image" title="Permalink to this headline"></a></h2>
@ -377,6 +398,11 @@ by using <code class="docutils literal notranslate"><span class="pre">composer-c
with <code class="docutils literal notranslate"><span class="pre">composer-cli</span> <span class="pre">upload</span> <span class="pre">start</span> <span class="pre">...</span></code>. In order to access the service you need
to pass authentication details to composer-cli using a TOML file, or reference
a previously saved profile.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>With <code class="docutils literal notranslate"><span class="pre">osbuild-composer</span></code> you can only specify upload targets during
the compose process.</p>
</div>
</div>
<div class="section" id="providers">
<h2>Providers<a class="headerlink" href="#providers" title="Permalink to this headline"></a></h2>
@ -467,6 +493,322 @@ can monitor with <code class="docutils literal notranslate"><span class="pre">co
<p>This will output the UUID of the upload, which can then be used to monitor the status in the same way
described above.</p>
</div>
<div class="section" id="debugging">
<h2>Debugging<a class="headerlink" href="#debugging" title="Permalink to this headline"></a></h2>
<p>There are a couple of arguments that can be helpful when debugging problems.
These are only meant for debugging and should not be used to script access to
the API. If you need to do that you can communicate with it directly in the
language of your choice.</p>
<p><code class="docutils literal notranslate"><span class="pre">--json</span></code> will return the server's response as a nicely formatted json output
instead of printing what the command would usually print.</p>
<p><code class="docutils literal notranslate"><span class="pre">--test=1</span></code> will cause a compose start to start creating an image, and then
end with a failed state.</p>
<p><code class="docutils literal notranslate"><span class="pre">--test=2</span></code> will cause a compose to start and then end with a finished state,
without actually composing anything.</p>
</div>
<div class="section" id="blueprint-reference">
<h2>Blueprint Reference<a class="headerlink" href="#blueprint-reference" title="Permalink to this headline"></a></h2>
<p>Blueprints are simple text files in <a class="reference external" href="https://github.com/toml-lang/toml">TOML</a> format that describe
which packages, and what versions, to install into the image. They can also define a limited set
of customizations to make to the final image.</p>
<p>A basic blueprint looks like this:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;base&quot;</span>
<span class="n">description</span> <span class="o">=</span> <span class="s2">&quot;A base system with bash&quot;</span>
<span class="n">version</span> <span class="o">=</span> <span class="s2">&quot;0.0.1&quot;</span>
<span class="p">[[</span><span class="n">packages</span><span class="p">]]</span>
<span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;bash&quot;</span>
<span class="n">version</span> <span class="o">=</span> <span class="s2">&quot;4.4.*&quot;</span>
</pre></div>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">name</span></code> field is the name of the blueprint. It can contain spaces, but they will be converted to <code class="docutils literal notranslate"><span class="pre">-</span></code>
when it is written to disk. It should be short and descriptive.</p>
<p><code class="docutils literal notranslate"><span class="pre">description</span></code> can be a longer description of the blueprint, it is only used for display purposes.</p>
<p><code class="docutils literal notranslate"><span class="pre">version</span></code> is a <a class="reference external" href="https://semver.org/">semver compatible</a> version number. If
a new blueprint is uploaded with the same <code class="docutils literal notranslate"><span class="pre">version</span></code> the server will
automatically bump the PATCH level of the <code class="docutils literal notranslate"><span class="pre">version</span></code>. If the <code class="docutils literal notranslate"><span class="pre">version</span></code>
doesn't match it will be used as is. eg. Uploading a blueprint with <code class="docutils literal notranslate"><span class="pre">version</span></code>
set to <code class="docutils literal notranslate"><span class="pre">0.1.0</span></code> when the existing blueprint <code class="docutils literal notranslate"><span class="pre">version</span></code> is <code class="docutils literal notranslate"><span class="pre">0.0.1</span></code> will
result in the new blueprint being stored as <code class="docutils literal notranslate"><span class="pre">version</span> <span class="pre">0.1.0</span></code>.</p>
<div class="section" id="packages-and-modules">
<h3>[[packages]] and [[modules]]<a class="headerlink" href="#packages-and-modules" title="Permalink to this headline"></a></h3>
<p>These entries describe the package names and matching version glob to be installed into the image.</p>
<p>The names must match the names exactly, and the versions can be an exact match
or a filesystem-like glob of the version using <code class="docutils literal notranslate"><span class="pre">*</span></code> wildcards and <code class="docutils literal notranslate"><span class="pre">?</span></code>
character matching.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Currently there are no differences between <code class="docutils literal notranslate"><span class="pre">packages</span></code> and <code class="docutils literal notranslate"><span class="pre">modules</span></code>
in <code class="docutils literal notranslate"><span class="pre">osbuild-composer</span></code>. Both are treated like an rpm package dependency.</p>
</div>
<p>For example, to install <code class="docutils literal notranslate"><span class="pre">tmux-2.9a</span></code> and <code class="docutils literal notranslate"><span class="pre">openssh-server-8.*</span></code>, you would add
this to your blueprint:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">packages</span><span class="p">]]</span>
<span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;tmux&quot;</span>
<span class="n">version</span> <span class="o">=</span> <span class="s2">&quot;2.9a&quot;</span>
<span class="p">[[</span><span class="n">packages</span><span class="p">]]</span>
<span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;openssh-server&quot;</span>
<span class="n">version</span> <span class="o">=</span> <span class="s2">&quot;8.*&quot;</span>
</pre></div>
</div>
</div>
<div class="section" id="groups">
<h3>[[groups]]<a class="headerlink" href="#groups" title="Permalink to this headline"></a></h3>
<p>The <code class="docutils literal notranslate"><span class="pre">groups</span></code> entries describe a group of packages to be installed into the image. Package groups are
defined in the repository metadata. Each group has a descriptive name used primarily for display
in user interfaces and an ID more commonly used in kickstart files. Here, the ID is the expected
way of listing a group.</p>
<p>Groups have three different ways of categorizing their packages: mandatory, default, and optional.
For purposes of blueprints, mandatory and default packages will be installed. There is no mechanism
for selecting optional packages.</p>
<p>For example, if you want to install the <code class="docutils literal notranslate"><span class="pre">anaconda-tools</span></code> group you would add this to your
blueprint:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">groups</span><span class="p">]]</span>
<span class="n">name</span><span class="o">=</span><span class="s2">&quot;anaconda-tools&quot;</span>
</pre></div>
</div>
<p><code class="docutils literal notranslate"><span class="pre">groups</span></code> is a TOML list, so each group needs to be listed separately, like <code class="docutils literal notranslate"><span class="pre">packages</span></code> but with
no version number.</p>
</div>
<div class="section" id="customizations">
<h3>Customizations<a class="headerlink" href="#customizations" title="Permalink to this headline"></a></h3>
<p>The <code class="docutils literal notranslate"><span class="pre">[customizations]</span></code> section can be used to configure the hostname of the final image. eg.:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">customizations</span><span class="p">]</span>
<span class="n">hostname</span> <span class="o">=</span> <span class="s2">&quot;baseimage&quot;</span>
</pre></div>
</div>
<p>This is optional and may be left out to use the defaults.</p>
<div class="section" id="customizations-kernel">
<h4>[customizations.kernel]<a class="headerlink" href="#customizations-kernel" title="Permalink to this headline"></a></h4>
<p>This allows you to append arguments to the bootloader's kernel commandline. This will not have any
effect on <code class="docutils literal notranslate"><span class="pre">tar</span></code> or <code class="docutils literal notranslate"><span class="pre">ext4-filesystem</span></code> images since they do not include a bootloader.</p>
<p>For example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">customizations</span><span class="o">.</span><span class="n">kernel</span><span class="p">]</span>
<span class="n">append</span> <span class="o">=</span> <span class="s2">&quot;nosmt=force&quot;</span>
</pre></div>
</div>
</div>
<div class="section" id="customizations-sshkey">
<h4>[[customizations.sshkey]]<a class="headerlink" href="#customizations-sshkey" title="Permalink to this headline"></a></h4>
<p>Set an existing user's ssh key in the final image:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">customizations</span><span class="o">.</span><span class="n">sshkey</span><span class="p">]]</span>
<span class="n">user</span> <span class="o">=</span> <span class="s2">&quot;root&quot;</span>
<span class="n">key</span> <span class="o">=</span> <span class="s2">&quot;PUBLIC SSH KEY&quot;</span>
</pre></div>
</div>
<p>The key will be added to the user's authorized_keys file.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p><code class="docutils literal notranslate"><span class="pre">key</span></code> expects the entire content of <code class="docutils literal notranslate"><span class="pre">~/.ssh/id_rsa.pub</span></code></p>
</div>
</div>
<div class="section" id="customizations-user">
<h4>[[customizations.user]]<a class="headerlink" href="#customizations-user" title="Permalink to this headline"></a></h4>
<p>Add a user to the image, and/or set their ssh key.
All fields for this section are optional except for the <code class="docutils literal notranslate"><span class="pre">name</span></code>, here is a complete example:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">customizations</span><span class="o">.</span><span class="n">user</span><span class="p">]]</span>
<span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;admin&quot;</span>
<span class="n">description</span> <span class="o">=</span> <span class="s2">&quot;Administrator account&quot;</span>
<span class="n">password</span> <span class="o">=</span> <span class="s2">&quot;$6$CHO2$3rN8eviE2t50lmVyBYihTgVRHcaecmeCk31L...&quot;</span>
<span class="n">key</span> <span class="o">=</span> <span class="s2">&quot;PUBLIC SSH KEY&quot;</span>
<span class="n">home</span> <span class="o">=</span> <span class="s2">&quot;/srv/widget/&quot;</span>
<span class="n">shell</span> <span class="o">=</span> <span class="s2">&quot;/usr/bin/bash&quot;</span>
<span class="n">groups</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;widget&quot;</span><span class="p">,</span> <span class="s2">&quot;users&quot;</span><span class="p">,</span> <span class="s2">&quot;wheel&quot;</span><span class="p">]</span>
<span class="n">uid</span> <span class="o">=</span> <span class="mi">1200</span>
<span class="n">gid</span> <span class="o">=</span> <span class="mi">1200</span>
</pre></div>
</div>
<p>If the password starts with <code class="docutils literal notranslate"><span class="pre">$6$</span></code>, <code class="docutils literal notranslate"><span class="pre">$5$</span></code>, or <code class="docutils literal notranslate"><span class="pre">$2b$</span></code> it will be stored as
an encrypted password. Otherwise it will be treated as a plain text password.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p><code class="docutils literal notranslate"><span class="pre">key</span></code> expects the entire content of <code class="docutils literal notranslate"><span class="pre">~/.ssh/id_rsa.pub</span></code></p>
</div>
</div>
<div class="section" id="customizations-group">
<h4>[[customizations.group]]<a class="headerlink" href="#customizations-group" title="Permalink to this headline"></a></h4>
<p>Add a group to the image. <code class="docutils literal notranslate"><span class="pre">name</span></code> is required and <code class="docutils literal notranslate"><span class="pre">gid</span></code> is optional:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">customizations</span><span class="o">.</span><span class="n">group</span><span class="p">]]</span>
<span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;widget&quot;</span>
<span class="n">gid</span> <span class="o">=</span> <span class="mi">1130</span>
</pre></div>
</div>
</div>
<div class="section" id="customizations-timezone">
<h4>[customizations.timezone]<a class="headerlink" href="#customizations-timezone" title="Permalink to this headline"></a></h4>
<p>Customizing the timezone and the NTP servers to use for the system:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">customizations</span><span class="o">.</span><span class="n">timezone</span><span class="p">]</span>
<span class="n">timezone</span> <span class="o">=</span> <span class="s2">&quot;US/Eastern&quot;</span>
<span class="n">ntpservers</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;0.north-america.pool.ntp.org&quot;</span><span class="p">,</span> <span class="s2">&quot;1.north-america.pool.ntp.org&quot;</span><span class="p">]</span>
</pre></div>
</div>
<p>The values supported by <code class="docutils literal notranslate"><span class="pre">timezone</span></code> can be listed by running <code class="docutils literal notranslate"><span class="pre">timedatectl</span> <span class="pre">list-timezones</span></code>.</p>
<p>If no timezone is setup the system will default to using <cite>UTC</cite>. The ntp servers are also
optional and will default to using the distribution defaults which are fine for most uses.</p>
<p>In some image types there are already NTP servers setup, eg. Google cloud image, and they
cannot be overridden because they are required to boot in the selected environment. But the
timezone will be updated to the one selected in the blueprint.</p>
</div>
<div class="section" id="customizations-locale">
<h4>[customizations.locale]<a class="headerlink" href="#customizations-locale" title="Permalink to this headline"></a></h4>
<p>Customize the locale settings for the system:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">customizations</span><span class="o">.</span><span class="n">locale</span><span class="p">]</span>
<span class="n">languages</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;en_US.UTF-8&quot;</span><span class="p">]</span>
<span class="n">keyboard</span> <span class="o">=</span> <span class="s2">&quot;us&quot;</span>
</pre></div>
</div>
<p>The values supported by <code class="docutils literal notranslate"><span class="pre">languages</span></code> can be listed by running <code class="docutils literal notranslate"><span class="pre">localectl</span> <span class="pre">list-locales</span></code> from
the command line.</p>
<p>The values supported by <code class="docutils literal notranslate"><span class="pre">keyboard</span></code> can be listed by running <code class="docutils literal notranslate"><span class="pre">localectl</span> <span class="pre">list-keymaps</span></code> from
the command line.</p>
<p>Multiple languages can be added. The first one becomes the
primary, and the others are added as secondary. One or the other of <code class="docutils literal notranslate"><span class="pre">languages</span></code>
or <code class="docutils literal notranslate"><span class="pre">keyboard</span></code> must be included (or both) in the section.</p>
</div>
<div class="section" id="customizations-firewall">
<h4>[customizations.firewall]<a class="headerlink" href="#customizations-firewall" title="Permalink to this headline"></a></h4>
<p>By default the firewall blocks all access except for services that enable their ports explicitly,
like <code class="docutils literal notranslate"><span class="pre">sshd</span></code>. This command can be used to open other ports or services. Ports are configured using
the port:protocol format:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">customizations</span><span class="o">.</span><span class="n">firewall</span><span class="p">]</span>
<span class="n">ports</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;22:tcp&quot;</span><span class="p">,</span> <span class="s2">&quot;80:tcp&quot;</span><span class="p">,</span> <span class="s2">&quot;imap:tcp&quot;</span><span class="p">,</span> <span class="s2">&quot;53:tcp&quot;</span><span class="p">,</span> <span class="s2">&quot;53:udp&quot;</span><span class="p">]</span>
</pre></div>
</div>
<p>Numeric ports, or their names from <code class="docutils literal notranslate"><span class="pre">/etc/services</span></code> can be used in the <code class="docutils literal notranslate"><span class="pre">ports</span></code> enabled/disabled lists.</p>
<p>The blueprint settings extend any existing settings in the image templates, so if <code class="docutils literal notranslate"><span class="pre">sshd</span></code> is
already enabled it will extend the list of ports with the ones listed by the blueprint.</p>
<p>If the distribution uses <code class="docutils literal notranslate"><span class="pre">firewalld</span></code> you can specify services listed by <code class="docutils literal notranslate"><span class="pre">firewall-cmd</span> <span class="pre">--get-services</span></code>
in a <code class="docutils literal notranslate"><span class="pre">customizations.firewall.services</span></code> section:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">customizations</span><span class="o">.</span><span class="n">firewall</span><span class="o">.</span><span class="n">services</span><span class="p">]</span>
<span class="n">enabled</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;ftp&quot;</span><span class="p">,</span> <span class="s2">&quot;ntp&quot;</span><span class="p">,</span> <span class="s2">&quot;dhcp&quot;</span><span class="p">]</span>
<span class="n">disabled</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;telnet&quot;</span><span class="p">]</span>
</pre></div>
</div>
<p>Remember that the <code class="docutils literal notranslate"><span class="pre">firewall.services</span></code> are different from the names in <code class="docutils literal notranslate"><span class="pre">/etc/services</span></code>.</p>
<p>Both are optional, if they are not used leave them out or set them to an empty list <code class="docutils literal notranslate"><span class="pre">[]</span></code>. If you
only want the default firewall setup this section can be omitted from the blueprint.</p>
<p>NOTE: The <code class="docutils literal notranslate"><span class="pre">Google</span></code> and <code class="docutils literal notranslate"><span class="pre">OpenStack</span></code> templates explicitly disable the firewall for their environment.
This cannot be overridden by the blueprint.</p>
</div>
<div class="section" id="customizations-services">
<h4>[customizations.services]<a class="headerlink" href="#customizations-services" title="Permalink to this headline"></a></h4>
<p>This section can be used to control which services are enabled at boot time.
Some image types already have services enabled or disabled in order for the
image to work correctly, and cannot be overridden. eg. <code class="docutils literal notranslate"><span class="pre">ami</span></code> requires
<code class="docutils literal notranslate"><span class="pre">sshd</span></code>, <code class="docutils literal notranslate"><span class="pre">chronyd</span></code>, and <code class="docutils literal notranslate"><span class="pre">cloud-init</span></code>. Without them the image will not
boot. Blueprint services are added to, not replacing, the list already in the
templates, if any.</p>
<p>The service names are systemd service units. You may specify any systemd unit
file accepted by <code class="docutils literal notranslate"><span class="pre">systemctl</span> <span class="pre">enable</span></code> eg. <code class="docutils literal notranslate"><span class="pre">cockpit.socket</span></code>:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[</span><span class="n">customizations</span><span class="o">.</span><span class="n">services</span><span class="p">]</span>
<span class="n">enabled</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;sshd&quot;</span><span class="p">,</span> <span class="s2">&quot;cockpit.socket&quot;</span><span class="p">,</span> <span class="s2">&quot;httpd&quot;</span><span class="p">]</span>
<span class="n">disabled</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;postfix&quot;</span><span class="p">,</span> <span class="s2">&quot;telnetd&quot;</span><span class="p">]</span>
</pre></div>
</div>
<div class="section" id="repos-git">
<h5>[[repos.git]]<a class="headerlink" href="#repos-git" title="Permalink to this headline"></a></h5>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Currently <code class="docutils literal notranslate"><span class="pre">osbuild-composer</span></code> does not support <code class="docutils literal notranslate"><span class="pre">repos.git</span></code></p>
</div>
<p>The <code class="docutils literal notranslate"><span class="pre">[[repos.git]]</span></code> entries are used to add files from a <a class="reference external" href="https://git-scm.com/">git repository</a>
repository to the created image. The repository is cloned, the specified <code class="docutils literal notranslate"><span class="pre">ref</span></code> is checked out
and an rpm is created to install the files to a <code class="docutils literal notranslate"><span class="pre">destination</span></code> path. The rpm includes a summary
with the details of the repository and reference used to create it. The rpm is also included in the
image build metadata.</p>
<p>To create an rpm named <code class="docutils literal notranslate"><span class="pre">server-config-1.0-1.noarch.rpm</span></code> you would add this to your blueprint:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">repos</span><span class="o">.</span><span class="n">git</span><span class="p">]]</span>
<span class="n">rpmname</span><span class="o">=</span><span class="s2">&quot;server-config&quot;</span>
<span class="n">rpmversion</span><span class="o">=</span><span class="s2">&quot;1.0&quot;</span>
<span class="n">rpmrelease</span><span class="o">=</span><span class="s2">&quot;1&quot;</span>
<span class="n">summary</span><span class="o">=</span><span class="s2">&quot;Setup files for server deployment&quot;</span>
<span class="n">repo</span><span class="o">=</span><span class="s2">&quot;PATH OF GIT REPO TO CLONE&quot;</span>
<span class="n">ref</span><span class="o">=</span><span class="s2">&quot;v1.0&quot;</span>
<span class="n">destination</span><span class="o">=</span><span class="s2">&quot;/opt/server/&quot;</span>
</pre></div>
</div>
<ul class="simple">
<li><p>rpmname: Name of the rpm to create, also used as the prefix name in the tar archive</p></li>
<li><p>rpmversion: Version of the rpm, eg. &quot;1.0.0&quot;</p></li>
<li><p>rpmrelease: Release of the rpm, eg. &quot;1&quot;</p></li>
<li><p>summary: Summary string for the rpm</p></li>
<li><p>repo: URL of the get repo to clone and create the archive from</p></li>
<li><p>ref: Git reference to check out. eg. origin/branch-name, git tag, or git commit hash</p></li>
<li><p>destination: Path to install the / of the git repo at when installing the rpm</p></li>
</ul>
<p>An rpm will be created with the contents of the git repository referenced, with the files
being installed under <code class="docutils literal notranslate"><span class="pre">/opt/server/</span></code> in this case.</p>
<p><code class="docutils literal notranslate"><span class="pre">ref</span></code> can be any valid git reference for use with <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">archive</span></code>. eg. to use the head
of a branch set it to <code class="docutils literal notranslate"><span class="pre">origin/branch-name</span></code>, a tag name, or a commit hash.</p>
<p>Note that the repository is cloned in full each time a build is started, so pointing to a
repository with a large amount of history may take a while to clone and use a significant
amount of disk space. The clone is temporary and is removed once the rpm is created.</p>
</div>
</div>
</div>
</div>
<div class="section" id="example-blueprint">
<h2>Example Blueprint<a class="headerlink" href="#example-blueprint" title="Permalink to this headline"></a></h2>
<p>This example blueprint will install the <code class="docutils literal notranslate"><span class="pre">tmux</span></code>, <code class="docutils literal notranslate"><span class="pre">git</span></code>, and <code class="docutils literal notranslate"><span class="pre">vim-enhanced</span></code>
packages. It will set the <code class="docutils literal notranslate"><span class="pre">root</span></code> ssh key, add the <code class="docutils literal notranslate"><span class="pre">widget</span></code> and <code class="docutils literal notranslate"><span class="pre">admin</span></code>
users as well as a <code class="docutils literal notranslate"><span class="pre">students</span></code> group:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;example-custom-base&quot;</span>
<span class="n">description</span> <span class="o">=</span> <span class="s2">&quot;A base system with customizations&quot;</span>
<span class="n">version</span> <span class="o">=</span> <span class="s2">&quot;0.0.1&quot;</span>
<span class="p">[[</span><span class="n">packages</span><span class="p">]]</span>
<span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;tmux&quot;</span>
<span class="n">version</span> <span class="o">=</span> <span class="s2">&quot;*&quot;</span>
<span class="p">[[</span><span class="n">packages</span><span class="p">]]</span>
<span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;git&quot;</span>
<span class="n">version</span> <span class="o">=</span> <span class="s2">&quot;*&quot;</span>
<span class="p">[[</span><span class="n">packages</span><span class="p">]]</span>
<span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;vim-enhanced&quot;</span>
<span class="n">version</span> <span class="o">=</span> <span class="s2">&quot;*&quot;</span>
<span class="p">[</span><span class="n">customizations</span><span class="p">]</span>
<span class="n">hostname</span> <span class="o">=</span> <span class="s2">&quot;custombase&quot;</span>
<span class="p">[[</span><span class="n">customizations</span><span class="o">.</span><span class="n">sshkey</span><span class="p">]]</span>
<span class="n">user</span> <span class="o">=</span> <span class="s2">&quot;root&quot;</span>
<span class="n">key</span> <span class="o">=</span> <span class="s2">&quot;A SSH KEY FOR ROOT&quot;</span>
<span class="p">[[</span><span class="n">customizations</span><span class="o">.</span><span class="n">user</span><span class="p">]]</span>
<span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;widget&quot;</span>
<span class="n">description</span> <span class="o">=</span> <span class="s2">&quot;Widget process user account&quot;</span>
<span class="n">home</span> <span class="o">=</span> <span class="s2">&quot;/srv/widget/&quot;</span>
<span class="n">shell</span> <span class="o">=</span> <span class="s2">&quot;/usr/bin/false&quot;</span>
<span class="n">groups</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;dialout&quot;</span><span class="p">,</span> <span class="s2">&quot;users&quot;</span><span class="p">]</span>
<span class="p">[[</span><span class="n">customizations</span><span class="o">.</span><span class="n">user</span><span class="p">]]</span>
<span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;admin&quot;</span>
<span class="n">description</span> <span class="o">=</span> <span class="s2">&quot;Widget admin account&quot;</span>
<span class="n">password</span> <span class="o">=</span> <span class="s2">&quot;$6$CHO2$3rN8eviE2t50lmVyBYihTgVRHcaecmeCk31LeOUleVK/R/aeWVHVZDi26zAH.o0ywBKH9Tc0/wm7sW/q39uyd1&quot;</span>
<span class="n">home</span> <span class="o">=</span> <span class="s2">&quot;/srv/widget/&quot;</span>
<span class="n">shell</span> <span class="o">=</span> <span class="s2">&quot;/usr/bin/bash&quot;</span>
<span class="n">groups</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;widget&quot;</span><span class="p">,</span> <span class="s2">&quot;users&quot;</span><span class="p">,</span> <span class="s2">&quot;students&quot;</span><span class="p">]</span>
<span class="n">uid</span> <span class="o">=</span> <span class="mi">1200</span>
<span class="p">[[</span><span class="n">customizations</span><span class="o">.</span><span class="n">user</span><span class="p">]]</span>
<span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;plain&quot;</span>
<span class="n">password</span> <span class="o">=</span> <span class="s2">&quot;simple plain password&quot;</span>
<span class="p">[[</span><span class="n">customizations</span><span class="o">.</span><span class="n">user</span><span class="p">]]</span>
<span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;bart&quot;</span>
<span class="n">key</span> <span class="o">=</span> <span class="s2">&quot;SSH KEY FOR BART&quot;</span>
<span class="n">groups</span> <span class="o">=</span> <span class="p">[</span><span class="s2">&quot;students&quot;</span><span class="p">]</span>
<span class="p">[[</span><span class="n">customizations</span><span class="o">.</span><span class="n">group</span><span class="p">]]</span>
<span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;widget&quot;</span>
<span class="p">[[</span><span class="n">customizations</span><span class="o">.</span><span class="n">group</span><span class="p">]]</span>
<span class="n">name</span> <span class="o">=</span> <span class="s2">&quot;students&quot;</span>
</pre></div>
</div>
</div>
</div>
@ -480,7 +822,7 @@ described above.</p>
<a href="mkksiso.html" class="btn btn-neutral float-right" title="mkksiso" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="lorax-composer.html" class="btn btn-neutral float-left" title="lorax-composer" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
<a href="livemedia-creator.html" class="btn btn-neutral float-left" title="livemedia-creator" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer.cli package &mdash; Lorax 33.2 documentation</title>
<title>composer.cli package &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></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/language_data.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -35,7 +35,7 @@
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="lifted package" href="lifted.html" />
<link rel="next" title="pylorax package" href="pylorax.html" />
<link rel="prev" title="composer package" href="composer.html" />
</head>
@ -60,7 +60,7 @@
<div class="version">
33.2
34.3
</div>
@ -89,7 +89,6 @@
<li class="toctree-l1"><a class="reference internal" href="intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="product-images.html">Product and Updates Images</a></li>
@ -105,7 +104,6 @@
<li class="toctree-l3"><a class="reference internal" href="composer.html#module-composer">Module contents</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="lifted.html">lifted package</a></li>
<li class="toctree-l2"><a class="reference internal" href="pylorax.html">pylorax package</a></li>
</ul>
</li>
@ -184,9 +182,9 @@
</div>
<div class="section" id="module-composer.cli.blueprints">
<span id="composer-cli-blueprints-module"></span><h2>composer.cli.blueprints module<a class="headerlink" href="#module-composer.cli.blueprints" title="Permalink to this headline"></a></h2>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.blueprints_changes">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_changes</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_changes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_changes" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_changes</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_changes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_changes" title="Permalink to this definition"></a></dt>
<dd><p>Display the changes for each of the blueprints</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -201,9 +199,9 @@
<p>blueprints changes &lt;blueprint,...&gt; Display the changes for each blueprint.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.blueprints_cmd">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_cmd</code><span class="sig-paren">(</span><em class="sig-param">opts</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_cmd" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_cmd</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">opts</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_cmd" title="Permalink to this definition"></a></dt>
<dd><p>Process blueprints commands</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -219,9 +217,9 @@
<p>This dispatches the blueprints commands to a function</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.blueprints_delete">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_delete</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_delete" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_delete</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_delete" title="Permalink to this definition"></a></dt>
<dd><p>Delete a blueprint from the server</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -236,9 +234,9 @@
<p>delete &lt;blueprint&gt; Delete a blueprint from the server</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.blueprints_depsolve">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_depsolve</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_depsolve"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_depsolve" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_depsolve</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_depsolve"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_depsolve" title="Permalink to this definition"></a></dt>
<dd><p>Display the packages needed to install the blueprint</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -253,9 +251,9 @@
<p>blueprints depsolve &lt;blueprint,...&gt; Display the packages needed to install the blueprint.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.blueprints_diff">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_diff</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_diff"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_diff" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_diff</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_diff"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_diff" title="Permalink to this definition"></a></dt>
<dd><p>Display the differences between 2 versions of a blueprint</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -274,9 +272,9 @@
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.blueprints_freeze">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_freeze</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_freeze"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_freeze" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_freeze</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_freeze"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_freeze" title="Permalink to this definition"></a></dt>
<dd><p>Handle the blueprints freeze commands</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -293,9 +291,9 @@ blueprints freeze show &lt;blueprint,...&gt; Display the frozen blueprint in TOM
blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file, &lt;blueprint-name&gt;.frozen.toml.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.blueprints_freeze_save">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_freeze_save</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_freeze_save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_freeze_save" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_freeze_save</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_freeze_save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_freeze_save" title="Permalink to this definition"></a></dt>
<dd><p>Save the frozen blueprint to a TOML file</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -310,9 +308,9 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
<p>blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file, &lt;blueprint-name&gt;.frozen.toml.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.blueprints_freeze_show">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_freeze_show</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_freeze_show"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_freeze_show" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_freeze_show</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_freeze_show"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_freeze_show" title="Permalink to this definition"></a></dt>
<dd><p>Show the frozen blueprint in TOML format</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -327,9 +325,9 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
<p>blueprints freeze show &lt;blueprint,...&gt; Display the frozen blueprint in TOML format.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.blueprints_list">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_list</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_list" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_list</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_list" title="Permalink to this definition"></a></dt>
<dd><p>Output the list of available blueprints</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -344,9 +342,9 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
<p>blueprints list</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.blueprints_push">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_push</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_push"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_push" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_push</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_push"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_push" title="Permalink to this definition"></a></dt>
<dd><p>Push a blueprint TOML file to the server, updating the blueprint</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -361,9 +359,9 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
<p>push &lt;blueprint&gt; Push a blueprint TOML file to the server.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.blueprints_save">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_save</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_save" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_save</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_save" title="Permalink to this definition"></a></dt>
<dd><p>Save the blueprint to a TOML file</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -378,9 +376,9 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
<p>blueprints save &lt;blueprint,...&gt; Save the blueprint to a file, &lt;blueprint-name&gt;.toml</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.blueprints_show">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_show</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_show"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_show" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_show</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_show"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_show" title="Permalink to this definition"></a></dt>
<dd><p>Show the blueprints, in TOML format</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -396,9 +394,9 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
<p>Multiple blueprints will be separated by</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.blueprints_tag">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_tag</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_tag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_tag" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_tag</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_tag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_tag" title="Permalink to this definition"></a></dt>
<dd><p>Tag the most recent blueprint commit as a release</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -413,9 +411,9 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
<p>blueprints tag &lt;blueprint&gt; Tag the most recent blueprint commit as a release.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.blueprints_undo">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_undo</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_undo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_undo" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_undo</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_undo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_undo" title="Permalink to this definition"></a></dt>
<dd><p>Undo changes to a blueprint</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -430,9 +428,9 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
<p>blueprints undo &lt;blueprint&gt; &lt;commit&gt; Undo changes to a blueprint by reverting to the selected commit.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.blueprints_workspace">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_workspace</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_workspace"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_workspace" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">blueprints_workspace</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#blueprints_workspace"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.blueprints_workspace" title="Permalink to this definition"></a></dt>
<dd><p>Push the blueprint TOML to the temporary workspace storage</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -447,9 +445,9 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
<p>blueprints workspace &lt;blueprint&gt; Push the blueprint TOML to the temporary workspace storage.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.dict_names">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">dict_names</code><span class="sig-paren">(</span><em class="sig-param">lst</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#dict_names"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.dict_names" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">dict_names</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">lst</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#dict_names"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.dict_names" title="Permalink to this definition"></a></dt>
<dd><p>Return comma-separated list of the dict's name/user fields</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -465,9 +463,9 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
<p>root, norm</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.prettyCommitDetails">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">prettyCommitDetails</code><span class="sig-paren">(</span><em class="sig-param">change</em>, <em class="sig-param">indent=4</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#prettyCommitDetails"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.prettyCommitDetails" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">prettyCommitDetails</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">change</span></em>, <em class="sig-param"><span class="n">indent</span><span class="o">=</span><span class="default_value">4</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#prettyCommitDetails"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.prettyCommitDetails" title="Permalink to this definition"></a></dt>
<dd><p>Print the blueprint's change in a nice way</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -479,9 +477,9 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.pretty_dict">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">pretty_dict</code><span class="sig-paren">(</span><em class="sig-param">d</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#pretty_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.pretty_dict" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">pretty_dict</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">d</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#pretty_dict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.pretty_dict" title="Permalink to this definition"></a></dt>
<dd><p>Return the dict as a human readable single line</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -497,9 +495,9 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
<p>key=&quot;str&quot;, key=&quot;str1,str2&quot;, ...</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.blueprints.pretty_diff_entry">
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">pretty_diff_entry</code><span class="sig-paren">(</span><em class="sig-param">diff</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#pretty_diff_entry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.pretty_diff_entry" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.blueprints.</code><code class="sig-name descname">pretty_diff_entry</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">diff</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/blueprints.html#pretty_diff_entry"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.blueprints.pretty_diff_entry" title="Permalink to this definition"></a></dt>
<dd><p>Generate nice diff entry string.</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -514,7 +512,7 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
</div>
<div class="section" id="module-composer.cli.cmdline">
<span id="composer-cli-cmdline-module"></span><h2>composer.cli.cmdline module<a class="headerlink" href="#module-composer.cli.cmdline" title="Permalink to this headline"></a></h2>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.cmdline.composer_cli_parser">
<code class="sig-prename descclassname">composer.cli.cmdline.</code><code class="sig-name descname">composer_cli_parser</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/cmdline.html#composer_cli_parser"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.cmdline.composer_cli_parser" title="Permalink to this definition"></a></dt>
<dd><p>Return the ArgumentParser for composer-cli</p>
@ -523,9 +521,9 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
</div>
<div class="section" id="module-composer.cli.compose">
<span id="composer-cli-compose-module"></span><h2>composer.cli.compose module<a class="headerlink" href="#module-composer.cli.compose" title="Permalink to this headline"></a></h2>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.compose.compose_cancel">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_cancel</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_cancel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_cancel" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_cancel</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">api</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_cancel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_cancel" title="Permalink to this definition"></a></dt>
<dd><p>Cancel a running compose</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -542,9 +540,9 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
<p>This will cancel a running compose. It does nothing if the compose has finished.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.compose.compose_cmd">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_cmd</code><span class="sig-paren">(</span><em class="sig-param">opts</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_cmd" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_cmd</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">opts</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_cmd" title="Permalink to this definition"></a></dt>
<dd><p>Process compose commands</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -558,11 +556,15 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
</dd>
</dl>
<p>This dispatches the compose commands to a function</p>
<p>compose_cmd expects api to be passed. eg.</p>
<blockquote>
<div><p>{&quot;version&quot;: 1, &quot;backend&quot;: &quot;lorax-composer&quot;}</p>
</div></blockquote>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.compose.compose_delete">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_delete</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_delete" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_delete</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">api</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_delete" title="Permalink to this definition"></a></dt>
<dd><p>Delete a finished compose's results</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -580,9 +582,9 @@ blueprints freeze save &lt;blueprint,...&gt; Save the frozen blueprint to a file
or failed, not a running compose.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.compose.compose_image">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_image</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_image"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_image" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_image</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">api</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_image"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_image" title="Permalink to this definition"></a></dt>
<dd><p>Download the compose's output image</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -600,9 +602,9 @@ or failed, not a running compose.</p>
of compose that was selected.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.compose.compose_info">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_info</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_info" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_info</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">api</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_info" title="Permalink to this definition"></a></dt>
<dd><p>Return detailed information about the compose</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -619,15 +621,15 @@ of compose that was selected.</p>
<p>This returns information about the compose, including the blueprint and the dependencies.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.compose.compose_list">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_list</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_list" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_list</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">api</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_list" title="Permalink to this definition"></a></dt>
<dd><p>Return a simple list of compose identifiers</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.compose.compose_log">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_log</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_log"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_log" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_log</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">api</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_log"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_log" title="Permalink to this definition"></a></dt>
<dd><p>Show the last part of the compose log</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -645,9 +647,9 @@ of compose that was selected.</p>
during the build.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.compose.compose_logs">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_logs</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_logs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_logs" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_logs</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">api</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_logs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_logs" title="Permalink to this definition"></a></dt>
<dd><p>Download a tar of the compose's logs</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -664,9 +666,9 @@ during the build.</p>
<p>Saves the logs as uuid-logs.tar</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.compose.compose_metadata">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_metadata</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_metadata"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_metadata" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_metadata</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">api</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_metadata"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_metadata" title="Permalink to this definition"></a></dt>
<dd><p>Download a tar file of the compose's metadata</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -683,9 +685,28 @@ during the build.</p>
<p>Saves the metadata as uuid-metadata.tar</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.compose.compose_ostree">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_ostree</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">api</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_ostree"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_ostree" title="Permalink to this definition"></a></dt>
<dd><p>Start a new ostree compose using the selected blueprint and type</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>socket_path</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) -- Path to the Unix socket to use for API communication</p></li>
<li><p><strong>api_version</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) -- Version of the API to talk to. eg. &quot;0&quot;</p></li>
<li><p><strong>args</strong> (<em>list of str</em>) -- List of remaining arguments from the cmdline</p></li>
<li><p><strong>show_json</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a>) -- Set to True to show the JSON output instead of the human readable output</p></li>
<li><p><strong>testmode</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) -- Set to 1 to simulate a failed compose, set to 2 to simulate a finished one.</p></li>
<li><p><strong>api</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) -- Details about the API server, &quot;version&quot; and &quot;backend&quot;</p></li>
</ul>
</dd>
</dl>
<p>compose start-ostree [--size XXXX] [--parent PARENT] [--ref REF] &lt;BLUEPRINT&gt; &lt;TYPE&gt; [&lt;IMAGE-NAME&gt; &lt;PROFILE.TOML&gt;]</p>
</dd></dl>
<dl class="py function">
<dt id="composer.cli.compose.compose_results">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_results</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_results"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_results" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_results</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">api</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_results"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_results" title="Permalink to this definition"></a></dt>
<dd><p>Download a tar file of the compose's results</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -703,9 +724,9 @@ during the build.</p>
It is saved as uuid.tar</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.compose.compose_start">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_start</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_start"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_start" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_start</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">api</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_start"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_start" title="Permalink to this definition"></a></dt>
<dd><p>Start a new compose using the selected blueprint and type</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -715,15 +736,16 @@ It is saved as uuid.tar</p>
<li><p><strong>args</strong> (<em>list of str</em>) -- List of remaining arguments from the cmdline</p></li>
<li><p><strong>show_json</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a>) -- Set to True to show the JSON output instead of the human readable output</p></li>
<li><p><strong>testmode</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) -- Set to 1 to simulate a failed compose, set to 2 to simulate a finished one.</p></li>
<li><p><strong>api</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) -- Details about the API server, &quot;version&quot; and &quot;backend&quot;</p></li>
</ul>
</dd>
</dl>
<p>compose start &lt;blueprint-name&gt; &lt;compose-type&gt; [&lt;image-name&gt; &lt;provider&gt; &lt;profile&gt; | &lt;image-name&gt; &lt;profile.toml&gt;]</p>
<p>compose start [--size XXX] &lt;blueprint-name&gt; &lt;compose-type&gt; [&lt;image-name&gt; &lt;provider&gt; &lt;profile&gt; | &lt;image-name&gt; &lt;profile.toml&gt;]</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.compose.compose_status">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_status</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_status"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_status" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_status</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">api</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_status"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_status" title="Permalink to this definition"></a></dt>
<dd><p>Return the status of all known composes</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -740,9 +762,9 @@ It is saved as uuid.tar</p>
and failed so raw JSON output is not available.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.compose.compose_types">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_types</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_types"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_types" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">compose_types</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em>, <em class="sig-param"><span class="n">api</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#compose_types"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.compose_types" title="Permalink to this definition"></a></dt>
<dd><p>Return information about the supported compose types</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -759,15 +781,73 @@ and failed so raw JSON output is not available.</p>
include this extra information.</p>
</dd></dl>
<dl class="py function">
<dt id="composer.cli.compose.get_parent">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">get_parent</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">args</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#get_parent"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.get_parent" title="Permalink to this definition"></a></dt>
<dd><p>Return optional --parent argument, and remaining args</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>args</strong> (<em>list of strings</em>) -- list of arguments</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>(args, parent)</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.8)">tuple</a></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="composer.cli.compose.get_ref">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">get_ref</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">args</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#get_ref"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.get_ref" title="Permalink to this definition"></a></dt>
<dd><p>Return optional --ref argument, and remaining args</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>args</strong> (<em>list of strings</em>) -- list of arguments</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>(args, parent)</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.8)">tuple</a></p>
</dd>
</dl>
</dd></dl>
<dl class="py function">
<dt id="composer.cli.compose.get_size">
<code class="sig-prename descclassname">composer.cli.compose.</code><code class="sig-name descname">get_size</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">args</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/compose.html#get_size"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.compose.get_size" title="Permalink to this definition"></a></dt>
<dd><p>Return optional --size argument, and remaining args</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><p><strong>args</strong> (<em>list of strings</em>) -- list of arguments</p>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>(args, size)</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.8)">tuple</a></p>
</dd>
</dl>
<ul class="simple">
<li><p>check size argument for int</p></li>
<li><p>check other args for --size in wrong place</p></li>
<li><p>raise error? Or just return 0?</p></li>
<li><p>no size returns 0 in size</p></li>
<li><p>multiply by 1024**2 to make it easier on users to specify large sizes</p></li>
</ul>
</dd></dl>
</div>
<div class="section" id="module-composer.cli.help">
<span id="composer-cli-help-module"></span><h2>composer.cli.help module<a class="headerlink" href="#module-composer.cli.help" title="Permalink to this headline"></a></h2>
</div>
<div class="section" id="module-composer.cli.modules">
<span id="composer-cli-modules-module"></span><h2>composer.cli.modules module<a class="headerlink" href="#module-composer.cli.modules" title="Permalink to this headline"></a></h2>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.modules.modules_cmd">
<code class="sig-prename descclassname">composer.cli.modules.</code><code class="sig-name descname">modules_cmd</code><span class="sig-paren">(</span><em class="sig-param">opts</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/modules.html#modules_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.modules.modules_cmd" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.modules.</code><code class="sig-name descname">modules_cmd</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">opts</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/modules.html#modules_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.modules.modules_cmd" title="Permalink to this definition"></a></dt>
<dd><p>Process modules commands</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -785,9 +865,9 @@ include this extra information.</p>
</div>
<div class="section" id="module-composer.cli.projects">
<span id="composer-cli-projects-module"></span><h2>composer.cli.projects module<a class="headerlink" href="#module-composer.cli.projects" title="Permalink to this headline"></a></h2>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.projects.projects_cmd">
<code class="sig-prename descclassname">composer.cli.projects.</code><code class="sig-name descname">projects_cmd</code><span class="sig-paren">(</span><em class="sig-param">opts</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/projects.html#projects_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.projects.projects_cmd" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.projects.</code><code class="sig-name descname">projects_cmd</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">opts</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/projects.html#projects_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.projects.projects_cmd" title="Permalink to this definition"></a></dt>
<dd><p>Process projects commands</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -802,9 +882,9 @@ include this extra information.</p>
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.projects.projects_info">
<code class="sig-prename descclassname">composer.cli.projects.</code><code class="sig-name descname">projects_info</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/projects.html#projects_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.projects.projects_info" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.projects.</code><code class="sig-name descname">projects_info</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/projects.html#projects_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.projects.projects_info" title="Permalink to this definition"></a></dt>
<dd><p>Output info on a list of projects</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -819,9 +899,9 @@ include this extra information.</p>
<p>projects info &lt;project,...&gt;</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.projects.projects_list">
<code class="sig-prename descclassname">composer.cli.projects.</code><code class="sig-name descname">projects_list</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/projects.html#projects_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.projects.projects_list" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.projects.</code><code class="sig-name descname">projects_list</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/projects.html#projects_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.projects.projects_list" title="Permalink to this definition"></a></dt>
<dd><p>Output the list of available projects</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -839,9 +919,9 @@ include this extra information.</p>
</div>
<div class="section" id="module-composer.cli.providers">
<span id="composer-cli-providers-module"></span><h2>composer.cli.providers module<a class="headerlink" href="#module-composer.cli.providers" title="Permalink to this headline"></a></h2>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.providers.providers_cmd">
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_cmd</code><span class="sig-paren">(</span><em class="sig-param">opts</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_cmd" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_cmd</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">opts</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_cmd" title="Permalink to this definition"></a></dt>
<dd><p>Process providers commands</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -857,9 +937,9 @@ include this extra information.</p>
<p>This dispatches the providers commands to a function</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.providers.providers_delete">
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_delete</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_delete" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_delete</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_delete" title="Permalink to this definition"></a></dt>
<dd><p>Delete a profile from a provider</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -875,9 +955,9 @@ include this extra information.</p>
<p>providers delete &lt;provider&gt; &lt;profile&gt;</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.providers.providers_info">
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_info</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_info" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_info</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_info" title="Permalink to this definition"></a></dt>
<dd><p>Show information about each provider</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -893,9 +973,9 @@ include this extra information.</p>
<p>providers info &lt;PROVIDER&gt;</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.providers.providers_list">
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_list</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_list" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_list</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_list" title="Permalink to this definition"></a></dt>
<dd><p>Return the list of providers</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -911,9 +991,9 @@ include this extra information.</p>
<p>providers list</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.providers.providers_push">
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_push</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_push"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_push" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_push</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_push"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_push" title="Permalink to this definition"></a></dt>
<dd><p>Add a new provider profile or overwrite an existing one</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -929,9 +1009,9 @@ include this extra information.</p>
<p>providers push &lt;profile.toml&gt;</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.providers.providers_save">
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_save</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_save" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_save</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_save"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_save" title="Permalink to this definition"></a></dt>
<dd><p>Save a provider's profile to a TOML file</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -947,9 +1027,9 @@ include this extra information.</p>
<p>providers save &lt;provider&gt; &lt;profile&gt;</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.providers.providers_show">
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_show</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_show"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_show" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_show</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_show"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_show" title="Permalink to this definition"></a></dt>
<dd><p>Return details about a provider</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -965,9 +1045,9 @@ include this extra information.</p>
<p>providers show &lt;provider&gt; &lt;profile&gt;</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.providers.providers_template">
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_template</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_template"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_template" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.providers.</code><code class="sig-name descname">providers_template</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/providers.html#providers_template"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.providers.providers_template" title="Permalink to this definition"></a></dt>
<dd><p>Return a TOML template for setting the provider's fields</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -986,9 +1066,9 @@ include this extra information.</p>
</div>
<div class="section" id="module-composer.cli.sources">
<span id="composer-cli-sources-module"></span><h2>composer.cli.sources module<a class="headerlink" href="#module-composer.cli.sources" title="Permalink to this headline"></a></h2>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.sources.sources_add">
<code class="sig-prename descclassname">composer.cli.sources.</code><code class="sig-name descname">sources_add</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/sources.html#sources_add"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.sources.sources_add" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.sources.</code><code class="sig-name descname">sources_add</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/sources.html#sources_add"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.sources.sources_add" title="Permalink to this definition"></a></dt>
<dd><p>Add or change a source</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1003,9 +1083,9 @@ include this extra information.</p>
<p>sources add &lt;source.toml&gt;</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.sources.sources_cmd">
<code class="sig-prename descclassname">composer.cli.sources.</code><code class="sig-name descname">sources_cmd</code><span class="sig-paren">(</span><em class="sig-param">opts</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/sources.html#sources_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.sources.sources_cmd" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.sources.</code><code class="sig-name descname">sources_cmd</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">opts</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/sources.html#sources_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.sources.sources_cmd" title="Permalink to this definition"></a></dt>
<dd><p>Process sources commands</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1020,9 +1100,9 @@ include this extra information.</p>
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.sources.sources_delete">
<code class="sig-prename descclassname">composer.cli.sources.</code><code class="sig-name descname">sources_delete</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/sources.html#sources_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.sources.sources_delete" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.sources.</code><code class="sig-name descname">sources_delete</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/sources.html#sources_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.sources.sources_delete" title="Permalink to this definition"></a></dt>
<dd><p>Delete a source</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1037,9 +1117,9 @@ include this extra information.</p>
<p>sources delete &lt;source-name&gt;</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.sources.sources_info">
<code class="sig-prename descclassname">composer.cli.sources.</code><code class="sig-name descname">sources_info</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/sources.html#sources_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.sources.sources_info" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.sources.</code><code class="sig-name descname">sources_info</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/sources.html#sources_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.sources.sources_info" title="Permalink to this definition"></a></dt>
<dd><p>Output info on a list of projects</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1054,9 +1134,9 @@ include this extra information.</p>
<p>sources info &lt;source-name&gt;</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.sources.sources_list">
<code class="sig-prename descclassname">composer.cli.sources.</code><code class="sig-name descname">sources_list</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/sources.html#sources_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.sources.sources_list" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.sources.</code><code class="sig-name descname">sources_list</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/sources.html#sources_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.sources.sources_list" title="Permalink to this definition"></a></dt>
<dd><p>Output the list of available sources</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1074,9 +1154,9 @@ include this extra information.</p>
</div>
<div class="section" id="module-composer.cli.status">
<span id="composer-cli-status-module"></span><h2>composer.cli.status module<a class="headerlink" href="#module-composer.cli.status" title="Permalink to this headline"></a></h2>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.status.status_cmd">
<code class="sig-prename descclassname">composer.cli.status.</code><code class="sig-name descname">status_cmd</code><span class="sig-paren">(</span><em class="sig-param">opts</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/status.html#status_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.status.status_cmd" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.status.</code><code class="sig-name descname">status_cmd</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">opts</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/status.html#status_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.status.status_cmd" title="Permalink to this definition"></a></dt>
<dd><p>Process status commands</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1094,9 +1174,9 @@ include this extra information.</p>
</div>
<div class="section" id="module-composer.cli.upload">
<span id="composer-cli-upload-module"></span><h2>composer.cli.upload module<a class="headerlink" href="#module-composer.cli.upload" title="Permalink to this headline"></a></h2>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.upload.upload_cancel">
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_cancel</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_cancel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_cancel" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_cancel</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_cancel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_cancel" title="Permalink to this definition"></a></dt>
<dd><p>Cancel the queued or running upload</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1112,9 +1192,9 @@ include this extra information.</p>
<p>upload cancel &lt;build-uuid&gt;</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.upload.upload_cmd">
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_cmd</code><span class="sig-paren">(</span><em class="sig-param">opts</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_cmd" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_cmd</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">opts</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_cmd"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_cmd" title="Permalink to this definition"></a></dt>
<dd><p>Process upload commands</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1130,9 +1210,9 @@ include this extra information.</p>
<p>This dispatches the upload commands to a function</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.upload.upload_delete">
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_delete</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_delete" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_delete</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_delete"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_delete" title="Permalink to this definition"></a></dt>
<dd><p>Delete an upload and remove it from the build</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1148,9 +1228,9 @@ include this extra information.</p>
<p>upload delete &lt;build-uuid&gt;</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.upload.upload_info">
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_info</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_info" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_info</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_info"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_info" title="Permalink to this definition"></a></dt>
<dd><p>Return detailed information about the upload</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1167,9 +1247,9 @@ include this extra information.</p>
<p>This returns information about the upload, including uuid, name, status, service, and image.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.upload.upload_list">
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_list</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_list" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_list</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_list"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_list" title="Permalink to this definition"></a></dt>
<dd><p>Return the composes and their associated upload uuids and status</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1185,9 +1265,9 @@ include this extra information.</p>
<p>upload list</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.upload.upload_log">
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_log</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_log"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_log" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_log</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_log"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_log" title="Permalink to this definition"></a></dt>
<dd><p>Return the upload log</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1203,9 +1283,9 @@ include this extra information.</p>
<p>upload log &lt;build-uuid&gt;</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.upload.upload_reset">
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_reset</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_reset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_reset" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_reset</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_reset"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_reset" title="Permalink to this definition"></a></dt>
<dd><p>Reset the upload and execute it again</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1221,9 +1301,9 @@ include this extra information.</p>
<p>upload reset &lt;build-uuid&gt;</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.upload.upload_start">
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_start</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">api_version</em>, <em class="sig-param">args</em>, <em class="sig-param">show_json=False</em>, <em class="sig-param">testmode=0</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_start"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_start" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.upload.</code><code class="sig-name descname">upload_start</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em>, <em class="sig-param"><span class="n">testmode</span><span class="o">=</span><span class="default_value">0</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/upload.html#upload_start"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.upload.upload_start" title="Permalink to this definition"></a></dt>
<dd><p>Start upload up a build uuid image</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1242,9 +1322,9 @@ include this extra information.</p>
</div>
<div class="section" id="module-composer.cli.utilities">
<span id="composer-cli-utilities-module"></span><h2>composer.cli.utilities module<a class="headerlink" href="#module-composer.cli.utilities" title="Permalink to this headline"></a></h2>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.utilities.argify">
<code class="sig-prename descclassname">composer.cli.utilities.</code><code class="sig-name descname">argify</code><span class="sig-paren">(</span><em class="sig-param">args</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/utilities.html#argify"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.utilities.argify" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.utilities.</code><code class="sig-name descname">argify</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">args</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/utilities.html#argify"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.utilities.argify" title="Permalink to this definition"></a></dt>
<dd><p>Take a list of human args and return a list with each item</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1261,9 +1341,9 @@ include this extra information.</p>
<p>[&quot;one,two&quot;, &quot;three&quot;, &quot;,four&quot;, &quot;,five,&quot;] returns [&quot;one&quot;, &quot;two&quot;, &quot;three&quot;, &quot;four&quot;, &quot;five&quot;]</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.utilities.frozen_toml_filename">
<code class="sig-prename descclassname">composer.cli.utilities.</code><code class="sig-name descname">frozen_toml_filename</code><span class="sig-paren">(</span><em class="sig-param">blueprint_name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/utilities.html#frozen_toml_filename"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.utilities.frozen_toml_filename" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.utilities.</code><code class="sig-name descname">frozen_toml_filename</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">blueprint_name</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/utilities.html#frozen_toml_filename"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.utilities.frozen_toml_filename" title="Permalink to this definition"></a></dt>
<dd><p>Convert a blueprint name into a filename.toml</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1278,9 +1358,32 @@ include this extra information.</p>
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.utilities.get_arg">
<code class="sig-prename descclassname">composer.cli.utilities.</code><code class="sig-name descname">get_arg</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">args</span></em>, <em class="sig-param"><span class="n">name</span></em>, <em class="sig-param"><span class="n">argtype</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/utilities.html#get_arg"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.utilities.get_arg" title="Permalink to this definition"></a></dt>
<dd><p>Return optional value from args, and remaining args</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>args</strong> (<em>list of strings</em>) -- list of arguments</p></li>
<li><p><strong>name</strong> (<em>string</em>) -- The argument to remove from the args list</p></li>
<li><p><strong>argtype</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#type" title="(in Python v3.8)"><em>type</em></a>) -- Type to use for checking the argument value</p></li>
</ul>
</dd>
<dt class="field-even">Returns</dt>
<dd class="field-even"><p>(args, value)</p>
</dd>
<dt class="field-odd">Return type</dt>
<dd class="field-odd"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#tuple" title="(in Python v3.8)">tuple</a></p>
</dd>
</dl>
<p>This removes the optional argument and value from the argument list, returns the new list,
and the value of the argument.</p>
</dd></dl>
<dl class="py function">
<dt id="composer.cli.utilities.handle_api_result">
<code class="sig-prename descclassname">composer.cli.utilities.</code><code class="sig-name descname">handle_api_result</code><span class="sig-paren">(</span><em class="sig-param">result</em>, <em class="sig-param">show_json=False</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/utilities.html#handle_api_result"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.utilities.handle_api_result" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.utilities.</code><code class="sig-name descname">handle_api_result</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">result</span></em>, <em class="sig-param"><span class="n">show_json</span><span class="o">=</span><span class="default_value">False</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/utilities.html#handle_api_result"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.utilities.handle_api_result" title="Permalink to this definition"></a></dt>
<dd><p>Log any errors, return the correct value</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1297,9 +1400,9 @@ include this extra information.</p>
not to continue processing the results.</p>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.utilities.packageNEVRA">
<code class="sig-prename descclassname">composer.cli.utilities.</code><code class="sig-name descname">packageNEVRA</code><span class="sig-paren">(</span><em class="sig-param">pkg</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/utilities.html#packageNEVRA"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.utilities.packageNEVRA" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.utilities.</code><code class="sig-name descname">packageNEVRA</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">pkg</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/utilities.html#packageNEVRA"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.utilities.packageNEVRA" title="Permalink to this definition"></a></dt>
<dd><p>Return the package info as a NEVRA</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1314,9 +1417,9 @@ not to continue processing the results.</p>
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.utilities.toml_filename">
<code class="sig-prename descclassname">composer.cli.utilities.</code><code class="sig-name descname">toml_filename</code><span class="sig-paren">(</span><em class="sig-param">blueprint_name</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/utilities.html#toml_filename"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.utilities.toml_filename" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.utilities.</code><code class="sig-name descname">toml_filename</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">blueprint_name</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli/utilities.html#toml_filename"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.utilities.toml_filename" title="Permalink to this definition"></a></dt>
<dd><p>Convert a blueprint name into a filename.toml</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1334,9 +1437,9 @@ not to continue processing the results.</p>
</div>
<div class="section" id="module-composer.cli">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-composer.cli" title="Permalink to this headline"></a></h2>
<dl class="function">
<dl class="py function">
<dt id="composer.cli.main">
<code class="sig-prename descclassname">composer.cli.</code><code class="sig-name descname">main</code><span class="sig-paren">(</span><em class="sig-param">opts</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.main" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.cli.</code><code class="sig-name descname">main</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">opts</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/cli.html#main"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.cli.main" title="Permalink to this definition"></a></dt>
<dd><p>Main program execution</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -1356,7 +1459,7 @@ not to continue processing the results.</p>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="lifted.html" class="btn btn-neutral float-right" title="lifted package" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="pylorax.html" class="btn btn-neutral float-right" title="pylorax package" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="composer.html" class="btn btn-neutral float-left" title="composer package" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>

View File

@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>composer package &mdash; Lorax 33.2 documentation</title>
<title>composer package &mdash; Lorax 34.3 documentation</title>
@ -21,10 +21,10 @@
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></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/language_data.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
@ -60,7 +60,7 @@
<div class="version">
33.2
34.3
</div>
@ -89,7 +89,6 @@
<li class="toctree-l1"><a class="reference internal" href="intro.html#before-lorax">Before Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="lorax.html">Lorax</a></li>
<li class="toctree-l1"><a class="reference internal" href="livemedia-creator.html">livemedia-creator</a></li>
<li class="toctree-l1"><a class="reference internal" href="lorax-composer.html">lorax-composer</a></li>
<li class="toctree-l1"><a class="reference internal" href="composer-cli.html">composer-cli</a></li>
<li class="toctree-l1"><a class="reference internal" href="mkksiso.html">mkksiso</a></li>
<li class="toctree-l1"><a class="reference internal" href="product-images.html">Product and Updates Images</a></li>
@ -105,7 +104,6 @@
<li class="toctree-l3"><a class="reference internal" href="#module-composer">Module contents</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="lifted.html">lifted package</a></li>
<li class="toctree-l2"><a class="reference internal" href="pylorax.html">pylorax package</a></li>
</ul>
</li>
@ -205,9 +203,9 @@
</div>
<div class="section" id="module-composer.http_client">
<span id="composer-http-client-module"></span><h2>composer.http_client module<a class="headerlink" href="#module-composer.http_client" title="Permalink to this headline"></a></h2>
<dl class="function">
<dl class="py function">
<dt id="composer.http_client.api_url">
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">api_url</code><span class="sig-paren">(</span><em class="sig-param">api_version</em>, <em class="sig-param">url</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#api_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.api_url" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">api_url</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">api_version</span></em>, <em class="sig-param"><span class="n">url</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#api_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.api_url" title="Permalink to this definition"></a></dt>
<dd><p>Return the versioned path to the API route</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -225,9 +223,9 @@
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.http_client.append_query">
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">append_query</code><span class="sig-paren">(</span><em class="sig-param">url</em>, <em class="sig-param">query</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#append_query"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.append_query" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">append_query</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">url</span></em>, <em class="sig-param"><span class="n">query</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#append_query"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.append_query" title="Permalink to this definition"></a></dt>
<dd><p>Add a query argument to a URL</p>
<p>The query should be of the form &quot;param1=what&amp;param2=ever&quot;, i.e., no
leading '?'. The new query data will be appended to any existing
@ -248,9 +246,9 @@ query string.</p>
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.http_client.delete_url_json">
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">delete_url_json</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">url</em>, <em class="sig-param">timeout=120</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#delete_url_json"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.delete_url_json" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">delete_url_json</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">url</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#delete_url_json"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.delete_url_json" title="Permalink to this definition"></a></dt>
<dd><p>Send a DELETE request to the url and return JSON response</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -268,9 +266,9 @@ query string.</p>
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.http_client.download_file">
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">download_file</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">url</em>, <em class="sig-param">progress=True</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#download_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.download_file" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">download_file</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">url</span></em>, <em class="sig-param"><span class="n">progress</span><span class="o">=</span><span class="default_value">True</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#download_file"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.download_file" title="Permalink to this definition"></a></dt>
<dd><p>Download a file, saving it to the CWD with the included filename</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -282,9 +280,9 @@ query string.</p>
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.http_client.get_filename">
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">get_filename</code><span class="sig-paren">(</span><em class="sig-param">headers</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#get_filename"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.get_filename" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">get_filename</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">headers</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#get_filename"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.get_filename" title="Permalink to this definition"></a></dt>
<dd><p>Get the filename from the response header</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -302,9 +300,9 @@ query string.</p>
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.http_client.get_url_json">
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">get_url_json</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">url</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#get_url_json"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.get_url_json" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">get_url_json</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">url</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#get_url_json"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.get_url_json" title="Permalink to this definition"></a></dt>
<dd><p>Return the JSON results of a GET request</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -322,9 +320,9 @@ query string.</p>
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.http_client.get_url_json_unlimited">
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">get_url_json_unlimited</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">url</em>, <em class="sig-param">total_fn=None</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#get_url_json_unlimited"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.get_url_json_unlimited" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">get_url_json_unlimited</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">url</span></em>, <em class="sig-param"><span class="n">total_fn</span><span class="o">=</span><span class="default_value">None</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#get_url_json_unlimited"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.get_url_json_unlimited" title="Permalink to this definition"></a></dt>
<dd><p>Return the JSON results of a GET request</p>
<p>For URLs that use offset/limit arguments, this command will
fetch all results for the given request.</p>
@ -344,9 +342,9 @@ fetch all results for the given request.</p>
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.http_client.get_url_raw">
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">get_url_raw</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">url</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#get_url_raw"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.get_url_raw" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">get_url_raw</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">url</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#get_url_raw"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.get_url_raw" title="Permalink to this definition"></a></dt>
<dd><p>Return the raw results of a GET request</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -364,9 +362,9 @@ fetch all results for the given request.</p>
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.http_client.post_url">
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">post_url</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">url</em>, <em class="sig-param">body</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#post_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.post_url" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">post_url</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">url</span></em>, <em class="sig-param"><span class="n">body</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#post_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.post_url" title="Permalink to this definition"></a></dt>
<dd><p>POST raw data to the URL</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -385,9 +383,9 @@ fetch all results for the given request.</p>
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.http_client.post_url_json">
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">post_url_json</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">url</em>, <em class="sig-param">body</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#post_url_json"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.post_url_json" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">post_url_json</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">url</span></em>, <em class="sig-param"><span class="n">body</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#post_url_json"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.post_url_json" title="Permalink to this definition"></a></dt>
<dd><p>POST some JSON data to the URL</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -406,9 +404,9 @@ fetch all results for the given request.</p>
</dl>
</dd></dl>
<dl class="function">
<dl class="py function">
<dt id="composer.http_client.post_url_toml">
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">post_url_toml</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">url</em>, <em class="sig-param">body</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#post_url_toml"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.post_url_toml" title="Permalink to this definition"></a></dt>
<code class="sig-prename descclassname">composer.http_client.</code><code class="sig-name descname">post_url_toml</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">url</span></em>, <em class="sig-param"><span class="n">body</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/http_client.html#post_url_toml"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.http_client.post_url_toml" title="Permalink to this definition"></a></dt>
<dd><p>POST a TOML string to the URL</p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
@ -430,11 +428,11 @@ fetch all results for the given request.</p>
</div>
<div class="section" id="module-composer.unix_socket">
<span id="composer-unix-socket-module"></span><h2>composer.unix_socket module<a class="headerlink" href="#module-composer.unix_socket" title="Permalink to this headline"></a></h2>
<dl class="class">
<dl class="py class">
<dt id="composer.unix_socket.UnixHTTPConnection">
<em class="property">class </em><code class="sig-prename descclassname">composer.unix_socket.</code><code class="sig-name descname">UnixHTTPConnection</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">timeout=60</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/unix_socket.html#UnixHTTPConnection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.unix_socket.UnixHTTPConnection" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">composer.unix_socket.</code><code class="sig-name descname">UnixHTTPConnection</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">timeout</span><span class="o">=</span><span class="default_value">300</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/unix_socket.html#UnixHTTPConnection"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.unix_socket.UnixHTTPConnection" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/http.client.html#http.client.HTTPConnection" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">http.client.HTTPConnection</span></code></a>, <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p>
<dl class="method">
<dl class="py method">
<dt id="composer.unix_socket.UnixHTTPConnection.connect">
<code class="sig-name descname">connect</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/unix_socket.html#UnixHTTPConnection.connect"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.unix_socket.UnixHTTPConnection.connect" title="Permalink to this definition"></a></dt>
<dd><p>Connect to the host and port specified in __init__.</p>
@ -442,9 +440,9 @@ fetch all results for the given request.</p>
</dd></dl>
<dl class="class">
<dl class="py class">
<dt id="composer.unix_socket.UnixHTTPConnectionPool">
<em class="property">class </em><code class="sig-prename descclassname">composer.unix_socket.</code><code class="sig-name descname">UnixHTTPConnectionPool</code><span class="sig-paren">(</span><em class="sig-param">socket_path</em>, <em class="sig-param">timeout=60</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/unix_socket.html#UnixHTTPConnectionPool"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.unix_socket.UnixHTTPConnectionPool" title="Permalink to this definition"></a></dt>
<em class="property">class </em><code class="sig-prename descclassname">composer.unix_socket.</code><code class="sig-name descname">UnixHTTPConnectionPool</code><span class="sig-paren">(</span><em class="sig-param"><span class="n">socket_path</span></em>, <em class="sig-param"><span class="n">timeout</span><span class="o">=</span><span class="default_value">300</span></em><span class="sig-paren">)</span><a class="reference internal" href="_modules/composer/unix_socket.html#UnixHTTPConnectionPool"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#composer.unix_socket.UnixHTTPConnectionPool" title="Permalink to this definition"></a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal notranslate"><span class="pre">urllib3.connectionpool.HTTPConnectionPool</span></code></p>
</dd></dl>

Some files were not shown because too many files have changed in this diff Show More