Merge ~adam-collard/maas:maas-cli-tweaks into maas:master
Status: | Merged |
---|---|
Approved by: | Adam Collard |
Approved revision: | d2d41a970bd71f60375bad34a00f701b07a6beac |
Merge reported by: | MAAS Lander |
Merged at revision: | not available |
Proposed branch: | ~adam-collard/maas:maas-cli-tweaks |
Merge into: | maas:master |
Diff against target: |
165 lines (+60/-19) 4 files modified
src/maascli/__init__.py (+3/-11) src/maascli/parser.py (+13/-1) src/maascli/tests/test_integration.py (+10/-6) src/maascli/tests/test_parser.py (+34/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
MAAS Lander | Approve | ||
Alberto Donato (community) | Approve | ||
Review via email: mp+401465@code.launchpad.net |
Commit message
Show best possible help for maas cli when missing arguments.
Signed-off-by: Adam Collard <email address hidden>
Description of the change
Before 1:
$ maas bolla
usage: maas [-h] COMMAND ...
optional arguments:
-h, --help show this help message and exit
drill down:
COMMAND
login Log in to a remote API, and remember its description and credentials.
logout Log out of a remote API, purging any stored credentials.
list List remote APIs that have been logged-in to.
refresh Refresh the API descriptions of all profiles.
autopkgtest
bolla Interact with http://
karura Interact with http://
too few arguments
After 1:
$ maas bolla
usage: maas bolla [-h] COMMAND ...
Issue commands to the MAAS region controller at http://
optional arguments:
-h, --help show this help message and exit
drill down:
COMMAND
account Manage the current logged-in user.
bcache-
bcache-
bcache Manage bcache device on a machine.
bcaches Manage bcache devices on a machine.
block-device Manage a block device on a machine.
block-devices Manage block devices on a machine.
boot-resource Manage a boot resource.
boot-resources Manage the boot resources.
boot-source Manage a boot source.
<snip>
Before 2:
$ maas bolla nodes
usage: maas [-h] COMMAND ...
optional arguments:
-h, --help show this help message and exit
drill down:
COMMAND
login Log in to a remote API, and remember its description and credentials.
logout Log out of a remote API, purging any stored credentials.
list List remote APIs that have been logged-in to.
refresh Refresh the API descriptions of all profiles.
autopkgtest
bolla Interact with http://
karura Interact with http://
too few arguments
After 2:
$ maas bolla nodes
usage: maas bolla nodes [-h] COMMAND ...
Manage the collection of all the nodes in the MAAS.
optional arguments:
-h, --help show this help message and exit
drill down:
COMMAND
is-registered MAC address registered
set-zone Assign nodes to a zone
read List Nodes visible to the user
is-
too few arguments
nice!
minor nits inline