<h2><aclass="reference internal"href="#module-pylorax"title="pylorax"><ttclass="xref py py-mod docutils literal"><spanclass="pre">pylorax</span></tt></a> Package<aclass="headerlink"href="#id1"title="Permalink to this headline">¶</a></h2>
<emclass="property">class </em><ttclass="descclassname">pylorax.</tt><ttclass="descname">ArchData</tt><big>(</big><em>buildarch</em><big>)</big><aclass="reference internal"href="_modules/pylorax.html#ArchData"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ArchData"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><ttclass="descclassname">pylorax.</tt><ttclass="descname">Lorax</tt><aclass="reference internal"href="_modules/pylorax.html#Lorax"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.Lorax"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">configure</tt><big>(</big><em>conf_file='/etc/lorax/lorax.conf'</em><big>)</big><aclass="reference internal"href="_modules/pylorax.html#Lorax.configure"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.Lorax.configure"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">init_file_logging</tt><big>(</big><em>logdir</em>, <em>logname='pylorax.log'</em><big>)</big><aclass="reference internal"href="_modules/pylorax.html#Lorax.init_file_logging"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.Lorax.init_file_logging"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">init_stream_logging</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax.html#Lorax.init_stream_logging"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.Lorax.init_stream_logging"title="Permalink to this definition">¶</a></dt>
<ttclass="descclassname">pylorax.</tt><ttclass="descname">get_buildarch</tt><big>(</big><em>ybo</em><big>)</big><aclass="reference internal"href="_modules/pylorax.html#get_buildarch"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.get_buildarch"title="Permalink to this definition">¶</a></dt>
<spanid="base-module"></span><h2><ttclass="xref py py-mod docutils literal"><spanclass="pre">base</span></tt> Module<aclass="headerlink"href="#module-pylorax.base"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.base.BaseLoraxClass">
<emclass="property">class </em><ttclass="descclassname">pylorax.base.</tt><ttclass="descname">BaseLoraxClass</tt><aclass="reference internal"href="_modules/pylorax/base.html#BaseLoraxClass"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.BaseLoraxClass"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">pcritical</tt><big>(</big><em>msg</em>, <em>fobj=<open file '<stdout>'</em>, <em>mode 'w' at 0x7f4f7f21e150></em><big>)</big><aclass="reference internal"href="_modules/pylorax/base.html#BaseLoraxClass.pcritical"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.BaseLoraxClass.pcritical"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">pdebug</tt><big>(</big><em>msg</em>, <em>fobj=<open file '<stdout>'</em>, <em>mode 'w' at 0x7f4f7f21e150></em><big>)</big><aclass="reference internal"href="_modules/pylorax/base.html#BaseLoraxClass.pdebug"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.BaseLoraxClass.pdebug"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">perror</tt><big>(</big><em>msg</em>, <em>fobj=<open file '<stdout>'</em>, <em>mode 'w' at 0x7f4f7f21e150></em><big>)</big><aclass="reference internal"href="_modules/pylorax/base.html#BaseLoraxClass.perror"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.BaseLoraxClass.perror"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">pinfo</tt><big>(</big><em>msg</em>, <em>fobj=<open file '<stdout>'</em>, <em>mode 'w' at 0x7f4f7f21e150></em><big>)</big><aclass="reference internal"href="_modules/pylorax/base.html#BaseLoraxClass.pinfo"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.BaseLoraxClass.pinfo"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">pwarning</tt><big>(</big><em>msg</em>, <em>fobj=<open file '<stdout>'</em>, <em>mode 'w' at 0x7f4f7f21e150></em><big>)</big><aclass="reference internal"href="_modules/pylorax/base.html#BaseLoraxClass.pwarning"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.BaseLoraxClass.pwarning"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><ttclass="descclassname">pylorax.base.</tt><ttclass="descname">DataHolder</tt><big>(</big><em>**kwargs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/base.html#DataHolder"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.DataHolder"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">copy</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/base.html#DataHolder.copy"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.base.DataHolder.copy"title="Permalink to this definition">¶</a></dt>
<spanid="buildstamp-module"></span><h2><ttclass="xref py py-mod docutils literal"><spanclass="pre">buildstamp</span></tt> Module<aclass="headerlink"href="#module-pylorax.buildstamp"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.buildstamp.BuildStamp">
<emclass="property">class </em><ttclass="descclassname">pylorax.buildstamp.</tt><ttclass="descname">BuildStamp</tt><big>(</big><em>product</em>, <em>version</em>, <em>bugurl</em>, <em>isfinal</em>, <em>buildarch</em><big>)</big><aclass="reference internal"href="_modules/pylorax/buildstamp.html#BuildStamp"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.buildstamp.BuildStamp"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">write</tt><big>(</big><em>outfile</em><big>)</big><aclass="reference internal"href="_modules/pylorax/buildstamp.html#BuildStamp.write"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.buildstamp.BuildStamp.write"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<divclass="section"id="module-pylorax.creator">
<spanid="creator-module"></span><h2><ttclass="xref py py-mod docutils literal"><spanclass="pre">creator</span></tt> Module<aclass="headerlink"href="#module-pylorax.creator"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.creator.KernelInfo">
<emclass="property">class </em><ttclass="descclassname">pylorax.creator.</tt><ttclass="descname">KernelInfo</tt><big>(</big><em>boot_dir</em><big>)</big><aclass="reference internal"href="_modules/pylorax/creator.html#KernelInfo"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.KernelInfo"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">get_kernel_arch</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/creator.html#KernelInfo.get_kernel_arch"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.KernelInfo.get_kernel_arch"title="Permalink to this definition">¶</a></dt>
<dd><p>Get the arch of the first kernel in boot_dir</p>
<p>Defaults to i386</p>
</dd></dl>
<dlclass="method">
<dtid="pylorax.creator.KernelInfo.get_kernels">
<ttclass="descname">get_kernels</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/creator.html#KernelInfo.get_kernels"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.KernelInfo.get_kernels"title="Permalink to this definition">¶</a></dt>
<dd><p>Get a list of the kernels in the boot_dir</p>
<p>Examine the vmlinuz-* versions and return a list of them</p>
<p>Ignore any with -rescue- in them, these are dracut rescue images.
The user shoud add
-dracut-config-rescue
to the kickstart to remove them, but catch it here as well.</p>
</dd></dl>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.create_pxe_config">
<ttclass="descclassname">pylorax.creator.</tt><ttclass="descname">create_pxe_config</tt><big>(</big><em>template</em>, <em>images_dir</em>, <em>live_image_name</em>, <em>add_args=None</em><big>)</big><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/2/library/functions.html#str"title="(in Python v2.7)"><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/2/library/functions.html#str"title="(in Python v2.7)"><em>str</em></a>) – Name of live rootfs image file</li>
<li><strong>add_args</strong> (<em>list</em>) – Arguments to be added to initrd= pxe config</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.find_ostree_root">
<ttclass="descclassname">pylorax.creator.</tt><ttclass="descname">find_ostree_root</tt><big>(</big><em>phys_root</em><big>)</big><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"><td> </td><tdclass="field-body">More than one deployment roots were found</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.get_ks_disk_size">
<ttclass="descclassname">pylorax.creator.</tt><ttclass="descname">get_ks_disk_size</tt><big>(</big><em>ks</em><big>)</big><aclass="reference internal"href="_modules/pylorax/creator.html#get_ks_disk_size"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.get_ks_disk_size"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the size of the kickstart’s disk partitions</p>
<trclass="field-odd field"><thclass="field-name">Parameters:</th><tdclass="field-body"><strong>ks</strong> (<em>Kickstart object</em>) – The kickstart</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body">The size of the disk, in GiB</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.is_image_mounted">
<ttclass="descclassname">pylorax.creator.</tt><ttclass="descname">is_image_mounted</tt><big>(</big><em>disk_img</em><big>)</big><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>Return True if the disk_img is mounted</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.make_appliance">
<ttclass="descclassname">pylorax.creator.</tt><ttclass="descname">make_appliance</tt><big>(</big><em>disk_img</em>, <em>name</em>, <em>template</em>, <em>outfile</em>, <em>networks=None</em>, <em>ram=1024</em>, <em>vcpus=1</em>, <em>arch=None</em>, <em>title='Linux'</em>, <em>project='Linux'</em>, <em>releasever='7'</em><big>)</big><aclass="reference internal"href="_modules/pylorax/creator.html#make_appliance"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.creator.make_appliance"title="Permalink to this definition">¶</a></dt>
<dd><p>Generate an appliance description file</p>
<p>disk_img Full path of the disk image
name Name of the appliance, passed to the template
template Full path of Mako template
outfile Full path of file to write, using template
networks List of networks from the kickstart
ram Ram, in MB, passed to template. Default is 1024
vcpus CPUs, passed to template. Default is 1
arch CPU architecture. Default is ‘x86_64’
title Title, passed to template. Default is ‘Linux’
project Project, passed to template. Default is ‘Linux’
releasever Release version, passed to template. Default is 17</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.make_image">
<ttclass="descclassname">pylorax.creator.</tt><ttclass="descname">make_image</tt><big>(</big><em>opts</em>, <em>ks</em>, <em>callback_func=None</em><big>)</big><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>
<dd><p>Install to an image</p>
<p>Use virt or anaconda to install to an image.</p>
<p>Returns the full path of of the image created.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.make_live_images">
<ttclass="descclassname">pylorax.creator.</tt><ttclass="descname">make_live_images</tt><big>(</big><em>opts</em>, <em>work_dir</em>, <em>root_dir</em>, <em>rootfs_image=None</em>, <em>size=None</em><big>)</big><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/2/library/functions.html#str"title="(in Python v2.7)"><em>str</em></a>) – Directory for storing results</li>
<li><strong>root_dir</strong> (<aclass="reference external"href="https://docs.python.org/2/library/functions.html#str"title="(in Python v2.7)"><em>str</em></a>) – Root directory of live filesystem tree</li>
<li><strong>rootfs_image</strong> (<aclass="reference external"href="https://docs.python.org/2/library/functions.html#str"title="(in Python v2.7)"><em>str</em></a>) – Path to live rootfs image to be used</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first">Path of directory with created images</p>
<ttclass="descclassname">pylorax.creator.</tt><ttclass="descname">make_livecd</tt><big>(</big><em>opts</em>, <em>mount_dir</em>, <em>work_dir</em><big>)</big><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>
<dlclass="docutils">
<dt>This uses wwood’s squashfs live initramfs method:</dt>
<dd><ulclass="first last simple">
<li>put the real / into LiveOS/rootfs.img</li>
<li>make a squashfs of the LiveOS/rootfs.img tree</li>
<li>make a simple initramfs with the squashfs.img and /etc/cmdline in it</li>
<li>make a cpio of that tree</li>
<li>append the squashfs.cpio to a dracut initramfs for each kernel installed</li>
</ul>
</dd>
</dl>
<p>Then on boot dracut reads /etc/cmdline which points to the squashfs.img
mounts that and then mounts LiveOS/rootfs.img as /</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.make_runtime">
<ttclass="descclassname">pylorax.creator.</tt><ttclass="descname">make_runtime</tt><big>(</big><em>opts</em>, <em>mount_dir</em>, <em>work_dir</em><big>)</big><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>
<p>Result is in work_dir+RUNTIME</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.creator.make_squashfs">
<ttclass="descclassname">pylorax.creator.</tt><ttclass="descname">make_squashfs</tt><big>(</big><em>disk_img</em>, <em>work_dir</em>, <em>compression='xz'</em><big>)</big><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>Take disk_img and put it into LiveOS/rootfs.img and squashfs this
<ttclass="descclassname">pylorax.creator.</tt><ttclass="descname">mount_boot_part_over_root</tt><big>(</big><em>img_mount</em><big>)</big><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">
<ttclass="descclassname">pylorax.creator.</tt><ttclass="descname">rebuild_initrds_for_live</tt><big>(</big><em>opts</em>, <em>sys_root_dir</em>, <em>results_dir</em><big>)</big><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/2/library/functions.html#str"title="(in Python v2.7)"><em>str</em></a>) – Path to root of the system</li>
<li><strong>results_dir</strong> (<aclass="reference external"href="https://docs.python.org/2/library/functions.html#str"title="(in Python v2.7)"><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">
<ttclass="descclassname">pylorax.creator.</tt><ttclass="descname">run_creator</tt><big>(</big><em>opts</em>, <em>callback_func=None</em><big>)</big><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 or 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>
<spanid="decorators-module"></span><h2><ttclass="xref py py-mod docutils literal"><spanclass="pre">decorators</span></tt> Module<aclass="headerlink"href="#module-pylorax.decorators"title="Permalink to this headline">¶</a></h2>
<dlclass="function">
<dtid="pylorax.decorators.singleton">
<ttclass="descclassname">pylorax.decorators.</tt><ttclass="descname">singleton</tt><big>(</big><em>cls</em><big>)</big><aclass="reference internal"href="_modules/pylorax/decorators.html#singleton"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.decorators.singleton"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
<divclass="section"id="module-pylorax.discinfo">
<spanid="discinfo-module"></span><h2><ttclass="xref py py-mod docutils literal"><spanclass="pre">discinfo</span></tt> Module<aclass="headerlink"href="#module-pylorax.discinfo"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.discinfo.DiscInfo">
<emclass="property">class </em><ttclass="descclassname">pylorax.discinfo.</tt><ttclass="descname">DiscInfo</tt><big>(</big><em>release</em>, <em>basearch</em><big>)</big><aclass="reference internal"href="_modules/pylorax/discinfo.html#DiscInfo"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.discinfo.DiscInfo"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">write</tt><big>(</big><em>outfile</em><big>)</big><aclass="reference internal"href="_modules/pylorax/discinfo.html#DiscInfo.write"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.discinfo.DiscInfo.write"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<divclass="section"id="module-pylorax.executils">
<spanid="executils-module"></span><h2><ttclass="xref py py-mod docutils literal"><spanclass="pre">executils</span></tt> Module<aclass="headerlink"href="#module-pylorax.executils"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.executils.ExecProduct">
<emclass="property">class </em><ttclass="descclassname">pylorax.executils.</tt><ttclass="descname">ExecProduct</tt><big>(</big><em>rc</em>, <em>stdout</em>, <em>stderr</em><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#ExecProduct"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.ExecProduct"title="Permalink to this definition">¶</a></dt>
<ttclass="descclassname">pylorax.executils.</tt><ttclass="descname">execConsole</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#execConsole"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.execConsole"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.executils.execWithCallback">
<ttclass="descclassname">pylorax.executils.</tt><ttclass="descname">execWithCallback</tt><big>(</big><em>command</em>, <em>argv</em>, <em>stdin=None</em>, <em>stdout=None</em>, <em>stderr=None</em>, <em>echo=True</em>, <em>callback=None</em>, <em>callback_data=None</em>, <em>root='/'</em><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#execWithCallback"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.execWithCallback"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.executils.execWithCapture">
<ttclass="descclassname">pylorax.executils.</tt><ttclass="descname">execWithCapture</tt><big>(</big><em>command</em>, <em>argv</em>, <em>stdin=None</em>, <em>stderr=None</em>, <em>root=None</em>, <em>preexec_fn=None</em>, <em>cwd=None</em>, <em>raise_err=False</em><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#execWithCapture"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.execWithCapture"title="Permalink to this definition">¶</a></dt>
<dd><p>Run an external program and capture standard out.
@param command The command to run.
@param argv A list of arguments.
@param stdin The file descriptor to read stdin from.
@param stderr The file descriptor to redirect stderr to.
@param root The directory to chroot to before running command.
@param preexec_fn function to pass to Popen
@param cwd working directory to pass to Popen
@param raise_err raise CalledProcessError when the returncode is not 0
@return The output of command from stdout.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.executils.execWithPulseProgress">
<ttclass="descclassname">pylorax.executils.</tt><ttclass="descname">execWithPulseProgress</tt><big>(</big><em>command</em>, <em>argv</em>, <em>stdin=None</em>, <em>stdout=None</em>, <em>stderr=None</em>, <em>echo=True</em>, <em>progress=None</em>, <em>root='/'</em><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#execWithPulseProgress"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.execWithPulseProgress"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.executils.execWithRedirect">
<ttclass="descclassname">pylorax.executils.</tt><ttclass="descname">execWithRedirect</tt><big>(</big><em>command</em>, <em>argv</em>, <em>stdin=None</em>, <em>stdout=None</em>, <em>stderr=None</em>, <em>root=None</em>, <em>preexec_fn=None</em>, <em>cwd=None</em>, <em>raise_err=False</em>, <em>callback_func=None</em>, <em>callback_args=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#execWithRedirect"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.execWithRedirect"title="Permalink to this definition">¶</a></dt>
<dd><p>Run an external program and redirect the output to a file.
@param command The command to run.
@param argv A list of arguments.
@param stdin The file descriptor to read stdin from.
@param stdout The file descriptor to redirect stdout to.
@param stderr The file descriptor to redirect stderr to.
@param root The directory to chroot to before running command.
@param preexec_fn function to pass to Popen
@param cwd working directory to pass to Popen
@param raise_err raise CalledProcessError when the returncode is not 0
@return The return code of command.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.executils.runcmd">
<ttclass="descclassname">pylorax.executils.</tt><ttclass="descname">runcmd</tt><big>(</big><em>cmd</em>, <em>**kwargs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#runcmd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.runcmd"title="Permalink to this definition">¶</a></dt>
<dd><p>run execWithRedirect with raise_err=True</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.executils.runcmd_output">
<ttclass="descclassname">pylorax.executils.</tt><ttclass="descname">runcmd_output</tt><big>(</big><em>cmd</em>, <em>**kwargs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#runcmd_output"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.runcmd_output"title="Permalink to this definition">¶</a></dt>
<dd><p>run execWithCapture with raise_err=True</p>
</dd></dl>
<dlclass="class">
<dtid="pylorax.executils.tee">
<emclass="property">class </em><ttclass="descclassname">pylorax.executils.</tt><ttclass="descname">tee</tt><big>(</big><em>inputdesc</em>, <em>outputdesc</em>, <em>logmethod</em>, <em>command</em><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#tee"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.tee"title="Permalink to this definition">¶</a></dt>
<p>Python reimplementation of the shell tee process, so we can
feed the pipe output into two places at the same time</p>
<dlclass="method">
<dtid="pylorax.executils.tee.run">
<ttclass="descname">run</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#tee.run"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.tee.run"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="pylorax.executils.tee.stop">
<ttclass="descname">stop</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/executils.html#tee.stop"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.executils.tee.stop"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<divclass="section"id="module-pylorax.imgutils">
<spanid="imgutils-module"></span><h2><ttclass="xref py py-mod docutils literal"><spanclass="pre">imgutils</span></tt> Module<aclass="headerlink"href="#module-pylorax.imgutils"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.imgutils.DMDev">
<emclass="property">class </em><ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">DMDev</tt><big>(</big><em>dev</em>, <em>size</em>, <em>name=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#DMDev"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.DMDev"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">LoopDev</tt><big>(</big><em>filename</em>, <em>size=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#LoopDev"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.LoopDev"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">Mount</tt><big>(</big><em>dev</em>, <em>opts=''</em>, <em>mnt=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#Mount"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.Mount"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">PartitionMount</tt><big>(</big><em>disk_img</em>, <em>mount_ok=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#PartitionMount"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.PartitionMount"title="Permalink to this definition">¶</a></dt>
<p>Mount a partitioned image file using kpartx</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.compress">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">compress</tt><big>(</big><em>command</em>, <em>rootdir</em>, <em>outfile</em>, <em>compression='xz'</em>, <em>compressargs=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#compress"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.compress"title="Permalink to this definition">¶</a></dt>
<dd><p>Make a compressed archive of the given rootdir.
command is a list of the archiver commands to run
compression should be “xz”, “gzip”, “lzma”, “bzip2”, or None.
compressargs will be used on the compression commandline.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.copytree">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">copytree</tt><big>(</big><em>src</em>, <em>dest</em>, <em>preserve=True</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#copytree"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.copytree"title="Permalink to this definition">¶</a></dt>
<dd><p>Copy a tree of files using cp -a, thus preserving modes, timestamps,
links, acls, sparse files, xattrs, selinux contexts, etc.
If preserve is False, uses cp -R (useful for modeless filesystems)
raises CalledProcessError if copy fails.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.default_image_name">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">default_image_name</tt><big>(</big><em>compression</em>, <em>basename</em><big>)</big><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>
<li><strong>basename</strong> (<aclass="reference external"href="https://docs.python.org/2/library/functions.html#str"title="(in Python v2.7)"><em>str</em></a>) – Base filename</li>
</ul>
</td>
</tr>
<trclass="field-even field"><thclass="field-name">Returns:</th><tdclass="field-body"><pclass="first last">basename with compression suffix</p>
</td>
</tr>
</tbody>
</table>
<p>If the compression is unknown it defaults to xz</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.dm_attach">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">dm_attach</tt><big>(</big><em>dev</em>, <em>size</em>, <em>name=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#dm_attach"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.dm_attach"title="Permalink to this definition">¶</a></dt>
<dd><p>Attach a devicemapper device to the given device, with the given size.
If name is None, a random name will be chosen. Returns the device name.
raises CalledProcessError if dmsetup fails.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.dm_detach">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">dm_detach</tt><big>(</big><em>dev</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#dm_detach"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.dm_detach"title="Permalink to this definition">¶</a></dt>
<dd><p>Detach the named devicemapper device. Returns False if dmsetup fails.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.do_grafts">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">do_grafts</tt><big>(</big><em>grafts</em>, <em>dest</em>, <em>preserve=True</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#do_grafts"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.do_grafts"title="Permalink to this definition">¶</a></dt>
<dd><p>Copy each of the items listed in grafts into dest.
If the key ends with ‘/’ it’s assumed to be a directory which should be
created, otherwise just the leading directories will be created.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.estimate_size">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">estimate_size</tt><big>(</big><em>rootdir</em>, <em>graft=None</em>, <em>fstype=None</em>, <em>blocksize=4096</em>, <em>overhead=128</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#estimate_size"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.estimate_size"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.get_loop_name">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">get_loop_name</tt><big>(</big><em>path</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#get_loop_name"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.get_loop_name"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the loop device associated with the path.
Raises RuntimeError if more than one loop is associated</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.loop_attach">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">loop_attach</tt><big>(</big><em>outfile</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#loop_attach"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.loop_attach"title="Permalink to this definition">¶</a></dt>
<dd><p>Attach a loop device to the given file. Return the loop device name.
Raises CalledProcessError if losetup fails.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.loop_detach">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">loop_detach</tt><big>(</big><em>loopdev</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#loop_detach"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.loop_detach"title="Permalink to this definition">¶</a></dt>
<dd><p>Detach the given loop device. Return False on failure.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.loop_waitfor">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">loop_waitfor</tt><big>(</big><em>loop_dev</em>, <em>outfile</em><big>)</big><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">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkbtrfsimg</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>size=None</em>, <em>label=''</em>, <em>mountargs=''</em>, <em>graft=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkbtrfsimg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkbtrfsimg"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkcpio">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkcpio</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>compression='xz'</em>, <em>compressargs=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkcpio"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkcpio"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkdiskfsimage">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkdiskfsimage</tt><big>(</big><em>diskimage</em>, <em>fsimage</em>, <em>label='Anaconda'</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkdiskfsimage"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkdiskfsimage"title="Permalink to this definition">¶</a></dt>
<dd><p>Copy the / partition of a partitioned disk image to an un-partitioned
disk image.</p>
<p>diskimage is the full path to partitioned disk image with a /
fsimage is the full path of the output fs image file
label is the label to apply to the image. Defaults to “Anaconda”</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkdosimg">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkdosimg</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>size=None</em>, <em>label=''</em>, <em>mountargs='shortname=winnt</em>, <em>umask=0077'</em>, <em>graft=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkdosimg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkdosimg"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkext4img">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkext4img</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>size=None</em>, <em>label=''</em>, <em>mountargs=''</em>, <em>graft=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkext4img"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkext4img"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkfsimage">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkfsimage</tt><big>(</big><em>fstype</em>, <em>rootdir</em>, <em>outfile</em>, <em>size=None</em>, <em>mkfsargs=None</em>, <em>mountargs=''</em>, <em>graft=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkfsimage"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkfsimage"title="Permalink to this definition">¶</a></dt>
fstype should be a filesystem type - “mkfs.${fstype}” must exist.
graft should be a dict: {“some/path/in/image”: “local/file/or/dir”};</p>
<blockquote>
<div>if the path ends with a ‘/’ it’s assumed to be a directory.</div></blockquote>
<p>Will raise CalledProcessError if something goes wrong.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkhfsimg">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkhfsimg</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>size=None</em>, <em>label=''</em>, <em>mountargs=''</em>, <em>graft=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkhfsimg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkhfsimg"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkqcow2">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkqcow2</tt><big>(</big><em>outfile</em>, <em>size</em>, <em>options=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkqcow2"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkqcow2"title="Permalink to this definition">¶</a></dt>
<dd><p>use qemu-img to create a file of the given size.
options is a list of options passed to qemu-img</p>
<p>Default format is qcow2, override by passing “-f”, fmt
in options.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mkrootfsimg">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mkrootfsimg</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>label</em>, <em>size=2</em>, <em>sysroot=''</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mkrootfsimg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mkrootfsimg"title="Permalink to this definition">¶</a></dt>
<li><strong>size</strong> (<aclass="reference external"href="https://docs.python.org/2/library/functions.html#int"title="(in Python v2.7)"><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/2/library/functions.html#str"title="(in Python v2.7)"><em>str</em></a>) – path to system (deployment) root relative to physical root</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mksparse">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mksparse</tt><big>(</big><em>outfile</em>, <em>size</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mksparse"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mksparse"title="Permalink to this definition">¶</a></dt>
<dd><p>use os.ftruncate to create a sparse file of the given size.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mksquashfs">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mksquashfs</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>compression='default'</em>, <em>compressargs=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mksquashfs"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mksquashfs"title="Permalink to this definition">¶</a></dt>
<dd><p>Make a squashfs image containing the given rootdir.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mktar">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mktar</tt><big>(</big><em>rootdir</em>, <em>outfile</em>, <em>compression='xz'</em>, <em>compressargs=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mktar"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mktar"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.mount">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">mount</tt><big>(</big><em>dev</em>, <em>opts=''</em>, <em>mnt=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#mount"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.mount"title="Permalink to this definition">¶</a></dt>
<dd><p>Mount the given device at the given mountpoint, using the given opts.
opts should be a comma-separated string of mount options.
if mnt is none, a temporary directory will be created and its path will be
returned.
raises CalledProcessError if mount fails.</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.round_to_blocks">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">round_to_blocks</tt><big>(</big><em>size</em>, <em>blocksize</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#round_to_blocks"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.round_to_blocks"title="Permalink to this definition">¶</a></dt>
<dd><p>If size isn’t a multiple of blocksize, round up to the next multiple</p>
</dd></dl>
<dlclass="function">
<dtid="pylorax.imgutils.umount">
<ttclass="descclassname">pylorax.imgutils.</tt><ttclass="descname">umount</tt><big>(</big><em>mnt</em>, <em>lazy=False</em>, <em>maxretry=3</em>, <em>retrysleep=1.0</em><big>)</big><aclass="reference internal"href="_modules/pylorax/imgutils.html#umount"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.imgutils.umount"title="Permalink to this definition">¶</a></dt>
<dd><p>Unmount the given mountpoint. If lazy is True, do a lazy umount (-l).
If the mount was a temporary dir created by mount, it will be deleted.
raises CalledProcessError if umount fails.</p>
</dd></dl>
</div>
<divclass="section"id="module-pylorax.installer">
<spanid="installer-module"></span><h2><ttclass="xref py py-mod docutils literal"><spanclass="pre">installer</span></tt> Module<aclass="headerlink"href="#module-pylorax.installer"title="Permalink to this headline">¶</a></h2>
<dlclass="exception">
<dtid="pylorax.installer.InstallError">
<emclass="property">exception </em><ttclass="descclassname">pylorax.installer.</tt><ttclass="descname">InstallError</tt><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>
<emclass="property">class </em><ttclass="descclassname">pylorax.installer.</tt><ttclass="descname">IsoMountpoint</tt><big>(</big><em>iso_path</em>, <em>initrd_path=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/installer.html#IsoMountpoint"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.installer.IsoMountpoint"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">get_iso_label</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/installer.html#IsoMountpoint.get_iso_label"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.installer.IsoMountpoint.get_iso_label"title="Permalink to this definition">¶</a></dt>
<dd><p>Get the iso’s label using isoinfo</p>
</dd></dl>
<dlclass="method">
<dtid="pylorax.installer.IsoMountpoint.umount">
<ttclass="descname">umount</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/installer.html#IsoMountpoint.umount"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.installer.IsoMountpoint.umount"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="pylorax.installer.VirtualInstall">
<emclass="property">class </em><ttclass="descclassname">pylorax.installer.</tt><ttclass="descname">VirtualInstall</tt><big>(</big><em>iso</em>, <em>ks_paths</em>, <em>disk_img</em>, <em>img_size=2</em>, <em>kernel_args=None</em>, <em>memory=1024</em>, <em>vnc=None</em>, <em>arch=None</em>, <em>log_check=None</em>, <em>virtio_host='127.0.0.1'</em>, <em>virtio_port=6080</em>, <em>qcow2=False</em><big>)</big><aclass="reference internal"href="_modules/pylorax/installer.html#VirtualInstall"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.installer.VirtualInstall"title="Permalink to this definition">¶</a></dt>
<p>Run virt-install using an iso and kickstart(s)</p>
<dlclass="method">
<dtid="pylorax.installer.VirtualInstall.destroy">
<ttclass="descname">destroy</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/installer.html#VirtualInstall.destroy"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.installer.VirtualInstall.destroy"title="Permalink to this definition">¶</a></dt>
<dd><p>Make sure the virt has been shut down and destroyed</p>
<p>Could use libvirt for this instead.</p>
</dd></dl>
</dd></dl>
<dlclass="function">
<dtid="pylorax.installer.novirt_install">
<ttclass="descclassname">pylorax.installer.</tt><ttclass="descname">novirt_install</tt><big>(</big><em>opts</em>, <em>disk_img</em>, <em>disk_size</em>, <em>repo_url</em>, <em>callback_func=None</em><big>)</big><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>
</dd></dl>
<dlclass="function">
<dtid="pylorax.installer.virt_install">
<ttclass="descclassname">pylorax.installer.</tt><ttclass="descname">virt_install</tt><big>(</big><em>opts</em>, <em>install_log</em>, <em>disk_img</em>, <em>disk_size</em><big>)</big><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>
<dd><p>Use virt-install to install to a disk image</p>
<p>install_log is the path to write the log from virt-install
disk_img is the full path to the final disk or filesystem image
disk_size is the size of the disk to create in GiB</p>
<spanid="logmonitor-module"></span><h2><ttclass="xref py py-mod docutils literal"><spanclass="pre">logmonitor</span></tt> Module<aclass="headerlink"href="#module-pylorax.logmonitor"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.logmonitor.LogMonitor">
<emclass="property">class </em><ttclass="descclassname">pylorax.logmonitor.</tt><ttclass="descname">LogMonitor</tt><big>(</big><em>log_path</em>, <em>host='localhost'</em>, <em>port=0</em><big>)</big><aclass="reference internal"href="_modules/pylorax/logmonitor.html#LogMonitor"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.logmonitor.LogMonitor"title="Permalink to this definition">¶</a></dt>
<p>Contains all the stuff needed to setup a thread to listen to the logs
from the virtual install</p>
<dlclass="method">
<dtid="pylorax.logmonitor.LogMonitor.shutdown">
<ttclass="descname">shutdown</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/logmonitor.html#LogMonitor.shutdown"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.logmonitor.LogMonitor.shutdown"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="pylorax.logmonitor.LogRequestHandler">
<emclass="property">class </em><ttclass="descclassname">pylorax.logmonitor.</tt><ttclass="descname">LogRequestHandler</tt><big>(</big><em>request</em>, <em>client_address</em>, <em>server</em><big>)</big><aclass="reference internal"href="_modules/pylorax/logmonitor.html#LogRequestHandler"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.logmonitor.LogRequestHandler"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">finish</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/logmonitor.html#LogRequestHandler.finish"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.logmonitor.LogRequestHandler.finish"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">handle</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/logmonitor.html#LogRequestHandler.handle"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.logmonitor.LogRequestHandler.handle"title="Permalink to this definition">¶</a></dt>
<dd><p>Handle writing incoming data to a logfile and
checking the logs for any Tracebacks or other errors that indicate
<ttclass="descname">iserror</tt><big>(</big><em>line</em><big>)</big><aclass="reference internal"href="_modules/pylorax/logmonitor.html#LogRequestHandler.iserror"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.logmonitor.LogRequestHandler.iserror"title="Permalink to this definition">¶</a></dt>
<dd><p>Check a line to see if it contains an error indicating install failure</p>
<ttclass="descname">setup</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/logmonitor.html#LogRequestHandler.setup"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.logmonitor.LogRequestHandler.setup"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="pylorax.logmonitor.LogServer">
<emclass="property">class </em><ttclass="descclassname">pylorax.logmonitor.</tt><ttclass="descname">LogServer</tt><big>(</big><em>log_path</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/logmonitor.html#LogServer"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.logmonitor.LogServer"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">log_check</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/logmonitor.html#LogServer.log_check"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.logmonitor.LogServer.log_check"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<divclass="section"id="module-pylorax.ltmpl">
<spanid="ltmpl-module"></span><h2><ttclass="xref py py-mod docutils literal"><spanclass="pre">ltmpl</span></tt> Module<aclass="headerlink"href="#module-pylorax.ltmpl"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.ltmpl.LoraxTemplate">
<emclass="property">class </em><ttclass="descclassname">pylorax.ltmpl.</tt><ttclass="descname">LoraxTemplate</tt><big>(</big><em>directories=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplate"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplate"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">parse</tt><big>(</big><em>template_file</em>, <em>variables</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplate.parse"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplate.parse"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="pylorax.ltmpl.LoraxTemplateRunner">
<emclass="property">class </em><ttclass="descclassname">pylorax.ltmpl.</tt><ttclass="descname">LoraxTemplateRunner</tt><big>(</big><em>inroot</em>, <em>outroot</em>, <em>yum_obj=None</em>, <em>fatalerrors=True</em>, <em>templatedir=None</em>, <em>defaults=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner"title="Permalink to this definition">¶</a></dt>
<li>If the first token is the name of a function, call that function
with the rest of the line as arguments</li>
</ol>
</div></blockquote>
</li>
<li><pclass="first">Parsing and execution are <em>separate</em> passes - so you can’t use the result
of a command in an %if statement (or any other control statements)!</p>
</li>
<li><pclass="first">Commands that run external programs (systemctl, gconfset) currently use
the <em>host</em>‘s copy of that program, which may cause problems if there’s a
big enough difference between the host and the image you’re modifying.</p>
</li>
<li><pclass="first">The commands are not executed under a real chroot, so absolute symlinks
will point <em>outside</em> the inroot/outroot. Be careful with symlinks!</p>
</li>
</ul>
<p>ADDING NEW COMMANDS:</p>
<ulclass="simple">
<li>Each template command is just a method of the LoraxTemplateRunner
object - so adding a new command is as easy as adding a new function.</li>
<li>Each function gets arguments that correspond to the rest of the tokens
on that line (after word splitting and brace expansion)</li>
<li>Commands should raise exceptions for errors - don’t use sys.exit()</li>
</ul>
<dlclass="method">
<dtid="pylorax.ltmpl.LoraxTemplateRunner.append">
<ttclass="descname">append</tt><big>(</big><em>filename</em>, <em>data</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.append"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.append"title="Permalink to this definition">¶</a></dt>
<dd><p>append FILE STRING
Append STRING (followed by a newline character) to FILE.
Python character escape sequences (‘n’, ‘t’, etc.) will be
<ttclass="descname">chmod</tt><big>(</big><em>fileglob</em>, <em>mode</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.chmod"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.chmod"title="Permalink to this definition">¶</a></dt>
<dd><p>chmod FILEGLOB OCTALMODE
Change the mode of all the files matching FILEGLOB to OCTALMODE.</p>
</dd></dl>
<dlclass="method">
<dtid="pylorax.ltmpl.LoraxTemplateRunner.copy">
<ttclass="descname">copy</tt><big>(</big><em>src</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.copy"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.copy"title="Permalink to this definition">¶</a></dt>
<dd><p>copy SRC DEST
Copy SRC to DEST.
If DEST is a directory, SRC will be copied inside it.
If DEST doesn’t exist, SRC will be copied to a file with
<ttclass="descname">createaddrsize</tt><big>(</big><em>addr</em>, <em>src</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.createaddrsize"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.createaddrsize"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">gconfset</tt><big>(</big><em>path</em>, <em>keytype</em>, <em>value</em>, <em>outfile=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.gconfset"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.gconfset"title="Permalink to this definition">¶</a></dt>
<dd><p>gconfset PATH KEYTYPE VALUE [OUTFILE]
Set the given gconf PATH, with type KEYTYPE, to the given value.
OUTFILE defaults to /etc/gconf/gconf.xml.defaults if not given.
Example:</p>
<blockquote>
<div>gconfset /apps/metacity/general/num_workspaces int 1</div></blockquote>
<ttclass="descname">hardlink</tt><big>(</big><em>src</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.hardlink"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.hardlink"title="Permalink to this definition">¶</a></dt>
<dd><p>hardlink SRC DEST
Create a hardlink at DEST which is linked to SRC.</p>
<ttclass="descname">install</tt><big>(</big><em>srcglob</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.install"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.install"title="Permalink to this definition">¶</a></dt>
<dd><p>install SRC DEST
Copy the given file (or files, if a glob is used) from the input
tree to the given destination in the output tree.
The path to DEST must exist in the output tree.
If DEST is a directory, SRC will be copied into that directory.
If DEST doesn’t exist, SRC will be copied to a file with that name,
assuming the rest of the path exists.
This is pretty much like how the ‘cp’ command works.
<ttclass="descname">installimg</tt><big>(</big><em>srcdir</em>, <em>destfile</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.installimg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.installimg"title="Permalink to this definition">¶</a></dt>
<dd><p>installimg SRCDIR DESTFILE
Create a compressed cpio archive of the contents of SRCDIR and place
it in DESTFILE.</p>
<p>If SRCDIR doesn’t exist or is empty nothing is created.</p>
<ttclass="descname">installinitrd</tt><big>(</big><em>section</em>, <em>src</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.installinitrd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.installinitrd"title="Permalink to this definition">¶</a></dt>
<dd><p>installinitrd SECTION SRC DEST
Same as installkernel, but for “initrd”.</p>
<ttclass="descname">installkernel</tt><big>(</big><em>section</em>, <em>src</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.installkernel"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.installkernel"title="Permalink to this definition">¶</a></dt>
<dd><p>installkernel SECTION SRC DEST
Install the kernel from SRC in the input tree to DEST in the output
tree, and then add an item to the treeinfo data store, in the named
<ttclass="descname">installpkg</tt><big>(</big><em>*pkgs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.installpkg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.installpkg"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">installupgradeinitrd</tt><big>(</big><em>section</em>, <em>src</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.installupgradeinitrd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.installupgradeinitrd"title="Permalink to this definition">¶</a></dt>
<dd><p>installupgradeinitrd SECTION SRC DEST
Same as installkernel, but for “upgrade”.</p>
</dd></dl>
<dlclass="method">
<dtid="pylorax.ltmpl.LoraxTemplateRunner.log">
<ttclass="descname">log</tt><big>(</big><em>msg</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.log"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.log"title="Permalink to this definition">¶</a></dt>
<dd><p>log MESSAGE
Emit the given log message. Be sure to put it in quotes!
<ttclass="descname">mkdir</tt><big>(</big><em>*dirs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.mkdir"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.mkdir"title="Permalink to this definition">¶</a></dt>
<dd><p>mkdir DIR [DIR ...]
Create the named DIR(s). Will create leading directories as needed.
Example:</p>
<blockquote>
<div>mkdir /images</div></blockquote>
</dd></dl>
<dlclass="method">
<dtid="pylorax.ltmpl.LoraxTemplateRunner.move">
<ttclass="descname">move</tt><big>(</big><em>src</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.move"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.move"title="Permalink to this definition">¶</a></dt>
<dd><p>move SRC DEST
Move SRC to DEST.</p>
</dd></dl>
<dlclass="method">
<dtid="pylorax.ltmpl.LoraxTemplateRunner.remove">
<ttclass="descname">remove</tt><big>(</big><em>*fileglobs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.remove"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.remove"title="Permalink to this definition">¶</a></dt>
<dd><p>remove FILEGLOB [FILEGLOB ...]
Remove all the named files or directories.
Will <em>not</em> raise exceptions if the file(s) are not found.</p>
<ttclass="descname">removefrom</tt><big>(</big><em>pkg</em>, <em>*globs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.removefrom"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.removefrom"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">removekmod</tt><big>(</big><em>*globs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.removekmod"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.removekmod"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">removepkg</tt><big>(</big><em>*pkgs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.removepkg"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.removepkg"title="Permalink to this definition">¶</a></dt>
<dd><p>removepkg PKGGLOB [PKGGLOB...]
Delete the named package(s).
IMPLEMENTATION NOTES:</p>
<blockquote>
<div>RPM scriptlets (%preun/%postun) are <em>not</em> run.
Files are deleted, but directories are left behind.</div></blockquote>
<ttclass="descname">replace</tt><big>(</big><em>pat</em>, <em>repl</em>, <em>*fileglobs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.replace"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.replace"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">run</tt><big>(</big><em>templatefile</em>, <em>**variables</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.run"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.run"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">run_pkg_transaction</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.run_pkg_transaction"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.run_pkg_transaction"title="Permalink to this definition">¶</a></dt>
<dd><p>Actually install all the packages requested by previous ‘installpkg’
commands.</p>
</dd></dl>
<dlclass="method">
<dtid="pylorax.ltmpl.LoraxTemplateRunner.runcmd">
<ttclass="descname">runcmd</tt><big>(</big><em>*cmdlist</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.runcmd"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.runcmd"title="Permalink to this definition">¶</a></dt>
<dd><p>runcmd CMD [–chdir=DIR] [ARG ...]
Run the given command with the given arguments.
If “–chdir=DIR” is given, change to the named directory
before executing the command.</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="docutils">
<dt>Examples:</dt>
<dd><pclass="first">(this should be replaced with a “find” function)
runcmd find ${root} -name “<em>.pyo” -type f -delete
%for f in find(root, name=”</em>.pyo”):</p>
<ttclass="descname">symlink</tt><big>(</big><em>target</em>, <em>dest</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.symlink"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.symlink"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">systemctl</tt><big>(</big><em>cmd</em>, <em>*units</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.systemctl"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.systemctl"title="Permalink to this definition">¶</a></dt>
<dd><p>systemctl [enable|disable|mask] UNIT [UNIT...]
<ttclass="descname">treeinfo</tt><big>(</big><em>section</em>, <em>key</em>, <em>*valuetoks</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#LoraxTemplateRunner.treeinfo"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.LoraxTemplateRunner.treeinfo"title="Permalink to this definition">¶</a></dt>
<dd><p>treeinfo SECTION KEY ARG [ARG ...]
Add an item to the treeinfo data store.
The given SECTION will have a new item added where
<ttclass="descclassname">pylorax.ltmpl.</tt><ttclass="descname">brace_expand</tt><big>(</big><em>s</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#brace_expand"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.brace_expand"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.ltmpl.rexists">
<ttclass="descclassname">pylorax.ltmpl.</tt><ttclass="descname">rexists</tt><big>(</big><em>pathname</em>, <em>root=''</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#rexists"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.rexists"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.ltmpl.rglob">
<ttclass="descclassname">pylorax.ltmpl.</tt><ttclass="descname">rglob</tt><big>(</big><em>pathname</em>, <em>root='/'</em>, <em>fatal=False</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#rglob"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.rglob"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.ltmpl.split_and_expand">
<ttclass="descclassname">pylorax.ltmpl.</tt><ttclass="descname">split_and_expand</tt><big>(</big><em>line</em><big>)</big><aclass="reference internal"href="_modules/pylorax/ltmpl.html#split_and_expand"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.ltmpl.split_and_expand"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
<divclass="section"id="module-pylorax.output">
<spanid="output-module"></span><h2><ttclass="xref py py-mod docutils literal"><spanclass="pre">output</span></tt> Module<aclass="headerlink"href="#module-pylorax.output"title="Permalink to this headline">¶</a></h2>
</div>
<divclass="section"id="module-pylorax.sysutils">
<spanid="sysutils-module"></span><h2><ttclass="xref py py-mod docutils literal"><spanclass="pre">sysutils</span></tt> Module<aclass="headerlink"href="#module-pylorax.sysutils"title="Permalink to this headline">¶</a></h2>
<dlclass="function">
<dtid="pylorax.sysutils.joinpaths">
<ttclass="descclassname">pylorax.sysutils.</tt><ttclass="descname">joinpaths</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/sysutils.html#joinpaths"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.sysutils.joinpaths"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.sysutils.touch">
<ttclass="descclassname">pylorax.sysutils.</tt><ttclass="descname">touch</tt><big>(</big><em>fname</em><big>)</big><aclass="reference internal"href="_modules/pylorax/sysutils.html#touch"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.sysutils.touch"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.sysutils.replace">
<ttclass="descclassname">pylorax.sysutils.</tt><ttclass="descname">replace</tt><big>(</big><em>fname</em>, <em>find</em>, <em>substitute</em><big>)</big><aclass="reference internal"href="_modules/pylorax/sysutils.html#replace"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.sysutils.replace"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.sysutils.chown_">
<ttclass="descclassname">pylorax.sysutils.</tt><ttclass="descname">chown_</tt><big>(</big><em>path</em>, <em>user=None</em>, <em>group=None</em>, <em>recursive=False</em><big>)</big><aclass="reference internal"href="_modules/pylorax/sysutils.html#chown_"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.sysutils.chown_"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.sysutils.chmod_">
<ttclass="descclassname">pylorax.sysutils.</tt><ttclass="descname">chmod_</tt><big>(</big><em>path</em>, <em>mode</em>, <em>recursive=False</em><big>)</big><aclass="reference internal"href="_modules/pylorax/sysutils.html#chmod_"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.sysutils.chmod_"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.sysutils.remove">
<ttclass="descclassname">pylorax.sysutils.</tt><ttclass="descname">remove</tt><big>(</big><em>target</em><big>)</big><aclass="reference internal"href="_modules/pylorax/sysutils.html#remove"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.sysutils.remove"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.sysutils.linktree">
<ttclass="descclassname">pylorax.sysutils.</tt><ttclass="descname">linktree</tt><big>(</big><em>src</em>, <em>dst</em><big>)</big><aclass="reference internal"href="_modules/pylorax/sysutils.html#linktree"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.sysutils.linktree"title="Permalink to this definition">¶</a></dt>
<spanid="treebuilder-module"></span><h2><ttclass="xref py py-mod docutils literal"><spanclass="pre">treebuilder</span></tt> Module<aclass="headerlink"href="#module-pylorax.treebuilder"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.treebuilder.RuntimeBuilder">
<emclass="property">class </em><ttclass="descclassname">pylorax.treebuilder.</tt><ttclass="descname">RuntimeBuilder</tt><big>(</big><em>product</em>, <em>arch</em>, <em>yum</em>, <em>templatedir=None</em>, <em>installpkgs=None</em>, <em>add_templates=None</em>, <em>add_template_vars=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">cleanup</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.cleanup"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.cleanup"title="Permalink to this definition">¶</a></dt>
<dd><p>Remove unneeded packages and files with runtime-cleanup.tmpl</p>
<ttclass="descname">create_runtime</tt><big>(</big><em>outfile='/var/tmp/squashfs.img'</em>, <em>compression='xz'</em>, <em>compressargs=None</em>, <em>size=2</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.create_runtime"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.create_runtime"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">generate_module_data</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.generate_module_data"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.generate_module_data"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">install</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.install"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.install"title="Permalink to this definition">¶</a></dt>
<dd><p>Install packages and do initial setup with runtime-install.tmpl</p>
<ttclass="descname">postinstall</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.postinstall"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.postinstall"title="Permalink to this definition">¶</a></dt>
<dd><p>Do some post-install setup work with runtime-postinstall.tmpl</p>
<ttclass="descname">writepkglists</tt><big>(</big><em>pkglistdir</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.writepkglists"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.writepkglists"title="Permalink to this definition">¶</a></dt>
<dd><p>debugging data: write out lists of package contents</p>
<ttclass="descname">writepkgsizes</tt><big>(</big><em>pkgsizefile</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#RuntimeBuilder.writepkgsizes"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.RuntimeBuilder.writepkgsizes"title="Permalink to this definition">¶</a></dt>
<dd><p>debugging data: write a big list of pkg sizes</p>
</dd></dl>
</dd></dl>
<dlclass="class">
<dtid="pylorax.treebuilder.TreeBuilder">
<emclass="property">class </em><ttclass="descclassname">pylorax.treebuilder.</tt><ttclass="descname">TreeBuilder</tt><big>(</big><em>product</em>, <em>arch</em>, <em>inroot</em>, <em>outroot</em>, <em>runtime</em>, <em>isolabel</em>, <em>domacboot=False</em>, <em>doupgrade=True</em>, <em>templatedir=None</em>, <em>add_templates=None</em>, <em>add_template_vars=None</em>, <em>workdir=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#TreeBuilder"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.TreeBuilder"title="Permalink to this definition">¶</a></dt>
inroot should be the installtree root (the newly-built runtime dir)</p>
<dlclass="method">
<dtid="pylorax.treebuilder.TreeBuilder.build">
<ttclass="descname">build</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#TreeBuilder.build"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.TreeBuilder.build"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">copy_dracut_hooks</tt><big>(</big><em>hooks</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#TreeBuilder.copy_dracut_hooks"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.TreeBuilder.copy_dracut_hooks"title="Permalink to this definition">¶</a></dt>
<dd><p>Copy the hook scripts in hooks into the installroot’s /tmp/
and return a list of commands to pass to dracut when creating the
initramfs</p>
<p>hooks is a list of tuples with the name of the hook script and the
<ttclass="descname">dracut_hooks_path</tt><aclass="reference internal"href="_modules/pylorax/treebuilder.html#TreeBuilder.dracut_hooks_path"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.TreeBuilder.dracut_hooks_path"title="Permalink to this definition">¶</a></dt>
<dd><p>Return the path to the lorax dracut hooks scripts</p>
<p>Use the configured share dir if it is setup,
otherwise default to /usr/share/lorax/dracut_hooks</p>
<ttclass="descname">implantisomd5</tt><big>(</big><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#TreeBuilder.implantisomd5"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.TreeBuilder.implantisomd5"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="attribute">
<dtid="pylorax.treebuilder.TreeBuilder.kernels">
<ttclass="descname">kernels</tt><aclass="reference internal"href="_modules/pylorax/treebuilder.html#TreeBuilder.kernels"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.TreeBuilder.kernels"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">rebuild_initrds</tt><big>(</big><em>add_args=None</em>, <em>backup=''</em>, <em>prefix=''</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#TreeBuilder.rebuild_initrds"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.TreeBuilder.rebuild_initrds"title="Permalink to this definition">¶</a></dt>
<dd><p>Rebuild all the initrds in the tree. If backup is specified, each
initrd will be renamed with backup as a suffix before rebuilding.
If backup is empty, the existing initrd files will be overwritten.
If suffix is specified, the existing initrd is untouched and a new
image is built with the filename “${prefix}-${kernel.version}.img”</p>
</dd></dl>
</dd></dl>
<dlclass="function">
<dtid="pylorax.treebuilder.findkernels">
<ttclass="descclassname">pylorax.treebuilder.</tt><ttclass="descname">findkernels</tt><big>(</big><em>root='/'</em>, <em>kdir='boot'</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#findkernels"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.findkernels"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.treebuilder.generate_module_info">
<ttclass="descclassname">pylorax.treebuilder.</tt><ttclass="descname">generate_module_info</tt><big>(</big><em>moddir</em>, <em>outfile=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#generate_module_info"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.generate_module_info"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="function">
<dtid="pylorax.treebuilder.udev_escape">
<ttclass="descclassname">pylorax.treebuilder.</tt><ttclass="descname">udev_escape</tt><big>(</big><em>label</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treebuilder.html#udev_escape"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treebuilder.udev_escape"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</div>
<divclass="section"id="module-pylorax.treeinfo">
<spanid="treeinfo-module"></span><h2><ttclass="xref py py-mod docutils literal"><spanclass="pre">treeinfo</span></tt> Module<aclass="headerlink"href="#module-pylorax.treeinfo"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.treeinfo.TreeInfo">
<emclass="property">class </em><ttclass="descclassname">pylorax.treeinfo.</tt><ttclass="descname">TreeInfo</tt><big>(</big><em>product</em>, <em>version</em>, <em>variant</em>, <em>basearch</em>, <em>packagedir=''</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treeinfo.html#TreeInfo"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treeinfo.TreeInfo"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">add_section</tt><big>(</big><em>section</em>, <em>data</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treeinfo.html#TreeInfo.add_section"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treeinfo.TreeInfo.add_section"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="pylorax.treeinfo.TreeInfo.write">
<ttclass="descname">write</tt><big>(</big><em>outfile</em><big>)</big><aclass="reference internal"href="_modules/pylorax/treeinfo.html#TreeInfo.write"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.treeinfo.TreeInfo.write"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<divclass="section"id="module-pylorax.yumhelper">
<spanid="yumhelper-module"></span><h2><ttclass="xref py py-mod docutils literal"><spanclass="pre">yumhelper</span></tt> Module<aclass="headerlink"href="#module-pylorax.yumhelper"title="Permalink to this headline">¶</a></h2>
<dlclass="class">
<dtid="pylorax.yumhelper.LoraxDownloadCallback">
<emclass="property">class </em><ttclass="descclassname">pylorax.yumhelper.</tt><ttclass="descname">LoraxDownloadCallback</tt><aclass="reference internal"href="_modules/pylorax/yumhelper.html#LoraxDownloadCallback"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.yumhelper.LoraxDownloadCallback"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">updateProgress</tt><big>(</big><em>name</em>, <em>frac</em>, <em>fread</em>, <em>ftime</em><big>)</big><aclass="reference internal"href="_modules/pylorax/yumhelper.html#LoraxDownloadCallback.updateProgress"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.yumhelper.LoraxDownloadCallback.updateProgress"title="Permalink to this definition">¶</a></dt>
<emclass="property">class </em><ttclass="descclassname">pylorax.yumhelper.</tt><ttclass="descname">LoraxTransactionCallback</tt><aclass="reference internal"href="_modules/pylorax/yumhelper.html#LoraxTransactionCallback"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.yumhelper.LoraxTransactionCallback"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">event</tt><big>(</big><em>state</em>, <em>data=None</em><big>)</big><aclass="reference internal"href="_modules/pylorax/yumhelper.html#LoraxTransactionCallback.event"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.yumhelper.LoraxTransactionCallback.event"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
<dlclass="class">
<dtid="pylorax.yumhelper.LoraxRpmCallback">
<emclass="property">class </em><ttclass="descclassname">pylorax.yumhelper.</tt><ttclass="descname">LoraxRpmCallback</tt><aclass="reference internal"href="_modules/pylorax/yumhelper.html#LoraxRpmCallback"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.yumhelper.LoraxRpmCallback"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">errorlog</tt><big>(</big><em>msg</em><big>)</big><aclass="reference internal"href="_modules/pylorax/yumhelper.html#LoraxRpmCallback.errorlog"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.yumhelper.LoraxRpmCallback.errorlog"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
<dlclass="method">
<dtid="pylorax.yumhelper.LoraxRpmCallback.event">
<ttclass="descname">event</tt><big>(</big><em>package</em>, <em>action</em>, <em>te_current</em>, <em>te_total</em>, <em>ts_current</em>, <em>ts_total</em><big>)</big><aclass="reference internal"href="_modules/pylorax/yumhelper.html#LoraxRpmCallback.event"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.yumhelper.LoraxRpmCallback.event"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">filelog</tt><big>(</big><em>package</em>, <em>action</em><big>)</big><aclass="reference internal"href="_modules/pylorax/yumhelper.html#LoraxRpmCallback.filelog"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.yumhelper.LoraxRpmCallback.filelog"title="Permalink to this definition">¶</a></dt>
<ttclass="descname">scriptout</tt><big>(</big><em>package</em>, <em>msgs</em><big>)</big><aclass="reference internal"href="_modules/pylorax/yumhelper.html#LoraxRpmCallback.scriptout"><spanclass="viewcode-link">[source]</span></a><aclass="headerlink"href="#pylorax.yumhelper.LoraxRpmCallback.scriptout"title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>
</dd></dl>
</div>
<divclass="section"id="subpackages">
<h2>Subpackages<aclass="headerlink"href="#subpackages"title="Permalink to this headline">¶</a></h2>