diskimage-builder/diskimage_builder/tests
Steve Baker 7e38f85724 A new diskimage-builder command for yaml image builds
The `diskimage-builder` command provides a yaml file based interface
to `disk-image-create` and `ramdisk-image-create`. Every argument to
these scripts has a YAML equivalent. The command has the following
features:
- Environment values can be provided from the calling environment as
  well as YAML
- All arguments are validated with jsonschema in the most appropriate
  YAML type
- Schema is self-documenting and printed when running with --help
- Multiple YAML files can be specified and each file can have multiple
  images defined
- Entries with duplicate image names will be merged into a single
  image build, with attributes overwritten, elements appended, and
  environment values updated/overwritten. A missing image name implies
  the same image name as the previous entry.
- --dry-run and --stop-on-failure flags

A simple YAML defintion would resemble:

- imagename: centos-minimal
  checksum: true
  install-type: package
  elements: [centos, vm]
- imagename: ironic-python-agent
  elements:
  - ironic-python-agent-ramdisk
  - extra-hardware

The TripleO project has managed image build options with YAML files
and it has proved useful having git history and a diff friendly
format, specifically for the following situations:
- Managing differences between distros (centos, rhel)
- Managing changes in major distro releases (centos-8, centos-9-stream)
- Managing the python2 to python3 transition, within and across major
  distro releases

Now that the TripleO toolchain is being retired this tool is being
proposed to be used for the image builds of TripleO's successor, as
well as the rest of the community.

Subsequent commits will add documentation and switch some tests to
using `diskimage-builder`.

Change-Id: I95cba3530d1b1c6c52cf547338762e33738f7225
2023-03-13 09:01:49 +13:00
..
functional Move "functional" unit tests under block-device 2017-06-05 12:22:52 +10:00
__init__.py Python code refactorings. 2013-11-12 10:47:57 -05:00
base.py Add unit test for cache-url 2014-09-30 16:39:21 -05:00
test_diskimage_builder.py A new diskimage-builder command for yaml image builds 2023-03-13 09:01:49 +13:00
test_elementdeps.py Switch from unittest2 compat methods to Python 3.x methods 2020-07-07 11:11:28 +08:00
test_loggingconfig.py Introspect logging testing more 2016-06-16 13:54:52 +10:00
test_no_dup_filenames.py Add test to ensure we don't duplicate filenames 2014-06-11 08:16:41 -04:00