Merge ~chad.smith/cloud-init:feature/schema-resizefs-bootcmd into cloud-init:master
| Status: | Merged |
|---|---|
| Merged at revision: | ed8f1b159174715403cb1ffa200ff6d080770152 |
| Proposed branch: | ~chad.smith/cloud-init:feature/schema-resizefs-bootcmd |
| Merge into: | cloud-init:master |
| Diff against target: |
1022 lines (+604/-168) (has conflicts) 8 files modified
cloudinit/config/cc_bootcmd.py (+62/-29) cloudinit/config/cc_ntp.py (+12/-36) cloudinit/config/cc_resizefs.py (+85/-64) cloudinit/config/cc_runcmd.py (+4/-1) cloudinit/config/schema.py (+12/-7) tests/unittests/test_handler/test_handler_bootcmd.py (+157/-0) tests/unittests/test_handler/test_handler_resizefs.py (+252/-7) tests/unittests/test_handler/test_schema.py (+20/-24) Conflict in cloudinit/config/cc_bootcmd.py |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Server Team CI bot | continuous-integration | Approve on 2017-09-08 | |
| cloud-init commiters | 2017-09-05 | Pending | |
|
Review via email:
|
|||
Description of the Change
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_
supplement python help() calls for cc_runcmd, cc_bootcmd, cc_ntp and
cc_resizefs
- Add a SCHEMA_
contain more than one example
to test:
$ tox -e doc; xdg-open doc/rtd_
$ 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
- 5562e81... by Chad Smith on 2017-09-05
FAILED: Continuous integration, rev:5562e81e085
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
FAILED: MAAS Compatability Testing
Click here to trigger a rebuild:
https:/
- 7b8bdd7... by Chad Smith on 2017-09-05
FAILED: Continuous integration, rev:7b8bdd7a0c3
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Unit & Style Tests
Click here to trigger a rebuild:
https:/
- f86c892... by Chad Smith on 2017-09-06
FAILED: Continuous integration, rev:f86c8927fd4
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
FAILED: Ubuntu LTS: Integration
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:f86c8927fd4
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
FAILED: MAAS Compatability Testing
Click here to trigger a rebuild:
https:/
- 00cf0f2... by Chad Smith on 2017-09-06
PASSED: Continuous integration, rev:00cf0f29c98
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: MAAS Compatability Testing
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
- 1a7aca9... by Chad Smith on 2017-09-08
| Chad Smith (chad.smith) wrote : | # |
Good suggestions Scott, I pulled in your changes and adapted cc_runcmd, cc_ntp, cc_resizefs and cc_bootcmd to all set __doc__ through get_schema_doc().
PASSED: Continuous integration, rev:1a7aca93010
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
SUCCESS: MAAS Compatability Testing
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/


FAILED: Continuous integration, rev:07195877d39 6a5a36583b3bd27 7a91561a606f29 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 257/
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Unit & Style Tests
SUCCESS: Ubuntu LTS: Build
SUCCESS: Ubuntu LTS: Integration
FAILED: MAAS Compatability Testing
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 257/rebuild
https:/