summaryrefslogtreecommitdiffstats
path: root/openstack/common/plugin
diff options
context:
space:
mode:
authorMark McLoughlin <markmc@redhat.com>2012-11-28 11:47:03 +0000
committerMark McLoughlin <markmc@redhat.com>2012-11-29 17:44:35 +0000
commit1e4753263fd8fad9db57558f6db7d6206da33439 (patch)
tree765b6d2e0c57cb330a9c2ef5bb361549c536781a /openstack/common/plugin
parent0ac56f54542ac2068d7881c1befbea4b86075f86 (diff)
downloadoslo-1e4753263fd8fad9db57558f6db7d6206da33439.tar.gz
oslo-1e4753263fd8fad9db57558f6db7d6206da33439.tar.xz
oslo-1e4753263fd8fad9db57558f6db7d6206da33439.zip
Add a CLI argument validation utility
blueprint oslo-cliutils 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. Improve the usability of these commands using a new utility function to check that the required arguments have been supplied and raise a useful exception if not. Change-Id: If6e4a9f222a30472bbfbcd06859865bd4e37e139
Diffstat (limited to 'openstack/common/plugin')
0 files changed, 0 insertions, 0 deletions