<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><codeclass="descclassname">pylorax.base.</code><codeclass="descname">BaseLoraxClass</code><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>
<codeclass="descname">pcritical</code><spanclass="sig-paren">(</span><em>msg</em>, <em>fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em><spanclass="sig-paren">)</span><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">
<codeclass="descname">pdebug</code><spanclass="sig-paren">(</span><em>msg</em>, <em>fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em><spanclass="sig-paren">)</span><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">
<codeclass="descname">perror</code><spanclass="sig-paren">(</span><em>msg</em>, <em>fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em><spanclass="sig-paren">)</span><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">
<codeclass="descname">pinfo</code><spanclass="sig-paren">(</span><em>msg</em>, <em>fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em><spanclass="sig-paren">)</span><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">
<codeclass="descname">pwarning</code><spanclass="sig-paren">(</span><em>msg</em>, <em>fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'></em><spanclass="sig-paren">)</span><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><codeclass="descclassname">pylorax.base.</code><codeclass="descname">DataHolder</code><spanclass="sig-paren">(</span><em>**kwargs</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">copy</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span>→ a shallow copy of D<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><codeclass="descclassname">pylorax.buildstamp.</code><codeclass="descname">BuildStamp</code><spanclass="sig-paren">(</span><em>product</em>, <em>version</em>, <em>bugurl</em>, <em>isfinal</em>, <em>buildarch</em>, <em>variant=''</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">write</code><spanclass="sig-paren">(</span><em>outfile</em><spanclass="sig-paren">)</span><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>
<dd></dd></dl>
</dd></dl>
</div>
<divclass="section"id="module-pylorax.cmdline">
<spanid="pylorax-cmdline-module"></span><h2>pylorax.cmdline module<aclass="headerlink"href="#module-pylorax.cmdline"title="Permalink to this headline">¶</a></h2>
<dlclass="function">
<dtid="pylorax.cmdline.lmc_parser">
<codeclass="descclassname">pylorax.cmdline.</code><codeclass="descname">lmc_parser</code><spanclass="sig-paren">(</span><em>dracut_default=''</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/cmdline.html#lmc_parser"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.cmdline.lmc_parser"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a ArgumentParser object for live-media-creator.</p>
<codeclass="descclassname">pylorax.cmdline.</code><codeclass="descname">lorax_parser</code><spanclass="sig-paren">(</span><em>dracut_default=''</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/cmdline.html#lorax_parser"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.cmdline.lorax_parser"title="Permalink to this definition">¶</a></dt>
<spanid="pylorax-creator-module"></span><h2>pylorax.creator module<aclass="headerlink"href="#module-pylorax.creator"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.creator.FakeDNF">
<emclass="property">class </em><codeclass="descclassname">pylorax.creator.</code><codeclass="descname">FakeDNF</code><spanclass="sig-paren">(</span><em>conf</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#FakeDNF"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.FakeDNF"title="Permalink to this definition">¶</a></dt>
<p>A minimal DNF object suitable for passing to RuntimeBuilder</p>
<p>lmc uses RuntimeBuilder to run the arch specific iso creation
templates, so the the installroot config value is the important part of
this. Everything else should be a nop.</p>
<dlclass="method">
<dtid="pylorax.creator.FakeDNF.reset">
<codeclass="descname">reset</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#FakeDNF.reset"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.FakeDNF.reset"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.calculate_disk_size">
<codeclass="descclassname">pylorax.creator.</code><codeclass="descname">calculate_disk_size</code><spanclass="sig-paren">(</span><em>opts</em>, <em>ks</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#calculate_disk_size"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.calculate_disk_size"title="Permalink to this definition">¶</a></dt>
<dd><p>Calculate the disk size from the kickstart</p>
<li><strong>opts</strong> (<em>argparse options</em>) – options passed to livemedia-creator</li>
<li><strong>ks</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Path to the kickstart to use for the installation</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">Disk size in MiB</p>
<codeclass="descclassname">pylorax.creator.</code><codeclass="descname">create_pxe_config</code><spanclass="sig-paren">(</span><em>template</em>, <em>images_dir</em>, <em>live_image_name</em>, <em>add_args=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#create_pxe_config"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.create_pxe_config"title="Permalink to this definition">¶</a></dt>
<dd><p>Create template for pxe to live configuration</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>images_dir</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Path of directory with images to be used</li>
<li><strong>live_image_name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Name of live rootfs image file</li>
<li><strong>add_args</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#list"title="(in Python v3.6)"><em>list</em></a>) – Arguments to be added to initrd= pxe config</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.find_ostree_root">
<codeclass="descclassname">pylorax.creator.</code><codeclass="descname">find_ostree_root</code><spanclass="sig-paren">(</span><em>phys_root</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#find_ostree_root"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.find_ostree_root"title="Permalink to this definition">¶</a></dt>
<trclass="field-even field"><thclass="field-name">Raises:</th><tdclass="field-body"><aclass="reference external"href="https://docs.python.org/3/library/exceptions.html#Exception"title="(in Python v3.6)"><strong>Exception</strong></a>– More than one deployment roots were found</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.get_arch">
<codeclass="descclassname">pylorax.creator.</code><codeclass="descname">get_arch</code><spanclass="sig-paren">(</span><em>mount_dir</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#get_arch"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.get_arch"title="Permalink to this definition">¶</a></dt>
<codeclass="descclassname">pylorax.creator.</code><codeclass="descname">is_image_mounted</code><spanclass="sig-paren">(</span><em>disk_img</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#is_image_mounted"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.is_image_mounted"title="Permalink to this definition">¶</a></dt>
<dd><p>Check to see if the disk_img is mounted</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>disk_img</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Full path of the disk image</li>
<li><strong>name</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Name of the appliance, passed to the template</li>
<li><strong>template</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Full path of Mako template</li>
<li><strong>outfile</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Full path of file to write, using template</li>
<li><strong>networks</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#list"title="(in Python v3.6)"><em>list</em></a>) – List of networks(str) from the kickstart</li>
<li><strong>ram</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.6)"><em>int</em></a>) – Ram, in MiB, passed to template. Default is 1024</li>
<li><strong>vcpus</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.6)"><em>int</em></a>) – CPUs, passed to template. Default is 1</li>
<li><strong>arch</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – CPU architecture. Default is ‘x86_64’</li>
<li><strong>title</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Title, passed to template. Default is ‘Linux’</li>
<li><strong>project</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Project, passed to template. Default is ‘Linux’</li>
<li><strong>releasever</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Release version, passed to template. Default is 29</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.make_image">
<codeclass="descclassname">pylorax.creator.</code><codeclass="descname">make_image</code><spanclass="sig-paren">(</span><em>opts</em>, <em>ks</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#make_image"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.make_image"title="Permalink to this definition">¶</a></dt>
<li><strong>opts</strong> (<em>argparse options</em>) – options passed to livemedia-creator</li>
<li><strong>ks</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Path to the kickstart to use for the installation</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">Path of the image created</p>
<p>Use qemu+boot.iso or anaconda to install to a disk image.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.make_live_images">
<codeclass="descclassname">pylorax.creator.</code><codeclass="descname">make_live_images</code><spanclass="sig-paren">(</span><em>opts</em>, <em>work_dir</em>, <em>disk_img</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#make_live_images"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.make_live_images"title="Permalink to this definition">¶</a></dt>
<dd><p>Create live images from direcory or rootfs image</p>
<li><strong>opts</strong> (<em>argparse options</em>) – options passed to livemedia-creator</li>
<li><strong>work_dir</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Directory for storing results</li>
<li><strong>disk_img</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Path to disk image (fsimage or partitioned)</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">Path of directory with created images or None</p>
<p>fsck.ext4 is run on the rootfs_image to make sure there are no errors and to zero
out any deleted blocks to make it compress better. If this fails for any reason
it will return None and log the error.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.make_livecd">
<codeclass="descclassname">pylorax.creator.</code><codeclass="descname">make_livecd</code><spanclass="sig-paren">(</span><em>opts</em>, <em>mount_dir</em>, <em>work_dir</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#make_livecd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.make_livecd"title="Permalink to this definition">¶</a></dt>
<dd><p>Take the content from the disk image and make a livecd out of it</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>opts</strong> (<em>argparse options</em>) – options passed to livemedia-creator</li>
<li><strong>mount_dir</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Directory tree to compress</li>
<codeclass="descclassname">pylorax.creator.</code><codeclass="descname">make_runtime</code><spanclass="sig-paren">(</span><em>opts</em>, <em>mount_dir</em>, <em>work_dir</em>, <em>size=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#make_runtime"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.make_runtime"title="Permalink to this definition">¶</a></dt>
<dd><p>Make the squashfs image from a directory</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>opts</strong> (<em>argparse options</em>) – options passed to livemedia-creator</li>
<li><strong>mount_dir</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Directory tree to compress</li>
<li><strong>size</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.6)"><em>int</em></a>) – Size of disk image, in GiB</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.make_squashfs">
<codeclass="descclassname">pylorax.creator.</code><codeclass="descname">make_squashfs</code><spanclass="sig-paren">(</span><em>opts</em>, <em>disk_img</em>, <em>work_dir</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#make_squashfs"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.make_squashfs"title="Permalink to this definition">¶</a></dt>
<dd><p>Create a squashfs image of an unpartitioned filesystem disk image</p>
<li><strong>disk_img</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Path to the unpartitioned filesystem disk image</li>
<li><strong>compression</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Compression type to use</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">True if squashfs creation was successful. False if there was an error.</p>
<codeclass="descclassname">pylorax.creator.</code><codeclass="descname">mount_boot_part_over_root</code><spanclass="sig-paren">(</span><em>img_mount</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#mount_boot_part_over_root"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.mount_boot_part_over_root"title="Permalink to this definition">¶</a></dt>
<dd><p>Mount boot partition to /boot of root fs mounted in img_mount</p>
<p>Used for OSTree so it finds deployment configurations on live rootfs</p>
<p>param img_mount: object with mounted disk image root partition
type img_mount: imgutils.PartitionMount</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.rebuild_initrds_for_live">
<codeclass="descclassname">pylorax.creator.</code><codeclass="descname">rebuild_initrds_for_live</code><spanclass="sig-paren">(</span><em>opts</em>, <em>sys_root_dir</em>, <em>results_dir</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#rebuild_initrds_for_live"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.rebuild_initrds_for_live"title="Permalink to this definition">¶</a></dt>
<dd><p>Rebuild intrds for pxe live image (root=live:<aclass="reference external"href="http://">http://</a>)</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>opts</strong> (<em>argparse options</em>) – options passed to livemedia-creator</li>
<li><strong>sys_root_dir</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Path to root of the system</li>
<li><strong>results_dir</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Path of directory for storing results</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.run_creator">
<codeclass="descclassname">pylorax.creator.</code><codeclass="descname">run_creator</code><spanclass="sig-paren">(</span><em>opts</em>, <em>callback_func=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#run_creator"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.run_creator"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>opts</strong> (<em>Either a DataHolder</em><em> or </em><em>ArgumentParser</em>) – Commandline options to control the process</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body">The result directory and the disk image path.</td>
</tr>
<trclass="field-odd field"><thclass="field-name">Return type:</th><tdclass="field-body">Tuple of str</td>
</tr>
</tbody>
</table>
<p>This function takes the opts arguments and creates the selected output image.
See the cmdline –help for livemedia-creator for the possible options</p>
<p>(Yes, this is not ideal, but we can fix that later)</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.squashfs_args">
<codeclass="descclassname">pylorax.creator.</code><codeclass="descname">squashfs_args</code><spanclass="sig-paren">(</span><em>opts</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/creator.html#squashfs_args"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.squashfs_args"title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the compression type and args to use when making squashfs</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>opts</strong>– ArgumentParser object with compression and compressopts</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body">tuple of compression type and args</td>
<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">
<codeclass="descclassname">pylorax.decorators.</code><codeclass="descname">singleton</code><spanclass="sig-paren">(</span><em>cls</em><spanclass="sig-paren">)</span><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><codeclass="descclassname">pylorax.discinfo.</code><codeclass="descname">DiscInfo</code><spanclass="sig-paren">(</span><em>release</em>, <em>basearch</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">write</code><spanclass="sig-paren">(</span><em>outfile</em><spanclass="sig-paren">)</span><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><codeclass="descclassname">pylorax.dnfhelper.</code><codeclass="descname">LoraxDownloadCallback</code><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>
<codeclass="descname">end</code><spanclass="sig-paren">(</span><em>payload</em>, <em>status</em>, <em>msg</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">progress</code><spanclass="sig-paren">(</span><em>payload</em>, <em>done</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">start</code><spanclass="sig-paren">(</span><em>total_files</em>, <em>total_size</em>, <em>total_drpms=0</em><spanclass="sig-paren">)</span><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><codeclass="descclassname">pylorax.dnfhelper.</code><codeclass="descname">LoraxRpmCallback</code><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>
<codeclass="descname">error</code><spanclass="sig-paren">(</span><em>message</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/dnfhelper.html#LoraxRpmCallback.error"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.dnfhelper.LoraxRpmCallback.error"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">progress</code><spanclass="sig-paren">(</span><em>package</em>, <em>action</em>, <em>ti_done</em>, <em>ti_total</em>, <em>ts_done</em>, <em>ts_total</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/dnfhelper.html#LoraxRpmCallback.progress"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.dnfhelper.LoraxRpmCallback.progress"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><codeclass="descclassname">pylorax.executils.</code><codeclass="descname">ExecProduct</code><spanclass="sig-paren">(</span><em>rc</em>, <em>stdout</em>, <em>stderr</em><spanclass="sig-paren">)</span><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>
<codeclass="descclassname">pylorax.executils.</code><codeclass="descname">augmentEnv</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.executils.execReadlines">
<codeclass="descclassname">pylorax.executils.</code><codeclass="descname">execReadlines</code><spanclass="sig-paren">(</span><em>command</em>, <em>argv</em>, <em>stdin=None</em>, <em>root='/'</em>, <em>env_prune=None</em>, <em>filter_stderr=False</em>, <em>callback=<function <lambda>></em>, <em>env_add=None</em>, <em>reset_handlers=True</em>, <em>reset_lang=True</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/executils.html#execReadlines"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.execReadlines"title="Permalink to this definition">¶</a></dt>
<dd><p>Execute an external command and return the line output of the command
in real-time.</p>
<p>This method assumes that there is a reasonably low delay between the
end of output and the process exiting. If the child process closes
stdout and then keeps on truckin’ there will be problems.</p>
<dlclass="docutils">
<dt>NOTE/WARNING: UnicodeDecodeError will be raised if the output of the</dt>
<dd>external command can’t be decoded as UTF-8.</dd>
<li><strong>command</strong>– The command to run</li>
<li><strong>argv</strong>– The argument list</li>
<li><strong>stdin</strong>– The file object to read stdin from.</li>
<li><strong>stdout</strong>– Optional file object to redirect stdout and stderr to.</li>
<li><strong>root</strong>– The directory to chroot to before running command.</li>
<li><strong>env_prune</strong>– environment variable to remove before execution</li>
<li><strong>log_output</strong>– whether to log the output of command</li>
<li><strong>binary_output</strong>– whether to treat the output of command as binary data</li>
<li><strong>raise_err</strong>– whether to raise a CalledProcessError if the returncode is non-zero</li>
<li><strong>callback</strong>– method to call while waiting for process to finish, passed Popen object</li>
<li><strong>env_add</strong>– environment variables to add before execution</li>
<li><strong>reset_handlers</strong>– whether to reset to SIG_DFL any signal handlers set to SIG_IGN</li>
<li><strong>reset_lang</strong>– whether to set the locale of the child process to C</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first last">The return code of the command</p>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.executils.runcmd">
<codeclass="descclassname">pylorax.executils.</code><codeclass="descname">runcmd</code><spanclass="sig-paren">(</span><em>cmd</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.executils.</code><codeclass="descname">runcmd_output</code><spanclass="sig-paren">(</span><em>cmd</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.executils.</code><codeclass="descname">setenv</code><spanclass="sig-paren">(</span><em>name</em>, <em>value</em><spanclass="sig-paren">)</span><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.6)"><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.6)"><em>str</em></a>) – The value of the environment variable</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.executils.startProgram">
<codeclass="descclassname">pylorax.executils.</code><codeclass="descname">startProgram</code><spanclass="sig-paren">(</span><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><spanclass="sig-paren">)</span><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
<li><strong>argv</strong>– The command to run and argument</li>
<li><strong>root</strong>– The directory to chroot to before running command.</li>
<li><strong>stdin</strong>– The file object to read stdin from.</li>
<li><strong>stdout</strong>– The file object to write stdout to.</li>
<li><strong>stderr</strong>– The file object to write stderr to.</li>
<li><strong>env_prune</strong>– environment variables to remove before execution</li>
<li><strong>env_add</strong>– environment variables to add before execution</li>
<li><strong>reset_handlers</strong>– whether to reset to SIG_DFL any signal handlers set to SIG_IGN</li>
<li><strong>reset_lang</strong>– whether to set the locale of the child process to C</li>
<li><strong>kwargs</strong>– Additional parameters to pass to subprocess.Popen</li>
<li><strong>preexec_fn</strong>– A function to run before execution starts.</li>
</ul>
</td>
</tr>
<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><codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">DMDev</code><spanclass="sig-paren">(</span><em>dev</em>, <em>size</em>, <em>name=None</em><spanclass="sig-paren">)</span><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><codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">LoopDev</code><spanclass="sig-paren">(</span><em>filename</em>, <em>size=None</em><spanclass="sig-paren">)</span><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><codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">Mount</code><spanclass="sig-paren">(</span><em>dev</em>, <em>opts=''</em>, <em>mnt=None</em><spanclass="sig-paren">)</span><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><codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">PartitionMount</code><spanclass="sig-paren">(</span><em>disk_img</em>, <em>mount_ok=None</em>, <em>submount=None</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">compress</code><spanclass="sig-paren">(</span><em>command</em>, <em>rootdir</em>, <em>outfile</em>, <em>compression='xz'</em>, <em>compressargs=None</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">copytree</code><spanclass="sig-paren">(</span><em>src</em>, <em>dest</em>, <em>preserve=True</em><spanclass="sig-paren">)</span><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)
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">default_image_name</code><spanclass="sig-paren">(</span><em>compression</em>, <em>basename</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/imgutils.html#default_image_name"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.default_image_name"title="Permalink to this definition">¶</a></dt>
<dd><p>Return a default image name with the correct suffix for the compression type.</p>
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">dm_attach</code><spanclass="sig-paren">(</span><em>dev</em>, <em>size</em>, <em>name=None</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">dm_detach</code><spanclass="sig-paren">(</span><em>dev</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">do_grafts</code><spanclass="sig-paren">(</span><em>grafts</em>, <em>dest</em>, <em>preserve=True</em><spanclass="sig-paren">)</span><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>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.estimate_size">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">estimate_size</code><spanclass="sig-paren">(</span><em>rootdir</em>, <em>graft=None</em>, <em>fstype=None</em>, <em>blocksize=4096</em>, <em>overhead=256</em><spanclass="sig-paren">)</span><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>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.get_loop_name">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">get_loop_name</code><spanclass="sig-paren">(</span><em>path</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">loop_attach</code><spanclass="sig-paren">(</span><em>outfile</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">loop_detach</code><spanclass="sig-paren">(</span><em>loopdev</em><spanclass="sig-paren">)</span><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.loop_waitfor">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">loop_waitfor</code><spanclass="sig-paren">(</span><em>loop_dev</em>, <em>outfile</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/imgutils.html#loop_waitfor"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.loop_waitfor"title="Permalink to this definition">¶</a></dt>
<dd><p>Make sure the loop device is attached to the outfile.</p>
<p>It seems that on rare occasions losetup can return before the /dev/loopX is
ready for use, causing problems with mkfs. This tries to make sure that the
loop device really is associated with the backing file before continuing.</p>
<p>Raise RuntimeError if it isn’t setup after 5 tries.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkbtrfsimg">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">mkbtrfsimg</code><spanclass="sig-paren">(</span><em>rootdir</em>, <em>outfile</em>, <em>size=None</em>, <em>label=''</em>, <em>mountargs=''</em>, <em>graft=None</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">mkcpio</code><spanclass="sig-paren">(</span><em>rootdir</em>, <em>outfile</em>, <em>compression='xz'</em>, <em>compressargs=None</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">mkdosimg</code><spanclass="sig-paren">(</span><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><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">mkext4img</code><spanclass="sig-paren">(</span><em>rootdir</em>, <em>outfile</em>, <em>size=None</em>, <em>label=''</em>, <em>mountargs=''</em>, <em>graft=None</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">mkfsimage</code><spanclass="sig-paren">(</span><em>fstype</em>, <em>rootdir</em>, <em>outfile</em>, <em>size=None</em>, <em>mkfsargs=None</em>, <em>mountargs=''</em>, <em>graft=None</em><spanclass="sig-paren">)</span><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>
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">mkfsimage_from_disk</code><spanclass="sig-paren">(</span><em>diskimage</em>, <em>fsimage</em>, <em>img_size=None</em>, <em>label='Anaconda'</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkfsimage_from_disk"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkfsimage_from_disk"title="Permalink to this definition">¶</a></dt>
<dd><p>Copy the / partition of a partitioned disk image to an un-partitioned
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>diskimage</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – The full path to partitioned disk image with a /</li>
<li><strong>fsimage</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – The full path of the output fs image file</li>
<li><strong>img_size</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.6)"><em>int</em></a>) – Optional size of the fsimage in MiB or None to make
it as small as possible</li>
<li><strong>label</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – The label to apply to the image. Defaults to “Anaconda”</li>
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">mkhfsimg</code><spanclass="sig-paren">(</span><em>rootdir</em>, <em>outfile</em>, <em>size=None</em>, <em>label=''</em>, <em>mountargs=''</em>, <em>graft=None</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">mkqcow2</code><spanclass="sig-paren">(</span><em>outfile</em>, <em>size</em>, <em>options=None</em><spanclass="sig-paren">)</span><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.mkqemu_img">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">mkqemu_img</code><spanclass="sig-paren">(</span><em>outfile</em>, <em>size</em>, <em>options=None</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkqemu_img"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkqemu_img"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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">mkrootfsimg</code><spanclass="sig-paren">(</span><em>rootdir</em>, <em>outfile</em>, <em>label</em>, <em>size=2</em>, <em>sysroot=''</em><spanclass="sig-paren">)</span><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.6)"><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.6)"><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">mksparse</code><spanclass="sig-paren">(</span><em>outfile</em>, <em>size</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">mksquashfs</code><spanclass="sig-paren">(</span><em>rootdir</em>, <em>outfile</em>, <em>compression='default'</em>, <em>compressargs=None</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">mktar</code><spanclass="sig-paren">(</span><em>rootdir</em>, <em>outfile</em>, <em>compression='xz'</em>, <em>compressargs=None</em>, <em>selinux=True</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">mount</code><spanclass="sig-paren">(</span><em>dev</em>, <em>opts=''</em>, <em>mnt=None</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">round_to_blocks</code><spanclass="sig-paren">(</span><em>size</em>, <em>blocksize</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.imgutils.</code><codeclass="descname">umount</code><spanclass="sig-paren">(</span><em>mnt</em>, <em>lazy=False</em>, <em>maxretry=3</em>, <em>retrysleep=1.0</em>, <em>delete=True</em><spanclass="sig-paren">)</span><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.
<spanid="pylorax-installer-module"></span><h2>pylorax.installer module<aclass="headerlink"href="#module-pylorax.installer"title="Permalink to this headline">¶</a></h2>
<dlclass="exception">
<dtid="pylorax.installer.InstallError">
<emclass="property">exception </em><codeclass="descclassname">pylorax.installer.</code><codeclass="descname">InstallError</code><aclass="reference internal"href="_modules/pylorax/installer.html#InstallError"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.installer.InstallError"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">QEMU_CMDS</code><emclass="property"> = {'aarch64': 'qemu-system-aarch64', 'arm': 'qemu-system-arm', 'i386': 'qemu-system-i386', 'ppc': 'qemu-system-ppc', 'ppc64': 'qemu-system-ppc64', 'x86_64': 'qemu-system-x86_64'}</em><aclass="headerlink"href="#pylorax.installer.QEMUInstall.QEMU_CMDS"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="function">
<dtid="pylorax.installer.anaconda_cleanup">
<codeclass="descclassname">pylorax.installer.</code><codeclass="descname">anaconda_cleanup</code><spanclass="sig-paren">(</span><em>dirinstall_path</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/installer.html#anaconda_cleanup"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.installer.anaconda_cleanup"title="Permalink to this definition">¶</a></dt>
<dd><p>Cleanup any leftover mounts from anaconda</p>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body">True if cleanups were successful. False if any of them failed.</td>
</tr>
</tbody>
</table>
<p>If anaconda crashes it may leave things mounted under this path. It will
typically be set to /mnt/sysimage/</p>
<p>Attempts to cleanup may also fail. Catch these and continue trying the
other mountpoints.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.installer.append_initrd">
<codeclass="descclassname">pylorax.installer.</code><codeclass="descname">append_initrd</code><spanclass="sig-paren">(</span><em>initrd</em>, <em>files</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/installer.html#append_initrd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.installer.append_initrd"title="Permalink to this definition">¶</a></dt>
<li><strong>initrd</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Path to initrd</li>
<li><strong>files</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#list"title="(in Python v3.6)"><em>list</em></a>) – list of file paths to add</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">Path to a new initrd</p>
<codeclass="descclassname">pylorax.installer.</code><codeclass="descname">create_vagrant_metadata</code><spanclass="sig-paren">(</span><em>path</em>, <em>size=0</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/installer.html#create_vagrant_metadata"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.installer.create_vagrant_metadata"title="Permalink to this definition">¶</a></dt>
<dd><p>Create a default Vagrant metadata.json file</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>path</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Path to metadata.json file</li>
<li><strong>size</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.6)"><em>int</em></a>) – Disk size in MiB</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.installer.find_free_port">
<codeclass="descclassname">pylorax.installer.</code><codeclass="descname">find_free_port</code><spanclass="sig-paren">(</span><em>start=5900</em>, <em>end=5999</em>, <em>host='127.0.0.1'</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/installer.html#find_free_port"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.installer.find_free_port"title="Permalink to this definition">¶</a></dt>
<li><strong>start</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.6)"><em>int</em></a>) – Starting port number</li>
<li><strong>end</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.6)"><em>int</em></a>) – Ending port number</li>
<li><strong>host</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Host IP to search</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">First free port or -1 if none found</p>
<codeclass="descclassname">pylorax.installer.</code><codeclass="descname">novirt_install</code><spanclass="sig-paren">(</span><em>opts</em>, <em>disk_img</em>, <em>disk_size</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/installer.html#novirt_install"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.installer.novirt_install"title="Permalink to this definition">¶</a></dt>
<dd><p>Use Anaconda to install to a disk image</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>opts</strong> (<em>argparse options</em>) – options passed to livemedia-creator</li>
<li><strong>disk_img</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – The full path to the disk image to be created</li>
<li><strong>disk_size</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.6)"><em>int</em></a>) – The size of the disk_img in MiB</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>This method runs anaconda to create the image and then based on the opts
passed creates a qemu disk image or tarfile.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.installer.novirt_log_check">
<codeclass="descclassname">pylorax.installer.</code><codeclass="descname">novirt_log_check</code><spanclass="sig-paren">(</span><em>log_check</em>, <em>proc</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/installer.html#novirt_log_check"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.installer.novirt_log_check"title="Permalink to this definition">¶</a></dt>
<dd><p>Check to see if there has been an error in the logs</p>
<codeclass="descclassname">pylorax.installer.</code><codeclass="descname">update_vagrant_metadata</code><spanclass="sig-paren">(</span><em>path</em>, <em>size</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/installer.html#update_vagrant_metadata"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.installer.update_vagrant_metadata"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>path</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Path to metadata.json file</li>
<li><strong>size</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.6)"><em>int</em></a>) – Disk size in MiB</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>This function makes sure that the provider, format and virtual size of the
metadata file are set correctly. All other values are left untouched.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.installer.virt_install">
<codeclass="descclassname">pylorax.installer.</code><codeclass="descname">virt_install</code><spanclass="sig-paren">(</span><em>opts</em>, <em>install_log</em>, <em>disk_img</em>, <em>disk_size</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax/installer.html#virt_install"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.installer.virt_install"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><ulclass="first last simple">
<li><strong>opts</strong> (<em>argparse options</em>) – options passed to livemedia-creator</li>
<li><strong>install_log</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – The path to write the log from qemu</li>
<li><strong>disk_img</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – The full path to the disk image to be created</li>
<li><strong>disk_size</strong> (<aclass="reference external"href="https://docs.python.org/3/library/functions.html#int"title="(in Python v3.6)"><em>int</em></a>) – The size of the disk_img in MiB</li>
</ul>
</td>
</tr>
</tbody>
</table>
<p>This uses qemu with a boot.iso and a kickstart to create a disk
image and then optionally, based on the opts passed, creates tarfile.</p>
<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><codeclass="descclassname">pylorax.ltmpl.</code><codeclass="descname">LoraxTemplate</code><spanclass="sig-paren">(</span><em>directories=None</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">parse</code><spanclass="sig-paren">(</span><em>template_file</em>, <em>variables</em><spanclass="sig-paren">)</span><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><codeclass="descclassname">pylorax.ltmpl.</code><codeclass="descname">LoraxTemplateRunner</code><spanclass="sig-paren">(</span><em>inroot</em>, <em>outroot</em>, <em>dbo=None</em>, <em>fatalerrors=True</em>, <em>templatedir=None</em>, <em>defaults=None</em><spanclass="sig-paren">)</span><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>
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">
<codeclass="descname">append</code><spanclass="sig-paren">(</span><em>filename</em>, <em>data</em><spanclass="sig-paren">)</span><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
<codeclass="descname">chmod</code><spanclass="sig-paren">(</span><em>fileglob</em>, <em>mode</em><spanclass="sig-paren">)</span><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">
<codeclass="descname">copy</code><spanclass="sig-paren">(</span><em>src</em>, <em>dest</em><spanclass="sig-paren">)</span><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
<codeclass="descname">createaddrsize</code><spanclass="sig-paren">(</span><em>addr</em>, <em>src</em>, <em>dest</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">hardlink</code><spanclass="sig-paren">(</span><em>src</em>, <em>dest</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">install</code><spanclass="sig-paren">(</span><em>srcglob</em>, <em>dest</em><spanclass="sig-paren">)</span><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.
<codeclass="descname">installimg</code><spanclass="sig-paren">(</span><em>*args</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">installinitrd</code><spanclass="sig-paren">(</span><em>section</em>, <em>src</em>, <em>dest</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">installkernel</code><spanclass="sig-paren">(</span><em>section</em>, <em>src</em>, <em>dest</em><spanclass="sig-paren">)</span><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
<codeclass="descname">installpkg</code><spanclass="sig-paren">(</span><em>*pkgs</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">installupgradeinitrd</code><spanclass="sig-paren">(</span><em>section</em>, <em>src</em>, <em>dest</em><spanclass="sig-paren">)</span><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">
<codeclass="descname">log</code><spanclass="sig-paren">(</span><em>msg</em><spanclass="sig-paren">)</span><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!
<codeclass="descname">mkdir</code><spanclass="sig-paren">(</span><em>*dirs</em><spanclass="sig-paren">)</span><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">
<codeclass="descname">move</code><spanclass="sig-paren">(</span><em>src</em>, <em>dest</em><spanclass="sig-paren">)</span><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">
<codeclass="descname">remove</code><spanclass="sig-paren">(</span><em>*fileglobs</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">removefrom</code><spanclass="sig-paren">(</span><em>pkg</em>, <em>*globs</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">removekmod</code><spanclass="sig-paren">(</span><em>*globs</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">removepkg</code><spanclass="sig-paren">(</span><em>*pkgs</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">replace</code><spanclass="sig-paren">(</span><em>pat</em>, <em>repl</em>, <em>*fileglobs</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">run</code><spanclass="sig-paren">(</span><em>templatefile</em>, <em>**variables</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">run_pkg_transaction</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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">
<codeclass="descname">runcmd</code><spanclass="sig-paren">(</span><em>*cmdlist</em><spanclass="sig-paren">)</span><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
<codeclass="descname">symlink</code><spanclass="sig-paren">(</span><em>target</em>, <em>dest</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">systemctl</code><spanclass="sig-paren">(</span><em>cmd</em>, <em>*units</em><spanclass="sig-paren">)</span><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.
<codeclass="descname">treeinfo</code><spanclass="sig-paren">(</span><em>section</em>, <em>key</em>, <em>*valuetoks</em><spanclass="sig-paren">)</span><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
<codeclass="descclassname">pylorax.ltmpl.</code><codeclass="descname">brace_expand</code><spanclass="sig-paren">(</span><em>s</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.ltmpl.</code><codeclass="descname">rexists</code><spanclass="sig-paren">(</span><em>pathname</em>, <em>root=''</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.ltmpl.</code><codeclass="descname">rglob</code><spanclass="sig-paren">(</span><em>pathname</em>, <em>root='/'</em>, <em>fatal=False</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.ltmpl.</code><codeclass="descname">split_and_expand</code><spanclass="sig-paren">(</span><em>line</em><spanclass="sig-paren">)</span><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>
<dd></dd></dl>
</div>
<divclass="section"id="module-pylorax.monitor">
<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><codeclass="descclassname">pylorax.monitor.</code><codeclass="descname">LogMonitor</code><spanclass="sig-paren">(</span><em>log_path=None</em>, <em>host='localhost'</em>, <em>port=0</em>, <em>timeout=None</em><spanclass="sig-paren">)</span><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">
<codeclass="descname">shutdown</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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><codeclass="descclassname">pylorax.monitor.</code><codeclass="descname">LogRequestHandler</code><spanclass="sig-paren">(</span><em>request</em>, <em>client_address</em>, <em>server</em><spanclass="sig-paren">)</span><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">
<codeclass="descname">finish</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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">
<codeclass="descname">handle</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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
<codeclass="descname">iserror</code><spanclass="sig-paren">(</span><em>line</em><spanclass="sig-paren">)</span><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.6)"><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">
<codeclass="descname">setup</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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><codeclass="descclassname">pylorax.monitor.</code><codeclass="descname">LogServer</code><spanclass="sig-paren">(</span><em>log_path</em>, <em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">log_check</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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>
<codeclass="descname">timeout</code><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><codeclass="descclassname">pylorax.mount.</code><codeclass="descname">IsoMountpoint</code><spanclass="sig-paren">(</span><em>iso_path</em>, <em>initrd_path=None</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">get_iso_label</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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">
<codeclass="descname">umount</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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>
<dd><p>Unmount the iso</p>
</dd></dl>
</dd></dl>
</div>
<divclass="section"id="module-pylorax.output">
<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">
<codeclass="descclassname">pylorax.sysutils.</code><codeclass="descname">joinpaths</code><spanclass="sig-paren">(</span><em>*args</em>, <em>**kwargs</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.sysutils.</code><codeclass="descname">touch</code><spanclass="sig-paren">(</span><em>fname</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.sysutils.</code><codeclass="descname">replace</code><spanclass="sig-paren">(</span><em>fname</em>, <em>find</em>, <em>sub</em><spanclass="sig-paren">)</span><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_">
<codeclass="descclassname">pylorax.sysutils.</code><codeclass="descname">chown_</code><spanclass="sig-paren">(</span><em>path</em>, <em>user=None</em>, <em>group=None</em>, <em>recursive=False</em><spanclass="sig-paren">)</span><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_">
<codeclass="descclassname">pylorax.sysutils.</code><codeclass="descname">chmod_</code><spanclass="sig-paren">(</span><em>path</em>, <em>mode</em>, <em>recursive=False</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.sysutils.</code><codeclass="descname">remove</code><spanclass="sig-paren">(</span><em>target</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.sysutils.</code><codeclass="descname">linktree</code><spanclass="sig-paren">(</span><em>src</em>, <em>dst</em><spanclass="sig-paren">)</span><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><codeclass="descclassname">pylorax.treebuilder.</code><codeclass="descname">RuntimeBuilder</code><spanclass="sig-paren">(</span><em>product</em>, <em>arch</em>, <em>dbo</em>, <em>templatedir=None</em>, <em>installpkgs=None</em>, <em>excludepkgs=None</em>, <em>add_templates=None</em>, <em>add_template_vars=None</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">cleanup</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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>
<codeclass="descname">create_runtime</code><spanclass="sig-paren">(</span><em>outfile='/var/tmp/squashfs.img'</em>, <em>compression='xz'</em>, <em>compressargs=None</em>, <em>size=2</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">finished</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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>
<codeclass="descname">generate_module_data</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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>
<codeclass="descname">install</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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>
<codeclass="descname">postinstall</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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>
<codeclass="descname">verify</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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>
<codeclass="descname">writepkglists</code><spanclass="sig-paren">(</span><em>pkglistdir</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">writepkgsizes</code><spanclass="sig-paren">(</span><em>pkgsizefile</em><spanclass="sig-paren">)</span><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><codeclass="descclassname">pylorax.treebuilder.</code><codeclass="descname">TreeBuilder</code><spanclass="sig-paren">(</span><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><spanclass="sig-paren">)</span><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">
<codeclass="descname">build</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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>
<codeclass="descname">copy_dracut_hooks</code><spanclass="sig-paren">(</span><em>hooks</em><spanclass="sig-paren">)</span><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
<codeclass="descname">dracut_hooks_path</code><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>
<codeclass="descname">implantisomd5</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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">
<codeclass="descname">kernels</code><aclass="headerlink"href="#pylorax.treebuilder.TreeBuilder.kernels"title="Permalink to this definition">¶</a></dt>
<codeclass="descname">rebuild_initrds</code><spanclass="sig-paren">(</span><em>add_args=None</em>, <em>backup=''</em>, <em>prefix=''</em><spanclass="sig-paren">)</span><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>
<p>If the initrd doesn’t exist its name will be created based on the
name of the kernel.</p>
</dd></dl>
</dd></dl>
<dlclass="function">
<dtid="pylorax.treebuilder.findkernels">
<codeclass="descclassname">pylorax.treebuilder.</code><codeclass="descname">findkernels</code><spanclass="sig-paren">(</span><em>root='/'</em>, <em>kdir='boot'</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.treebuilder.</code><codeclass="descname">generate_module_info</code><spanclass="sig-paren">(</span><em>moddir</em>, <em>outfile=None</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.treebuilder.</code><codeclass="descname">string_lower</code><spanclass="sig-paren">(</span><em>string</em><spanclass="sig-paren">)</span><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">
<codeclass="descclassname">pylorax.treebuilder.</code><codeclass="descname">udev_escape</code><spanclass="sig-paren">(</span><em>label</em><spanclass="sig-paren">)</span><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><codeclass="descclassname">pylorax.treeinfo.</code><codeclass="descname">TreeInfo</code><spanclass="sig-paren">(</span><em>product</em>, <em>version</em>, <em>variant</em>, <em>basearch</em>, <em>packagedir=''</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">add_section</code><spanclass="sig-paren">(</span><em>section</em>, <em>data</em><spanclass="sig-paren">)</span><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">
<codeclass="descname">write</code><spanclass="sig-paren">(</span><em>outfile</em><spanclass="sig-paren">)</span><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><codeclass="descclassname">pylorax.</code><codeclass="descname">ArchData</code><spanclass="sig-paren">(</span><em>buildarch</em><spanclass="sig-paren">)</span><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>
<codeclass="descname">bcj_arch</code><emclass="property"> = {'arm': 'arm', 'armhfp': 'arm', 'i386': 'x86', 'ppc': 'powerpc', 'ppc64': 'powerpc', 'ppc64le': 'powerpc', 'x86_64': 'x86'}</em><aclass="headerlink"href="#pylorax.ArchData.bcj_arch"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="attribute">
<dtid="pylorax.ArchData.lib64_arches">
<codeclass="descname">lib64_arches</code><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><codeclass="descclassname">pylorax.</code><codeclass="descname">Lorax</code><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>
<codeclass="descname">configure</code><spanclass="sig-paren">(</span><em>conf_file='/etc/lorax/lorax.conf'</em><spanclass="sig-paren">)</span><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">
<codeclass="descname">init_file_logging</code><spanclass="sig-paren">(</span><em>logdir</em>, <em>logname='pylorax.log'</em><spanclass="sig-paren">)</span><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">
<codeclass="descname">init_stream_logging</code><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><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>
<codeclass="descname">templatedir</code><aclass="headerlink"href="#pylorax.Lorax.templatedir"title="Permalink to this definition">¶</a></dt>
<dd><p>Find the template directory.</p>
<p>Pick the first directory under sharedir/templates.d/ if it exists.
Otherwise use the sharedir</p>
</dd></dl>
</dd></dl>
<dlclass="function">
<dtid="pylorax.find_templates">
<codeclass="descclassname">pylorax.</code><codeclass="descname">find_templates</code><spanclass="sig-paren">(</span><em>templatedir='/usr/share/lorax'</em><spanclass="sig-paren">)</span><aclass="reference internal"href="_modules/pylorax.html#find_templates"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.find_templates"title="Permalink to this definition">¶</a></dt>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>templatedir</strong> (<aclass="reference external"href="https://docs.python.org/3/library/stdtypes.html#str"title="(in Python v3.6)"><em>str</em></a>) – Top directory to search for templates</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body">Path to templates</td>
<codeclass="descclassname">pylorax.</code><codeclass="descname">get_buildarch</code><spanclass="sig-paren">(</span><em>dbo</em><spanclass="sig-paren">)</span><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>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.setup_logging">
<codeclass="descclassname">pylorax.</code><codeclass="descname">setup_logging</code><spanclass="sig-paren">(</span><em>logfile</em>, <em>theLogger</em><spanclass="sig-paren">)</span><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/rtfd/sphinx_rtd_theme">theme</a> provided by <ahref="https://readthedocs.org">Read the Docs</a>.