Skip to content

cli/request: support passing instance parameters from a file

Jérome Perrin requested to merge feat/cli_request_file into master

Support a syntax like:

  slapos request \
    --node=computer_guid=local \
    --parameters-file=~/request.json \
    ERP5 \
    https://lab.nexedi.com/nexedi/slapos/raw/1.0.145/software/erp5/software.cfg

to request an instance with parameters in ~/request.json file.

This also teach slapos.core about the instance schema, which makes it possible to understand the serialisation, so that we no longer need to use _ = json.dump(params) to encode parameters.

This also emits a warning when requesting with parameters which do not match the schema.

Edited by Jérome Perrin

Merge request reports