<h1>pylorax package<aclass="headerlink"href="#pylorax-package"title="Permalink to this headline">¶</a></h1>
<divclass="section"id="submodules">
<h2>Submodules<aclass="headerlink"href="#submodules"title="Permalink to this headline">¶</a></h2>
</div>
<divclass="section"id="module-pylorax.base">
<spanid="pylorax-base-module"></span><h2>pylorax.base module<aclass="headerlink"href="#module-pylorax.base"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.base.BaseLoraxClass">
<emclass="property">class </em><ttclass="descclassname">pylorax.base.</tt><ttclass="descname">BaseLoraxClass</tt><aclass="reference internal"href="_modules/pylorax/base.html#BaseLoraxClass"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.BaseLoraxClass"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">pcritical</tt><big>(</big><em>msg</em>, <em>fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em><big>)</big><aclass="reference internal"href="_modules/pylorax/base.html#BaseLoraxClass.pcritical"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.BaseLoraxClass.pcritical"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="pylorax.base.BaseLoraxClass.pdebug">
<ttclass="descname">pdebug</tt><big>(</big><em>msg</em>, <em>fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em><big>)</big><aclass="reference internal"href="_modules/pylorax/base.html#BaseLoraxClass.pdebug"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.BaseLoraxClass.pdebug"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="pylorax.base.BaseLoraxClass.perror">
<ttclass="descname">perror</tt><big>(</big><em>msg</em>, <em>fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em><big>)</big><aclass="reference internal"href="_modules/pylorax/base.html#BaseLoraxClass.perror"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.BaseLoraxClass.perror"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="pylorax.base.BaseLoraxClass.pinfo">
<ttclass="descname">pinfo</tt><big>(</big><em>msg</em>, <em>fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em><big>)</big><aclass="reference internal"href="_modules/pylorax/base.html#BaseLoraxClass.pinfo"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.BaseLoraxClass.pinfo"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="pylorax.base.BaseLoraxClass.pwarning">
<ttclass="descname">pwarning</tt><big>(</big><em>msg</em>, <em>fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em><big>)</big><aclass="reference internal"href="_modules/pylorax/base.html#BaseLoraxClass.pwarning"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.BaseLoraxClass.pwarning"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="pylorax.base.DataHolder">
<emclass="property">class </em><ttclass="descclassname">pylorax.base.</tt><ttclass="descname">DataHolder</tt><big>(</big><em>**kwargs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/base.html#DataHolder"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.DataHolder"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">copy</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/base.html#DataHolder.copy"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.DataHolder.copy"title="Permalink to this definition">¶</a></dt>
<spanid="pylorax-buildstamp-module"></span><h2>pylorax.buildstamp module<aclass="headerlink"href="#module-pylorax.buildstamp"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.buildstamp.BuildStamp">
<emclass="property">class </em><ttclass="descclassname">pylorax.buildstamp.</tt><ttclass="descname">BuildStamp</tt><big>(</big><em>product</em>, <em>version</em>, <em>bugurl</em>, <em>isfinal</em>, <em>buildarch</em><big>)</big><aclass="reference internal"href="_modules/pylorax/buildstamp.html#BuildStamp"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.buildstamp.BuildStamp"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">write</tt><big>(</big><em>outfile</em><big>)</big><aclass="reference internal"href="_modules/pylorax/buildstamp.html#BuildStamp.write"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.buildstamp.BuildStamp.write"title="Permalink to this definition">¶</a></dt>
<spanid="pylorax-decorators-module"></span><h2>pylorax.decorators module<aclass="headerlink"href="#module-pylorax.decorators"title="Permalink to this headline">¶</a></h2>
<dlclass="function">
<dtid="pylorax.decorators.singleton">
<ttclass="descclassname">pylorax.decorators.</tt><ttclass="descname">singleton</tt><big>(</big><em>cls</em><big>)</big><aclass="reference internal"href="_modules/pylorax/decorators.html#singleton"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.decorators.singleton"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
<divclass="section"id="module-pylorax.discinfo">
<spanid="pylorax-discinfo-module"></span><h2>pylorax.discinfo module<aclass="headerlink"href="#module-pylorax.discinfo"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.discinfo.DiscInfo">
<emclass="property">class </em><ttclass="descclassname">pylorax.discinfo.</tt><ttclass="descname">DiscInfo</tt><big>(</big><em>release</em>, <em>basearch</em><big>)</big><aclass="reference internal"href="_modules/pylorax/discinfo.html#DiscInfo"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.discinfo.DiscInfo"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">write</tt><big>(</big><em>outfile</em><big>)</big><aclass="reference internal"href="_modules/pylorax/discinfo.html#DiscInfo.write"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.discinfo.DiscInfo.write"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<divclass="section"id="module-pylorax.dnfhelper">
<spanid="pylorax-dnfhelper-module"></span><h2>pylorax.dnfhelper module<aclass="headerlink"href="#module-pylorax.dnfhelper"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.dnfhelper.LoraxDownloadCallback">
<emclass="property">class </em><ttclass="descclassname">pylorax.dnfhelper.</tt><ttclass="descname">LoraxDownloadCallback</tt><aclass="reference internal"href="_modules/pylorax/dnfhelper.html#LoraxDownloadCallback"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.dnfhelper.LoraxDownloadCallback"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">end</tt><big>(</big><em>payload</em>, <em>status</em>, <em>err_msg</em><big>)</big><aclass="reference internal"href="_modules/pylorax/dnfhelper.html#LoraxDownloadCallback.end"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.dnfhelper.LoraxDownloadCallback.end"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">progress</tt><big>(</big><em>payload</em>, <em>done</em><big>)</big><aclass="reference internal"href="_modules/pylorax/dnfhelper.html#LoraxDownloadCallback.progress"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.dnfhelper.LoraxDownloadCallback.progress"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">start</tt><big>(</big><em>total_files</em>, <em>total_size</em><big>)</big><aclass="reference internal"href="_modules/pylorax/dnfhelper.html#LoraxDownloadCallback.start"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.dnfhelper.LoraxDownloadCallback.start"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="pylorax.dnfhelper.LoraxRpmCallback">
<emclass="property">class </em><ttclass="descclassname">pylorax.dnfhelper.</tt><ttclass="descname">LoraxRpmCallback</tt><big>(</big><em>queue</em><big>)</big><aclass="reference internal"href="_modules/pylorax/dnfhelper.html#LoraxRpmCallback"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.dnfhelper.LoraxRpmCallback"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">event</tt><big>(</big><em>package</em>, <em>action</em>, <em>te_current</em>, <em>te_total</em>, <em>ts_current</em>, <em>ts_total</em><big>)</big><aclass="reference internal"href="_modules/pylorax/dnfhelper.html#LoraxRpmCallback.event"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.dnfhelper.LoraxRpmCallback.event"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<divclass="section"id="module-pylorax.executils">
<spanid="pylorax-executils-module"></span><h2>pylorax.executils module<aclass="headerlink"href="#module-pylorax.executils"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.executils.ExecProduct">
<emclass="property">class </em><ttclass="descclassname">pylorax.executils.</tt><ttclass="descname">ExecProduct</tt><big>(</big><em>rc</em>, <em>stdout</em>, <em>stderr</em><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#ExecProduct"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.ExecProduct"title="Permalink to this definition">¶</a></dt>
<ttclass="descclassname">pylorax.executils.</tt><ttclass="descname">augmentEnv</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#augmentEnv"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.augmentEnv"title="Permalink to this definition">¶</a></dt>
<ttclass="descclassname">pylorax.executils.</tt><ttclass="descname">runcmd</tt><big>(</big><em>cmd</em>, <em>**kwargs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#runcmd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.runcmd"title="Permalink to this definition">¶</a></dt>
<dd><p>run execWithRedirect with raise_err=True</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.executils.runcmd_output">
<ttclass="descclassname">pylorax.executils.</tt><ttclass="descname">runcmd_output</tt><big>(</big><em>cmd</em>, <em>**kwargs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#runcmd_output"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.runcmd_output"title="Permalink to this definition">¶</a></dt>
<dd><p>run execWithCapture with raise_err=True</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.executils.setenv">
<ttclass="descclassname">pylorax.executils.</tt><ttclass="descname">setenv</tt><big>(</big><em>name</em>, <em>value</em><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#setenv"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.setenv"title="Permalink to this definition">¶</a></dt>
<dd><p>Set an environment variable to be used by child processes.</p>
<p>This method does not modify os.environ for the running process, which
is not thread-safe. If setenv has already been called for a particular
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.4)"><em>str</em></a>) – The name of the environment variable</li>
<li><strong>value</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.4)"><em>str</em></a>) – The value of the environment variable</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.executils.startProgram">
<ttclass="descclassname">pylorax.executils.</tt><ttclass="descname">startProgram</tt><big>(</big><em>argv</em>, <em>root='/'</em>, <em>stdin=None</em>, <em>stdout=-1</em>, <em>stderr=-2</em>, <em>env_prune=None</em>, <em>env_add=None</em>, <em>reset_handlers=True</em>, <em>reset_lang=True</em>, <em>**kwargs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#startProgram"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.startProgram"title="Permalink to this definition">¶</a></dt>
<dd><p>Start an external program and return the Popen object.</p>
<p>The root and reset_handlers arguments are handled by passing a
preexec_fn argument to subprocess.Popen, but an additional preexec_fn
can still be specified and will be run. The user preexec_fn will be run
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first last">A Popen object for the running command.</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</div>
<divclass="section"id="module-pylorax.imgutils">
<spanid="pylorax-imgutils-module"></span><h2>pylorax.imgutils module<aclass="headerlink"href="#module-pylorax.imgutils"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.imgutils.DMDev">
<emclass="property">class </em><ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">DMDev</tt><big>(</big><em>dev</em>, <em>size</em>, <em>name=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#DMDev"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.DMDev"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">LoopDev</tt><big>(</big><em>filename</em>, <em>size=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#LoopDev"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.LoopDev"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">Mount</tt><big>(</big><em>dev</em>, <em>opts=''</em>, <em>mnt=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#Mount"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.Mount"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">PartitionMount</tt><big>(</big><em>disk_img</em>, <em>mount_ok=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#PartitionMount"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.PartitionMount"title="Permalink to this definition">¶</a></dt>
<p>Mount a partitioned image file using kpartx</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.compress">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">compress</tt><big>(</big><em>command</em>, <em>rootdir</em>, <em>outfile</em>, <em>compression='xz'</em>, <em>compressargs=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#compress"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.compress"title="Permalink to this definition">¶</a></dt>
<dd><p>Make a compressed archive of the given rootdir.
command is a list of the archiver commands to run
compression should be “xz”, “gzip”, “lzma”, “bzip2”, or None.
compressargs will be used on the compression commandline.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.copytree">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">copytree</tt><big>(</big><em>src</em>, <em>dest</em>, <em>preserve=True</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#copytree"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.copytree"title="Permalink to this definition">¶</a></dt>
<dd><p>Copy a tree of files using cp -a, thus preserving modes, timestamps,
links, acls, sparse files, xattrs, selinux contexts, etc.
If preserve is False, uses cp -R (useful for modeless filesystems)
raises CalledProcessError if copy fails.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.dm_attach">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">dm_attach</tt><big>(</big><em>dev</em>, <em>size</em>, <em>name=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#dm_attach"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.dm_attach"title="Permalink to this definition">¶</a></dt>
<dd><p>Attach a devicemapper device to the given device, with the given size.
If name is None, a random name will be chosen. Returns the device name.
raises CalledProcessError if dmsetup fails.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.dm_detach">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">dm_detach</tt><big>(</big><em>dev</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#dm_detach"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.dm_detach"title="Permalink to this definition">¶</a></dt>
<dd><p>Detach the named devicemapper device. Returns False if dmsetup fails.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.do_grafts">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">do_grafts</tt><big>(</big><em>grafts</em>, <em>dest</em>, <em>preserve=True</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#do_grafts"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.do_grafts"title="Permalink to this definition">¶</a></dt>
<dd><p>Copy each of the items listed in grafts into dest.
If the key ends with ‘/’ it’s assumed to be a directory which should be
created, otherwise just the leading directories will be created.</p>
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">estimate_size</tt><big>(</big><em>rootdir</em>, <em>graft=None</em>, <em>fstype=None</em>, <em>blocksize=4096</em>, <em>overhead=256</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#estimate_size"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.estimate_size"title="Permalink to this definition">¶</a></dt>
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">get_loop_name</tt><big>(</big><em>path</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#get_loop_name"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.get_loop_name"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the loop device associated with the path.
Raises RuntimeError if more than one loop is associated</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.loop_attach">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">loop_attach</tt><big>(</big><em>outfile</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#loop_attach"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.loop_attach"title="Permalink to this definition">¶</a></dt>
<dd><p>Attach a loop device to the given file. Return the loop device name.
Raises CalledProcessError if losetup fails.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.loop_detach">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">loop_detach</tt><big>(</big><em>loopdev</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#loop_detach"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.loop_detach"title="Permalink to this definition">¶</a></dt>
<dd><p>Detach the given loop device. Return False on failure.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkbtrfsimg">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkbtrfsimg</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>size=None</em>, <em>label=''</em>, <em>mountargs=''</em>, <em>graft=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkbtrfsimg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkbtrfsimg"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkcpio">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkcpio</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>compression='xz'</em>, <em>compressargs=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkcpio"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkcpio"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkdosimg">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkdosimg</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>size=None</em>, <em>label=''</em>, <em>mountargs='shortname=winnt</em>, <em>umask=0077'</em>, <em>graft=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkdosimg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkdosimg"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkext4img">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkext4img</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>size=None</em>, <em>label=''</em>, <em>mountargs=''</em>, <em>graft=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkext4img"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkext4img"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkfsimage">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkfsimage</tt><big>(</big><em>fstype</em>, <em>rootdir</em>, <em>outfile</em>, <em>size=None</em>, <em>mkfsargs=None</em>, <em>mountargs=''</em>, <em>graft=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkfsimage"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkfsimage"title="Permalink to this definition">¶</a></dt>
fstype should be a filesystem type - “mkfs.${fstype}” must exist.
graft should be a dict: {“some/path/in/image”: “local/file/or/dir”};</p>
<blockquote>
<div>if the path ends with a ‘/’ it’s assumed to be a directory.</div></blockquote>
<p>Will raise CalledProcessError if something goes wrong.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkhfsimg">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkhfsimg</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>size=None</em>, <em>label=''</em>, <em>mountargs=''</em>, <em>graft=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkhfsimg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkhfsimg"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkqcow2">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkqcow2</tt><big>(</big><em>outfile</em>, <em>size</em>, <em>options=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkqcow2"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkqcow2"title="Permalink to this definition">¶</a></dt>
<dd><p>use qemu-img to create a file of the given size.
options is a list of options passed to qemu-img</p>
<p>Default format is qcow2, override by passing “-f”, fmt
in options.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkrootfsimg">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkrootfsimg</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>label</em>, <em>size=2</em>, <em>sysroot=''</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkrootfsimg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkrootfsimg"title="Permalink to this definition">¶</a></dt>
<li><strong>size</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.4)"><em>int</em></a>) – Size of the image in GiB, if None computed automatically</li>
<li><strong>sysroot</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.4)"><em>str</em></a>) – path to system (deployment) root relative to physical root</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mksparse">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mksparse</tt><big>(</big><em>outfile</em>, <em>size</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mksparse"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mksparse"title="Permalink to this definition">¶</a></dt>
<dd><p>use os.ftruncate to create a sparse file of the given size.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mksquashfs">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mksquashfs</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>compression='default'</em>, <em>compressargs=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mksquashfs"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mksquashfs"title="Permalink to this definition">¶</a></dt>
<dd><p>Make a squashfs image containing the given rootdir.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mktar">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mktar</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>compression='xz'</em>, <em>compressargs=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mktar"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mktar"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mount">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mount</tt><big>(</big><em>dev</em>, <em>opts=''</em>, <em>mnt=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mount"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mount"title="Permalink to this definition">¶</a></dt>
<dd><p>Mount the given device at the given mountpoint, using the given opts.
opts should be a comma-separated string of mount options.
if mnt is none, a temporary directory will be created and its path will be
returned.
raises CalledProcessError if mount fails.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.round_to_blocks">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">round_to_blocks</tt><big>(</big><em>size</em>, <em>blocksize</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#round_to_blocks"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.round_to_blocks"title="Permalink to this definition">¶</a></dt>
<dd><p>If size isn’t a multiple of blocksize, round up to the next multiple</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.umount">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">umount</tt><big>(</big><em>mnt</em>, <em>lazy=False</em>, <em>maxretry=3</em>, <em>retrysleep=1.0</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#umount"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.umount"title="Permalink to this definition">¶</a></dt>
<dd><p>Unmount the given mountpoint. If lazy is True, do a lazy umount (-l).
If the mount was a temporary dir created by mount, it will be deleted.
raises CalledProcessError if umount fails.</p>
</dd></dl>
</div>
<divclass="section"id="module-pylorax.ltmpl">
<spanid="pylorax-ltmpl-module"></span><h2>pylorax.ltmpl module<aclass="headerlink"href="#module-pylorax.ltmpl"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.ltmpl.LoraxTemplate">
<emclass="property">class </em><ttclass="descclassname">pylorax.ltmpl.</tt><ttclass="descname">LoraxTemplate</tt><big>(</big><em>directories=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplate"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplate"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">parse</tt><big>(</big><em>template_file</em>, <em>variables</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplate.parse"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplate.parse"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="pylorax.ltmpl.LoraxTemplateRunner">
<emclass="property">class </em><ttclass="descclassname">pylorax.ltmpl.</tt><ttclass="descname">LoraxTemplateRunner</tt><big>(</big><em>inroot</em>, <em>outroot</em>, <em>dbo=None</em>, <em>fatalerrors=True</em>, <em>templatedir=None</em>, <em>defaults=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner"title="Permalink to this definition">¶</a></dt>
<li>If the first token is the name of a function, call that function
with the rest of the line as arguments</li>
</ol>
</div></blockquote>
</li>
<li><pclass="first">Parsing and execution are <em>separate</em> passes - so you can’t use the result
of a command in an %if statement (or any other control statements)!</p>
</li>
<li><pclass="first">Commands that run external programs (systemctl, gconfset) currently use
the <em>host</em>‘s copy of that program, which may cause problems if there’s a
big enough difference between the host and the image you’re modifying.</p>
</li>
<li><pclass="first">The commands are not executed under a real chroot, so absolute symlinks
will point <em>outside</em> the inroot/outroot. Be careful with symlinks!</p>
</li>
</ul>
<p>ADDING NEW COMMANDS:</p>
<ulclass="simple">
<li>Each template command is just a method of the LoraxTemplateRunner
object - so adding a new command is as easy as adding a new function.</li>
<li>Each function gets arguments that correspond to the rest of the tokens
on that line (after word splitting and brace expansion)</li>
<li>Commands should raise exceptions for errors - don’t use sys.exit()</li>
</ul>
<dlclass="method">
<dtid="pylorax.ltmpl.LoraxTemplateRunner.append">
<ttclass="descname">append</tt><big>(</big><em>filename</em>, <em>data</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.append"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.append"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>append FILE STRING</dt>
<dd><pclass="first">Append STRING (followed by a newline character) to FILE.
Python character escape sequences (‘n’, ‘t’, etc.) will be
<ttclass="descname">chmod</tt><big>(</big><em>fileglob</em>, <em>mode</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.chmod"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.chmod"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>chmod FILEGLOB OCTALMODE</dt>
<dd>Change the mode of all the files matching FILEGLOB to OCTALMODE.</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="pylorax.ltmpl.LoraxTemplateRunner.copy">
<ttclass="descname">copy</tt><big>(</big><em>src</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.copy"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.copy"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>copy SRC DEST</dt>
<dd>Copy SRC to DEST.
If DEST is a directory, SRC will be copied inside it.
If DEST doesn’t exist, SRC will be copied to a file with
<ttclass="descname">createaddrsize</tt><big>(</big><em>addr</em>, <em>src</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.createaddrsize"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.createaddrsize"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">gconfset</tt><big>(</big><em>path</em>, <em>keytype</em>, <em>value</em>, <em>outfile=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.gconfset"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.gconfset"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>gconfset PATH KEYTYPE VALUE [OUTFILE]</dt>
<dd><pclass="first">Set the given gconf PATH, with type KEYTYPE, to the given value.
OUTFILE defaults to /etc/gconf/gconf.xml.defaults if not given.
Example:</p>
<blockquoteclass="last">
<div>gconfset /apps/metacity/general/num_workspaces int 1</div></blockquote>
<ttclass="descname">get_token_checked</tt><big>(</big><em>process</em>, <em>token_queue</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.get_token_checked"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.get_token_checked"title="Permalink to this definition">¶</a></dt>
<dd><p>Try to get token from queue checking that process is still alive</p>
<ttclass="descname">hardlink</tt><big>(</big><em>src</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.hardlink"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.hardlink"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>hardlink SRC DEST</dt>
<dd>Create a hardlink at DEST which is linked to SRC.</dd>
<ttclass="descname">install</tt><big>(</big><em>srcglob</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.install"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.install"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>install SRC DEST</dt>
<dd><pclass="first">Copy the given file (or files, if a glob is used) from the input
tree to the given destination in the output tree.
The path to DEST must exist in the output tree.
If DEST is a directory, SRC will be copied into that directory.
If DEST doesn’t exist, SRC will be copied to a file with that name,
assuming the rest of the path exists.
This is pretty much like how the ‘cp’ command works.
<ttclass="descname">installimg</tt><big>(</big><em>srcdir</em>, <em>destfile</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.installimg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.installimg"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>installimg SRCDIR DESTFILE</dt>
<dd><pclass="first">Create a compressed cpio archive of the contents of SRCDIR and place
it in DESTFILE.</p>
<p>If SRCDIR doesn’t exist or is empty nothing is created.</p>
<ttclass="descname">installinitrd</tt><big>(</big><em>section</em>, <em>src</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.installinitrd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.installinitrd"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>installinitrd SECTION SRC DEST</dt>
<dd>Same as installkernel, but for “initrd”.</dd>
<ttclass="descname">installkernel</tt><big>(</big><em>section</em>, <em>src</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.installkernel"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.installkernel"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>installkernel SECTION SRC DEST</dt>
<dd><pclass="first">Install the kernel from SRC in the input tree to DEST in the output
tree, and then add an item to the treeinfo data store, in the named
<ttclass="descname">installpkg</tt><big>(</big><em>*pkgs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.installpkg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.installpkg"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">installupgradeinitrd</tt><big>(</big><em>section</em>, <em>src</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.installupgradeinitrd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.installupgradeinitrd"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>installupgradeinitrd SECTION SRC DEST</dt>
<dd>Same as installkernel, but for “upgrade”.</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="pylorax.ltmpl.LoraxTemplateRunner.log">
<ttclass="descname">log</tt><big>(</big><em>msg</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.log"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.log"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>log MESSAGE</dt>
<dd><pclass="first">Emit the given log message. Be sure to put it in quotes!
<ttclass="descname">mkdir</tt><big>(</big><em>*dirs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.mkdir"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.mkdir"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>mkdir DIR [DIR ...]</dt>
<dd><pclass="first">Create the named DIR(s). Will create leading directories as needed.
Example:</p>
<blockquoteclass="last">
<div>mkdir /images</div></blockquote>
</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="pylorax.ltmpl.LoraxTemplateRunner.move">
<ttclass="descname">move</tt><big>(</big><em>src</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.move"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.move"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>move SRC DEST</dt>
<dd>Move SRC to DEST.</dd>
</dl>
</dd></dl>
<dlclass="method">
<dtid="pylorax.ltmpl.LoraxTemplateRunner.remove">
<ttclass="descname">remove</tt><big>(</big><em>*fileglobs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.remove"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.remove"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>remove FILEGLOB [FILEGLOB ...]</dt>
<dd>Remove all the named files or directories.
Will <em>not</em> raise exceptions if the file(s) are not found.</dd>
<ttclass="descname">removefrom</tt><big>(</big><em>pkg</em>, <em>*globs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.removefrom"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.removefrom"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">removekmod</tt><big>(</big><em>*globs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.removekmod"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.removekmod"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">removepkg</tt><big>(</big><em>*pkgs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.removepkg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.removepkg"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>removepkg PKGGLOB [PKGGLOB...]</dt>
<dd><pclass="first">Delete the named package(s).
IMPLEMENTATION NOTES:</p>
<blockquoteclass="last">
<div>RPM scriptlets (%preun/%postun) are <em>not</em> run.
Files are deleted, but directories are left behind.</div></blockquote>
<ttclass="descname">replace</tt><big>(</big><em>pat</em>, <em>repl</em>, <em>*fileglobs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.replace"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.replace"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">run</tt><big>(</big><em>templatefile</em>, <em>**variables</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.run"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.run"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">run_pkg_transaction</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.run_pkg_transaction"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.run_pkg_transaction"title="Permalink to this definition">¶</a></dt>
<dd><p>Actually install all the packages requested by previous ‘installpkg’
commands.</p>
</dd></dl>
<dlclass="method">
<dtid="pylorax.ltmpl.LoraxTemplateRunner.runcmd">
<ttclass="descname">runcmd</tt><big>(</big><em>*cmdlist</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.runcmd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.runcmd"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>runcmd CMD [ARG ...]</dt>
<dd><pclass="first">Run the given command with the given arguments.</p>
<p>NOTE: All paths given MUST be COMPLETE, ABSOLUTE PATHS to the file
or files mentioned. ${root}/${inroot}/${outroot} are good for
constructing these paths.</p>
<p>FURTHER NOTE: Please use this command only as a last resort!
Whenever possible, you should use the existing template commands.
If the existing commands don’t do what you need, fix them!</p>
<dlclass="last docutils">
<dt>Examples:</dt>
<dd><pclass="first">(this should be replaced with a “find” function)
runcmd find ${root} -name “<em>.pyo” -type f -delete
%for f in find(root, name=”</em>.pyo”):</p>
<ttclass="descname">symlink</tt><big>(</big><em>target</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.symlink"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.symlink"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>symlink SRC DEST</dt>
<dd>Create a symlink at DEST which points to SRC.</dd>
<ttclass="descname">systemctl</tt><big>(</big><em>cmd</em>, <em>*units</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.systemctl"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.systemctl"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>systemctl [enable|disable|mask] UNIT [UNIT...]</dt>
<dd><pclass="first">Enable, disable, or mask the given systemd units.
<ttclass="descname">treeinfo</tt><big>(</big><em>section</em>, <em>key</em>, <em>*valuetoks</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.treeinfo"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.treeinfo"title="Permalink to this definition">¶</a></dt>
<dd><dlclass="docutils">
<dt>treeinfo SECTION KEY ARG [ARG ...]</dt>
<dd><pclass="first">Add an item to the treeinfo data store.
The given SECTION will have a new item added where
<ttclass="descclassname">pylorax.ltmpl.</tt><ttclass="descname">brace_expand</tt><big>(</big><em>s</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#brace_expand"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.brace_expand"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.ltmpl.rexists">
<ttclass="descclassname">pylorax.ltmpl.</tt><ttclass="descname">rexists</tt><big>(</big><em>pathname</em>, <em>root=''</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#rexists"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.rexists"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.ltmpl.rglob">
<ttclass="descclassname">pylorax.ltmpl.</tt><ttclass="descname">rglob</tt><big>(</big><em>pathname</em>, <em>root='/'</em>, <em>fatal=False</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#rglob"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.rglob"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.ltmpl.split_and_expand">
<ttclass="descclassname">pylorax.ltmpl.</tt><ttclass="descname">split_and_expand</tt><big>(</big><em>line</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#split_and_expand"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.split_and_expand"title="Permalink to this definition">¶</a></dt>
<spanid="pylorax-monitor-module"></span><h2>pylorax.monitor module<aclass="headerlink"href="#module-pylorax.monitor"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.monitor.LogMonitor">
<emclass="property">class </em><ttclass="descclassname">pylorax.monitor.</tt><ttclass="descname">LogMonitor</tt><big>(</big><em>log_path=None</em>, <em>host='localhost'</em>, <em>port=0</em>, <em>timeout=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/monitor.html#LogMonitor"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.monitor.LogMonitor"title="Permalink to this definition">¶</a></dt>
<p>Setup a server to monitor the logs output by the installation</p>
<p>This needs to be running before the virt-install runs, it expects
there to be a listener on the port used for the virtio log port.</p>
<dlclass="method">
<dtid="pylorax.monitor.LogMonitor.shutdown">
<ttclass="descname">shutdown</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/monitor.html#LogMonitor.shutdown"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.monitor.LogMonitor.shutdown"title="Permalink to this definition">¶</a></dt>
<dd><p>Force shutdown of the monitoring thread</p>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="pylorax.monitor.LogRequestHandler">
<emclass="property">class </em><ttclass="descclassname">pylorax.monitor.</tt><ttclass="descname">LogRequestHandler</tt><big>(</big><em>request</em>, <em>client_address</em>, <em>server</em><big>)</big><aclass="reference internal"href="_modules/pylorax/monitor.html#LogRequestHandler"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.monitor.LogRequestHandler"title="Permalink to this definition">¶</a></dt>
<p>Handle monitoring and saving the logfiles from the virtual install</p>
<p>Incoming data is written to self.server.log_path and each line is checked
for patterns that would indicate that the installation failed.
self.server.log_error is set True when this happens.</p>
<dlclass="method">
<dtid="pylorax.monitor.LogRequestHandler.finish">
<ttclass="descname">finish</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/monitor.html#LogRequestHandler.finish"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.monitor.LogRequestHandler.finish"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="pylorax.monitor.LogRequestHandler.handle">
<ttclass="descname">handle</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/monitor.html#LogRequestHandler.handle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.monitor.LogRequestHandler.handle"title="Permalink to this definition">¶</a></dt>
<dd><p>Write incoming data to a logfile and check for errors</p>
<p>Split incoming data into lines and check for any Tracebacks or other
<ttclass="descname">iserror</tt><big>(</big><em>line</em><big>)</big><aclass="reference internal"href="_modules/pylorax/monitor.html#LogRequestHandler.iserror"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.monitor.LogRequestHandler.iserror"title="Permalink to this definition">¶</a></dt>
<dd><p>Check a line to see if it contains an error indicating installation failure</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>line</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.4)"><em>str</em></a>) – log line to check for failure</td>
</tr>
</tbody>
</table>
<p>If the line contains IGNORED it will be skipped.</p>
</dd></dl>
<dlclass="method">
<dtid="pylorax.monitor.LogRequestHandler.setup">
<ttclass="descname">setup</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/monitor.html#LogRequestHandler.setup"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.monitor.LogRequestHandler.setup"title="Permalink to this definition">¶</a></dt>
<dd><p>Start writing to self.server.log_path</p>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="pylorax.monitor.LogServer">
<emclass="property">class </em><ttclass="descclassname">pylorax.monitor.</tt><ttclass="descname">LogServer</tt><big>(</big><em>log_path</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/monitor.html#LogServer"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.monitor.LogServer"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">log_check</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/monitor.html#LogServer.log_check"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.monitor.LogServer.log_check"title="Permalink to this definition">¶</a></dt>
<dd><p>Check to see if an error has been found in the log</p>
<ttclass="descname">timeout</tt><emclass="property"> = 60</em><aclass="headerlink"href="#pylorax.monitor.LogServer.timeout"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<divclass="section"id="module-pylorax.mount">
<spanid="pylorax-mount-module"></span><h2>pylorax.mount module<aclass="headerlink"href="#module-pylorax.mount"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.mount.IsoMountpoint">
<emclass="property">class </em><ttclass="descclassname">pylorax.mount.</tt><ttclass="descname">IsoMountpoint</tt><big>(</big><em>iso_path</em>, <em>initrd_path=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/mount.html#IsoMountpoint"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.mount.IsoMountpoint"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">get_iso_label</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/mount.html#IsoMountpoint.get_iso_label"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.mount.IsoMountpoint.get_iso_label"title="Permalink to this definition">¶</a></dt>
<dd><p>Get the iso’s label using isoinfo</p>
<p>Sets self.label if one is found</p>
</dd></dl>
<dlclass="method">
<dtid="pylorax.mount.IsoMountpoint.umount">
<ttclass="descname">umount</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/mount.html#IsoMountpoint.umount"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.mount.IsoMountpoint.umount"title="Permalink to this definition">¶</a></dt>
<spanid="pylorax-output-module"></span><h2>pylorax.output module<aclass="headerlink"href="#module-pylorax.output"title="Permalink to this headline">¶</a></h2>
</div>
<divclass="section"id="module-pylorax.sysutils">
<spanid="pylorax-sysutils-module"></span><h2>pylorax.sysutils module<aclass="headerlink"href="#module-pylorax.sysutils"title="Permalink to this headline">¶</a></h2>
<dlclass="function">
<dtid="pylorax.sysutils.joinpaths">
<ttclass="descclassname">pylorax.sysutils.</tt><ttclass="descname">joinpaths</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/sysutils.html#joinpaths"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.sysutils.joinpaths"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.sysutils.touch">
<ttclass="descclassname">pylorax.sysutils.</tt><ttclass="descname">touch</tt><big>(</big><em>fname</em><big>)</big><aclass="reference internal"href="_modules/pylorax/sysutils.html#touch"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.sysutils.touch"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.sysutils.replace">
<ttclass="descclassname">pylorax.sysutils.</tt><ttclass="descname">replace</tt><big>(</big><em>fname</em>, <em>find</em>, <em>sub</em><big>)</big><aclass="reference internal"href="_modules/pylorax/sysutils.html#replace"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.sysutils.replace"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.sysutils.chown_">
<ttclass="descclassname">pylorax.sysutils.</tt><ttclass="descname">chown_</tt><big>(</big><em>path</em>, <em>user=None</em>, <em>group=None</em>, <em>recursive=False</em><big>)</big><aclass="reference internal"href="_modules/pylorax/sysutils.html#chown_"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.sysutils.chown_"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.sysutils.chmod_">
<ttclass="descclassname">pylorax.sysutils.</tt><ttclass="descname">chmod_</tt><big>(</big><em>path</em>, <em>mode</em>, <em>recursive=False</em><big>)</big><aclass="reference internal"href="_modules/pylorax/sysutils.html#chmod_"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.sysutils.chmod_"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.sysutils.remove">
<ttclass="descclassname">pylorax.sysutils.</tt><ttclass="descname">remove</tt><big>(</big><em>target</em><big>)</big><aclass="reference internal"href="_modules/pylorax/sysutils.html#remove"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.sysutils.remove"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.sysutils.linktree">
<ttclass="descclassname">pylorax.sysutils.</tt><ttclass="descname">linktree</tt><big>(</big><em>src</em>, <em>dst</em><big>)</big><aclass="reference internal"href="_modules/pylorax/sysutils.html#linktree"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.sysutils.linktree"title="Permalink to this definition">¶</a></dt>
<spanid="pylorax-treebuilder-module"></span><h2>pylorax.treebuilder module<aclass="headerlink"href="#module-pylorax.treebuilder"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.treebuilder.RuntimeBuilder">
<emclass="property">class </em><ttclass="descclassname">pylorax.treebuilder.</tt><ttclass="descname">RuntimeBuilder</tt><big>(</big><em>product</em>, <em>arch</em>, <em>dbo</em>, <em>templatedir=None</em>, <em>installpkgs=None</em>, <em>add_templates=None</em>, <em>add_template_vars=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">cleanup</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.cleanup"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.cleanup"title="Permalink to this definition">¶</a></dt>
<dd><p>Remove unneeded packages and files with runtime-cleanup.tmpl</p>
<ttclass="descname">create_runtime</tt><big>(</big><em>outfile='/var/tmp/squashfs.img'</em>, <em>compression='xz'</em>, <em>compressargs=None</em>, <em>size=2</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.create_runtime"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.create_runtime"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">finished</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.finished"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.finished"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">generate_module_data</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.generate_module_data"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.generate_module_data"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">install</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.install"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.install"title="Permalink to this definition">¶</a></dt>
<dd><p>Install packages and do initial setup with runtime-install.tmpl</p>
<ttclass="descname">postinstall</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.postinstall"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.postinstall"title="Permalink to this definition">¶</a></dt>
<dd><p>Do some post-install setup work with runtime-postinstall.tmpl</p>
<ttclass="descname">verify</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.verify"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.verify"title="Permalink to this definition">¶</a></dt>
<dd><p>Ensure that contents of the installroot can run</p>
<ttclass="descname">writepkglists</tt><big>(</big><em>pkglistdir</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.writepkglists"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.writepkglists"title="Permalink to this definition">¶</a></dt>
<dd><p>debugging data: write out lists of package contents</p>
<ttclass="descname">writepkgsizes</tt><big>(</big><em>pkgsizefile</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.writepkgsizes"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.writepkgsizes"title="Permalink to this definition">¶</a></dt>
<dd><p>debugging data: write a big list of pkg sizes</p>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="pylorax.treebuilder.TreeBuilder">
<emclass="property">class </em><ttclass="descclassname">pylorax.treebuilder.</tt><ttclass="descname">TreeBuilder</tt><big>(</big><em>product</em>, <em>arch</em>, <em>inroot</em>, <em>outroot</em>, <em>runtime</em>, <em>isolabel</em>, <em>domacboot=True</em>, <em>doupgrade=True</em>, <em>templatedir=None</em>, <em>add_templates=None</em>, <em>add_template_vars=None</em>, <em>workdir=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#TreeBuilder"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.TreeBuilder"title="Permalink to this definition">¶</a></dt>
inroot should be the installtree root (the newly-built runtime dir)</p>
<dlclass="method">
<dtid="pylorax.treebuilder.TreeBuilder.build">
<ttclass="descname">build</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#TreeBuilder.build"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.TreeBuilder.build"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">copy_dracut_hooks</tt><big>(</big><em>hooks</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#TreeBuilder.copy_dracut_hooks"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.TreeBuilder.copy_dracut_hooks"title="Permalink to this definition">¶</a></dt>
<dd><p>Copy the hook scripts in hooks into the installroot’s /tmp/
and return a list of commands to pass to dracut when creating the
initramfs</p>
<p>hooks is a list of tuples with the name of the hook script and the
<ttclass="descname">dracut_hooks_path</tt><aclass="reference internal"href="_modules/pylorax/treebuilder.html#TreeBuilder.dracut_hooks_path"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.TreeBuilder.dracut_hooks_path"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the path to the lorax dracut hooks scripts</p>
<p>Use the configured share dir if it is setup,
otherwise default to /usr/share/lorax/dracut_hooks</p>
<ttclass="descname">implantisomd5</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#TreeBuilder.implantisomd5"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.TreeBuilder.implantisomd5"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="attribute">
<dtid="pylorax.treebuilder.TreeBuilder.kernels">
<ttclass="descname">kernels</tt><aclass="reference internal"href="_modules/pylorax/treebuilder.html#TreeBuilder.kernels"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.TreeBuilder.kernels"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">rebuild_initrds</tt><big>(</big><em>add_args=None</em>, <em>backup=''</em>, <em>prefix=''</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#TreeBuilder.rebuild_initrds"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.TreeBuilder.rebuild_initrds"title="Permalink to this definition">¶</a></dt>
<dd><p>Rebuild all the initrds in the tree. If backup is specified, each
initrd will be renamed with backup as a suffix before rebuilding.
If backup is empty, the existing initrd files will be overwritten.
If suffix is specified, the existing initrd is untouched and a new
image is built with the filename “${prefix}-${kernel.version}.img”</p>
</dd></dl>
</dd></dl>
<dlclass="function">
<dtid="pylorax.treebuilder.findkernels">
<ttclass="descclassname">pylorax.treebuilder.</tt><ttclass="descname">findkernels</tt><big>(</big><em>root='/'</em>, <em>kdir='boot'</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#findkernels"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.findkernels"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.treebuilder.generate_module_info">
<ttclass="descclassname">pylorax.treebuilder.</tt><ttclass="descname">generate_module_info</tt><big>(</big><em>moddir</em>, <em>outfile=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#generate_module_info"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.generate_module_info"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.treebuilder.string_lower">
<ttclass="descclassname">pylorax.treebuilder.</tt><ttclass="descname">string_lower</tt><big>(</big><em>string</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#string_lower"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.string_lower"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>string</strong>– String to lowercase</td>
</tr>
</tbody>
</table>
<p>This is used as a filter in the templates.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.treebuilder.udev_escape">
<ttclass="descclassname">pylorax.treebuilder.</tt><ttclass="descname">udev_escape</tt><big>(</big><em>label</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#udev_escape"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.udev_escape"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
<divclass="section"id="module-pylorax.treeinfo">
<spanid="pylorax-treeinfo-module"></span><h2>pylorax.treeinfo module<aclass="headerlink"href="#module-pylorax.treeinfo"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.treeinfo.TreeInfo">
<emclass="property">class </em><ttclass="descclassname">pylorax.treeinfo.</tt><ttclass="descname">TreeInfo</tt><big>(</big><em>product</em>, <em>version</em>, <em>variant</em>, <em>basearch</em>, <em>packagedir=''</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treeinfo.html#TreeInfo"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treeinfo.TreeInfo"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">add_section</tt><big>(</big><em>section</em>, <em>data</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treeinfo.html#TreeInfo.add_section"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treeinfo.TreeInfo.add_section"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="pylorax.treeinfo.TreeInfo.write">
<ttclass="descname">write</tt><big>(</big><em>outfile</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treeinfo.html#TreeInfo.write"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treeinfo.TreeInfo.write"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<divclass="section"id="module-pylorax">
<spanid="module-contents"></span><h2>Module contents<aclass="headerlink"href="#module-pylorax"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.ArchData">
<emclass="property">class </em><ttclass="descclassname">pylorax.</tt><ttclass="descname">ArchData</tt><big>(</big><em>buildarch</em><big>)</big><aclass="reference internal"href="_modules/pylorax.html#ArchData"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ArchData"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">lib64_arches</tt><emclass="property"> = ('x86_64', 'ppc64', 'ppc64le', 's390x', 'ia64', 'aarch64')</em><aclass="headerlink"href="#pylorax.ArchData.lib64_arches"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="pylorax.Lorax">
<emclass="property">class </em><ttclass="descclassname">pylorax.</tt><ttclass="descname">Lorax</tt><aclass="reference internal"href="_modules/pylorax.html#Lorax"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.Lorax"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">configure</tt><big>(</big><em>conf_file='/etc/lorax/lorax.conf'</em><big>)</big><aclass="reference internal"href="_modules/pylorax.html#Lorax.configure"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.Lorax.configure"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="pylorax.Lorax.init_file_logging">
<ttclass="descname">init_file_logging</tt><big>(</big><em>logdir</em>, <em>logname='pylorax.log'</em><big>)</big><aclass="reference internal"href="_modules/pylorax.html#Lorax.init_file_logging"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.Lorax.init_file_logging"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="pylorax.Lorax.init_stream_logging">
<ttclass="descname">init_stream_logging</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax.html#Lorax.init_stream_logging"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.Lorax.init_stream_logging"title="Permalink to this definition">¶</a></dt>
<ttclass="descclassname">pylorax.</tt><ttclass="descname">get_buildarch</tt><big>(</big><em>dbo</em><big>)</big><aclass="reference internal"href="_modules/pylorax.html#get_buildarch"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.get_buildarch"title="Permalink to this definition">¶</a></dt>
<ttclass="descclassname">pylorax.</tt><ttclass="descname">setup_logging</tt><big>(</big><em>logfile</em>, <em>theLogger</em><big>)</big><aclass="reference internal"href="_modules/pylorax.html#setup_logging"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.setup_logging"title="Permalink to this definition">¶</a></dt>
Built with <ahref="http://sphinx-doc.org/">Sphinx</a> using a <ahref="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.