Merge ~chad.smith/cloud-init:cc-ntp-schema-validation into cloud-init:master
| Status: | Merged |
|---|---|
| Approved by: | Scott Moser on 2017-05-31 |
| Approved revision: | 890d5a3f79324f74b6024bd21856158ca7d181f8 |
| Merged at revision: | 0a448dd034883c07f85091dbfc9117de7227eb8d |
| Proposed branch: | ~chad.smith/cloud-init:cc-ntp-schema-validation |
| Merge into: | cloud-init:master |
| Diff against target: |
757 lines (+657/-7) 7 files modified
cloudinit/config/cc_ntp.py (+67/-2) cloudinit/config/schema.py (+222/-0) requirements.txt (+3/-0) tests/unittests/helpers.py (+1/-5) tests/unittests/test_handler/test_handler_ntp.py (+109/-0) tests/unittests/test_handler/test_schema.py (+220/-0) tools/cloudconfig-schema (+35/-0) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Server Team CI bot | continuous-integration | Approve on 2017-05-31 | |
| Scott Moser | 2017-05-25 | Approve on 2017-05-31 | |
|
Review via email:
|
|||
Commit Message
cc_ntp: Add schema definition and passive schema validation.
cloud-config files are very flexible and permissive. This branch adds a supported schema definition to cc_ntp so that we can properly inform users of potential misconfiguration in their cloud-config yaml.
This first branch adds a jsonsschema definition to the cc_ntp module and validation functions in cloudinit/
A cmdline tools/cloudconf
LP: #1692916
Description of the Change
cc_ntp: Add schema definition and passive schema validation.
cloud-config files are very flexible and permissive. This branch adds a supported schema definition to cc_ntp so that we can properly inform users of potential misconfiguration in their cloud-config yaml.
This first branch adds a jsonsschema definition to the cc_ntp module and validation functions in cloudinit/
A cmdline tools/cloudconf
LP: #1692916
To test:
# download the attached schemas.tar
wget https:/
tar xf schemas.tar
./tools/
./tools/
for file in `ls schemas`; do echo '------
#run unit tests
tox -- --tests tests/unittests
- f5df731... by Chad Smith on 2017-05-25
- 9ee8f78... by Chad Smith on 2017-05-25
FAILED: Continuous integration, rev:7fd77646851
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
| Scott Moser (smoser) wrote : | # |
I like it very much.
Some comments inline. comments.
looking at diff i see that tools/cloudconf
tools/cloudconf
tools/cloudconf
might as well write errors to stderr.
Overall this is wonderful. Thank you.
The jsonschema thing is the only sticking point. we can add a dependency to trunk
and trunk's package build. But I dont yet want to add a runtime dependency on it.
So somehow we have to address that.
FAILED: Continuous integration, rev:9ee8f78041a
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- e6aabcd... by Chad Smith on 2017-05-25
FAILED: Continuous integration, rev:e6aabcd0274
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 9aff5a1... by Chad Smith on 2017-05-25
- 3d188c2... by Chad Smith on 2017-05-25
FAILED: Continuous integration, rev:9aff5a184f7
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 0d05dd1... by Chad Smith on 2017-05-25
- d625066... by Chad Smith on 2017-05-25
PASSED: Continuous integration, rev:d625066059e
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
| Chad Smith (chad.smith) wrote : | # |
Review comments addressed Scott. Thank you! I tweaked the rst doc layout a bit to make sure we could use structured text within the Config keys doc section. Let's talk about the runtime dependency concern tomorrow to see what we can do. Not having the dependency defined means we'd have to remove the validate_
- 1788d55... by Chad Smith on 2017-05-26
PASSED: Continuous integration, rev:1788d55154c
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- de1a75c... by Chad Smith on 2017-05-26
PASSED: Continuous integration, rev:de1a75cd63b
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- a4cf423... by Chad Smith on 2017-05-26
FAILED: Continuous integration, rev:a4cf423f7e8
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 8ebe99e... by Chad Smith on 2017-05-26
- f29875d... by Chad Smith on 2017-05-26
- fc42257... by Chad Smith on 2017-05-26
FAILED: Continuous integration, rev:f29875d757f
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:fc42257ec9b
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
- 5d585e9... by Chad Smith on 2017-05-27
PASSED: Continuous integration, rev:5d585e91c02
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
| Scott Moser (smoser) wrote : | # |
I have only one comment, and i'm fine with it as it is.
Could we put the main into cloudinit/
Then it would be executable on any system with cloud-init as:
python3 -m cloudinit.
- 704339e... by Chad Smith on 2017-05-31
FAILED: Continuous integration, rev:704339ebcc5
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- af370e1... by Chad Smith on 2017-05-31
- f85cd6c... by Chad Smith on 2017-05-31
FAILED: Continuous integration, rev:
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
FAILED: Continuous integration, rev:
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild:
https:/
- 890d5a3... by Chad Smith on 2017-05-31
PASSED: Continuous integration, rev:
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/
PASSED: Continuous integration, rev:890d5a3f793
https:/
Executed test runs:
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
SUCCESS: https:/
Click here to trigger a rebuild:
https:/


FAILED: Continuous integration, rev:7fd77646851 386a148e1d26d65 5fbe8163f72a14 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 398/ /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- amd64/398/ console /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- arm64/398/ console /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- ppc64el/ 398/console /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=metal- s390x/398/ console /jenkins. ubuntu. com/server/ job/cloud- init-ci/ nodes=vm- i386/398/ console
https:/
Executed test runs:
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
FAILURE: https:/
Click here to trigger a rebuild: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 398/rebuild
https:/