← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~chad.smith/cloud-init:feature/schema-resizefs-bootcmd into cloud-init:master

 

The proposal to merge ~chad.smith/cloud-init:feature/schema-resizefs-bootcmd into cloud-init:master has been updated.

Description changed to:

schema and docs: Add jsonschema to resizefs and bootcmd modules

Add schema definitions to both cc_resizefs and cc_bootcmd modules. Extend
schema.py to parse and document enumerated json types. Schema definitions
are used to generate module documention and log warnings for schema
infractions.

This branch also does the following:
  - drops vestigial 'resize_rootfs_tmp' option from cc_resizefs.  That
    option only created the specified directory and didn't make use of
that directory for any resize operations.
  - Drop yaml.dumps calls from schema documentation generation to avoid
    yaml import costs on module load
  - Add __doc__ = get_schema_doc(schema) definitions it each module to
    supplement python help() calls for cc_runcmd, cc_bootcmd, cc_ntp and
cc_resizefs
  - Add a SCHEMA_EXAMPLES_SPACER_TEMPLATE string to docs for modules which
    contain more than one example

to test: 
$ tox -e doc; xdg-open doc/rtd_html/topics/modules.html 
$ python3 -m cloudinit.cmd.main devel schema --doc 
$ cat > test.cfg <<EOF
#cloud-config
bootcmd: junk
resize_rootfs: invalid
EOF 
$ python3 -m cloudinit.cmd.main devel schema -c test.cfg --annotate


For more details, see:
https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/330243
-- 
Your team cloud-init commiters is requested to review the proposed merge of ~chad.smith/cloud-init:feature/schema-resizefs-bootcmd into cloud-init:master.


References