Merge ~chad.smith/cloud-init:fix-modules-cmdline-help into cloud-init:master
Status: | Merged |
---|---|
Approved by: | Chad Smith |
Approved revision: | 3cf942c94deba0554d0829e13c14d14c9d596be6 |
Merge reported by: | Chad Smith |
Merged at revision: | 4089e20c0a20bc2ad5c21b106687c4f3faf84b4b |
Proposed branch: | ~chad.smith/cloud-init:fix-modules-cmdline-help |
Merge into: | cloud-init:master |
Diff against target: |
144 lines (+87/-6) 2 files modified
cloudinit/cmd/main.py (+12/-6) tests/unittests/test_cli.py (+75/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
Chad Smith | Abstain | ||
Scott Moser | Approve | ||
Review via email:
|
Commit message
cli: Fix error in cloud-init modules --mode=init.
The cli help docs and argument parser allow the 'init' mode value
which caused a traceback.
Fix the cli to support 'init', 'config' and 'final' modes for the
cloud-init modules subcommand.
Add a check in the cli to raise a ValueError if a new
subcommand ends up allowing an unsupported/
Drive by unit test additions for a bit better coverage of error
handling.
LP: #1736600
Description of the change
cli: Allow providing 'init' mode to cloud-init modules --mode.
The cli help docs and argument parser allow the 'init' mode value
which caused a traceback.
Fix the cli to support 'init', 'config' and 'final' modes for the cloud-init modules subcommand.
Add a check in the cli to raise a ValueError if a new
subcommand ends up allowing an unsupported/
Drive by unit test additions for a bit better coverage of error
handling.
LP: #1736600
PASSED: Continuous integration, rev:171e54e007a 6a5357b194fb580 5451a7bc670682 /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 621/
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: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 621/rebuild
https:/