osbuild: add meta module for metadata information

This new module contains utilities that help to introspect parts
that constitute the inner parts of osbuild, i.e. its stages
and assembler (which is also considered a type of stage in
this context). It contains the `StageInfo` class that can that
contains meta-information about the individual stage, such as
a short information (`info`), a longer description (`desc`) and
its JSON schema. A new Schema class represents schema data and
has a `validation` method that can be used to validate that json
data conforms to said schema.
A `Index` class can be used to obtain `StageInfo` and `Schema`
for entities identified via `klass` and `name`.
A top level `validate` method is introduced that can validate
manifest data.
Internally it uses the `jsonschema` package so add that as a
requirement and Install this dependency in the CI.
This commit is contained in:
Christian Kellner 2020-04-24 17:40:17 +02:00
parent 651326c610
commit e77d95f4b7
5 changed files with 442 additions and 1 deletions

View file

@ -6,6 +6,9 @@ setuptools.setup(
description="A build system for OS images",
packages=["osbuild", "osbuild.util"],
license='Apache-2.0',
install_requires=[
"jsonschema",
],
entry_points={
"console_scripts": [
"osbuild = osbuild.main_cli:main_cli"