CLI argument validation utility
In nova-manage and cinder-manage, we allow command arguments to be passed as optional or positional arguments.
e.g.
$> nova-manage floating create 10.0.0.1/28
$> nova-manage floating create --ip_range 10.0.0.1/28
are equivalent.
Once nova-manage has collected those arguments, it calls the appropriate command function with them as positional and keyword arguments. If the user forgets to supply a required argument, they merely get a TypeError with little useful information.
We should improve the usability of these commands with a utility function to check that the required arguments have been supplied and raise a useful exception if not.
Blueprint information
- Status:
- Complete
- Approver:
- Mark McLoughlin
- Priority:
- Medium
- Drafter:
- Mark McLoughlin
- Direction:
- Approved
- Assignee:
- Mark McLoughlin
- Definition:
- Approved
- Series goal:
- Accepted for grizzly
- Implementation:
- Implemented
- Milestone target:
- 2013.1
- Started by
- Mark McLoughlin
- Completed by
- Mark McLoughlin
Related branches
Related bugs
Sprints
Whiteboard
This is based on jog0's idea in https:/
Merged into oslo-incubator here: https:/