diff --git a/rhel8-branch/.buildinfo b/rhel8-branch/.buildinfo index d9e049b1..0749d8f6 100644 --- a/rhel8-branch/.buildinfo +++ b/rhel8-branch/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 70a7edc36d19abd5eeb8cb6028d02c14 +config: cdc97b9d59e6d3fbe4f53a2804b058d1 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/rhel8-branch/.doctrees/composer-cli.doctree b/rhel8-branch/.doctrees/composer-cli.doctree index ee92f195..345dd3ab 100644 Binary files a/rhel8-branch/.doctrees/composer-cli.doctree and b/rhel8-branch/.doctrees/composer-cli.doctree differ diff --git a/rhel8-branch/.doctrees/environment.pickle b/rhel8-branch/.doctrees/environment.pickle index 2c4d35a5..26889dec 100644 Binary files a/rhel8-branch/.doctrees/environment.pickle and b/rhel8-branch/.doctrees/environment.pickle differ diff --git a/rhel8-branch/.doctrees/index.doctree b/rhel8-branch/.doctrees/index.doctree index 71fb8358..1cf4ccee 100644 Binary files a/rhel8-branch/.doctrees/index.doctree and b/rhel8-branch/.doctrees/index.doctree differ diff --git a/rhel8-branch/.doctrees/intro.doctree b/rhel8-branch/.doctrees/intro.doctree index c9c12690..44e5b51f 100644 Binary files a/rhel8-branch/.doctrees/intro.doctree and b/rhel8-branch/.doctrees/intro.doctree differ diff --git a/rhel8-branch/.doctrees/livemedia-creator.doctree b/rhel8-branch/.doctrees/livemedia-creator.doctree index 039c3895..e2788aad 100644 Binary files a/rhel8-branch/.doctrees/livemedia-creator.doctree and b/rhel8-branch/.doctrees/livemedia-creator.doctree differ diff --git a/rhel8-branch/.doctrees/lorax-composer.doctree b/rhel8-branch/.doctrees/lorax-composer.doctree index 1db844a8..a2e7c912 100644 Binary files a/rhel8-branch/.doctrees/lorax-composer.doctree and b/rhel8-branch/.doctrees/lorax-composer.doctree differ diff --git a/rhel8-branch/.doctrees/lorax.doctree b/rhel8-branch/.doctrees/lorax.doctree index 1c38f6b4..73dd2104 100644 Binary files a/rhel8-branch/.doctrees/lorax.doctree and b/rhel8-branch/.doctrees/lorax.doctree differ diff --git a/rhel8-branch/.doctrees/modules.doctree b/rhel8-branch/.doctrees/modules.doctree index f289caa8..99449ad1 100644 Binary files a/rhel8-branch/.doctrees/modules.doctree and b/rhel8-branch/.doctrees/modules.doctree differ diff --git a/rhel8-branch/.doctrees/product-images.doctree b/rhel8-branch/.doctrees/product-images.doctree index 177cff5c..daff6eb6 100644 Binary files a/rhel8-branch/.doctrees/product-images.doctree and b/rhel8-branch/.doctrees/product-images.doctree differ diff --git a/rhel8-branch/.doctrees/pylorax.api.doctree b/rhel8-branch/.doctrees/pylorax.api.doctree index e592eaba..bed12633 100644 Binary files a/rhel8-branch/.doctrees/pylorax.api.doctree and b/rhel8-branch/.doctrees/pylorax.api.doctree differ diff --git a/rhel8-branch/.doctrees/pylorax.doctree b/rhel8-branch/.doctrees/pylorax.doctree index 8c51bde0..a53751ba 100644 Binary files a/rhel8-branch/.doctrees/pylorax.doctree and b/rhel8-branch/.doctrees/pylorax.doctree differ diff --git a/rhel8-branch/_modules/index.html b/rhel8-branch/_modules/index.html index 9a3d5813..d90c57d9 100644 --- a/rhel8-branch/_modules/index.html +++ b/rhel8-branch/_modules/index.html @@ -1,38 +1,41 @@ - - + - + - + - Overview: module code — Lorax 28.14.42 documentation + Overview: module code — Lorax 28.14.58 documentation - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
- @@ -208,7 +220,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
@@ -638,7 +658,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
- @@ -247,7 +259,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
@@ -1389,7 +1401,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
@@ -297,7 +309,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
@@ -248,7 +260,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
- @@ -789,7 +801,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
@@ -859,7 +871,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
[docs]class RecipeModule(dict): - def __init__(self, name, version): + def __init__(self, name, version): dict.__init__(self, name=name, version=version)
[docs]class RecipePackage(RecipeModule): pass
[docs]class RecipeGroup(dict): - def __init__(self, name): + def __init__(self, name): dict.__init__(self, name=name)
[docs]def NewRecipeGit(toml_dict): @@ -400,7 +407,7 @@ toml_dict.get("destination"))
[docs]class RecipeGit(dict): - def __init__(self, rpmname, rpmversion, rpmrelease, summary, repo, ref, destination): + def __init__(self, rpmname, rpmversion, rpmrelease, summary, repo, ref, destination): dict.__init__(self, rpmname=rpmname, rpmversion=rpmversion, rpmrelease=rpmrelease, summary=summary, repo=repo, ref=ref, destination=destination)
@@ -1120,7 +1127,7 @@ return None
[docs]class CommitDetails(DataHolder): - def __init__(self, commit, timestamp, message, revision=None): + def __init__(self, commit, timestamp, message, revision=None): DataHolder.__init__(self, commit = commit, timestamp = timestamp, @@ -1440,20 +1447,25 @@
- @@ -1462,7 +1474,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
- @@ -266,7 +278,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
- @@ -2261,7 +2273,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
@@ -283,7 +295,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
+ + @@ -130,11 +135,13 @@ + +
@@ -245,7 +257,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
- @@ -497,7 +511,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
- @@ -961,7 +973,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
- @@ -214,7 +226,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
@@ -223,7 +235,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
@@ -360,7 +372,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
@@ -294,7 +306,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
[docs]class ExecProduct(object): - def __init__(self, rc, stdout, stderr): + def __init__(self, rc, stdout, stderr): self.rc = rc self.stdout = stdout self.stderr = stderr
@@ -441,15 +448,15 @@ up the process when the output is no longer needed. """ - def __init__(self, proc, argv, callback): + def __init__(self, proc, argv, callback): self._proc = proc self._argv = argv self._callback = callback - def __iter__(self): + def __iter__(self): return self - def __del__(self): + def __del__(self): # See if the process is still running if self._proc.poll() is None: # Stop the process and ignore any problems that might arise @@ -458,7 +465,7 @@ except OSError: pass - def __next__(self): + def __next__(self): # Read the next line, blocking if a line is not yet available line = self._proc.stdout.readline().decode("utf-8") if line == '' or not self._callback(self._proc): @@ -510,20 +517,25 @@ - @@ -532,7 +544,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
@@ -704,7 +716,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
- @@ -844,7 +856,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
@@ -1069,7 +1081,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
- @@ -379,7 +391,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
@@ -286,7 +298,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
@@ -316,7 +328,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
- - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -58,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -75,6 +78,7 @@ + + @@ -130,11 +135,13 @@ + +
@@ -241,7 +253,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -60,7 +63,7 @@
- 28.14.42 + 28.14.58
@@ -77,6 +80,7 @@ + + @@ -139,18 +155,20 @@ + +
@@ -221,29 +427,29 @@ save the qcow2 image as - - - - - - + + -

- © Copyright 2018-2019, Red Hat, Inc. + © Copyright 2018-2019, Red Hat, Inc..

- Built with Sphinx using a theme provided by Read the Docs. + + + + Built with Sphinx using a + + theme + + provided by Read the Docs. - @@ -252,7 +458,6 @@ save the qcow2 image as jQuery(function () { SphinxRtdTheme.Navigation.enable(true); diff --git a/rhel8-branch/genindex.html b/rhel8-branch/genindex.html index efd3ac0c..238ac9c5 100644 --- a/rhel8-branch/genindex.html +++ b/rhel8-branch/genindex.html @@ -1,39 +1,41 @@ - - - + - + - + - Index — Lorax 28.14.42 documentation + Index — Lorax 28.14.58 documentation - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -59,7 +61,7 @@
- 28.14.42 + 28.14.58
@@ -76,6 +78,7 @@ + + @@ -131,18 +135,20 @@ + +
- + @@ -1105,20 +1328,25 @@
- @@ -1127,7 +1355,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -59,7 +62,7 @@
- 28.14.42 + 28.14.58
@@ -76,6 +79,7 @@ + + @@ -131,18 +136,20 @@ + +
- @@ -222,7 +230,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -60,7 +63,7 @@
- 28.14.42 + 28.14.58
@@ -77,6 +80,7 @@ + + @@ -132,18 +137,20 @@ + +
    -
  • Docs »
  • +
  • »
  • Introduction to Lorax
  • - + View page source @@ -213,29 +220,29 @@ upd-instroot and mk-images* scripts.

- @@ -244,7 +251,6 @@ upd-instroot and mk-images* scripts.

- - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -60,7 +63,7 @@
- 28.14.42 + 28.14.58
@@ -77,6 +80,7 @@ + + @@ -164,18 +169,20 @@ + +
    -
  • Docs »
  • +
  • »
  • livemedia-creator
  • - + View page source @@ -1035,29 +1042,29 @@ report bugs against the lorax component.

- @@ -1066,7 +1073,6 @@ report bugs against the lorax component.

- - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -60,7 +63,7 @@
- 28.14.42 + 28.14.58
@@ -77,6 +80,7 @@ + + @@ -171,18 +176,20 @@ + +
    -
  • Docs »
  • +
  • »
  • lorax-composer
  • - + View page source @@ -203,13 +210,21 @@

    Brian C. Lane <bcl@redhat.com>

    -

    lorax-composer is an API server that allows you to build disk images using +

    lorax-composer is a WELDR API server that allows you to build disk images using Blueprints to describe the package versions to be installed into the image. It is compatible with the Weldr project’s bdcs-api REST protocol. More information on Weldr can be found on the Weldr blog.

    Behind the scenes it uses livemedia-creator and Anaconda to handle the installation and configuration of the images.

    +
    +

    Note

    +

    lorax-composer is now deprecated. It is being replaced by the +osbuild-composer WELDR API server which implements more features (eg. +ostree, image uploads, etc.) You can still use composer-cli and +cockpit-composer with osbuild-composer. See the documentation or +the osbuild website for more information.

    +

    Important Things To Note

      @@ -577,12 +592,12 @@ these are currently available via ./share/composer/. The name of the kickstart is what will be used by the /compose/types route, and the compose_type field of the POST to start a compose. It also needs to have -code added to the pylorax.api.compose.compose_args() function. The +code added to the pylorax.api.compose.compose_args() function. The _MAP entry in this function defines what lorax-composer will pass to pylorax.installer.novirt_install() when it runs the compose. When the compose is finished the output files need to be copied out of the build directory (/var/lib/lorax/composer/results/<UUID>/compose/), -pylorax.api.compose.move_compose_results() handles this for each type. +pylorax.api.compose.move_compose_results() handles this for each type. You should move them instead of copying to save space.

      If the new output type does not have support in livemedia-creator it should be added there first. This will make the output available to the widest number of @@ -594,8 +609,8 @@ via the --make-disk needs 3 things:

      • A partitioned-disk.ks file in ./share/composer/

      • -
      • A new entry in the _MAP in pylorax.api.compose.compose_args()

      • -
      • Add a bit of code to pylorax.api.compose.move_compose_results() to move the disk image from +

      • A new entry in the _MAP in pylorax.api.compose.compose_args()

      • +
      • Add a bit of code to pylorax.api.compose.move_compose_results() to move the disk image from the compose directory to the results directory.

      The partitioned-disk.ks is pretty similar to the example minimal kickstart @@ -695,29 +710,29 @@ sources from /etc/y

    -
@@ -726,7 +741,6 @@ sources from /etc/y - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -60,7 +63,7 @@
- 28.14.42 + 28.14.58
@@ -77,6 +80,7 @@ + + @@ -157,18 +162,20 @@ + +
    -
  • Docs »
  • +
  • »
  • Lorax
  • - + View page source @@ -214,7 +221,8 @@ repositories.

    [--add-arch-template-var ADD_ARCH_TEMPLATE_VARS] [--noverify] [--sharedir SHAREDIR] [--enablerepo [repo]] [--disablerepo [repo]] [--rootfs-size ROOTFS_SIZE] - [--noverifyssl] [--skip-branding] [--dracut-arg DRACUT_ARGS] [-V] + [--noverifyssl] [--skip-branding] [--squashfs-only] + [--dracut-arg DRACUT_ARGS] [-V] OUTPUTDIR
@@ -367,6 +375,10 @@ repositories.

Disable automatic branding package selection. Use –installpkgs to add custom branding.

Default: False

+
--squashfs-only
+

Use a plain squashfs filesystem for the runtime.

+

Default: False

+
@@ -513,29 +525,29 @@ should) select the specific template directory by passing - - - - - - + +
-

- © Copyright 2018-2019, Red Hat, Inc. + © Copyright 2018-2019, Red Hat, Inc..

- Built with Sphinx using a theme provided by Read the Docs. + + + + Built with Sphinx using a + + theme + + provided by Read the Docs. - @@ -544,7 +556,6 @@ should) select the specific template directory by passing jQuery(function () { SphinxRtdTheme.Navigation.enable(true); diff --git a/rhel8-branch/modules.html b/rhel8-branch/modules.html index 541af097..46b24fab 100644 --- a/rhel8-branch/modules.html +++ b/rhel8-branch/modules.html @@ -1,38 +1,41 @@ - - + - + - + - pylorax — Lorax 28.14.42 documentation + pylorax — Lorax 28.14.58 documentation - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -60,7 +63,7 @@
- 28.14.42 + 28.14.58
@@ -77,6 +80,7 @@ + + @@ -135,18 +140,20 @@ + +
- @@ -246,7 +253,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -60,7 +63,7 @@
- 28.14.42 + 28.14.58
@@ -77,6 +80,7 @@ + + @@ -132,18 +137,20 @@ + +
-

- © Copyright 2018-2019, Red Hat, Inc. + © Copyright 2018-2019, Red Hat, Inc..

- Built with Sphinx using a theme provided by Read the Docs. + + + + Built with Sphinx using a + + theme + + provided by Read the Docs. - @@ -217,7 +224,6 @@ command or the installpkgs paramater of jQuery(function () { SphinxRtdTheme.Navigation.enable(true); diff --git a/rhel8-branch/py-modindex.html b/rhel8-branch/py-modindex.html index 26451e7f..833a0d11 100644 --- a/rhel8-branch/py-modindex.html +++ b/rhel8-branch/py-modindex.html @@ -1,38 +1,41 @@ - - + - + - + - Python Module Index — Lorax 28.14.42 documentation + Python Module Index — Lorax 28.14.58 documentation - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -61,7 +64,7 @@
- 28.14.42 + 28.14.58
@@ -78,6 +81,7 @@ + + @@ -133,11 +138,13 @@ + +
    -
  • Docs »
  • +
  • »
  • Python Module Index
  • @@ -323,20 +330,25 @@
- @@ -345,7 +357,6 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -59,7 +62,7 @@
- 28.14.42 + 28.14.58
@@ -76,6 +79,7 @@ + + @@ -160,11 +165,13 @@ + +

pylorax.api.cmdline module

-
+
-pylorax.api.cmdline.lorax_composer_parser()[source]
+pylorax.api.cmdline.lorax_composer_parser()[source]

Return the ArgumentParser for lorax-composer

@@ -216,9 +223,9 @@ packages required by the output type, it should not have the trailing %end becau package NEVRAs will be appended to it at build time.

compose_args should have a name matching the kickstart, and it should set the novirt_install parameters needed to generate the desired output. Other types should be set to False.

-
+
-pylorax.api.compose.add_customizations(f, recipe)[source]
+pylorax.api.compose.add_customizations(f, recipe)[source]

Add customizations to the kickstart file

Parameters
@@ -236,15 +243,15 @@ parameters needed to generate the desired output. Other types should be set to F
-
+
-pylorax.api.compose.bootloader_append(line, kernel_append)[source]
+pylorax.api.compose.bootloader_append(line, kernel_append)[source]

Insert the kernel_append string into the –append argument

Parameters
    -
  • line (str) – The bootloader … line

  • -
  • kernel_append (str) – The arguments to append to the –append section

  • +
  • line (str) – The bootloader … line

  • +
  • kernel_append (str) – The arguments to append to the –append section

@@ -252,13 +259,13 @@ parameters needed to generate the desired output. Other types should be set to F is parsed correctly, and re-assembled for inclusion into the final kickstart

-
+
-pylorax.api.compose.compose_args(compose_type)[source]
+pylorax.api.compose.compose_args(compose_type)[source]

Returns the settings to pass to novirt_install for the compose type

Parameters
-

compose_type (str) – The type of compose to create, from compose_types()

+

compose_type (str) – The type of compose to create, from compose_types()

This will return a dict of options that match the ArgumentParser options for livemedia-creator. @@ -266,23 +273,23 @@ These are the ones the define the type of output, it’s filename, etc. Other options will be filled in by make_compose()

-
+
-pylorax.api.compose.compose_types(share_dir)[source]
+pylorax.api.compose.compose_types(share_dir)[source]

Returns a list of tuples of the supported output types, and their state

The output types come from the kickstart names in /usr/share/lorax/composer/*ks

If they are disabled on the current arch their state is False. If enabled, it is True. eg. [(“alibaba”, False), (“ext4-filesystem”, True), …]

-
+
-pylorax.api.compose.customize_ks_template(ks_template, recipe)[source]
+pylorax.api.compose.customize_ks_template(ks_template, recipe)[source]

Customize the kickstart template and return it

Parameters
    -
  • ks_template (str) – The kickstart template

  • +
  • ks_template (str) – The kickstart template

  • recipe (Recipe object) –

@@ -294,15 +301,15 @@ Add bootloader line if it is missing.

Add default timezone if needed. It does NOT replace an existing timezone entry

-
+
-pylorax.api.compose.firewall_cmd(line, settings)[source]
+pylorax.api.compose.firewall_cmd(line, settings)[source]

Update the firewall line with the new ports and services

Parameters
    -
  • line (str) – The firewall … line

  • -
  • settings (dict) – A dict with the list of services and ports to enable and disable

  • +
  • line (str) – The firewall … line

  • +
  • settings (dict) – A dict with the list of services and ports to enable and disable

@@ -310,9 +317,9 @@ Add bootloader line if it is missing.

is parsed correctly, and re-assembled for inclusion into the final kickstart

-
+
-pylorax.api.compose.get_default_services(recipe)[source]
+pylorax.api.compose.get_default_services(recipe)[source]

Get the default string for services, based on recipe :param recipe: The recipe

@@ -320,7 +327,7 @@ is parsed correctly, and re-assembled for inclusion into the final kickstart

string with “services” or “”

Return type
-

str

+

str

When no services have been selected we don’t need to add anything to the kickstart @@ -328,23 +335,23 @@ so return an empty string. Otherwise return “services” which will be updated the settings.

-
+
-pylorax.api.compose.get_extra_pkgs(dbo, share_dir, compose_type)[source]
+pylorax.api.compose.get_extra_pkgs(dbo, share_dir, compose_type)[source]

Return extra packages needed for the output type

Parameters
  • dbo (dnf.Base) – dnf base object

  • -
  • share_dir (str) – Path to the top level share directory

  • -
  • compose_type (str) – The type of output to create from the recipe

  • +
  • share_dir (str) – Path to the top level share directory

  • +
  • compose_type (str) – The type of output to create from the recipe

Returns

List of package names (name only, not NEVRA)

Return type
-

list

+

list

Currently this is only needed by live-iso, it reads ./live/live-install.tmpl and @@ -354,9 +361,9 @@ iso using the templates such as x86.tmpl

even though the results are applied differently.

-
+
-pylorax.api.compose.get_firewall_settings(recipe)[source]
+pylorax.api.compose.get_firewall_settings(recipe)[source]

Return the customizations.firewall settings

Parameters
@@ -366,14 +373,14 @@ even though the results are applied differently.

A dict of settings

Return type
-

dict

+

dict

-
+
-pylorax.api.compose.get_kernel_append(recipe)[source]
+pylorax.api.compose.get_kernel_append(recipe)[source]

Return the customizations.kernel append value

Parameters
@@ -383,14 +390,14 @@ even though the results are applied differently.

append value or empty string

Return type
-

str

+

str

-
+
-pylorax.api.compose.get_keyboard_layout(recipe)[source]
+pylorax.api.compose.get_keyboard_layout(recipe)[source]

Return the customizations.locale.keyboard list

Parameters
@@ -400,14 +407,14 @@ even though the results are applied differently.

The keyboard layout string

Return type
-

str

+

str

-
+
-pylorax.api.compose.get_languages(recipe)[source]
+pylorax.api.compose.get_languages(recipe)[source]

Return the customizations.locale.languages list

Parameters
@@ -417,14 +424,14 @@ even though the results are applied differently.

list of language strings

Return type
-

list

+

list

-
+
-pylorax.api.compose.get_services(recipe)[source]
+pylorax.api.compose.get_services(recipe)[source]

Return the customizations.services settings

Parameters
@@ -434,14 +441,14 @@ even though the results are applied differently.

A dict of settings

Return type
-

dict

+

dict

-
+
-pylorax.api.compose.get_timezone_settings(recipe)[source]
+pylorax.api.compose.get_timezone_settings(recipe)[source]

Return the customizations.timezone dict

Parameters
@@ -451,20 +458,20 @@ even though the results are applied differently.

append value or empty string

Return type
-

dict

+

dict

-
+
-pylorax.api.compose.keyboard_cmd(line, layout)[source]
+pylorax.api.compose.keyboard_cmd(line, layout)[source]

Update the keyboard line with the layout

Parameters
    -
  • line (str) – The keyboard … line

  • -
  • settings (str) – The keyboard layout

  • +
  • line (str) – The keyboard … line

  • +
  • settings (str) – The keyboard layout

@@ -472,15 +479,15 @@ even though the results are applied differently.

is parsed correctly, and re-assembled for inclusion into the final kickstart

-
+
-pylorax.api.compose.lang_cmd(line, languages)[source]
+pylorax.api.compose.lang_cmd(line, languages)[source]

Update the lang line with the languages

Parameters
    -
  • line (str) – The lang … line

  • -
  • settings (list) – The list of languages

  • +
  • line (str) – The lang … line

  • +
  • settings (list) – The list of languages

@@ -488,23 +495,23 @@ is parsed correctly, and re-assembled for inclusion into the final kickstart

is parsed correctly, and re-assembled for inclusion into the final kickstart

-
+
-pylorax.api.compose.move_compose_results(cfg, results_dir)[source]
+pylorax.api.compose.move_compose_results(cfg, results_dir)[source]

Move the final image to the results_dir and cleanup the unneeded compose files

Parameters
  • cfg (DataHolder) – Build configuration

  • -
  • results_dir (str) – Directory to put the results into

  • +
  • results_dir (str) – Directory to put the results into

-
+
-pylorax.api.compose.repo_to_ks(r, url='url')[source]
+pylorax.api.compose.repo_to_ks(r, url='url')[source]

Return a kickstart line with the correct args. :param r: DNF repository information :type r: dnf.Repo @@ -515,15 +522,15 @@ is parsed correctly, and re-assembled for inclusion into the final kickstart

Set url to “baseurl” if it is a repo, leave it as “url” for the installation url.

-
+
-pylorax.api.compose.services_cmd(line, settings)[source]
+pylorax.api.compose.services_cmd(line, settings)[source]

Update the services line with additional services to enable/disable

Parameters
    -
  • line (str) – The services … line

  • -
  • settings (dict) – A dict with the list of services to enable and disable

  • +
  • line (str) – The services … line

  • +
  • settings (dict) – A dict with the list of services to enable and disable

@@ -531,31 +538,31 @@ is parsed correctly, and re-assembled for inclusion into the final kickstart

is parsed correctly, and re-assembled for inclusion into the final kickstart

-
+
-pylorax.api.compose.start_build(cfg, dnflock, gitlock, branch, recipe_name, compose_type, test_mode=0)[source]
+pylorax.api.compose.start_build(cfg, dnflock, gitlock, branch, recipe_name, compose_type, test_mode=0)[source]

Start the build

Parameters
  • cfg (ComposerConfig) – Configuration object

  • dnflock (YumLock) – Lock and YumBase for depsolving

  • -
  • recipe (str) – The recipe to build

  • -
  • compose_type (str) – The type of output to create from the recipe

  • +
  • recipe (str) – The recipe to build

  • +
  • compose_type (str) – The type of output to create from the recipe

Returns

Unique ID for the build that can be used to track its status

Return type
-

str

+

str

-
+
-pylorax.api.compose.test_templates(dbo, share_dir)[source]
+pylorax.api.compose.test_templates(dbo, share_dir)[source]

Try depsolving each of the the templates and report any errors

Parameters
@@ -571,15 +578,15 @@ is parsed correctly, and re-assembled for inclusion into the final kickstart

Return a list of templates and errors encountered or an empty list

-
+
-pylorax.api.compose.timezone_cmd(line, settings)[source]
+pylorax.api.compose.timezone_cmd(line, settings)[source]

Update the timezone line with the settings

Parameters
    -
  • line (str) – The timezone … line

  • -
  • settings (dict) – A dict with timezone and/or ntpservers list

  • +
  • line (str) – The timezone … line

  • +
  • settings (dict) – A dict with timezone and/or ntpservers list

@@ -587,9 +594,9 @@ is parsed correctly, and re-assembled for inclusion into the final kickstart

is parsed correctly, and re-assembled for inclusion into the final kickstart

-
+
-pylorax.api.compose.write_ks_group(f, group)[source]
+pylorax.api.compose.write_ks_group(f, group)[source]

Write kickstart group entry

Parameters
@@ -602,22 +609,22 @@ is parsed correctly, and re-assembled for inclusion into the final kickstart

gid is optional

-
+
-pylorax.api.compose.write_ks_root(f, user)[source]
+pylorax.api.compose.write_ks_root(f, user)[source]

Write kickstart root password and sshkey entry

Parameters
  • f (open file object) – kickstart file object

  • -
  • user (dict) – A blueprint user dictionary

  • +
  • user (dict) – A blueprint user dictionary

Returns

True if it wrote a rootpw command to the kickstart

Return type
-

bool

+

bool

If the entry contains a ssh key, use sshkey to write it @@ -626,15 +633,15 @@ If it contains password, use rootpw to set it

for root.

-
+
-pylorax.api.compose.write_ks_user(f, user)[source]
+pylorax.api.compose.write_ks_user(f, user)[source]

Write kickstart user and sshkey entry

Parameters
  • f (open file object) – kickstart file object

  • -
  • user (dict) – A blueprint user dictionary

  • +
  • user (dict) – A blueprint user dictionary

@@ -647,35 +654,35 @@ with whatever options are relevant.

pylorax.api.config module

-
+
-class pylorax.api.config.ComposerConfig(*args, **kwargs)[source]
+class pylorax.api.config.ComposerConfig(*args, **kwargs)[source]

Bases: configparser.SafeConfigParser

-
+
-get_default(section, option, default)[source]
+get_default(section, option, default)[source]
-
+
-pylorax.api.config.configure(conf_file='/etc/lorax/composer.conf', root_dir='/', test_config=False)[source]
+pylorax.api.config.configure(conf_file='/etc/lorax/composer.conf', root_dir='/', test_config=False)[source]

lorax-composer configuration

Parameters
    -
  • conf_file (str) – Path to the config file overriding the default settings

  • -
  • root_dir (str) – Directory to prepend to paths, defaults to /

  • -
  • test_config (bool) – Set to True to skip reading conf_file

  • +
  • conf_file (str) – Path to the config file overriding the default settings

  • +
  • root_dir (str) – Directory to prepend to paths, defaults to /

  • +
  • test_config (bool) – Set to True to skip reading conf_file

-
+
-pylorax.api.config.make_dnf_dirs(conf)[source]
+pylorax.api.config.make_dnf_dirs(conf)[source]

Make any missing dnf directories

Parameters
@@ -687,15 +694,15 @@ with whatever options are relevant.

-
+
-pylorax.api.config.make_queue_dirs(conf, gid)[source]
+pylorax.api.config.make_queue_dirs(conf, gid)[source]

Make any missing queue directories

Parameters
  • conf (ComposerConfig) – The configuration to use

  • -
  • gid (int) – Group ID that has access to the queue directories

  • +
  • gid (int) – Group ID that has access to the queue directories

Returns
@@ -710,9 +717,9 @@ with whatever options are relevant.

pylorax.api.crossdomain module

-
+
-pylorax.api.crossdomain.crossdomain(origin, methods=None, headers=None, max_age=21600, attach_to_all=True, automatic_options=True)[source]
+pylorax.api.crossdomain.crossdomain(origin, methods=None, headers=None, max_age=21600, attach_to_all=True, automatic_options=True)[source]
@@ -721,54 +728,54 @@ with whatever options are relevant.

pylorax.api.projects module

-
+
-exception pylorax.api.projects.ProjectsError[source]
-

Bases: Exception

+exception pylorax.api.projects.ProjectsError[source] +

Bases: Exception

-
+
-pylorax.api.projects.api_changelog(changelog)[source]
+pylorax.api.projects.api_changelog(changelog)[source]

Convert the changelog to a string

Parameters
-

changelog (tuple) – A list of time, author, string tuples.

+

changelog (tuple) – A list of time, author, string tuples.

Returns

The most recent changelog text or “”

Return type
-

str

+

str

This returns only the most recent changelog entry.

-
+
-pylorax.api.projects.api_time(t)[source]
+pylorax.api.projects.api_time(t)[source]

Convert time since epoch to a string

Parameters
-

t (int) – Seconds since epoch

+

t (int) – Seconds since epoch

Returns

Time string

Return type
-

str

+

str

-
+
-pylorax.api.projects.delete_repo_source(source_glob, source_name)[source]
+pylorax.api.projects.delete_repo_source(source_glob, source_name)[source]

Delete a source from a repo file

Parameters
-

source_glob (str) – A glob of the repo sources to search

+

source_glob (str) – A glob of the repo sources to search

Returns

None

@@ -783,32 +790,32 @@ If it is the last one in the file, delete the file.

source_name isn’t passed to it.

-
+
-pylorax.api.projects.dep_evra(dep)[source]
+pylorax.api.projects.dep_evra(dep)[source]

Return the epoch:version-release.arch for the dep

Parameters
-

dep (dict) – dependency dict

+

dep (dict) – dependency dict

Returns

epoch:version-release.arch

Return type
-

str

+

str

-
+
-pylorax.api.projects.dep_nevra(dep)[source]
+pylorax.api.projects.dep_nevra(dep)[source]

Return the name-epoch:version-release.arch

-
+
-pylorax.api.projects.dnf_repo_to_file_repo(repo)[source]
+pylorax.api.projects.dnf_repo_to_file_repo(repo)[source]

Return a string representation of a DNF Repo object suitable for writing to a .repo file

Parameters
@@ -818,7 +825,7 @@ source_name isn’t passed to it.

A string

Return type
-

str

+

str

The DNF Repo.dump() function does not produce a string that can be used as a dnf .repo file, @@ -826,22 +833,22 @@ it ouputs baseurl and gpgkey as python lists which DNF cannot read. So do this m only the attributes we care about.

-
+
-pylorax.api.projects.estimate_size(packages, block_size=6144)[source]
+pylorax.api.projects.estimate_size(packages, block_size=6144)[source]

Estimate the installed size of a package list

Parameters
  • packages (list of hawkey.Package objects) – The packages to be installed

  • -
  • block_size (int) – The block size to use for rounding up file sizes.

  • +
  • block_size (int) – The block size to use for rounding up file sizes.

Returns

The estimated size of installed packages

Return type
-

int

+

int

Estimating actual requirements is difficult without the actual file sizes, which @@ -849,13 +856,13 @@ dnf doesn’t provide access to. So use the file count and block size to estimat a minimum size for each package.

-
+
-pylorax.api.projects.get_repo_sources(source_glob)[source]
+pylorax.api.projects.get_repo_sources(source_glob)[source]

Return a list of sources from a directory of yum repositories

Parameters
-

source_glob (str) – A glob to use to match the source files, including full path

+

source_glob (str) – A glob to use to match the source files, including full path

Returns

A list of the source ids in all of the matching files

@@ -866,13 +873,13 @@ a minimum size for each package.

-
+
-pylorax.api.projects.get_source_ids(source_path)[source]
+pylorax.api.projects.get_source_ids(source_path)[source]

Return a list of the source ids in a file

Parameters
-

source_path (str) – Full path and filename of the source (yum repo) file

+

source_path (str) – Full path and filename of the source (yum repo) file

Returns

A list of source id strings

@@ -883,15 +890,15 @@ a minimum size for each package.

-
+
-pylorax.api.projects.modules_info(dbo, module_names)[source]
+pylorax.api.projects.modules_info(dbo, module_names)[source]

Return details about a module, including dependencies

Parameters
  • dbo (dnf.Base) – dnf base object

  • -
  • module_names (str) – Names of the modules to get info about

  • +
  • module_names (str) – Names of the modules to get info about

Returns
@@ -903,16 +910,16 @@ a minimum size for each package.

-
+
-pylorax.api.projects.modules_list(dbo, module_names)[source]
+pylorax.api.projects.modules_list(dbo, module_names)[source]

Return a list of modules

Parameters
  • dbo (dnf.Base) – dnf base object

  • offset – Number of modules to skip

  • -
  • limit (int) – Maximum number of modules to return

  • +
  • limit (int) – Maximum number of modules to return

Returns
@@ -926,9 +933,9 @@ a minimum size for each package.

and sets the type to “rpm”

-
+
-pylorax.api.projects.pkg_to_build(pkg)[source]
+pylorax.api.projects.pkg_to_build(pkg)[source]

Extract the build details from a hawkey.Package object

Parameters
@@ -938,16 +945,16 @@ and sets the type to “rpm”

A dict with the build details, epoch, release, arch, build_time, changelog, …

Return type
-

dict

+

dict

metadata entries are hard-coded to {}

Note that this only returns the build dict, it does not include the name, description, etc.

-
+
-pylorax.api.projects.pkg_to_dep(pkg)[source]
+pylorax.api.projects.pkg_to_dep(pkg)[source]

Extract the info from a hawkey.Package object

Parameters
@@ -957,14 +964,14 @@ and sets the type to “rpm”

A dict with name, epoch, version, release, arch

Return type
-

dict

+

dict

-
+
-pylorax.api.projects.pkg_to_project(pkg)[source]
+pylorax.api.projects.pkg_to_project(pkg)[source]

Extract the details from a hawkey.Package object

Parameters
@@ -974,15 +981,15 @@ and sets the type to “rpm”

A dict with the name, summary, description, and url.

Return type
-

dict

+

dict

upstream_vcs is hard-coded to UPSTREAM_VCS

-
+
-pylorax.api.projects.pkg_to_project_info(pkg)[source]
+pylorax.api.projects.pkg_to_project_info(pkg)[source]

Extract the details from a hawkey.Package object

Parameters
@@ -992,33 +999,33 @@ and sets the type to “rpm”

A dict with the project details, as well as epoch, release, arch, build_time, changelog, …

Return type
-

dict

+

dict

metadata entries are hard-coded to {}

-
+
-pylorax.api.projects.proj_to_module(proj)[source]
+pylorax.api.projects.proj_to_module(proj)[source]

Extract the name from a project_info dict

Parameters
-

pkg (dict) – dict with package details

+

pkg (dict) – dict with package details

Returns

A dict with name, and group_type

Return type
-

dict

+

dict

group_type is hard-coded to “rpm”

-
+
-pylorax.api.projects.projects_depsolve(dbo, projects, groups)[source]
+pylorax.api.projects.projects_depsolve(dbo, projects, groups)[source]

Return the dependencies for a list of projects

Parameters
@@ -1040,9 +1047,9 @@ and sets the type to “rpm”

-
+
-pylorax.api.projects.projects_depsolve_with_size(dbo, projects, groups, with_core=True)[source]
+pylorax.api.projects.projects_depsolve_with_size(dbo, projects, groups, with_core=True)[source]

Return the dependencies and installed size for a list of projects

Parameters
@@ -1056,7 +1063,7 @@ and sets the type to “rpm”

installed size and a list of NEVRA’s of the project and its dependencies

Return type
-

tuple of (int, list of dicts)

+

tuple of (int, list of dicts)

Raises

ProjectsError if there was a problem installing something

@@ -1064,15 +1071,15 @@ and sets the type to “rpm”

-
+
-pylorax.api.projects.projects_info(dbo, project_names)[source]
+pylorax.api.projects.projects_info(dbo, project_names)[source]

Return details about specific projects

Parameters
  • dbo (dnf.Base) – dnf base object

  • -
  • project_names (str) – List of names of projects to get info about

  • +
  • project_names (str) – List of names of projects to get info about

Returns
@@ -1085,9 +1092,9 @@ and sets the type to “rpm”

If project_names is None it will return the full list of available packages

-
+
-pylorax.api.projects.projects_list(dbo)[source]
+pylorax.api.projects.projects_list(dbo)[source]

Return a list of projects

Parameters
@@ -1102,22 +1109,22 @@ and sets the type to “rpm”

-
+
-pylorax.api.projects.repo_to_source(repo, system_source)[source]
+pylorax.api.projects.repo_to_source(repo, system_source)[source]

Return a Weldr Source dict created from the DNF Repository

Parameters
  • repo (dnf.RepoDict) – DNF Repository

  • -
  • system_source (bool) – True if this source is an immutable system source

  • +
  • system_source (bool) – True if this source is an immutable system source

Returns

A dict with Weldr Source fields filled in

Return type
-

dict

+

dict

Example:

@@ -1137,13 +1144,13 @@ and sets the type to “rpm”

-
+
-pylorax.api.projects.source_to_repo(source, dnf_conf)[source]
+pylorax.api.projects.source_to_repo(source, dnf_conf)[source]

Return a dnf Repo object created from a source dict

Parameters
-

source (dict) – A Weldr source dict

+

source (dict) – A Weldr source dict

Returns

A dnf Repo object

@@ -1173,15 +1180,15 @@ and sets the type to “rpm”

pylorax.api.queue module

Functions to monitor compose queue and run anaconda

-
+
-pylorax.api.queue.build_status(cfg, status_filter=None)[source]
+pylorax.api.queue.build_status(cfg, status_filter=None)[source]

Return the details of finished or failed builds

Parameters
  • cfg (ComposerConfig) – Configuration settings

  • -
  • status_filter (str) – What builds to return. None == all, “FINISHED”, or “FAILED”

  • +
  • status_filter (str) – What builds to return. None == all, “FINISHED”, or “FAILED”

Returns
@@ -1196,9 +1203,9 @@ system. It does not return the status of builds that have not been finished. Use queue_status() for those.

-
+
-pylorax.api.queue.check_queues(cfg)[source]
+pylorax.api.queue.check_queues(cfg)[source]

Check to make sure the new and run queue symlinks are correct

Parameters
@@ -1209,19 +1216,19 @@ Use queue_status() for those.

set in STATUS have a symlink in queue/new/

-
+
-pylorax.api.queue.compose_detail(results_dir)[source]
+pylorax.api.queue.compose_detail(results_dir)[source]

Return details about the build.

Parameters
-

results_dir (str) – The directory containing the metadata and results for the build

+

results_dir (str) – The directory containing the metadata and results for the build

Returns

A dictionary with details about the compose

Return type
-

dict

+

dict

Raises

IOError if it cannot read the directory, STATUS, or blueprint file.

@@ -1246,19 +1253,19 @@ None in Python (or null in JSON). The following timestamps are included:

-
+
-pylorax.api.queue.get_compose_type(results_dir)[source]
+pylorax.api.queue.get_compose_type(results_dir)[source]

Return the type of composition.

Parameters
-

results_dir (str) – The directory containing the metadata and results for the build

+

results_dir (str) – The directory containing the metadata and results for the build

Returns

The type of compose (eg. ‘tar’)

Return type
-

str

+

str

Raises

RuntimeError if no kickstart template can be found.

@@ -1266,13 +1273,13 @@ None in Python (or null in JSON). The following timestamps are included:

-
+
-pylorax.api.queue.get_image_name(uuid_dir)[source]
+pylorax.api.queue.get_image_name(uuid_dir)[source]

Return the filename and full path of the build’s image file

Parameters
-

uuid (str) – The UUID of the build

+

uuid (str) – The UUID of the build

Returns

The image filename and full path

@@ -1286,15 +1293,15 @@ None in Python (or null in JSON). The following timestamps are included:

-
+
-pylorax.api.queue.make_compose(cfg, results_dir)[source]
+pylorax.api.queue.make_compose(cfg, results_dir)[source]

Run anaconda with the final-kickstart.ks from results_dir

Parameters
  • cfg (DataHolder) – Configuration settings

  • -
  • results_dir (str) – The directory containing the metadata and results for the build

  • +
  • results_dir (str) – The directory containing the metadata and results for the build

Returns
@@ -1312,9 +1319,9 @@ moved into logs/anaconda/ and their ownership will be set to the user from the c object.

-
+
-pylorax.api.queue.monitor(cfg)[source]
+pylorax.api.queue.monitor(cfg)[source]

Monitor the queue for new compose requests

Parameters
@@ -1334,9 +1341,9 @@ will be created in the results directory.

from ./queue/run/ to ./queue/new/ and rerun them.

-
+
-pylorax.api.queue.queue_status(cfg)[source]
+pylorax.api.queue.queue_status(cfg)[source]

Return details about what is in the queue.

Parameters
@@ -1346,23 +1353,23 @@ from ./queue/run/ to ./queue/new/ and rerun them.

A list of the new composes, and a list of the running composes

Return type
-

dict

+

dict

This returns a dict with 2 lists. “new” is the list of uuids that are waiting to be built, and “run” has the uuids that are being built (currently limited to 1 at a time).

-
+
-pylorax.api.queue.start_queue_monitor(cfg, uid, gid)[source]
+pylorax.api.queue.start_queue_monitor(cfg, uid, gid)[source]

Start the queue monitor as a mp process

Parameters
  • cfg (ComposerConfig) – Configuration settings

  • -
  • uid (int) – User ID that owns the queue

  • -
  • gid (int) – Group ID that owns the queue

  • +
  • uid (int) – User ID that owns the queue

  • +
  • gid (int) – Group ID that owns the queue

Returns
@@ -1371,43 +1378,43 @@ and “run” has the uuids that are being built (currently limited to 1 at a ti
-
+
-pylorax.api.queue.uuid_cancel(cfg, uuid)[source]
+pylorax.api.queue.uuid_cancel(cfg, uuid)[source]

Cancel a build and delete its results

Parameters
  • cfg (ComposerConfig) – Configuration settings

  • -
  • uuid (str) – The UUID of the build

  • +
  • uuid (str) – The UUID of the build

Returns

True if it was canceled and deleted

Return type
-

bool

+

bool

Only call this if the build status is WAITING or RUNNING

-
+
-pylorax.api.queue.uuid_delete(cfg, uuid)[source]
+pylorax.api.queue.uuid_delete(cfg, uuid)[source]

Delete all of the results from a compose

Parameters
  • cfg (ComposerConfig) – Configuration settings

  • -
  • uuid (str) – The UUID of the build

  • +
  • uuid (str) – The UUID of the build

Returns

True if it was deleted

Return type
-

bool

+

bool

Raises

This will raise an error if the delete failed

@@ -1415,15 +1422,15 @@ and “run” has the uuids that are being built (currently limited to 1 at a ti
-
+
-pylorax.api.queue.uuid_image(cfg, uuid)[source]
+pylorax.api.queue.uuid_image(cfg, uuid)[source]

Return the filename and full path of the build’s image file

Parameters
  • cfg (ComposerConfig) – Configuration settings

  • -
  • uuid (str) – The UUID of the build

  • +
  • uuid (str) – The UUID of the build

Returns
@@ -1438,22 +1445,22 @@ and “run” has the uuids that are being built (currently limited to 1 at a ti
-
+
-pylorax.api.queue.uuid_info(cfg, uuid)[source]
+pylorax.api.queue.uuid_info(cfg, uuid)[source]

Return information about the composition

Parameters
  • cfg (ComposerConfig) – Configuration settings

  • -
  • uuid (str) – The UUID of the build

  • +
  • uuid (str) – The UUID of the build

Returns

dictionary of information about the composition or None

Return type
-

dict

+

dict

Raises

RuntimeError if there was a problem

@@ -1471,23 +1478,23 @@ and “run” has the uuids that are being built (currently limited to 1 at a ti
-
+
-pylorax.api.queue.uuid_log(cfg, uuid, size=1024)[source]
+pylorax.api.queue.uuid_log(cfg, uuid, size=1024)[source]

Return size kbytes from the end of the anaconda.log

Parameters
  • cfg (ComposerConfig) – Configuration settings

  • -
  • uuid (str) – The UUID of the build

  • -
  • size (int) – Number of kbytes to read. Default is 1024

  • +
  • uuid (str) – The UUID of the build

  • +
  • size (int) – Number of kbytes to read. Default is 1024

Returns

Up to size kbytes from the end of the log

Return type
-

str

+

str

Raises

RuntimeError if there was a problem (eg. no log file available)

@@ -1497,39 +1504,39 @@ and “run” has the uuids that are being built (currently limited to 1 at a ti attempt to start on a line boundry, and may return less than size kbytes.

-
+
-pylorax.api.queue.uuid_status(cfg, uuid)[source]
+pylorax.api.queue.uuid_status(cfg, uuid)[source]

Return the details of a specific UUID compose

Parameters
  • cfg (ComposerConfig) – Configuration settings

  • -
  • uuid (str) – The UUID of the build

  • +
  • uuid (str) – The UUID of the build

Returns

Details about the build

Return type
-

dict or None

+

dict or None

Returns the same dict as compose_details()

-
+
-pylorax.api.queue.uuid_tar(cfg, uuid, metadata=False, image=False, logs=False)[source]
+pylorax.api.queue.uuid_tar(cfg, uuid, metadata=False, image=False, logs=False)[source]

Return a tar of the build data

Parameters
  • cfg (ComposerConfig) – Configuration settings

  • -
  • uuid (str) – The UUID of the build

  • -
  • metadata (bool) – Set to true to include all the metadata needed to reproduce the build

  • -
  • image (bool) – Set to true to include the output image

  • -
  • logs (bool) – Set to true to include the logs from the build

  • +
  • uuid (str) – The UUID of the build

  • +
  • metadata (bool) – Set to true to include all the metadata needed to reproduce the build

  • +
  • image (bool) – Set to true to include the output image

  • +
  • logs (bool) – Set to true to include the logs from the build

Returns
@@ -1549,32 +1556,32 @@ the selected data to the caller by returning the Popen stdout from the tar proce

pylorax.api.recipes module

-
+
-class pylorax.api.recipes.CommitDetails(commit, timestamp, message, revision=None)[source]
+class pylorax.api.recipes.CommitDetails(commit, timestamp, message, revision=None)[source]

Bases: pylorax.base.DataHolder

-
+
-exception pylorax.api.recipes.CommitTimeValError[source]
-

Bases: Exception

+exception pylorax.api.recipes.CommitTimeValError[source] +

Bases: Exception

-
+
-pylorax.api.recipes.NewRecipeGit(toml_dict)[source]
+pylorax.api.recipes.NewRecipeGit(toml_dict)[source]

Create a RecipeGit object from fields in a TOML dict

Parameters
    -
  • rpmname (str) – Name of the rpm to create, also used as the prefix name in the tar archive

  • -
  • rpmversion (str) – Version of the rpm, eg. “1.0.0”

  • -
  • rpmrelease (str) – Release of the rpm, eg. “1”

  • -
  • summary (str) – Summary string for the rpm

  • -
  • repo (str) – URL of the get repo to clone and create the archive from

  • -
  • ref (str) – Git reference to check out. eg. origin/branch-name, git tag, or git commit hash

  • -
  • destination (str) – Path to install the / of the git repo at when installing the rpm

  • +
  • rpmname (str) – Name of the rpm to create, also used as the prefix name in the tar archive

  • +
  • rpmversion (str) – Version of the rpm, eg. “1.0.0”

  • +
  • rpmrelease (str) – Release of the rpm, eg. “1”

  • +
  • summary (str) – Summary string for the rpm

  • +
  • repo (str) – URL of the get repo to clone and create the archive from

  • +
  • ref (str) – Git reference to check out. eg. origin/branch-name, git tag, or git commit hash

  • +
  • destination (str) – Path to install the / of the git repo at when installing the rpm

Returns
@@ -1599,27 +1606,27 @@ the selected data to the caller by returning the Popen stdout from the tar proce

Currently there is no support for authentication

-
+
-class pylorax.api.recipes.Recipe(name, description, version, modules, packages, groups, customizations=None, gitrepos=None)[source]
-

Bases: dict

+class pylorax.api.recipes.Recipe(name, description, version, modules, packages, groups, customizations=None, gitrepos=None)[source] +

Bases: dict

A Recipe of package and modules

This is a subclass of dict that enforces the constructor arguments and adds a .filename property to return the recipe’s filename, and a .toml() function to return the recipe as a TOML string.

-
+
-bump_version(old_version=None)[source]
+bump_version(old_version=None)[source]

semver recipe version number bump

Parameters
-

old_version (str) – An optional old version number

+

old_version (str) – An optional old version number

Returns

The new version number or None

Return type
-

str

+

str

Raises

ValueError

@@ -1632,20 +1639,20 @@ If the old and new versions are the same, bump the patch level If they are different, check and return the new version

-
+
-property filename
+property filename

Return the Recipe’s filename

Replaces spaces in the name with ‘-‘ and appends .toml

-
+
-freeze(deps)[source]
+freeze(deps)[source]

Return a new Recipe with full module and package NEVRA

Parameters
-

deps (list() – A list of dependency NEVRA to use to fill in the modules and packages

+

deps (list() – A list of dependency NEVRA to use to fill in the modules and packages

Returns

A new Recipe object

@@ -1656,83 +1663,83 @@ If they are different, check and return the new version

-
+
-property group_names
+property group_names

Return the names of the groups. Groups do not have versions.

-
+
-property module_names
+property module_names

Return the names of the modules

-
+
-property module_nver
+property module_nver

Return the names and version globs of the modules

-
+
-property package_names
+property package_names

Return the names of the packages

-
+
-property package_nver
+property package_nver

Return the names and version globs of the packages

-
+
-toml()[source]
+toml()[source]

Return the Recipe in TOML format

-
+
-exception pylorax.api.recipes.RecipeError[source]
-

Bases: Exception

+exception pylorax.api.recipes.RecipeError[source] +

Bases: Exception

-
+
-exception pylorax.api.recipes.RecipeFileError[source]
-

Bases: Exception

+exception pylorax.api.recipes.RecipeFileError[source] +

Bases: Exception

-
+
-class pylorax.api.recipes.RecipeGit(rpmname, rpmversion, rpmrelease, summary, repo, ref, destination)[source]
-

Bases: dict

+class pylorax.api.recipes.RecipeGit(rpmname, rpmversion, rpmrelease, summary, repo, ref, destination)[source] +

Bases: dict

-
+
-class pylorax.api.recipes.RecipeGroup(name)[source]
-

Bases: dict

+class pylorax.api.recipes.RecipeGroup(name)[source] +

Bases: dict

-
+
-class pylorax.api.recipes.RecipeModule(name, version)[source]
-

Bases: dict

+class pylorax.api.recipes.RecipeModule(name, version)[source] +

Bases: dict

-
+
-class pylorax.api.recipes.RecipePackage(name, version)[source]
+class pylorax.api.recipes.RecipePackage(name, version)[source]

Bases: pylorax.api.recipes.RecipeModule

-
+
-pylorax.api.recipes.check_list_case(expected_keys, recipe_keys, prefix='')[source]
+pylorax.api.recipes.check_list_case(expected_keys, recipe_keys, prefix='')[source]

Check the case of the recipe keys

Parameters
@@ -1750,19 +1757,19 @@ If they are different, check and return the new version

-
+
-pylorax.api.recipes.check_recipe_dict(recipe_dict)[source]
+pylorax.api.recipes.check_recipe_dict(recipe_dict)[source]

Check a dict before using it to create a new Recipe

Parameters
-

recipe_dict (dict) – A plain dict of the recipe

+

recipe_dict (dict) – A plain dict of the recipe

Returns

True if dict is ok

Return type
-

bool

+

bool

Raises

RecipeError

@@ -1775,9 +1782,9 @@ are of the correct format, when included.

a string that can be presented to users.

-
+
-pylorax.api.recipes.check_required_list(lst, fields)[source]
+pylorax.api.recipes.check_required_list(lst, fields)[source]

Check a list of dicts for required fields

Parameters
@@ -1795,15 +1802,15 @@ a string that can be presented to users.

-
+
-pylorax.api.recipes.commit_recipe(repo, branch, recipe)[source]
+pylorax.api.recipes.commit_recipe(repo, branch, recipe)[source]

Commit a recipe to a branch

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • +
  • branch (str) – Branch name

  • recipe (Recipe) – Recipe to commit

@@ -1819,16 +1826,16 @@ a string that can be presented to users.

-
+
-pylorax.api.recipes.commit_recipe_directory(repo, branch, directory)[source]
+pylorax.api.recipes.commit_recipe_directory(repo, branch, directory)[source]

Commit all *.toml files from a directory, if they aren’t already in git.

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • directory (str) – The directory of *.toml recipes to commit

  • +
  • branch (str) – Branch name

  • +
  • directory (str) – The directory of *.toml recipes to commit

Returns
@@ -1842,16 +1849,16 @@ a string that can be presented to users.

be tried.

-
+
-pylorax.api.recipes.commit_recipe_file(repo, branch, filename)[source]
+pylorax.api.recipes.commit_recipe_file(repo, branch, filename)[source]

Commit a recipe file to a branch

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • filename (str) – Path to the recipe file to commit

  • +
  • branch (str) – Branch name

  • +
  • filename (str) – Path to the recipe file to commit

Returns
@@ -1866,22 +1873,22 @@ be tried.

-
+
-pylorax.api.recipes.customizations_diff(old_recipe, new_recipe)[source]
+pylorax.api.recipes.customizations_diff(old_recipe, new_recipe)[source]

Diff the customizations sections from two versions of a recipe

-
+
-pylorax.api.recipes.delete_file(repo, branch, filename)[source]
+pylorax.api.recipes.delete_file(repo, branch, filename)[source]

Delete a file from a branch.

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • filename (str) – filename to delete

  • +
  • branch (str) – Branch name

  • +
  • filename (str) – filename to delete

Returns
@@ -1896,16 +1903,16 @@ be tried.

-
+
-pylorax.api.recipes.delete_recipe(repo, branch, recipe_name)[source]
+pylorax.api.recipes.delete_recipe(repo, branch, recipe_name)[source]

Delete a recipe from a branch.

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • recipe_name (str) – Recipe name to delete

  • +
  • branch (str) – Branch name

  • +
  • recipe_name (str) – Recipe name to delete

Returns
@@ -1920,38 +1927,38 @@ be tried.

-
+
-pylorax.api.recipes.diff_lists(title, field, old_items, new_items)[source]
+pylorax.api.recipes.diff_lists(title, field, old_items, new_items)[source]

Return the differences between two lists of dicts.

Parameters
    -
  • title (str) – Title of the entry

  • -
  • field (str) – Field to use as the key for comparisons

  • -
  • old_items (list(dict)) – List of item dicts with “name” field

  • -
  • new_items (list(dict)) – List of item dicts with “name” field

  • +
  • title (str) – Title of the entry

  • +
  • field (str) – Field to use as the key for comparisons

  • +
  • old_items (list(dict)) – List of item dicts with “name” field

  • +
  • new_items (list(dict)) – List of item dicts with “name” field

Returns

List of diff dicts with old/new entries

Return type
-

list(dict)

+

list(dict)

-
+
-pylorax.api.recipes.find_commit_tag(repo, branch, filename, commit_id)[source]
+pylorax.api.recipes.find_commit_tag(repo, branch, filename, commit_id)[source]

Find the tag that matches the commit_id

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • filename (str) – filename to revert

  • +
  • branch (str) – Branch name

  • +
  • filename (str) – filename to revert

  • commit_id (Git.OId) – The commit id to check

@@ -1959,7 +1966,7 @@ be tried.

The tag or None if there isn’t one

Return type
-

str or None

+

str or None

There should be only 1 tag pointing to a commit, but there may not @@ -1967,15 +1974,15 @@ be a tag at all.

The tag will look like: ‘refs/tags/<branch>/<filename>/r<revision>’

-
+
-pylorax.api.recipes.find_field_value(field, value, lst)[source]
+pylorax.api.recipes.find_field_value(field, value, lst)[source]

Find a field matching value in the list of dicts.

Parameters
    -
  • field (str) – field to search for

  • -
  • value (str) – value to match in the field

  • +
  • field (str) – field to search for

  • +
  • value (str) – value to match in the field

  • lst (list of dict) – List of dict’s with field

@@ -1983,7 +1990,7 @@ be a tag at all.

First dict with matching field:value, or None

Return type
-

dict or None

+

dict or None

Used to return a specific entry from a list that looks like this:

@@ -1991,14 +1998,14 @@ be a tag at all.

find_field_value(“name”, “one”, lst) will return the matching dict.

-
+
-pylorax.api.recipes.find_name(name, lst)[source]
+pylorax.api.recipes.find_name(name, lst)[source]

Find the dict matching the name in a list and return it.

Parameters
    -
  • name (str) – Name to search for

  • +
  • name (str) – Name to search for

  • lst (list of dict) – List of dict’s with “name” field

@@ -2006,15 +2013,15 @@ be a tag at all.

First dict with matching name, or None

Return type
-

dict or None

+

dict or None

This is just a wrapper for find_field_value with field set to “name”

-
+
-pylorax.api.recipes.find_recipe_obj(path, recipe, default=None)[source]
+pylorax.api.recipes.find_recipe_obj(path, recipe, default=None)[source]

Find a recipe object

Parameters
@@ -2031,15 +2038,15 @@ return the default if it doesn’t exist.

find_recipe_obj([“customizations”, “hostname”], recipe, “”)

-
+
-pylorax.api.recipes.get_commit_details(commit, revision=None)[source]
+pylorax.api.recipes.get_commit_details(commit, revision=None)[source]

Return the details about a specific commit.

Parameters
  • commit (Git.Commit) – The commit to get details from

  • -
  • revision (int) – Optional commit revision

  • +
  • revision (int) – Optional commit revision

Returns
@@ -2054,39 +2061,39 @@ return the default if it doesn’t exist.

-
+
-pylorax.api.recipes.get_revision_from_tag(tag)[source]
+pylorax.api.recipes.get_revision_from_tag(tag)[source]

Return the revision number from a tag

Parameters
-

tag (str) – The tag to exract the revision from

+

tag (str) – The tag to exract the revision from

Returns

The integer revision or None

Return type
-

int or None

+

int or None

The revision is the part after the r in ‘branch/filename/rXXX’

-
+
-pylorax.api.recipes.gfile(path)[source]
+pylorax.api.recipes.gfile(path)[source]

Convert a string path to GFile for use with Git

-
+
-pylorax.api.recipes.head_commit(repo, branch)[source]
+pylorax.api.recipes.head_commit(repo, branch)[source]

Get the branch’s HEAD Commit Object

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • +
  • branch (str) – Branch name

Returns
@@ -2101,36 +2108,36 @@ return the default if it doesn’t exist.

-
+
-pylorax.api.recipes.is_commit_tag(repo, commit_id, tag)[source]
+pylorax.api.recipes.is_commit_tag(repo, commit_id, tag)[source]

Check to see if a tag points to a specific commit.

Parameters
  • repo (Git.Repository) – Open repository

  • commit_id (Git.OId) – The commit id to check

  • -
  • tag (str) – The tag to check

  • +
  • tag (str) – The tag to check

Returns

True if the tag points to the commit, False otherwise

Return type
-

bool

+

bool

-
+
-pylorax.api.recipes.is_parent_diff(repo, filename, tree, parent)[source]
+pylorax.api.recipes.is_parent_diff(repo, filename, tree, parent)[source]

Check to see if the commit is different from its parents

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • filename (str) – filename to revert

  • +
  • filename (str) – filename to revert

  • tree (Git.Tree) – The commit’s tree

  • parent (Git.Commit) – The commit’s parent commit

@@ -2139,27 +2146,27 @@ return the default if it doesn’t exist.

True if filename in the commit is different from its parents

Return type
-

bool

+

bool

-
+
-pylorax.api.recipes.list_branch_files(repo, branch)[source]
+pylorax.api.recipes.list_branch_files(repo, branch)[source]

Return a sorted list of the files on the branch HEAD

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • +
  • branch (str) – Branch name

Returns

A sorted list of the filenames

Return type
-

list(str)

+

list(str)

Raises

Can raise errors from Ggit

@@ -2167,22 +2174,22 @@ return the default if it doesn’t exist.

-
+
-pylorax.api.recipes.list_commit_files(repo, commit)[source]
+pylorax.api.recipes.list_commit_files(repo, commit)[source]

Return a sorted list of the files on a commit

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • commit (str) – The commit hash to list

  • +
  • commit (str) – The commit hash to list

Returns

A sorted list of the filenames

Return type
-

list(str)

+

list(str)

Raises

Can raise errors from Ggit

@@ -2190,24 +2197,24 @@ return the default if it doesn’t exist.

-
+
-pylorax.api.recipes.list_commits(repo, branch, filename, limit=0)[source]
+pylorax.api.recipes.list_commits(repo, branch, filename, limit=0)[source]

List the commit history of a file on a branch.

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • filename (str) – filename to revert

  • -
  • limit (int) – Number of commits to return (0=all)

  • +
  • branch (str) – Branch name

  • +
  • filename (str) – filename to revert

  • +
  • limit (int) – Number of commits to return (0=all)

Returns

A list of commit details

Return type
-

list(CommitDetails)

+

list(CommitDetails)

Raises

Can raise errors from Ggit

@@ -2215,9 +2222,9 @@ return the default if it doesn’t exist.

-
+
-pylorax.api.recipes.open_or_create_repo(path)[source]
+pylorax.api.recipes.open_or_create_repo(path)[source]

Open an existing repo, or create a new one

Parameters
@@ -2238,15 +2245,15 @@ If a repo already exists it will be opened and returned instead of creating a new one.

-
+
-pylorax.api.recipes.prepare_commit(repo, branch, builder)[source]
+pylorax.api.recipes.prepare_commit(repo, branch, builder)[source]

Prepare for a commit

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • +
  • branch (str) – Branch name

  • builder (TreeBuilder) – instance of TreeBuilder

@@ -2254,7 +2261,7 @@ creating a new one.

(Tree, Sig, Ref)

Return type
-

tuple

+

tuple

Raises

Can raise errors from Ggit

@@ -2262,24 +2269,24 @@ creating a new one.

-
+
-pylorax.api.recipes.read_commit(repo, branch, filename, commit=None)[source]
+pylorax.api.recipes.read_commit(repo, branch, filename, commit=None)[source]

Return the contents of a file on a specific branch or commit.

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • filename (str) – filename to read

  • -
  • commit (str) – Optional commit hash

  • +
  • branch (str) – Branch name

  • +
  • filename (str) – filename to read

  • +
  • commit (str) – Optional commit hash

Returns

The commit id, and the contents of the commit

Return type
-

tuple(str, str)

+

tuple(str, str)

Raises

Can raise errors from Ggit

@@ -2289,22 +2296,22 @@ creating a new one.

commit:filename

-
+
-pylorax.api.recipes.read_commit_spec(repo, spec)[source]
+pylorax.api.recipes.read_commit_spec(repo, spec)[source]

Return the raw content of the blob specified by the spec

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • spec (str) – Git revparse spec

  • +
  • spec (str) – Git revparse spec

Returns

Contents of the commit

Return type
-

str

+

str

Raises

Can raise errors from Ggit

@@ -2313,24 +2320,24 @@ commit:filename

eg. To read the README file from master the spec is “master:README”

-
+
-pylorax.api.recipes.read_recipe_and_id(repo, branch, recipe_name, commit=None)[source]
+pylorax.api.recipes.read_recipe_and_id(repo, branch, recipe_name, commit=None)[source]

Read a recipe commit and its id from git

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • recipe_name (str) – Recipe name to read

  • -
  • commit (str) – Optional commit hash

  • +
  • branch (str) – Branch name

  • +
  • recipe_name (str) – Recipe name to read

  • +
  • commit (str) – Optional commit hash

Returns

The commit id, and a Recipe object

Return type
-

tuple(str, Recipe)

+

tuple(str, Recipe)

Raises

Can raise errors from Ggit

@@ -2340,17 +2347,17 @@ commit:filename

commit:filename

-
+
-pylorax.api.recipes.read_recipe_commit(repo, branch, recipe_name, commit=None)[source]
+pylorax.api.recipes.read_recipe_commit(repo, branch, recipe_name, commit=None)[source]

Read a recipe commit from git and return a Recipe object

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • recipe_name (str) – Recipe name to read

  • -
  • commit (str) – Optional commit hash

  • +
  • branch (str) – Branch name

  • +
  • recipe_name (str) – Recipe name to read

  • +
  • commit (str) – Optional commit hash

Returns
@@ -2367,9 +2374,9 @@ commit:filename

commit:filename

-
+
-pylorax.api.recipes.recipe_diff(old_recipe, new_recipe)[source]
+pylorax.api.recipes.recipe_diff(old_recipe, new_recipe)[source]

Diff two versions of a recipe

Parameters
@@ -2382,25 +2389,25 @@ commit:filename

A list of diff dict entries with old/new

Return type
-

list(dict)

+

list(dict)

-
+
-pylorax.api.recipes.recipe_filename(name)[source]
+pylorax.api.recipes.recipe_filename(name)[source]

Return the toml filename for a recipe

Replaces spaces with ‘-‘ and appends ‘.toml’

-
+
-pylorax.api.recipes.recipe_from_dict(recipe_dict)[source]
+pylorax.api.recipes.recipe_from_dict(recipe_dict)[source]

Create a Recipe object from a plain dict.

Parameters
-

recipe_dict (dict) – A plain dict of the recipe

+

recipe_dict (dict) – A plain dict of the recipe

Returns

A Recipe object

@@ -2414,13 +2421,13 @@ commit:filename

-
+
-pylorax.api.recipes.recipe_from_file(recipe_path)[source]
+pylorax.api.recipes.recipe_from_file(recipe_path)[source]

Return a recipe file as a Recipe object

Parameters
-

recipe_path (str) – Path to the recipe fila

+

recipe_path (str) – Path to the recipe fila

Returns

A Recipe object

@@ -2431,13 +2438,13 @@ commit:filename

-
+
-pylorax.api.recipes.recipe_from_toml(recipe_str)[source]
+pylorax.api.recipes.recipe_from_toml(recipe_str)[source]

Create a Recipe object from a toml string.

Parameters
-

recipe_str (str) – The Recipe TOML string

+

recipe_str (str) – The Recipe TOML string

Returns

A Recipe object

@@ -2451,38 +2458,38 @@ commit:filename

-
+
-pylorax.api.recipes.repo_file_exists(repo, branch, filename)[source]
+pylorax.api.recipes.repo_file_exists(repo, branch, filename)[source]

Return True if the filename exists on the branch

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • filename (str) – Filename to check

  • +
  • branch (str) – Branch name

  • +
  • filename (str) – Filename to check

Returns

True if the filename exists on the HEAD of the branch, False otherwise.

Return type
-

bool

+

bool

-
+
-pylorax.api.recipes.revert_file(repo, branch, filename, commit)[source]
+pylorax.api.recipes.revert_file(repo, branch, filename, commit)[source]

Revert the contents of a file to that of a previous commit

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • filename (str) – filename to revert

  • -
  • commit (str) – Commit hash

  • +
  • branch (str) – Branch name

  • +
  • filename (str) – filename to revert

  • +
  • commit (str) – Commit hash

Returns
@@ -2497,17 +2504,17 @@ commit:filename

-
+
-pylorax.api.recipes.revert_recipe(repo, branch, recipe_name, commit)[source]
+pylorax.api.recipes.revert_recipe(repo, branch, recipe_name, commit)[source]

Revert the contents of a recipe to that of a previous commit

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • recipe_name (str) – Recipe name to revert

  • -
  • commit (str) – Commit hash

  • +
  • branch (str) – Branch name

  • +
  • recipe_name (str) – Recipe name to revert

  • +
  • commit (str) – Commit hash

Returns
@@ -2522,16 +2529,16 @@ commit:filename

-
+
-pylorax.api.recipes.tag_file_commit(repo, branch, filename)[source]
+pylorax.api.recipes.tag_file_commit(repo, branch, filename)[source]

Tag a file’s most recent commit

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • filename (str) – Filename to tag

  • +
  • branch (str) – Branch name

  • +
  • filename (str) – Filename to tag

Returns
@@ -2550,16 +2557,16 @@ Revisions start at 1 and increment for each new commit that is tagged. If the commit has already been tagged it will return false.

-
+
-pylorax.api.recipes.tag_recipe_commit(repo, branch, recipe_name)[source]
+pylorax.api.recipes.tag_recipe_commit(repo, branch, recipe_name)[source]

Tag a file’s most recent commit

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • recipe_name (str) – Recipe name to tag

  • +
  • branch (str) – Branch name

  • +
  • recipe_name (str) – Recipe name to tag

Returns
@@ -2575,18 +2582,18 @@ If the commit has already been tagged it will return false.

Uses tag_file_commit()

-
+
-pylorax.api.recipes.write_commit(repo, branch, filename, message, content)[source]
+pylorax.api.recipes.write_commit(repo, branch, filename, message, content)[source]

Make a new commit to a repository’s branch

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • filename (str) – full path of the file to add

  • -
  • message (str) – The commit message

  • -
  • content (str) – The data to write

  • +
  • branch (str) – Branch name

  • +
  • filename (str) – full path of the file to add

  • +
  • message (str) – The commit message

  • +
  • content (str) – The data to write

Returns
@@ -2604,25 +2611,25 @@ If the commit has already been tagged it will return false.

pylorax.api.server module

-
+
-class pylorax.api.server.GitLock(repo, lock, dir)
-

Bases: tuple

-
+class pylorax.api.server.GitLock(repo, lock, dir) +

Bases: tuple

+
-property dir
+property dir

Alias for field number 2

-
+
-property lock
+property lock

Alias for field number 1

-
+
-property repo
+property repo

Alias for field number 0

@@ -3619,31 +3626,31 @@ a line boundry.

-
+
-pylorax.api.v0.blueprint_exists(api, branch, blueprint_name)[source]
+pylorax.api.v0.blueprint_exists(api, branch, blueprint_name)[source]

Return True if the blueprint exists

Parameters
  • api (Flask) – flask object

  • -
  • branch (str) – Branch name

  • -
  • recipe_name (str) – Recipe name to read

  • +
  • branch (str) – Branch name

  • +
  • recipe_name (str) – Recipe name to read

-
+
-pylorax.api.v0.take_limits(iterable, offset, limit)[source]
+pylorax.api.v0.take_limits(iterable, offset, limit)[source]

Apply offset and limit to an iterable object

Parameters
  • iterable (iter) – The object to limit

  • -
  • offset (int) – The number of items to skip

  • -
  • limit (int) – The total number of items to return

  • +
  • offset (int) – The number of items to skip

  • +
  • limit (int) – The total number of items to return

Returns
@@ -3652,9 +3659,9 @@ a line boundry.

-
+
-pylorax.api.v0.v0_api(api)[source]
+pylorax.api.v0.v0_api(api)[source]
@@ -3662,16 +3669,16 @@ a line boundry.

pylorax.api.workspace module

-
+
-pylorax.api.workspace.workspace_delete(repo, branch, recipe_name)[source]
+pylorax.api.workspace.workspace_delete(repo, branch, recipe_name)[source]

Delete the recipe from the workspace

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • recipe_name (str) – The name of the recipe

  • +
  • branch (str) – Branch name

  • +
  • recipe_name (str) – The name of the recipe

Returns
@@ -3683,43 +3690,43 @@ a line boundry.

-
+
-pylorax.api.workspace.workspace_dir(repo, branch)[source]
+pylorax.api.workspace.workspace_dir(repo, branch)[source]

Create the workspace’s path from a Repository and branch

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • +
  • branch (str) – Branch name

Returns

The path to the branch’s workspace directory

Return type
-

str

+

str

-
+
-pylorax.api.workspace.workspace_read(repo, branch, recipe_name)[source]
+pylorax.api.workspace.workspace_read(repo, branch, recipe_name)[source]

Read a Recipe from the branch’s workspace

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • -
  • recipe_name (str) – The name of the recipe

  • +
  • branch (str) – Branch name

  • +
  • recipe_name (str) – The name of the recipe

Returns

The workspace copy of the recipe, or None if it doesn’t exist

Return type
-

Recipe or None

+

Recipe or None

Raises

RecipeFileError

@@ -3727,15 +3734,15 @@ a line boundry.

-
+
-pylorax.api.workspace.workspace_write(repo, branch, recipe)[source]
+pylorax.api.workspace.workspace_write(repo, branch, recipe)[source]

Write a recipe to the workspace

Parameters
  • repo (Git.Repository) – Open repository

  • -
  • branch (str) – Branch name

  • +
  • branch (str) – Branch name

  • recipe (Recipe) – The recipe to write to the workspace

@@ -3751,9 +3758,9 @@ a line boundry.

Module contents

-
+
-pylorax.api.crossdomain(origin, methods=None, headers=None, max_age=21600, attach_to_all=True, automatic_options=True)[source]
+pylorax.api.crossdomain(origin, methods=None, headers=None, max_age=21600, attach_to_all=True, automatic_options=True)[source]
@@ -3764,27 +3771,28 @@ a line boundry.

- @@ -3793,7 +3801,6 @@ a line boundry.

- - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + @@ -60,7 +63,7 @@
- 28.14.42 + 28.14.58
@@ -77,6 +80,7 @@ + + @@ -161,11 +166,13 @@ + +

pylorax.base module

-
+
-class pylorax.base.BaseLoraxClass[source]
-

Bases: object

-
+class pylorax.base.BaseLoraxClass[source] +

Bases: object

+
-pcritical(msg, fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]
+pcritical(msg, fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]
-
+
-pdebug(msg, fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]
+pdebug(msg, fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]
-
+
-perror(msg, fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]
+perror(msg, fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]
-
+
-pinfo(msg, fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]
+pinfo(msg, fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]
-
+
-pwarning(msg, fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]
+pwarning(msg, fobj=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]
-
+
-class pylorax.base.DataHolder(**kwargs)[source]
-

Bases: dict

-
+class pylorax.base.DataHolder(**kwargs)[source] +

Bases: dict

+
-copy() → a shallow copy of D[source]
+copy()a shallow copy of D[source]
@@ -308,13 +315,13 @@

pylorax.buildstamp module

-
+
-class pylorax.buildstamp.BuildStamp(product, version, bugurl, isfinal, buildarch, variant='')[source]
-

Bases: object

-
+class pylorax.buildstamp.BuildStamp(product, version, bugurl, isfinal, buildarch, variant='')[source] +

Bases: object

+
-write(outfile)[source]
+write(outfile)[source]
@@ -322,60 +329,60 @@

pylorax.cmdline module

-
+
-pylorax.cmdline.lmc_parser(dracut_default='')[source]
+pylorax.cmdline.lmc_parser(dracut_default='')[source]

Return a ArgumentParser object for live-media-creator.

-
+
-pylorax.cmdline.lorax_parser(dracut_default='')[source]
+pylorax.cmdline.lorax_parser(dracut_default='')[source]

Return the ArgumentParser for lorax

pylorax.creator module

-
+
-class pylorax.creator.FakeDNF(conf)[source]
-

Bases: object

+class pylorax.creator.FakeDNF(conf)[source] +

Bases: object

A minimal DNF object suitable for passing to RuntimeBuilder

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.

-
+
-reset()[source]
+reset()[source]
-
+
-pylorax.creator.calculate_disk_size(opts, ks)[source]
+pylorax.creator.calculate_disk_size(opts, ks)[source]

Calculate the disk size from the kickstart

Parameters
  • opts (argparse options) – options passed to livemedia-creator

  • -
  • ks (str) – Path to the kickstart to use for the installation

  • +
  • ks (str) – Path to the kickstart to use for the installation

Returns

Disk size in MiB

Return type
-

int

+

int

Also takes into account the use of reqpart or reqpart –add-boot

-
+
-pylorax.creator.check_kickstart(ks, opts)[source]
+pylorax.creator.check_kickstart(ks, opts)[source]

Check the parsed kickstart object for errors

Parameters
@@ -388,106 +395,106 @@ this. Everything else should be a nop.

List of error strings or empty list

Return type
-

list

+

list

-
+
-pylorax.creator.create_pxe_config(template, images_dir, live_image_name, add_args=None)[source]
+pylorax.creator.create_pxe_config(template, images_dir, live_image_name, add_args=None)[source]

Create template for pxe to live configuration

Parameters
    -
  • images_dir (str) – Path of directory with images to be used

  • -
  • live_image_name (str) – Name of live rootfs image file

  • -
  • add_args (list) – Arguments to be added to initrd= pxe config

  • +
  • images_dir (str) – Path of directory with images to be used

  • +
  • live_image_name (str) – Name of live rootfs image file

  • +
  • add_args (list) – Arguments to be added to initrd= pxe config

-
+
-pylorax.creator.find_ostree_root(phys_root)[source]
+pylorax.creator.find_ostree_root(phys_root)[source]

Find root of ostree deployment

Parameters
-

phys_root (str) – Path to physical root

+

phys_root (str) – Path to physical root

Returns

Relative path of ostree deployment root

Return type
-

str

+

str

Raises
-

Exception – More than one deployment roots were found

+

Exception – More than one deployment roots were found

-
+
-pylorax.creator.get_arch(mount_dir)[source]
+pylorax.creator.get_arch(mount_dir)[source]

Get the kernel arch

Returns

Arch of first kernel found at mount_dir/boot/ or i386

Return type
-

str

+

str

-
+
-pylorax.creator.is_image_mounted(disk_img)[source]
+pylorax.creator.is_image_mounted(disk_img)[source]

Check to see if the disk_img is mounted

Returns

True if disk_img is in /proc/mounts

Return type
-

bool

+

bool

-
+
-pylorax.creator.make_appliance(disk_img, name, template, outfile, networks=None, ram=1024, vcpus=1, arch=None, title='Linux', project='Linux', releasever='29')[source]
+pylorax.creator.make_appliance(disk_img, name, template, outfile, networks=None, ram=1024, vcpus=1, arch=None, title='Linux', project='Linux', releasever='29')[source]

Generate an appliance description file

Parameters
    -
  • disk_img (str) – Full path of the disk image

  • -
  • name (str) – Name of the appliance, passed to the template

  • -
  • template (str) – Full path of Mako template

  • -
  • outfile (str) – Full path of file to write, using template

  • -
  • networks (list) – List of networks(str) from the kickstart

  • -
  • ram (int) – Ram, in MiB, passed to template. Default is 1024

  • -
  • vcpus (int) – CPUs, passed to template. Default is 1

  • -
  • arch (str) – CPU architecture. Default is ‘x86_64’

  • -
  • title (str) – Title, passed to template. Default is ‘Linux’

  • -
  • project (str) – Project, passed to template. Default is ‘Linux’

  • -
  • releasever (str) – Release version, passed to template. Default is 29

  • +
  • disk_img (str) – Full path of the disk image

  • +
  • name (str) – Name of the appliance, passed to the template

  • +
  • template (str) – Full path of Mako template

  • +
  • outfile (str) – Full path of file to write, using template

  • +
  • networks (list) – List of networks(str) from the kickstart

  • +
  • ram (int) – Ram, in MiB, passed to template. Default is 1024

  • +
  • vcpus (int) – CPUs, passed to template. Default is 1

  • +
  • arch (str) – CPU architecture. Default is ‘x86_64’

  • +
  • title (str) – Title, passed to template. Default is ‘Linux’

  • +
  • project (str) – Project, passed to template. Default is ‘Linux’

  • +
  • releasever (str) – Release version, passed to template. Default is 29

-
+
-pylorax.creator.make_image(opts, ks, cancel_func=None)[source]
+pylorax.creator.make_image(opts, ks, cancel_func=None)[source]

Install to a disk image

Parameters
  • opts (argparse options) – options passed to livemedia-creator

  • -
  • ks (str) – Path to the kickstart to use for the installation

  • +
  • ks (str) – Path to the kickstart to use for the installation

  • cancel_func (function) – Function that returns True to cancel build

@@ -495,29 +502,29 @@ this. Everything else should be a nop.

Path of the image created

Return type
-

str

+

str

Use qemu+boot.iso or anaconda to install to a disk image.

-
+
-pylorax.creator.make_live_images(opts, work_dir, disk_img)[source]
+pylorax.creator.make_live_images(opts, work_dir, disk_img)[source]

Create live images from direcory or rootfs image

Parameters
  • opts (argparse options) – options passed to livemedia-creator

  • -
  • work_dir (str) – Directory for storing results

  • -
  • disk_img (str) – Path to disk image (fsimage or partitioned)

  • +
  • work_dir (str) – Directory for storing results

  • +
  • disk_img (str) – Path to disk image (fsimage or partitioned)

Returns

Path of directory with created images or None

Return type
-

str

+

str

fsck.ext4 is run on the rootfs_image to make sure there are no errors and to zero @@ -525,16 +532,16 @@ out any deleted blocks to make it compress better. If this fails for any reason it will return None and log the error.

-
+
-pylorax.creator.make_livecd(opts, mount_dir, work_dir)[source]
+pylorax.creator.make_livecd(opts, mount_dir, work_dir)[source]

Take the content from the disk image and make a livecd out of it

Parameters
  • opts (argparse options) – options passed to livemedia-creator

  • -
  • mount_dir (str) – Directory tree to compress

  • -
  • work_dir (str) – Output compressed image to work_dir+images/install.img

  • +
  • mount_dir (str) – Directory tree to compress

  • +
  • work_dir (str) – Output compressed image to work_dir+images/install.img

@@ -549,39 +556,39 @@ root=live:CDLABEL=<volid> rd.live.image

-
+
-pylorax.creator.make_runtime(opts, mount_dir, work_dir, size=None)[source]
+pylorax.creator.make_runtime(opts, mount_dir, work_dir, size=None)[source]

Make the squashfs image from a directory

Parameters
  • opts (argparse options) – options passed to livemedia-creator

  • -
  • mount_dir (str) – Directory tree to compress

  • -
  • work_dir (str) – Output compressed image to work_dir+images/install.img

  • -
  • size (int) – Size of disk image, in GiB

  • +
  • mount_dir (str) – Directory tree to compress

  • +
  • work_dir (str) – Output compressed image to work_dir+images/install.img

  • +
  • size (int) – Size of disk image, in GiB

-
+
-pylorax.creator.make_squashfs(opts, disk_img, work_dir)[source]
+pylorax.creator.make_squashfs(opts, disk_img, work_dir)[source]

Create a squashfs image of an unpartitioned filesystem disk image

Parameters
    -
  • disk_img (str) – Path to the unpartitioned filesystem disk image

  • -
  • work_dir (str) – Output compressed image to work_dir+images/install.img

  • -
  • compression (str) – Compression type to use

  • +
  • disk_img (str) – Path to the unpartitioned filesystem disk image

  • +
  • work_dir (str) – Output compressed image to work_dir+images/install.img

  • +
  • compression (str) – Compression type to use

Returns

True if squashfs creation was successful. False if there was an error.

Return type
-

bool

+

bool

Take disk_img and put it into LiveOS/rootfs.img and squashfs this @@ -591,33 +598,33 @@ out any deleted blocks to make it compress better. If this fails for any reason it will return False and log the error.

-
+
-pylorax.creator.mount_boot_part_over_root(img_mount)[source]
+pylorax.creator.mount_boot_part_over_root(img_mount)[source]

Mount boot partition to /boot of root fs mounted in img_mount

Used for OSTree so it finds deployment configurations on live rootfs

param img_mount: object with mounted disk image root partition type img_mount: imgutils.PartitionMount

-
+
-pylorax.creator.rebuild_initrds_for_live(opts, sys_root_dir, results_dir)[source]
+pylorax.creator.rebuild_initrds_for_live(opts, sys_root_dir, results_dir)[source]

Rebuild intrds for pxe live image (root=live:http://)

Parameters
  • opts (argparse options) – options passed to livemedia-creator

  • -
  • sys_root_dir (str) – Path to root of the system

  • -
  • results_dir (str) – Path of directory for storing results

  • +
  • sys_root_dir (str) – Path to root of the system

  • +
  • results_dir (str) – Path of directory for storing results

-
+
-pylorax.creator.run_creator(opts, cancel_func=None)[source]
+pylorax.creator.run_creator(opts, cancel_func=None)[source]

Run the image creator process

Parameters
@@ -638,9 +645,9 @@ See the cmdline –help for livemedia-creator for the possible options

(Yes, this is not ideal, but we can fix that later)

-
+
-pylorax.creator.squashfs_args(opts)[source]
+pylorax.creator.squashfs_args(opts)[source]

Returns the compression type and args to use when making squashfs

Parameters
@@ -650,7 +657,7 @@ See the cmdline –help for livemedia-creator for the possible options

tuple of compression type and args

Return type
-

tuple

+

tuple

@@ -658,21 +665,21 @@ See the cmdline –help for livemedia-creator for the possible options

pylorax.decorators module

-
+
-pylorax.decorators.singleton(cls)[source]
+pylorax.decorators.singleton(cls)[source]

pylorax.discinfo module

-
+
-class pylorax.discinfo.DiscInfo(release, basearch)[source]
-

Bases: object

-
+class pylorax.discinfo.DiscInfo(release, basearch)[source] +

Bases: object

+
-write(outfile)[source]
+write(outfile)[source]
@@ -680,23 +687,23 @@ See the cmdline –help for livemedia-creator for the possible options

pylorax.dnfbase module

-
+
-pylorax.dnfbase.get_dnf_base_object(installroot, sources, mirrorlists=None, repos=None, enablerepos=None, disablerepos=None, tempdir='/var/tmp', proxy=None, releasever='8', cachedir=None, logdir=None, sslverify=True)[source]
+pylorax.dnfbase.get_dnf_base_object(installroot, sources, mirrorlists=None, repos=None, enablerepos=None, disablerepos=None, tempdir='/var/tmp', proxy=None, releasever='8', cachedir=None, logdir=None, sslverify=True)[source]

Create a dnf Base object and setup the repositories and installroot

Parameters
  • installroot (string) – Full path to the installroot

  • -
  • sources (list) – List of source repo urls to use for the installation

  • -
  • enablerepos (list) – List of repo names to enable

  • -
  • disablerepos (list) – List of repo names to disable

  • -
  • mirrorlist (list) – List of mirrors to use

  • +
  • sources (list) – List of source repo urls to use for the installation

  • +
  • enablerepos (list) – List of repo names to enable

  • +
  • disablerepos (list) – List of repo names to disable

  • +
  • mirrorlist (list) – List of mirrors to use

  • tempdir (string) – Path of temporary directory

  • proxy (string) – http proxy to use when fetching packages

  • releasever (string) – Release version to pass to dnf

  • cachedir (string) – Directory to use for caching packages

  • -
  • noverifyssl (bool) – Set to True to ignore the CA of ssl certs. eg. use self-signed ssl for https repos.

  • +
  • noverifyssl (bool) – Set to True to ignore the CA of ssl certs. eg. use self-signed ssl for https repos.

@@ -707,39 +714,39 @@ If cachedir is None a dnf.cache directory is created inside tmpdir

pylorax.dnfhelper module

-
+
-class pylorax.dnfhelper.LoraxDownloadCallback[source]
+class pylorax.dnfhelper.LoraxDownloadCallback[source]

Bases: DownloadProgress

-
+
-end(payload, status, msg)[source]
+end(payload, status, msg)[source]
-
+
-progress(payload, done)[source]
+progress(payload, done)[source]
-
+
-start(total_files, total_size, total_drpms=0)[source]
+start(total_files, total_size, total_drpms=0)[source]
-
+
-class pylorax.dnfhelper.LoraxRpmCallback[source]
+class pylorax.dnfhelper.LoraxRpmCallback[source]

Bases: TransactionProgress

-
+
-error(message)[source]
+error(message)[source]
-
+
-progress(package, action, ti_done, ti_total, ts_done, ts_total)[source]
+progress(package, action, ti_done, ti_total, ts_done, ts_total)[source]
@@ -747,20 +754,20 @@ If cachedir is None a dnf.cache directory is created inside tmpdir

pylorax.executils module

-
+
-class pylorax.executils.ExecProduct(rc, stdout, stderr)[source]
-

Bases: object

+class pylorax.executils.ExecProduct(rc, stdout, stderr)[source] +

Bases: object

-
+
-pylorax.executils.augmentEnv()[source]
+pylorax.executils.augmentEnv()[source]
-
+
-pylorax.executils.execReadlines(command, argv, stdin=None, root='/', env_prune=None, filter_stderr=False, callback=<function <lambda>>, env_add=None, reset_handlers=True, reset_lang=True)[source]
+pylorax.executils.execReadlines(command, argv, stdin=None, root='/', env_prune=None, filter_stderr=False, callback=<function <lambda>>, env_add=None, reset_handlers=True, reset_lang=True)[source]

Execute an external command and return the line output of the command in real-time.

This method assumes that there is a reasonably low delay between the @@ -794,9 +801,9 @@ stdout and then keeps on truckin’ there will be problems.

This returns an iterator with the lines from the command until it has finished

-
+
-pylorax.executils.execWithCapture(command, argv, stdin=None, root='/', log_output=True, filter_stderr=False, raise_err=False, callback=None, env_add=None, reset_handlers=True, reset_lang=True)[source]
+pylorax.executils.execWithCapture(command, argv, stdin=None, root='/', log_output=True, filter_stderr=False, raise_err=False, callback=None, env_add=None, reset_handlers=True, reset_lang=True)[source]

Run an external program and capture standard out and err.

Parameters
@@ -819,9 +826,9 @@ This returns an iterator with the lines from the command until it has finished
-
+
-pylorax.executils.execWithRedirect(command, argv, stdin=None, stdout=None, root='/', env_prune=None, log_output=True, binary_output=False, raise_err=False, callback=None, env_add=None, reset_handlers=True, reset_lang=True)[source]
+pylorax.executils.execWithRedirect(command, argv, stdin=None, stdout=None, root='/', env_prune=None, log_output=True, binary_output=False, raise_err=False, callback=None, env_add=None, reset_handlers=True, reset_lang=True)[source]

Run an external program and redirect the output to a file.

Parameters
@@ -847,21 +854,21 @@ This returns an iterator with the lines from the command until it has finished
-
+
-pylorax.executils.runcmd(cmd, **kwargs)[source]
+pylorax.executils.runcmd(cmd, **kwargs)[source]

run execWithRedirect with raise_err=True

-
+
-pylorax.executils.runcmd_output(cmd, **kwargs)[source]
+pylorax.executils.runcmd_output(cmd, **kwargs)[source]

run execWithCapture with raise_err=True

-
+
-pylorax.executils.setenv(name, value)[source]
+pylorax.executils.setenv(name, value)[source]

Set an environment variable to be used by child processes.

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 @@ -869,16 +876,16 @@ variable name, the old value is overwritten.

Parameters
    -
  • name (str) – The name of the environment variable

  • -
  • value (str) – The value of the environment variable

  • +
  • name (str) – The name of the environment variable

  • +
  • value (str) – The value of the environment variable

-
+
-pylorax.executils.startProgram(argv, root='/', stdin=None, stdout=-1, stderr=-2, env_prune=None, env_add=None, reset_handlers=True, reset_lang=True, **kwargs)[source]
+pylorax.executils.startProgram(argv, root='/', stdin=None, stdout=- 1, stderr=- 2, env_prune=None, env_add=None, reset_handlers=True, reset_lang=True, **kwargs)[source]

Start an external program and return the Popen object.

The root and reset_handlers arguments are handled by passing a preexec_fn argument to subprocess.Popen, but an additional preexec_fn @@ -909,58 +916,58 @@ last.

pylorax.imgutils module

-
+
-class pylorax.imgutils.DMDev(dev, size, name=None)[source]
-

Bases: object

+class pylorax.imgutils.DMDev(dev, size, name=None)[source] +

Bases: object

-
+
-class pylorax.imgutils.LoopDev(filename, size=None)[source]
-

Bases: object

+class pylorax.imgutils.LoopDev(filename, size=None)[source] +

Bases: object

-
+
-class pylorax.imgutils.Mount(dev, opts='', mnt=None)[source]
-

Bases: object

+class pylorax.imgutils.Mount(dev, opts='', mnt=None)[source] +

Bases: object

-
+
-class pylorax.imgutils.PartitionMount(disk_img, mount_ok=None, submount=None)[source]
-

Bases: object

+class pylorax.imgutils.PartitionMount(disk_img, mount_ok=None, submount=None)[source] +

Bases: object

Mount a partitioned image file using kpartx

-
+
-pylorax.imgutils.compress(command, root, outfile, compression='xz', compressargs=None)[source]
+pylorax.imgutils.compress(command, root, outfile, compression='xz', compressargs=None)[source]

Make a compressed archive of the given rootdir or file. 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.

-
+
-pylorax.imgutils.copytree(src, dest, preserve=True)[source]
+pylorax.imgutils.copytree(src, dest, preserve=True)[source]

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.

-
+
-pylorax.imgutils.default_image_name(compression, basename)[source]
+pylorax.imgutils.default_image_name(compression, basename)[source]

Return a default image name with the correct suffix for the compression type.

Parameters
    -
  • compression (str) – Compression type

  • -
  • basename (str) – Base filename

  • +
  • compression (str) – Compression type

  • +
  • basename (str) – Base filename

Returns
@@ -970,56 +977,56 @@ raises CalledProcessError if copy fails.

If the compression is unknown it defaults to xz

-
+
-pylorax.imgutils.dm_attach(dev, size, name=None)[source]
+pylorax.imgutils.dm_attach(dev, size, name=None)[source]

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.

-
+
-pylorax.imgutils.dm_detach(dev)[source]
+pylorax.imgutils.dm_detach(dev)[source]

Detach the named devicemapper device. Returns False if dmsetup fails.

-
+
-pylorax.imgutils.do_grafts(grafts, dest, preserve=True)[source]
+pylorax.imgutils.do_grafts(grafts, dest, preserve=True)[source]

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.

-
+
-pylorax.imgutils.estimate_size(rootdir, graft=None, fstype=None, blocksize=4096, overhead=256)[source]
+pylorax.imgutils.estimate_size(rootdir, graft=None, fstype=None, blocksize=4096, overhead=256)[source]
-
+
-pylorax.imgutils.get_loop_name(path)[source]
+pylorax.imgutils.get_loop_name(path)[source]

Return the loop device associated with the path. Raises RuntimeError if more than one loop is associated

-
+
-pylorax.imgutils.loop_attach(outfile)[source]
+pylorax.imgutils.loop_attach(outfile)[source]

Attach a loop device to the given file. Return the loop device name. Raises CalledProcessError if losetup fails.

-
+
-pylorax.imgutils.loop_detach(loopdev)[source]
+pylorax.imgutils.loop_detach(loopdev)[source]

Detach the given loop device. Return False on failure.

-
+
-pylorax.imgutils.loop_waitfor(loop_dev, outfile)[source]
+pylorax.imgutils.loop_waitfor(loop_dev, outfile)[source]

Make sure the loop device is attached to the outfile.

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 @@ -1027,29 +1034,29 @@ loop device really is associated with the backing file before continuing.

Raise RuntimeError if it isn’t setup after 5 tries.

-
+
-pylorax.imgutils.mkbtrfsimg(rootdir, outfile, size=None, label='', mountargs='', graft=None)[source]
+pylorax.imgutils.mkbtrfsimg(rootdir, outfile, size=None, label='', mountargs='', graft=None)[source]
-
+
-pylorax.imgutils.mkcpio(root, outfile, compression='xz', compressargs=None)[source]
+pylorax.imgutils.mkcpio(root, outfile, compression='xz', compressargs=None)[source]
-
+
-pylorax.imgutils.mkdosimg(rootdir, outfile, size=None, label='', mountargs='shortname=winnt, umask=0077', graft=None)[source]
+pylorax.imgutils.mkdosimg(rootdir, outfile, size=None, label='', mountargs='shortname=winnt,umask=0077', graft=None)[source]
-
+
-pylorax.imgutils.mkext4img(rootdir, outfile, size=None, label='', mountargs='', graft=None)[source]
+pylorax.imgutils.mkext4img(rootdir, outfile, size=None, label='', mountargs='', graft=None)[source]
-
+
-pylorax.imgutils.mkfsimage(fstype, rootdir, outfile, size=None, mkfsargs=None, mountargs='', graft=None)[source]
+pylorax.imgutils.mkfsimage(fstype, rootdir, outfile, size=None, mkfsargs=None, mountargs='', graft=None)[source]

Generic filesystem image creation function. fstype should be a filesystem type - “mkfs.${fstype}” must exist. graft should be a dict: {“some/path/in/image”: “local/file/or/dir”};

@@ -1059,84 +1066,84 @@ graft should be a dict: {“some/path/in/image”: “local/file/or/dir”};

Will raise CalledProcessError if something goes wrong.

-
+
-pylorax.imgutils.mkfsimage_from_disk(diskimage, fsimage, img_size=None, label='Anaconda')[source]
+pylorax.imgutils.mkfsimage_from_disk(diskimage, fsimage, img_size=None, label='Anaconda')[source]

Copy the / partition of a partitioned disk image to an un-partitioned disk image.

Parameters
    -
  • diskimage (str) – The full path to partitioned disk image with a /

  • -
  • fsimage (str) – The full path of the output fs image file

  • -
  • img_size (int) – Optional size of the fsimage in MiB or None to make +

  • diskimage (str) – The full path to partitioned disk image with a /

  • +
  • fsimage (str) – The full path of the output fs image file

  • +
  • img_size (int) – Optional size of the fsimage in MiB or None to make it as small as possible

  • -
  • label (str) – The label to apply to the image. Defaults to “Anaconda”

  • +
  • label (str) – The label to apply to the image. Defaults to “Anaconda”

-
+
-pylorax.imgutils.mkhfsimg(rootdir, outfile, size=None, label='', mountargs='', graft=None)[source]
+pylorax.imgutils.mkhfsimg(rootdir, outfile, size=None, label='', mountargs='', graft=None)[source]
-
+
-pylorax.imgutils.mkqcow2(outfile, size, options=None)[source]
+pylorax.imgutils.mkqcow2(outfile, size, options=None)[source]

use qemu-img to create a file of the given size. options is a list of options passed to qemu-img

Default format is qcow2, override by passing “-f”, fmt in options.

-
+
-pylorax.imgutils.mkqemu_img(outfile, size, options=None)[source]
+pylorax.imgutils.mkqemu_img(outfile, size, options=None)[source]

use qemu-img to create a file of the given size. options is a list of options passed to qemu-img

Default format is qcow2, override by passing “-f”, fmt in options.

-
+
-pylorax.imgutils.mkrootfsimg(rootdir, outfile, label, size=2, sysroot='')[source]
+pylorax.imgutils.mkrootfsimg(rootdir, outfile, label, size=2, sysroot='')[source]

Make rootfs image from a directory

Parameters
    -
  • rootdir (str) – Root directory

  • -
  • outfile (str) – Path of output image file

  • -
  • label (str) – Filesystem label

  • -
  • size (int) – Size of the image in GiB, if None computed automatically

  • -
  • sysroot (str) – path to system (deployment) root relative to physical root

  • +
  • rootdir (str) – Root directory

  • +
  • outfile (str) – Path of output image file

  • +
  • label (str) – Filesystem label

  • +
  • size (int) – Size of the image in GiB, if None computed automatically

  • +
  • sysroot (str) – path to system (deployment) root relative to physical root

-
+
-pylorax.imgutils.mksparse(outfile, size)[source]
+pylorax.imgutils.mksparse(outfile, size)[source]

use os.ftruncate to create a sparse file of the given size.

-
+
-pylorax.imgutils.mksquashfs(rootdir, outfile, compression='default', compressargs=None)[source]
+pylorax.imgutils.mksquashfs(rootdir, outfile, compression='default', compressargs=None)[source]

Make a squashfs image containing the given rootdir.

-
+
-pylorax.imgutils.mktar(root, outfile, compression='xz', compressargs=None, selinux=True)[source]
+pylorax.imgutils.mktar(root, outfile, compression='xz', compressargs=None, selinux=True)[source]
-
+
-pylorax.imgutils.mount(dev, opts='', mnt=None)[source]
+pylorax.imgutils.mount(dev, opts='', mnt=None)[source]

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 @@ -1144,15 +1151,15 @@ returned. raises CalledProcessError if mount fails.

-
+
-pylorax.imgutils.round_to_blocks(size, blocksize)[source]
+pylorax.imgutils.round_to_blocks(size, blocksize)[source]

If size isn’t a multiple of blocksize, round up to the next multiple

-
+
-pylorax.imgutils.umount(mnt, lazy=False, maxretry=3, retrysleep=1.0, delete=True)[source]
+pylorax.imgutils.umount(mnt, lazy=False, maxretry=3, retrysleep=1.0, delete=True)[source]

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.

@@ -1161,26 +1168,26 @@ raises CalledProcessError if umount fails.

pylorax.installer module

-
+
-exception pylorax.installer.InstallError[source]
-

Bases: Exception

+exception pylorax.installer.InstallError[source] +

Bases: Exception

-
+
-class pylorax.installer.QEMUInstall(opts, iso, ks_paths, disk_img, img_size=2048, kernel_args=None, memory=1024, vcpus=None, vnc=None, arch=None, cancel_func=None, virtio_host='127.0.0.1', virtio_port=6080, image_type=None, boot_uefi=False, ovmf_path=None)[source]
-

Bases: object

+class pylorax.installer.QEMUInstall(opts, iso, ks_paths, disk_img, img_size=2048, kernel_args=None, memory=1024, vcpus=None, vnc=None, arch=None, cancel_func=None, virtio_host='127.0.0.1', virtio_port=6080, image_type=None, boot_uefi=False, ovmf_path=None)[source] +

Bases: object

Run qemu using an iso and a kickstart

-
+
-pylorax.installer.anaconda_cleanup(dirinstall_path)[source]
+pylorax.installer.anaconda_cleanup(dirinstall_path)[source]

Cleanup any leftover mounts from anaconda

Parameters
-

dirinstall_path (str) – Path where anaconda mounts things

+

dirinstall_path (str) – Path where anaconda mounts things

Returns

True if cleanups were successful. False if any of them failed.

@@ -1192,22 +1199,22 @@ typically be set to /mnt/sysimage/

other mountpoints.

-
+
-pylorax.installer.append_initrd(initrd, files)[source]
+pylorax.installer.append_initrd(initrd, files)[source]

Append files to an initrd.

Parameters
    -
  • initrd (str) – Path to initrd

  • -
  • files (list) – list of file paths to add

  • +
  • initrd (str) – Path to initrd

  • +
  • files (list) – list of file paths to add

Returns

Path to a new initrd

Return type
-

str

+

str

The files are added to the initrd by creating a cpio image @@ -1217,50 +1224,50 @@ copy of the initrd.

cpio archive.

-
+
-pylorax.installer.create_vagrant_metadata(path, size=0)[source]
+pylorax.installer.create_vagrant_metadata(path, size=0)[source]

Create a default Vagrant metadata.json file

Parameters
    -
  • path (str) – Path to metadata.json file

  • -
  • size (int) – Disk size in MiB

  • +
  • path (str) – Path to metadata.json file

  • +
  • size (int) – Disk size in MiB

-
+
-pylorax.installer.find_free_port(start=5900, end=5999, host='127.0.0.1')[source]
+pylorax.installer.find_free_port(start=5900, end=5999, host='127.0.0.1')[source]

Return first free port in range.

Parameters
    -
  • start (int) – Starting port number

  • -
  • end (int) – Ending port number

  • -
  • host (str) – Host IP to search

  • +
  • start (int) – Starting port number

  • +
  • end (int) – Ending port number

  • +
  • host (str) – Host IP to search

Returns

First free port or -1 if none found

Return type
-

int

+

int

-
+
-pylorax.installer.novirt_cancel_check(cancel_funcs, proc)[source]
+pylorax.installer.novirt_cancel_check(cancel_funcs, proc)[source]

Check to see if there has been an error in the logs

Parameters
    -
  • cancel_funcs (list) – list of functions to call, True from any one cancels the build

  • -
  • proc (subprocess.Popen) – Popen object for the anaconda process

  • +
  • cancel_funcs (list) – list of functions to call, True from any one cancels the build

  • +
  • proc (subprocess.Popen) – Popen object for the anaconda process

Returns
@@ -1271,18 +1278,18 @@ cpio archive.

When an error is detected the process is terminated and this returns True

-
+
-pylorax.installer.novirt_install(opts, disk_img, disk_size, cancel_func=None, tar_img=None)[source]
+pylorax.installer.novirt_install(opts, disk_img, disk_size, cancel_func=None, tar_img=None)[source]

Use Anaconda to install to a disk image

Parameters
  • opts (argparse options) – options passed to livemedia-creator

  • -
  • disk_img (str) – The full path to the disk image to be created

  • -
  • disk_size (int) – The size of the disk_img in MiB

  • +
  • disk_img (str) – The full path to the disk image to be created

  • +
  • disk_size (int) – The size of the disk_img in MiB

  • cancel_func (function) – Function that returns True to cancel build

  • -
  • tar_img (str) – For make_tar_disk, the path to final tarball to be created

  • +
  • tar_img (str) – For make_tar_disk, the path to final tarball to be created

@@ -1290,15 +1297,15 @@ When an error is detected the process is terminated and this returns True

passed creates a qemu disk image or tarfile.

-
+
-pylorax.installer.update_vagrant_metadata(path, size)[source]
+pylorax.installer.update_vagrant_metadata(path, size)[source]

Update the Vagrant metadata.json file

Parameters
    -
  • path (str) – Path to metadata.json file

  • -
  • size (int) – Disk size in MiB

  • +
  • path (str) – Path to metadata.json file

  • +
  • size (int) – Disk size in MiB

@@ -1306,19 +1313,19 @@ passed creates a qemu disk image or tarfile.

metadata file are set correctly. All other values are left untouched.

-
+
-pylorax.installer.virt_install(opts, install_log, disk_img, disk_size, cancel_func=None, tar_img=None)[source]
+pylorax.installer.virt_install(opts, install_log, disk_img, disk_size, cancel_func=None, tar_img=None)[source]

Use qemu to install to a disk image

Parameters
  • opts (argparse options) – options passed to livemedia-creator

  • -
  • install_log (str) – The path to write the log from qemu

  • -
  • disk_img (str) – The full path to the disk image to be created

  • -
  • disk_size (int) – The size of the disk_img in MiB

  • +
  • install_log (str) – The path to write the log from qemu

  • +
  • disk_img (str) – The full path to the disk image to be created

  • +
  • disk_size (int) – The size of the disk_img in MiB

  • cancel_func (function) – Function that returns True to cancel build

  • -
  • tar_img (str) – For make_tar_disk, the path to final tarball to be created

  • +
  • tar_img (str) – For make_tar_disk, the path to final tarball to be created

@@ -1329,9 +1336,9 @@ image and then optionally, based on the opts passed, creates tarfile.

pylorax.ltmpl module

-
+
-class pylorax.ltmpl.LiveTemplateRunner(dbo, fatalerrors=True, templatedir=None, defaults=None)[source]
+class pylorax.ltmpl.LiveTemplateRunner(dbo, fatalerrors=True, templatedir=None, defaults=None)[source]

Bases: pylorax.ltmpl.TemplateRunner

This class parses and executes a limited Lorax template. Sample usage:

@@ -1341,9 +1348,9 @@ runner.run(“live-install.tmpl”)

It is meant to be used with the live-install.tmpl which lists the per-arch pacages needed to build the live-iso output.

-
+
-installpkg(*pkgs)[source]
+installpkg(*pkgs)[source]
installpkg [–required|–optional] [–except PKGGLOB [–except PKGGLOB …]] PKGGLOB [PKGGLOB …]

Request installation of all packages matching the given globs. Note that this is just a request - nothing is actually installed @@ -1355,20 +1362,20 @@ until the ‘run_pkg_transaction’ command is given.

-
+
-class pylorax.ltmpl.LoraxTemplate(directories=None)[source]
-

Bases: object

-
+class pylorax.ltmpl.LoraxTemplate(directories=None)[source] +

Bases: object

+
-parse(template_file, variables)[source]
+parse(template_file, variables)[source]
-
+
-class pylorax.ltmpl.LoraxTemplateRunner(inroot, outroot, dbo=None, fatalerrors=True, templatedir=None, defaults=None)[source]
+class pylorax.ltmpl.LoraxTemplateRunner(inroot, outroot, dbo=None, fatalerrors=True, templatedir=None, defaults=None)[source]

Bases: pylorax.ltmpl.TemplateRunner

This class parses and executes Lorax templates. Sample usage:

@@ -1395,9 +1402,9 @@ object - so adding a new command is as easy as adding a new function.

on that line (after word splitting and brace expansion)

  • Commands should raise exceptions for errors - don’t use sys.exit()

  • -
    +
    -append(filename, data)[source]
    +append(filename, data)[source]
    append FILE STRING

    Append STRING (followed by a newline character) to FILE. Python character escape sequences (‘n’, ‘t’, etc.) will be @@ -1411,18 +1418,18 @@ append /etc/resolv.conf “”

    -
    +
    -chmod(fileglob, mode)[source]
    +chmod(fileglob, mode)[source]
    chmod FILEGLOB OCTALMODE

    Change the mode of all the files matching FILEGLOB to OCTALMODE.

    -
    +
    -copy(src, dest)[source]
    +copy(src, dest)[source]
    copy SRC DEST

    Copy SRC to DEST. If DEST is a directory, SRC will be copied inside it. @@ -1432,9 +1439,9 @@ that name, if the path leading to it exists.

    -
    +
    -createaddrsize(addr, src, dest)[source]
    +createaddrsize(addr, src, dest)[source]
    createaddrsize INITRD_ADDRESS INITRD ADDRSIZE

    Create the initrd.addrsize file required in LPAR boot process.

    @@ -1445,18 +1452,18 @@ that name, if the path leading to it exists.

    -
    +
    +hardlink(src, dest)[source]
    hardlink SRC DEST

    Create a hardlink at DEST which is linked to SRC.

    -
    +
    -install(srcglob, dest)[source]
    +install(srcglob, dest)[source]
    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. @@ -1474,9 +1481,9 @@ install /usr/share/myconfig/grub.conf.in /boot/grub.conf

    -
    +
    -installimg(*args)[source]
    +installimg(*args)[source]
    installimg [–xz|–gzip|–bzip2|–lzma] [-ARG|–ARG=OPTION] SRCDIR DESTFILE

    Create a compressed cpio archive of the contents of SRCDIR and place it in DESTFILE.

    @@ -1494,18 +1501,18 @@ passed to it. The default is xz -9

    -
    +
    -installinitrd(section, src, dest)[source]
    +installinitrd(section, src, dest)[source]
    installinitrd SECTION SRC DEST

    Same as installkernel, but for “initrd”.

    -
    +
    -installkernel(section, src, dest)[source]
    +installkernel(section, src, dest)[source]
    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 @@ -1519,9 +1526,9 @@ treeinfo SECTION kernel DEST

    -
    +
    -installpkg(*pkgs)[source]
    +installpkg(*pkgs)[source]
    installpkg [–required|–optional] [–except PKGGLOB [–except PKGGLOB …]] PKGGLOB [PKGGLOB …]

    Request installation of all packages matching the given globs. Note that this is just a request - nothing is actually installed @@ -1531,18 +1538,18 @@ until the ‘run_pkg_transaction’ command is given.

    -
    +
    -installupgradeinitrd(section, src, dest)[source]
    +installupgradeinitrd(section, src, dest)[source]
    installupgradeinitrd SECTION SRC DEST

    Same as installkernel, but for “upgrade”.

    -
    +
    -log(msg)[source]
    +log(msg)[source]
    log MESSAGE

    Emit the given log message. Be sure to put it in quotes!

    @@ -1553,9 +1560,9 @@ until the ‘run_pkg_transaction’ command is given.

    -
    +
    -mkdir(*dirs)[source]
    +mkdir(*dirs)[source]
    mkdir DIR [DIR …]

    Create the named DIR(s). Will create leading directories as needed.

    @@ -1566,18 +1573,18 @@ until the ‘run_pkg_transaction’ command is given.

    -
    +
    -move(src, dest)[source]
    +move(src, dest)[source]
    move SRC DEST

    Move SRC to DEST.

    -
    +
    -remove(*fileglobs)[source]
    +remove(*fileglobs)[source]
    remove FILEGLOB [FILEGLOB …]

    Remove all the named files or directories. Will not raise exceptions if the file(s) are not found.

    @@ -1585,9 +1592,9 @@ Will not raise exceptions if the file(s) are not found.

    -
    +
    -removefrom(pkg, *globs)[source]
    +removefrom(pkg, *globs)[source]
    removefrom PKGGLOB [–allbut] FILEGLOB [FILEGLOB…]

    Remove all files matching the given file globs from the package (or packages) named. @@ -1602,9 +1609,9 @@ removefrom xfsprogs –allbut /sbin/*

    -
    +
    -removekmod(*globs)[source]
    +removekmod(*globs)[source]
    removekmod GLOB [GLOB…] [–allbut] KEEPGLOB [KEEPGLOB…]

    Remove all files and directories matching the given file globs from the kernel modules directory.

    @@ -1622,9 +1629,9 @@ removekmod drivers/char –allbut virtio_console hw_random

    -
    +
    -removepkg(*pkgs)[source]
    +removepkg(*pkgs)[source]
    removepkg PKGGLOB [PKGGLOB…]

    Delete the named package(s).

    @@ -1636,9 +1643,9 @@ Files are deleted, but directories are left behind.

    -
    +
    -replace(pat, repl, *fileglobs)[source]
    +replace(pat, repl, *fileglobs)[source]
    replace PATTERN REPLACEMENT FILEGLOB [FILEGLOB …]

    Find-and-replace the given PATTERN (Python-style regex) with the given REPLACEMENT string for each of the files listed.

    @@ -1650,16 +1657,16 @@ REPLACEMENT string for each of the files listed.

    -
    +
    -run_pkg_transaction()[source]
    +run_pkg_transaction()[source]

    Actually install all the packages requested by previous ‘installpkg’ commands.

    -
    +
    -runcmd(*cmdlist)[source]
    +runcmd(*cmdlist)[source]
    runcmd CMD [ARG …]

    Run the given command with the given arguments.

    NOTE: All paths given MUST be COMPLETE, ABSOLUTE PATHS to the file @@ -1682,18 +1689,18 @@ runcmd find ${root} -name “.pyo” -type f -delete

    -
    +
    +symlink(target, dest)[source]
    symlink SRC DEST

    Create a symlink at DEST which points to SRC.

    -
    +
    -systemctl(cmd, *units)[source]
    +systemctl(cmd, *units)[source]
    systemctl [enable|disable|mask] UNIT [UNIT…]

    Enable, disable, or mask the given systemd units.

    @@ -1705,9 +1712,9 @@ systemctl mask fedora-storage-init.service fedora-configure.service

    -
    +
    -treeinfo(section, key, *valuetoks)[source]
    +treeinfo(section, key, *valuetoks)[source]
    treeinfo SECTION KEY ARG [ARG …]

    Add an item to the treeinfo data store. The given SECTION will have a new item added where @@ -1722,10 +1729,10 @@ KEY = ARG ARG …

    -
    +
    -class pylorax.ltmpl.TemplateRunner(fatalerrors=True, templatedir=None, defaults=None, builtins=None)[source]
    -

    Bases: object

    +class pylorax.ltmpl.TemplateRunner(fatalerrors=True, templatedir=None, defaults=None, builtins=None)[source] +

    Bases: object

    This class parses and executes Lorax templates. Sample usage:

    # install a bunch of packages @@ -1749,115 +1756,115 @@ with the rest of the line as arguments

  • Parsing and execution are separate passes - so you can’t use the result of a command in an %if statement (or any other control statements)!

  • -
    +
    -run(templatefile, **variables)[source]
    +run(templatefile, **variables)[source]
    -
    +
    -pylorax.ltmpl.brace_expand(s)[source]
    +pylorax.ltmpl.brace_expand(s)[source]
    -
    +
    -pylorax.ltmpl.rexists(pathname, root='')[source]
    +pylorax.ltmpl.rexists(pathname, root='')[source]
    -
    +
    -pylorax.ltmpl.rglob(pathname, root='/', fatal=False)[source]
    +pylorax.ltmpl.rglob(pathname, root='/', fatal=False)[source]
    -
    +
    -pylorax.ltmpl.split_and_expand(line)[source]
    +pylorax.ltmpl.split_and_expand(line)[source]

    pylorax.monitor module

    -
    +
    -class pylorax.monitor.LogMonitor(log_path=None, host='localhost', port=0, timeout=None)[source]
    -

    Bases: object

    +class pylorax.monitor.LogMonitor(log_path=None, host='localhost', port=0, timeout=None)[source] +

    Bases: object

    Setup a server to monitor the logs output by the installation

    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.

    -
    +
    -shutdown()[source]
    +shutdown()[source]

    Force shutdown of the monitoring thread

    -
    +
    -class pylorax.monitor.LogRequestHandler(request, client_address, server)[source]
    -

    Bases: socketserver.BaseRequestHandler

    +class pylorax.monitor.LogRequestHandler(request, client_address, server)[source] +

    Bases: socketserver.BaseRequestHandler

    Handle monitoring and saving the logfiles from the virtual install

    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.

    -
    +
    -finish()[source]
    +finish()[source]
    -
    +
    -handle()[source]
    +handle()[source]

    Write incoming data to a logfile and check for errors

    Split incoming data into lines and check for any Tracebacks or other errors that indicate that the install failed.

    Loops until self.server.kill is True

    -
    +
    -iserror(line)[source]
    +iserror(line)[source]

    Check a line to see if it contains an error indicating installation failure

    Parameters
    -

    line (str) – log line to check for failure

    +

    line (str) – log line to check for failure

    If the line contains IGNORED it will be skipped.

    -
    +
    -setup()[source]
    +setup()[source]

    Start writing to self.server.log_path

    -
    +
    -class pylorax.monitor.LogServer(log_path, *args, **kwargs)[source]
    -

    Bases: socketserver.TCPServer

    +class pylorax.monitor.LogServer(log_path, *args, **kwargs)[source] +

    Bases: socketserver.TCPServer

    A TCP Server that listens for log data

    -
    +
    -log_check()[source]
    +log_check()[source]

    Check to see if an error has been found in the log

    Returns

    True if there has been an error

    Return type
    -

    bool

    +

    bool

    -
    +
    -timeout = 60
    +timeout = 60
    @@ -1865,24 +1872,24 @@ errors that indicate that the install failed.

    pylorax.mount module

    -
    +
    -class pylorax.mount.IsoMountpoint(iso_path, initrd_path=None)[source]
    -

    Bases: object

    +class pylorax.mount.IsoMountpoint(iso_path, initrd_path=None)[source] +

    Bases: object

    Mount the iso and check to make sure the vmlinuz and initrd.img files exist

    Also check the iso for a a stage2 image and set a flag and extract the iso’s label.

    stage2 can be either LiveOS/squashfs.img or images/install.img

    -
    +
    -get_iso_label()[source]
    +get_iso_label()[source]

    Get the iso’s label using isoinfo

    Sets self.label if one is found

    -
    +
    -umount()[source]
    +umount()[source]

    Unmount the iso

    @@ -1894,118 +1901,125 @@ iso’s label.

    pylorax.sysutils module

    -
    -
    -pylorax.sysutils.joinpaths(*args, **kwargs)[source]
    -
    - -
    -
    -pylorax.sysutils.touch(fname)[source]
    -
    - -
    -
    -pylorax.sysutils.replace(fname, find, sub)[source]
    -
    - -
    -
    -pylorax.sysutils.chown_(path, user=None, group=None, recursive=False)[source]
    -
    - -
    +
    -pylorax.sysutils.chmod_(path, mode, recursive=False)[source]
    +pylorax.sysutils.chmod_(path, mode, recursive=False)[source]
    -
    -
    -pylorax.sysutils.remove(target)[source]
    +
    +
    +pylorax.sysutils.chown_(path, user=None, group=None, recursive=False)[source]
    -
    +
    +
    +pylorax.sysutils.joinpaths(*args, **kwargs)[source]
    +
    + +
    -pylorax.sysutils.linktree(src, dst)[source]
    +pylorax.sysutils.linktree(src, dst)[source] +
    + +
    +
    +pylorax.sysutils.remove(target)[source]
    +
    + +
    +
    +pylorax.sysutils.replace(fname, find, sub)[source]
    +
    + +
    +
    +pylorax.sysutils.touch(fname)[source]

    pylorax.treebuilder module

    -
    +
    -class pylorax.treebuilder.RuntimeBuilder(product, arch, dbo, templatedir=None, installpkgs=None, excludepkgs=None, add_templates=None, add_template_vars=None, skip_branding=False)[source]
    -

    Bases: object

    +class pylorax.treebuilder.RuntimeBuilder(product, arch, dbo, templatedir=None, installpkgs=None, excludepkgs=None, add_templates=None, add_template_vars=None, skip_branding=False)[source] +

    Bases: object

    Builds the anaconda runtime image.

    -
    +
    -cleanup()[source]
    +cleanup()[source]

    Remove unneeded packages and files with runtime-cleanup.tmpl

    -
    -
    -create_runtime(outfile='/var/tmp/squashfs.img', compression='xz', compressargs=None, size=2)[source]
    -
    +
    +
    +create_ext4_runtime(outfile='/var/tmp/squashfs.img', compression='xz', compressargs=None, size=2)[source]
    +

    Create a squashfs compressed ext4 runtime

    +
    -
    +
    +
    +create_squashfs_runtime(outfile='/var/tmp/squashfs.img', compression='xz', compressargs=None, size=2)[source]
    +

    Create a plain squashfs runtime

    +
    + +
    -finished()[source]
    +finished()[source]

    Done using RuntimeBuilder

    Close the dnf base object

    -
    +
    -generate_module_data()[source]
    +generate_module_data()[source]
    -
    +
    -install()[source]
    +install()[source]

    Install packages and do initial setup with runtime-install.tmpl

    -
    +
    -postinstall()[source]
    +postinstall()[source]

    Do some post-install setup work with runtime-postinstall.tmpl

    -
    +
    -verify()[source]
    +verify()[source]

    Ensure that contents of the installroot can run

    -
    +
    -writepkglists(pkglistdir)[source]
    +writepkglists(pkglistdir)[source]

    debugging data: write out lists of package contents

    -
    +
    -writepkgsizes(pkgsizefile)[source]
    +writepkgsizes(pkgsizefile)[source]

    debugging data: write a big list of pkg sizes

    -
    +
    -class pylorax.treebuilder.TreeBuilder(product, arch, inroot, outroot, runtime, isolabel, domacboot=True, doupgrade=True, templatedir=None, add_templates=None, add_template_vars=None, workdir=None, extra_boot_args='')[source]
    -

    Bases: object

    +class pylorax.treebuilder.TreeBuilder(product, arch, inroot, outroot, runtime, isolabel, domacboot=True, doupgrade=True, templatedir=None, add_templates=None, add_template_vars=None, workdir=None, extra_boot_args='')[source] +

    Bases: object

    Builds the arch-specific boot images. inroot should be the installtree root (the newly-built runtime dir)

    -
    +
    -build()[source]
    +build()[source]
    -
    +
    -copy_dracut_hooks(hooks)[source]
    +copy_dracut_hooks(hooks)[source]

    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

    @@ -2014,27 +2028,27 @@ target dracut hook directory (eg. [(“99anaconda-copy-ks.sh”, “/lib/dracut/hooks/pre-pivot”)])

    -
    +
    -property dracut_hooks_path
    +property dracut_hooks_path

    Return the path to the lorax dracut hooks scripts

    Use the configured share dir if it is setup, otherwise default to /usr/share/lorax/dracut_hooks

    -
    +
    -implantisomd5()[source]
    +implantisomd5()[source]
    -
    +
    -property kernels
    +property kernels
    -
    +
    -rebuild_initrds(add_args=None, backup='', prefix='')[source]
    +rebuild_initrds(add_args=None, backup='', prefix='')[source]

    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. @@ -2046,19 +2060,19 @@ name of the kernel.

    -
    +
    -pylorax.treebuilder.findkernels(root='/', kdir='boot')[source]
    +pylorax.treebuilder.findkernels(root='/', kdir='boot')[source]
    -
    +
    -pylorax.treebuilder.generate_module_info(moddir, outfile=None)[source]
    +pylorax.treebuilder.generate_module_info(moddir, outfile=None)[source]
    -
    +
    -pylorax.treebuilder.string_lower(string)[source]
    +pylorax.treebuilder.string_lower(string)[source]

    Return a lowercase string.

    Parameters
    @@ -2068,26 +2082,26 @@ name of the kernel.

    This is used as a filter in the templates.

    -
    +
    -pylorax.treebuilder.udev_escape(label)[source]
    +pylorax.treebuilder.udev_escape(label)[source]

    pylorax.treeinfo module

    -
    +
    -class pylorax.treeinfo.TreeInfo(product, version, variant, basearch, packagedir='')[source]
    -

    Bases: object

    -
    +class pylorax.treeinfo.TreeInfo(product, version, variant, basearch, packagedir='')[source] +

    Bases: object

    +
    -add_section(section, data)[source]
    +add_section(section, data)[source]
    -
    +
    -write(outfile)[source]
    +write(outfile)[source]
    @@ -2095,49 +2109,49 @@ name of the kernel.

    Module contents

    -
    +
    -class pylorax.ArchData(buildarch)[source]
    +class pylorax.ArchData(buildarch)[source]

    Bases: pylorax.base.DataHolder

    -
    +
    -bcj_arch = {'arm': 'arm', 'armhfp': 'arm', 'i386': 'x86', 'ppc': 'powerpc', 'ppc64': 'powerpc', 'ppc64le': 'powerpc', 'x86_64': 'x86'}
    +bcj_arch = {'arm': 'arm', 'armhfp': 'arm', 'i386': 'x86', 'ppc': 'powerpc', 'ppc64': 'powerpc', 'ppc64le': 'powerpc', 'x86_64': 'x86'}
    -
    +
    -lib64_arches = ('x86_64', 'ppc64', 'ppc64le', 's390x', 'ia64', 'aarch64')
    +lib64_arches = ('x86_64', 'ppc64', 'ppc64le', 's390x', 'ia64', 'aarch64')
    -
    +
    -class pylorax.Lorax[source]
    +class pylorax.Lorax[source]

    Bases: pylorax.base.BaseLoraxClass

    -
    +
    -configure(conf_file='/etc/lorax/lorax.conf')[source]
    +configure(conf_file='/etc/lorax/lorax.conf')[source]
    -
    +
    -init_file_logging(logdir, logname='pylorax.log')[source]
    +init_file_logging(logdir, logname='pylorax.log')[source]
    -
    +
    -init_stream_logging()[source]
    +init_stream_logging()[source]
    -
    +
    -run(dbo, product, version, release, variant='', bugurl='', isfinal=False, workdir=None, outputdir=None, buildarch=None, volid=None, domacboot=True, doupgrade=True, remove_temp=False, installpkgs=None, excludepkgs=None, size=2, add_templates=None, add_template_vars=None, add_arch_templates=None, add_arch_template_vars=None, verify=True, user_dracut_args=None, skip_branding=False)[source]
    +run(dbo, product, version, release, variant='', bugurl='', isfinal=False, workdir=None, outputdir=None, buildarch=None, volid=None, domacboot=True, doupgrade=True, remove_temp=False, installpkgs=None, excludepkgs=None, size=2, add_templates=None, add_template_vars=None, add_arch_templates=None, add_arch_template_vars=None, verify=True, user_dracut_args=None, skip_branding=False, squashfs_only=False)[source]
    -
    +
    -property templatedir
    +property templatedir

    Find the template directory.

    Pick the first directory under sharedir/templates.d/ if it exists. Otherwise use the sharedir

    @@ -2145,19 +2159,19 @@ Otherwise use the sharedir

    -
    +
    -pylorax.find_templates(templatedir='/usr/share/lorax')[source]
    +pylorax.find_templates(templatedir='/usr/share/lorax')[source]

    Find the templates to use.

    Parameters
    -

    templatedir (str) – Top directory to search for templates

    +

    templatedir (str) – Top directory to search for templates

    Returns

    Path to templates

    Return type
    -

    str

    +

    str

    If there is a templates.d directory under templatedir the @@ -2165,26 +2179,26 @@ lowest numbered directory entry is returned.

    eg. /usr/share/lorax/templates.d/99-generic/

    -
    +
    -pylorax.get_buildarch(dbo)[source]
    +pylorax.get_buildarch(dbo)[source]
    -
    +
    -pylorax.log_selinux_state()[source]
    +pylorax.log_selinux_state()[source]

    Log the current state of selinux

    -
    +
    -pylorax.setup_logging(logfile, theLogger)[source]
    +pylorax.setup_logging(logfile, theLogger)[source]

    Setup the various logs

    Parameters
    • logfile (string) – filename to write the log to

    • -
    • theLogger (logging.Logger) – top-level logger

    • +
    • theLogger (logging.Logger) – top-level logger

    @@ -2198,29 +2212,29 @@ lowest numbered directory entry is returned.

    - @@ -2229,7 +2243,6 @@ lowest numbered directory entry is returned.

    - + - - - - + + + - - - - + @@ -60,7 +64,7 @@
    - 28.14.42 + 28.14.58
    @@ -77,6 +81,7 @@ + + @@ -132,19 +138,19 @@ + +
      -
    • Docs »
    • +
    • »
    • Search
    • - -
    @@ -158,8 +164,7 @@ @@ -173,20 +178,25 @@
    - @@ -195,7 +205,6 @@ -