diff --git a/lorax-composer/.buildinfo b/lorax-composer/.buildinfo index 82148231..1f43aec2 100644 --- a/lorax-composer/.buildinfo +++ b/lorax-composer/.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: 50e837e886c9cb44ee8f8828f75d7ded +config: 12d527250403177f77175f9f02bc8463 tags: fbb0d17656682115ca4d033fb2f83ba1 diff --git a/lorax-composer/.doctrees/composer-cli.doctree b/lorax-composer/.doctrees/composer-cli.doctree index 3905741a..70f36a3b 100644 Binary files a/lorax-composer/.doctrees/composer-cli.doctree and b/lorax-composer/.doctrees/composer-cli.doctree differ diff --git a/lorax-composer/.doctrees/composer.cli.doctree b/lorax-composer/.doctrees/composer.cli.doctree index 01939c6c..bc2cdfd5 100644 Binary files a/lorax-composer/.doctrees/composer.cli.doctree and b/lorax-composer/.doctrees/composer.cli.doctree differ diff --git a/lorax-composer/.doctrees/composer.doctree b/lorax-composer/.doctrees/composer.doctree index 945711d0..fa0f9202 100644 Binary files a/lorax-composer/.doctrees/composer.doctree and b/lorax-composer/.doctrees/composer.doctree differ diff --git a/lorax-composer/.doctrees/environment.pickle b/lorax-composer/.doctrees/environment.pickle index a687a431..5bd8ab3f 100644 Binary files a/lorax-composer/.doctrees/environment.pickle and b/lorax-composer/.doctrees/environment.pickle differ diff --git a/lorax-composer/.doctrees/index.doctree b/lorax-composer/.doctrees/index.doctree index c2101334..e32d0913 100644 Binary files a/lorax-composer/.doctrees/index.doctree and b/lorax-composer/.doctrees/index.doctree differ diff --git a/lorax-composer/.doctrees/intro.doctree b/lorax-composer/.doctrees/intro.doctree index c35bf25f..e606f96c 100644 Binary files a/lorax-composer/.doctrees/intro.doctree and b/lorax-composer/.doctrees/intro.doctree differ diff --git a/lorax-composer/.doctrees/livemedia-creator.doctree b/lorax-composer/.doctrees/livemedia-creator.doctree index 7d19a7cb..81771a97 100644 Binary files a/lorax-composer/.doctrees/livemedia-creator.doctree and b/lorax-composer/.doctrees/livemedia-creator.doctree differ diff --git a/lorax-composer/.doctrees/lorax-composer.doctree b/lorax-composer/.doctrees/lorax-composer.doctree index 6c3c5445..fd83fc08 100644 Binary files a/lorax-composer/.doctrees/lorax-composer.doctree and b/lorax-composer/.doctrees/lorax-composer.doctree differ diff --git a/lorax-composer/.doctrees/lorax.doctree b/lorax-composer/.doctrees/lorax.doctree index b7e2fed3..22f2a8b7 100644 Binary files a/lorax-composer/.doctrees/lorax.doctree and b/lorax-composer/.doctrees/lorax.doctree differ diff --git a/lorax-composer/.doctrees/modules.doctree b/lorax-composer/.doctrees/modules.doctree index 6dc44e6e..1e631d6e 100644 Binary files a/lorax-composer/.doctrees/modules.doctree and b/lorax-composer/.doctrees/modules.doctree differ diff --git a/lorax-composer/.doctrees/product-images.doctree b/lorax-composer/.doctrees/product-images.doctree index fd60188b..4353d99e 100644 Binary files a/lorax-composer/.doctrees/product-images.doctree and b/lorax-composer/.doctrees/product-images.doctree differ diff --git a/lorax-composer/.doctrees/pylorax.api.doctree b/lorax-composer/.doctrees/pylorax.api.doctree index 0c62ad4d..7b63d85b 100644 Binary files a/lorax-composer/.doctrees/pylorax.api.doctree and b/lorax-composer/.doctrees/pylorax.api.doctree differ diff --git a/lorax-composer/.doctrees/pylorax.doctree b/lorax-composer/.doctrees/pylorax.doctree index 9f25122d..37e0ec42 100644 Binary files a/lorax-composer/.doctrees/pylorax.doctree and b/lorax-composer/.doctrees/pylorax.doctree differ diff --git a/lorax-composer/_modules/composer/cli.html b/lorax-composer/_modules/composer/cli.html index 4effe024..1e5d84ad 100644 --- a/lorax-composer/_modules/composer/cli.html +++ b/lorax-composer/_modules/composer/cli.html @@ -8,7 +8,7 @@
-
+#
+# Copyright (C) 2018 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+[docs]def insort_left(a, x, key=None, lo=0, hi=None):
+ """Insert item x in list a, and keep it sorted assuming a is sorted.
+
+ :param a: sorted list
+ :type a: list
+ :param x: item to insert into the list
+ :type x: object
+ :param key: Function to use to compare items in the list
+ :type key: function
+ :returns: index where the item was inserted
+ :rtype: int
+
+ If x is already in a, insert it to the left of the leftmost x.
+ Optional args lo (default 0) and hi (default len(a)) bound the
+ slice of a to be searched.
+
+ This is a modified version of bisect.insort_left that can use a
+ function for the compare, and returns the index position where it
+ was inserted.
+ """
+ if key is None:
+ key = lambda i: i
+
+ if lo < 0:
+ raise ValueError('lo must be non-negative')
+ if hi is None:
+ hi = len(a)
+ while lo < hi:
+ mid = (lo+hi)//2
+ if key(a[mid]) < key(x): lo = mid+1
+ else: hi = mid
+ a.insert(lo, x)
+ return lo
+
-# Copyright (C) 2018 Red Hat, Inc.
+# Copyright (C) 2018-2019 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -83,11 +83,13 @@
parameters needed to generate the desired output. Other types should be set to False.
"""
+from __future__ import print_function
import logging
log = logging.getLogger("lorax-composer")
import os
from glob import glob
+from StringIO import StringIO
from math import ceil
import pytoml as toml
import shutil
@@ -103,6 +105,7 @@
from pylorax.api.projects import ProjectsError
from pylorax.api.recipes import read_recipe_and_id
from pylorax.api.timestamp import TS_CREATED, write_timestamp
+from pylorax.executils import runcmd_output
from pylorax.imgutils import default_image_name
from pylorax.sysutils import joinpaths
@@ -172,9 +175,391 @@
if not r.sslverify:
cmd += '--noverifyssl'
+ if r.sslcacert:
+ cmd += ' --sslcacert="%s"' % r.sslcacert
+ if r.sslclientcert:
+ cmd += ' --sslclientcert="%s"' % r.sslclientcert
+ if r.sslclientkey:
+ cmd += ' --sslclientkey="%s"' % r.sslclientkey
+
return cmd
#
-# Copyright (C) 2017 Red Hat, Inc.
+# Copyright (C) 2017-2019 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -287,6 +287,12 @@
description = recipe_dict["description"]
version = recipe_dict.get("version", None)
customizations = recipe_dict.get("customizations", None)
+
+ # [customizations] was incorrectly documented at first, so we have to support using it
+ # as [[customizations]] by grabbing the first element.
+ if isinstance(customizations, list):
+ customizations = customizations[0]
+
except KeyError as e:
raise RecipeError("There was a problem parsing the recipe: %s" % str(e))
@@ -461,6 +467,9 @@
If no commit is passed the master:filename is returned, otherwise it will be
commit:filename
"""
+ if not repo_file_exists(repo, branch, recipe_filename(recipe_name)):
+ raise RecipeFileError("Unknown blueprint")
+
(_, recipe_toml) = read_commit(repo, branch, recipe_filename(recipe_name), commit)
return recipe_from_toml(recipe_toml)
The available types of images is displayed by composer-cli compose types. -Currently this consists of: ext4-filesystem, live-iso, partitioned-disk, qcow2, -tar
+Currently this consists of: ami, ext4-filesystem, live-iso, openstack, +partitioned-disk, qcow2, tar, vhd, vmdkReturn the JSON representation of the blueprint. This includes 3 top level objects. changes which lists whether or not the workspace is different from the most recent commit. blueprints which lists the JSON representation of the blueprint, and errors which will list any errors, like non-existant blueprints.
-Example:
+By default the response is JSON, but if ?format=toml is included in the URL’s +arguments it will return the response as the blueprint’s raw TOML content. +Unless there is an error which will only return a 400 and a standard error +`Status Response`_.
+If there is an error when JSON is requested the successful blueprints and the +errors will both be returned.
+Example of json response:
{ "changes": [ { @@ -2409,7 +2894,8 @@ error response with it set to false and an error message included.+@@ -3210,7 +3696,21 @@ a line boundry.Delete a blueprint. The blueprint is deleted from the branch, and will no longer be listed by the list route. A blueprint can be undeleted using the undo route -to revert to a previous commit.
+to revert to a previous commit. This will also delete the workspace copy of the +blueprint.The response will be a status response with status set to true, or an error response with it set to false and an error message included.
Return True if the blueprint exists
++
++ + + + + Parameters: + +
- @@ -3349,6 +3849,34 @@ a line boundry.
@@ -107,6 +107,12 @@ pylorax.get_buildarch(ybo)[source]¶ + +yumbase Module¶
++
+- +class pylorax.api.yumbase.YumLock(conf, expire_secs=21600)[source]¶
+Bases: object
+Hold the YumBase object and a Lock to control access to it.
+self.yb is a property that returns the YumBase object, but it may change +from one call to the next if the upstream repositories have changed.
++
+ +- +lock[source]¶
+Check for repo updates (using expiration time) and return the lock
+If the repository has been updated, tear down the old YumBase and +create a new one. This is the only way to force yum to use the new +metadata.
++
+ +- +lock_check[source]¶
+Force a check for repo updates and return the lock
+If the repository has been updated, tear down the old YumBase and +create a new one. This is the only way to force yum to use the new +metadata.
+Use this method sparingly, it removes the repodata and downloads a new copy every time.
+
- pylorax.api.yumbase.get_base_object(conf)[source]¶
@@ -3398,6 +3926,7 @@ a line boundry.
- api Package
- api Package
+- bisect Module
- checkparams Module
- compose Module
- Adding New Output Types
@@ -3416,7 +3945,7 @@ a line boundry.- Status Responses
- API Routes
diff --git a/lorax-composer/pylorax.html b/lorax-composer/pylorax.html index d52e8fb9..521c9ec0 100644 --- a/lorax-composer/pylorax.html +++ b/lorax-composer/pylorax.html @@ -8,7 +8,7 @@ -
- /api/v0/blueprints/list
-- /api/v0/blueprints/info/<blueprint_names>
+- /api/v0/blueprints/info/<blueprint_names>[?format=<json|toml>]
- /api/v0/blueprints/changes/<blueprint_names>[?offset=0&limit=20]
- POST /api/v0/blueprints/new
- DELETE /api/v0/blueprints/delete/<blueprint_name>
@@ -3498,7 +4027,7 @@ a line boundry.- previous |
-- Lorax 19.7.22 documentation »
+- Lorax 19.7.43 documentation »
- src »
- pylorax Package »
pylorax Package — Lorax 19.7.22 documentation +pylorax Package — Lorax 19.7.43 documentation @@ -16,7 +16,7 @@ - + @@ -46,7 +46,7 @@- previous |
-- Lorax 19.7.22 documentation »
+- Lorax 19.7.43 documentation »
- src »
base Module¶
@@ -116,27 +122,27 @@@@ -275,7 +281,7 @@ releasever Release version, passed to template. Default is 17 Bases: object
- -pcritical(msg, fobj=<open file '<stdout>', mode 'w' at 0x7f838cf59150>)[source]¶
+pcritical(msg, fobj=<open file '<stdout>', mode 'w' at 0x7f44874d0150>)[source]¶
- -pdebug(msg, fobj=<open file '<stdout>', mode 'w' at 0x7f838cf59150>)[source]¶
+pdebug(msg, fobj=<open file '<stdout>', mode 'w' at 0x7f44874d0150>)[source]¶
- -perror(msg, fobj=<open file '<stdout>', mode 'w' at 0x7f838cf59150>)[source]¶
+perror(msg, fobj=<open file '<stdout>', mode 'w' at 0x7f44874d0150>)[source]¶
- -pylorax.creator.make_image(opts, ks, callback_func=None)[source]¶
+pylorax.creator.make_image(opts, ks, cancel_func=None)[source]¶Install to an image
Use virt or anaconda to install to an image.
Returns the full path of of the image created.
@@ -370,7 +376,7 @@ type img_mount: imgutils.PartitionMount
- -pylorax.creator.run_creator(opts, callback_func=None)[source]¶
+pylorax.creator.run_creator(opts, cancel_func=None)[source]¶Run the image creator process
@@ -775,7 +781,7 @@ initrd.img than the iso has. The iso is still used for stage2.
- -class pylorax.installer.VirtualInstall(iso, ks_paths, disk_img, img_size=2, kernel_args=None, memory=1024, vnc=None, arch=None, log_check=None, virtio_host='127.0.0.1', virtio_port=6080, qcow2=False, boot_uefi=False, ovmf_path=None)[source]¶
+class pylorax.installer.VirtualInstall(iso, ks_paths, disk_img, img_size=2, kernel_args=None, memory=1024, vnc=None, arch=None, cancel_func=None, virtio_host='127.0.0.1', virtio_port=6080, qcow2=False, boot_uefi=False, ovmf_path=None)[source]¶Bases: object
Run virt-install using an iso and kickstart(s)
@@ -789,13 +795,13 @@ initrd.img than the iso has. The iso is still used for stage2.
- -pylorax.installer.novirt_install(opts, disk_img, disk_size, repo_url, callback_func=None)[source]¶
+pylorax.installer.novirt_install(opts, disk_img, disk_size, repo_url, cancel_func=None)[source]¶Use Anaconda to install to a disk image
- -pylorax.installer.virt_install(opts, install_log, disk_img, disk_size)[source]¶
+pylorax.installer.virt_install(opts, install_log, disk_img, disk_size, cancel_func=None)[source]¶Use virt-install to install to a disk image
install_log is the path to write the log from virt-install disk_img is the full path to the final disk or filesystem image @@ -1320,7 +1326,7 @@ Example:
- -class pylorax.treebuilder.TreeBuilder(product, arch, inroot, outroot, runtime, isolabel, domacboot=False, doupgrade=True, templatedir=None, add_templates=None, add_template_vars=None, workdir=None)[source]¶
+class pylorax.treebuilder.TreeBuilder(product, arch, inroot, outroot, runtime, isolabel, domacboot=False, 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)
@@ -1467,6 +1473,7 @@ image is built with the filename “${prefix}-${kernel.version}.img”
- api Package
- api Package
+- bisect Module
- checkparams Module
- compose Module
@@ -94,7 +94,7 @@
- Adding New Output Types
@@ -1485,7 +1492,7 @@ image is built with the filename “${prefix}-${kernel.version}.img”- Status Responses
- API Routes
diff --git a/lorax-composer/search.html b/lorax-composer/search.html index 613d3725..ed8a5fc3 100644 --- a/lorax-composer/search.html +++ b/lorax-composer/search.html @@ -8,7 +8,7 @@ -
- /api/v0/blueprints/list
-- /api/v0/blueprints/info/<blueprint_names>
+- /api/v0/blueprints/info/<blueprint_names>[?format=<json|toml>]
- /api/v0/blueprints/changes/<blueprint_names>[?offset=0&limit=20]
- POST /api/v0/blueprints/new
- DELETE /api/v0/blueprints/delete/<blueprint_name>
@@ -1608,7 +1615,7 @@ image is built with the filename “${prefix}-${kernel.version}.img”- previous |
-- Lorax 19.7.22 documentation »
+- Lorax 19.7.43 documentation »
- src »
Search — Lorax 19.7.22 documentation +Search — Lorax 19.7.43 documentation @@ -16,7 +16,7 @@ - + @@ -43,7 +43,7 @@- modules |
-- Lorax 19.7.22 documentation »
+- Lorax 19.7.43 documentation »
- modules |
-- Lorax 19.7.22 documentation »
+- Lorax 19.7.43 documentation »