formats: load function takes combined manifest

Instead of having the pipeline and the source option as separate
arguments, the load function now takes the full manifest, which
has those two items combined.
This commit is contained in:
Christian Kellner 2020-12-16 17:49:37 +01:00 committed by Tom Gundersen
parent 0b6f36158d
commit a13783f67b
4 changed files with 17 additions and 12 deletions

View file

@ -116,10 +116,7 @@ def osbuild_cli():
show_validation(res, args.manifest_path)
return 2
pipeline = manifest.get("pipeline", {})
sources_options = manifest.get("sources", {})
pipeline = fmt.load(pipeline, sources_options)
pipeline = fmt.load(manifest)
if args.checkpoint:
missed = mark_checkpoints(pipeline, args.checkpoint)
@ -131,8 +128,8 @@ def osbuild_cli():
if args.inspect:
result = {"pipeline": pipeline.description(with_id=True)}
if sources_options:
result["sources"] = sources_options
if manifest.get("sources_options"):
result["sources"] = manifest["sources_options"]
json.dump(result, sys.stdout)
sys.stdout.write("\n")
return 0