Merge ~chad.smith/cloud-init:ntp-schema into cloud-init:master
Status: | Merged |
---|---|
Approved by: | Scott Moser |
Approved revision: | 545b0dd39f6e3741d6e9b698bdfd36d73e82abf7 |
Merged at revision: | 6bc504e41666329631cdfd5b947ed5b0e2529a76 |
Proposed branch: | ~chad.smith/cloud-init:ntp-schema |
Merge into: | cloud-init:master |
Diff against target: |
127 lines (+53/-15) 4 files modified
cloudinit/config/cc_ntp.py (+3/-1) tests/cloud_tests/testcases/modules/ntp.yaml (+2/-2) tests/unittests/test_handler/test_handler_ntp.py (+12/-11) tests/unittests/test_handler/test_schema.py (+36/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Scott Moser | Approve | ||
Joshua Powers (community) | Approve | ||
Server Team CI bot | continuous-integration | Approve | |
Review via email: mp+332540@code.launchpad.net |
Commit message
ntp: fix config module schema to allow empty ntp config
Fix three things related to the ntp module:
1. Fix invalid cloud-config schema in the integration test which
provided empty dicts instead of emptylists for pools and servers
2. Correct logic in the ntp module to allow support for the minimal
cloud-config 'ntp:' without raising a RuntimeError. Docs and schema
definitions already describe that cloud-config's ntp can be empty.
An ntp configuration with neither pools nor servers will be
configured with a default set of ntp pools. As such, the ntp module
now officially allows the following ntp cloud-configs:
- ntp:
- ntp: {}
- ntp:
servers: []
pools: []
3. Add a simple unit test which validates all cloud-config provided to
our integration tests to ensure it adheres to any defined module
schema so as more jsonschema definitions are added, we validate our
integration test configs.
LP: #1724951
Description of the change
ntp: fix config module schema to allow empty ntp config
Fix three things related to the ntp module:
1. Fix invalid cloud-config schema in the integration test which
provided empty dicts instead of emptylists for pools and servers
2. Correct logic in the ntp module to allow support for the minimal
cloud-config 'ntp:' without raising a RuntimeError. Docs and schema
definitions already describe that cloud-config's ntp can be empty.
An ntp configuration with neither pools nor servers will be
configured with a default set of ntp pools. As such, the ntp module
now officially allows the following ntp cloud-configs:
- ntp:
- ntp: {}
- ntp:
servers: []
pools: []
3. Add a simple unit test which validates all cloud-config provided to
our integration tests to ensure it adheres to any defined module
schema so as more jsonschema definitions are added, we validate our
integration test configs.
LP: #1724951
FAILED: Continuous integration, rev:545b0dd39f6 e3741d6e9b698bd fd36d73e82abf7 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 415/
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/ 415/rebuild
https:/