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 @@ - - +
- + - + -Brian C. Lane <bcl@redhat.com>
composer-cli
is used to interact with the lorax-composer
API server, managing blueprints, exploring available packages, and building new images.
It requires lorax-composer to be installed on the
-local system, and the user running it needs to be a member of the weldr
-group. They do not need to be root, but all of the security precautions apply.
composer-cli
is an interactive tool for use with a WELDR API server,
+managing blueprints, exploring available packages, and building new images.
+lorax-composer <lorax-composer.html> and osbuild-composer
+<https://osbuild.org> both implement compatible servers.
It requires server to be installed on the local system, and the user running it
+needs to be a member of the weldr
group. They do not need to be root, but
+all of the security precautions apply.
Lorax Composer commandline tool
+ +usage: composer-cli [-h] [-j] [-s SOCKET] [--log LOG] [-a APIVER]
+ [--test TESTMODE] [-V]
+ ...
+
Output the raw JSON response instead of the normal output.
+Default: False
+Path to the socket file to listen on
+Default: “/run/weldr/api.socket”
+Path to logfile (./composer-cli.log)
+API Version to use (overrides server API version)
+Pass test mode to compose. 1=Mock compose with fail. 2=Mock compose with finished.
+Default: 0
+show program’s version number and exit
+Default: False
+Start a compose using the selected blueprint and output type. –size is in MiB. +NOTE: uploading and –size are only supported by osbuild-composer.
+Start an ostree compose using the selected blueprint and output type. Optionally start an upload. This command +is only supported by osbuild-composer. –size is in MiB.
+List the supported output types.
+List the status of all running and finished composes.
+List basic information about composes.
+Show the last SIZE kB of the compose log.
+Cancel a running compose and delete any intermediate results.
+Delete the listed compose results.
+Show detailed information on the compose.
+Download the metadata use to create the compose to <uuid>-metadata.tar
+Download the compose logs to <uuid>-logs.tar
+Download all of the compose results; metadata, logs, and image to <uuid>.tar
+Download the output image from the compose. Filename depends on the type.
+List the names of the available blueprints.
+Display the blueprint in TOML format.
+Display the changes for each blueprint.
+Display the differences between 2 versions of a blueprint. +FROM-COMMIT can be a commit hash or NEWEST +TO-COMMIT can be a commit hash, NEWEST, or WORKSPACE
+Save the blueprint to a file, <BLUEPRINT>.toml
+Delete a blueprint from the server
+Display the packages needed to install the blueprint.
+Push a blueprint TOML file to the server.
+Display the frozen blueprint’s modules and packages.
+Display the frozen blueprint in TOML format.
+Save the frozen blueprint to a file, <blueprint-name>.frozen.toml.
+Tag the most recent blueprint commit as a release.
+Undo changes to a blueprint by reverting to the selected commit.
+Push the blueprint TOML to the temporary workspace storage.
+List the available modules.
+List the available projects.
+Show details about the listed projects.
+List the available sources
+Details about the source.
+Add a package source to the server.
+Change an existing source
+Delete a package source.
+status show Show API server status.
+NOTE: uploading is only available as part of the compose command +using the osbuild-composer API server.
+
+Image Uploads¶
+composer-cli
can upload the images to a number of services, including AWS,
+OpenStack, and vSphere. The upload can be started when the build is finished
+by using composer-cli compose start ...
. In order to access the service you need
+to pass authentication details to composer-cli using a TOML file.
+
+Note
+This is only supported when running the osbuild-composer
API server.
+
+
Providers are where the images are uploaded to. You
+will need to gather some provider
+specific information in order to authenticate with it. Please refer to the osbuild-composer
+documentation for the provider specific fields. You will then create a TOML file with the
+name of the provider and the settings, like this:
provider = "aws"
+
+[settings]
+aws_access_key = "AWS Access Key"
+aws_bucket = "AWS Bucket"
+aws_region = "AWS Region"
+aws_secret_key = "AWS Secret Key"
+
Save this into an aws-credentials.toml
file and use it when running start
.
The access key and secret key can be created by going to the
+IAM->Users->Security Credentials
section and creating a new access key. The
+secret key will only be shown when it is first created so make sure to record
+it in a secure place. The region should be the region that you want to use the
+AMI in, and the bucket can be an existing bucket, or a new one, following the
+normal AWS bucket naming rules. It will be created if it doesn’t already exist.
When uploading the image it is first uploaded to the s3 bucket, and then +converted to an AMI. If the conversion is successful the s3 object will be +deleted. If it fails, re-trying after correcting the problem will re-use the +object if you have not deleted it in the meantime, speeding up the process.
+With the settings stored in a TOML file:
+composer-cli compose start example-http-server ami "http image" aws-settings.toml
+
It will return the UUID of the image build. Once +the build has finished successfully it will start the upload process.
+There are a couple of arguments that can be helpful when debugging problems. +These are only meant for debugging and should not be used to script access to +the API. If you need to do that you can communicate with it directly in the +language of your choice.
+--json
will return the server’s response as a nicely formatted json output
+instead of printing what the command would usually print.
--test=1
will cause a compose start to start creating an image, and then
+end with a failed state.
--test=2
will cause a compose to start and then end with a finished state,
+without actually composing anything.
-
- Next
-
-
- Previous
-
+ Next
+ Previous
-
- © 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 @@
+
@@ -97,6 +100,7 @@
+
@@ -131,18 +135,20 @@
+
+
- - Docs »
+ - »
- Index
-
-
+
@@ -295,10 +301,12 @@
- copy_dracut_hooks() (pylorax.treebuilder.TreeBuilder method)
- copytree() (in module pylorax.imgutils)
+
+ - create_ext4_runtime() (pylorax.treebuilder.RuntimeBuilder method)
- create_pxe_config() (in module pylorax.creator)
- - create_runtime() (pylorax.treebuilder.RuntimeBuilder method)
+
- create_squashfs_runtime() (pylorax.treebuilder.RuntimeBuilder method)
- create_vagrant_metadata() (in module pylorax.installer)
@@ -652,8 +660,6 @@
- mkfsimage_from_disk() (in module pylorax.imgutils)
-
-
- mkhfsimg() (in module pylorax.imgutils)
- mkqcow2() (in module pylorax.imgutils)
@@ -668,6 +674,73 @@
- mktar() (in module pylorax.imgutils)
+ -
+ module
+
+
+ - pylorax
+
+ - pylorax.api
+
+ - pylorax.api.cmdline
+
+ - pylorax.api.compose
+
+ - pylorax.api.config
+
+ - pylorax.api.crossdomain
+
+ - pylorax.api.projects
+
+ - pylorax.api.queue
+
+ - pylorax.api.recipes
+
+ - pylorax.api.server
+
+ - pylorax.api.v0
+
+ - pylorax.api.workspace
+
+ - pylorax.base
+
+ - pylorax.buildstamp
+
+ - pylorax.cmdline
+
+ - pylorax.creator
+
+ - pylorax.decorators
+
+ - pylorax.discinfo
+
+ - pylorax.dnfbase
+
+ - pylorax.dnfhelper
+
+ - pylorax.executils
+
+ - pylorax.imgutils
+
+ - pylorax.installer
+
+ - pylorax.ltmpl
+
+ - pylorax.monitor
+
+ - pylorax.mount
+
+ - pylorax.output
+
+ - pylorax.sysutils
+
+ - pylorax.treebuilder
+
+ - pylorax.treeinfo
+
+
+
+
- module_names() (pylorax.api.recipes.Recipe property)
- module_nver() (pylorax.api.recipes.Recipe property)
@@ -764,68 +837,218 @@
- pwarning() (pylorax.base.BaseLoraxClass method)
- - pylorax (module)
+
-
+ pylorax
+
+
+ - module
- - pylorax.api (module)
+
+ -
+ pylorax.api
+
+
+ -
+ pylorax.api.cmdline
+
+
+ - module
+
+ -
+ pylorax.api.compose
+
+
+ - module
+
+
+ -
+ pylorax.api.config
+
+
+ - module
+
+
+ -
+ pylorax.api.crossdomain
+
+
+ - module
+
+
+ -
+ pylorax.api.projects
+
+
+ - module
+
+
+ -
+ pylorax.api.queue
+
+
+ - module
+
+
+ -
+ pylorax.api.recipes
+
+
+ - module
+
+
- - pylorax.api.compose (module)
+
-
+ pylorax.api.server
+
+
+ -
+ pylorax.api.v0
+
+
+ -
+ pylorax.api.workspace
+
+
+ -
+ pylorax.base
+
+
+ -
+ pylorax.buildstamp
+
+
+ -
+ pylorax.cmdline
+
+
+ -
+ pylorax.creator
+
+
+ -
+ pylorax.decorators
+
+
+ -
+ pylorax.discinfo
+
+
+ - module
- - pylorax.base (module)
+
+ -
+ pylorax.dnfbase
+
+
+ -
+ pylorax.dnfhelper
+
+
+ -
+ pylorax.executils
+
+
+ -
+ pylorax.imgutils
+
+
+ -
+ pylorax.installer
+
+
+ -
+ pylorax.ltmpl
+
+
+ -
+ pylorax.monitor
+
+
+ -
+ pylorax.mount
+
+
+ -
+ pylorax.output
+
+
+ -
+ pylorax.sysutils
+
+
+ -
+ pylorax.treebuilder
+
+
+ -
+ pylorax.treeinfo
+
+
+ - module
+
@@ -1105,20 +1328,25 @@
-
@@ -1127,7 +1355,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -59,7 +62,7 @@
- 28.14.42
+ 28.14.58
@@ -76,6 +79,7 @@
+
@@ -97,6 +101,7 @@
+
@@ -131,18 +136,20 @@
+
+
- - Docs »
+ - »
- Welcome to Lorax’s documentation!
-
-
+
View page source
@@ -193,27 +200,28 @@
-
@@ -222,7 +230,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -60,7 +63,7 @@
- 28.14.42
+ 28.14.58
@@ -77,6 +80,7 @@
+
@@ -98,6 +102,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 @@
+
@@ -130,6 +134,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 @@
+
@@ -137,6 +141,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 @@
+
@@ -123,6 +127,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
-
- Next
-
-
- Previous
-
+ Next
+ Previous
-
- © 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 @@
+
@@ -101,6 +105,7 @@
+
@@ -135,18 +140,20 @@
+
+
- - Docs »
+ - »
- pylorax
-
-
+
View page source
@@ -215,29 +222,29 @@
-
@@ -246,7 +253,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -60,7 +63,7 @@
- 28.14.42
+ 28.14.58
@@ -77,6 +80,7 @@
+
@@ -98,6 +102,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 @@
+
@@ -99,6 +103,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 @@
+
@@ -126,6 +130,7 @@
+
@@ -160,11 +165,13 @@
+
+
- - Docs »
+ - »
- pylorax »
@@ -175,7 +182,7 @@
-
-
+
View page source
@@ -196,9 +203,9 @@
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
@@ -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
-
+
-
-
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
@@ -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
--
+
-
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
-
- Returns
List of package names (name only, not NEVRA)
- Return type
--
+
-
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
-
+
-
-
pylorax.api.compose.
get_kernel_append
(recipe)[source]¶
+pylorax.api.compose.
get_kernel_append
(recipe)[source]¶
Return the customizations.kernel append value
-
+
-
-
pylorax.api.compose.
get_keyboard_layout
(recipe)[source]¶
+pylorax.api.compose.
get_keyboard_layout
(recipe)[source]¶
Return the customizations.locale.keyboard list
-
+
-
-
pylorax.api.compose.
get_languages
(recipe)[source]¶
+pylorax.api.compose.
get_languages
(recipe)[source]¶
Return the customizations.locale.languages list
-
+
-
-
pylorax.api.compose.
get_services
(recipe)[source]¶
+pylorax.api.compose.
get_services
(recipe)[source]¶
Return the customizations.services settings
-
+
-
-
pylorax.api.compose.
get_timezone_settings
(recipe)[source]¶
+pylorax.api.compose.
get_timezone_settings
(recipe)[source]¶
Return the customizations.timezone dict
-
+
-
-
pylorax.api.compose.
keyboard_cmd
(line, layout)[source]¶
+pylorax.api.compose.
keyboard_cmd
(line, layout)[source]¶
Update the keyboard line with the 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
@@ -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
@@ -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
--
+
-
-
+
-
-
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
@@ -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
-
- Returns
True if it wrote a rootpw command to the kickstart
- Return type
--
+
-
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.config module¶
-
+
-
-class
pylorax.api.config.
ComposerConfig
(*args, **kwargs)[source]¶
+class pylorax.api.config.
ComposerConfig
(*args, **kwargs)[source]¶
Bases: configparser.SafeConfigParser
-
-
+
-
-
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¶
-
@@ -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
--
+
-
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
-
+
-
-
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
-
+
-
-
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
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
-
- Returns
The estimated size of installed packages
- Return type
--
+
-
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
-
+
-
-
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
-
+
-
-
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
-
+
-
-
pylorax.api.projects.
modules_list
(dbo, module_names)[source]¶
+pylorax.api.projects.
modules_list
(dbo, module_names)[source]¶
Return a list of modules
-
+
-
-
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
--
+
-
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
-
+
-
-
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
--
+
-
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
--
+
-
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
--
+
-
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
-
- 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
-
- Returns
A dict with Weldr Source fields filled in
- Return type
--
+
-
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
--
+
-
- 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
--
+
-
- 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
-
+
-
-
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
--
+
-
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
--
+
-
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
--
+
-
- 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
--
+
-
- 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
--
+
-
- 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
--
+
-
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
--
+
-
- 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
-
-
+
-
-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]¶
-
-
+
-
-
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
--
+
-
- 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
-
+
-
-
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
-
- 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
-
+
-
-
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.
-
+
-
-
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.
-
+
-
-
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
--
+
-
-
+
-
-
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
-
@@ -1959,7 +1966,7 @@ be tried.
The tag or None if there isn’t one
- Return type
--
+
-
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
-
@@ -1983,7 +1990,7 @@ be a tag at all.
First dict with matching field:value, or None
- Return type
--
+
-
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
-
@@ -2006,15 +2013,15 @@ be a tag at all.
First dict with matching name, or None
- Return type
--
+
-
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.
-
+
-
-
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
--
+
-
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
-
+
-
-
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.
-
+
-
-
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
--
+
-
-
+
-
-
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
-
+
-
-
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
-
- Returns
A sorted list of the filenames
- Return type
--
+
-
- 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
-
- Returns
A list of commit details
- Return type
--
+
-
- 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
--
+
-
- 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
-
- Returns
The commit id, and the contents of the commit
- Return type
--
+
-
- 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
-
- Returns
Contents of the commit
- Return type
--
+
-
- 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
-
- Returns
The commit id, and a Recipe object
- Return type
--
+
-
- 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
-
- 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
-
+
-
-
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.
-
+
-
-
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
-
+
-
-
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.
-
+
-
-
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
-
+
-
-
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
-
+
-
-
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
-
+
-
-
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
-
- 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
-
- 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.v0.
blueprint_exists
(api, branch, blueprint_name)[source]¶
+pylorax.api.v0.
blueprint_exists
(api, branch, blueprint_name)[source]¶
Return True if the blueprint exists
-
+
-
-
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
-
+
-
-
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
-
+
-
-
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
-
+
-
-
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
-
- Returns
The workspace copy of the recipe, or None if it doesn’t exist
- Return type
--
+
-
- Raises
RecipeFileError
@@ -3727,15 +3734,15 @@ a line boundry.
-
Module contents¶
-
@@ -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 @@
+
@@ -127,6 +131,7 @@
+
@@ -161,11 +166,13 @@
+
+
- - Docs »
+ - »
- pylorax »
@@ -174,7 +181,7 @@
-
-
+
View page source
@@ -263,44 +270,44 @@
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]¶
-
-
pylorax.buildstamp module¶
-
pylorax.cmdline module¶
-
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.
-
-
+
-
-
pylorax.creator.
calculate_disk_size
(opts, ks)[source]¶
+pylorax.creator.
calculate_disk_size
(opts, ks)[source]¶
Calculate the disk size from the kickstart
- Parameters
-
- Returns
Disk size in MiB
- Return type
--
+
-
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
-
+
-
-
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
-
+
-
-
pylorax.creator.
get_arch
(mount_dir)[source]¶
+pylorax.creator.
get_arch
(mount_dir)[source]¶
Get the kernel arch
-
+
-
-
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
-
+
-
-
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
-
@@ -495,29 +502,29 @@ this. Everything else should be a nop.
Path of the image created
- Return type
--
+
-
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
-
- Returns
Path of directory with created images or None
- Return type
--
+
-
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_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
--
+
-
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://)
-
+
-
-
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.decorators module¶
-
pylorax.discinfo module¶
-
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
-
-
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.
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.
-
+
-
-
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.
-
+
-
-
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
-
- Returns
Path to a new initrd
- Return type
--
+
-
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
-
+
-
-
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.
-
+
-
-
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
@@ -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)[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
(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)!
-
-
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.
-
-
+
-
-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.
-
+
-
+
-
-
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
-
-
+
-
-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
-
@@ -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
-
pylorax.sysutils module¶
-
-
-
-
-
-
-
-
-
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
+
+
+
-
-
+
-
-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)
-
+
-
+
-
-
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
-
+
-
+
-
+
-
-
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.treeinfo module¶
-
Module contents¶
-
+
-
-class
pylorax.
ArchData
(buildarch)[source]¶
+class pylorax.
ArchData
(buildarch)[source]¶
Bases: pylorax.base.DataHolder
-
-
+
-
-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]¶
-
+
-
+
-
-
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
--
+
-
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.
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 @@
+
@@ -98,6 +103,7 @@
+
@@ -132,19 +138,19 @@
+
+
- - Docs »
+ - »
- Search
-
-
-
@@ -158,8 +164,7 @@
@@ -173,20 +178,25 @@
-
@@ -195,7 +205,6 @@
-