b85de3cd9e
A couple of things going on, but I think it makes sense to do them atomically. The NodeBase.create() argument "results" is the global state dictionary that will be saved to "state.json", and re-loaded in later phases and passed to them as the argument "state". So for consistency, call this argument "state" (this fits with the change out to start building the state dictionary earlier in the PluginBase.__init__() calls). Since the "state" is a pretty important part of how everything works, move it into a separate object. This is treated as essentially a singleton. It bundles it nicely together for some added documentation [1]. We move instantiation of this object out of the generic BlockDevice.__init__() call and into the actual cmd_* drivers. This is because there's two distinct instantiation operations -- creating a new state (during cmd_create) and loading an existing state (other cmd_*). This is also safer -- since we know the cmd_* arguments are looking for an existing state.json, we will fail if it somehow goes missing. To more fully unit test this, some testing plugins and new entry-points are added. These add known state values which we check for. These should be a good basis for further tests. [1] as noted, we could probably do some fun things in the future like make this implement a dictionary and have some saftey features like r/o keys. Change-Id: I90eb711b3e9b1ce139eb34bdf3cde641fd06828f
79 lines
2.3 KiB
INI
79 lines
2.3 KiB
INI
[metadata]
|
|
name = diskimage-builder
|
|
summary = Golden Disk Image builder.
|
|
description-file =
|
|
README.rst
|
|
author = OpenStack
|
|
author-email = openstack-dev@lists.openstack.org
|
|
license: Apache License (2.0)
|
|
home-page = http://docs.openstack.org/developer/diskimage-builder/
|
|
classifier =
|
|
Development Status :: 5 - Production/Stable
|
|
License :: OSI Approved :: Apache Software License
|
|
Operating System :: POSIX :: Linux
|
|
Programming Language :: Python :: 2.7
|
|
Programming Language :: Python :: 3
|
|
Environment :: Console
|
|
|
|
[build_sphinx]
|
|
all_files = 1
|
|
build-dir = doc/build
|
|
source-dir = doc/source
|
|
warning-is-error = 1
|
|
|
|
[pbr]
|
|
autodoc_index_modules = 1
|
|
autodoc_exclude_modules =
|
|
setup.py
|
|
diskimage_builder.tests.*
|
|
diskimage_builder.block_device.tests.*
|
|
# elements are a weird mix of scripts & python
|
|
diskimage_builder.elements.*
|
|
|
|
[files]
|
|
packages =
|
|
diskimage_builder
|
|
|
|
# ramdisk-image-create is a symlink which becomes a
|
|
# real file on install; see lp bug #1212482
|
|
scripts =
|
|
bin/dib-lint
|
|
data_files =
|
|
share/diskimage-builder/scripts = scripts/*
|
|
|
|
[extract_messages]
|
|
keywords = _ gettext ngettext l_ lazy_gettext
|
|
mapping_file = babel.cfg
|
|
output_file = diskimage_builder/locale/diskimage_builder.pot
|
|
|
|
[update_catalog]
|
|
domain = diskimage_builder
|
|
output_dir = diskimage_builder/locale
|
|
input_file = diskimage_builder/locale/diskimage_builder.pot
|
|
|
|
[compile_catalog]
|
|
directory = diskimage_builder/locale
|
|
domain = diskimage_builder
|
|
|
|
[wheel]
|
|
universal = 1
|
|
|
|
[entry_points]
|
|
console_scripts =
|
|
element-info = diskimage_builder.element_dependencies:main
|
|
dib-block-device = diskimage_builder.block_device.cmd:main
|
|
disk-image-create = diskimage_builder.disk_image_create:main
|
|
ramdisk-image-create = diskimage_builder.disk_image_create:main
|
|
|
|
diskimage_builder.block_device.plugin =
|
|
local_loop = diskimage_builder.block_device.level0.localloop:LocalLoop
|
|
partitioning = diskimage_builder.block_device.level1.partitioning:Partitioning
|
|
mkfs = diskimage_builder.block_device.level2.mkfs:Mkfs
|
|
mount = diskimage_builder.block_device.level3.mount:Mount
|
|
fstab = diskimage_builder.block_device.level4.fstab:Fstab
|
|
|
|
# unit test extensions
|
|
diskimage_builder.block_device.plugin_test =
|
|
test_a = diskimage_builder.block_device.tests.plugin.test_a:TestA
|
|
test_b = diskimage_builder.block_device.tests.plugin.test_b:TestB
|