commit b76f5944130e29ee1bf3095c966a393c489c05e6
Author: Cao Shufeng <email address hidden>
Date: Sun Jul 10 19:08:06 2016 +0800
Add "start_version" and "end_version" support to argparse
Now, "cinder help subcommand" can not show whether an argument
is supported for a specific microversion.
With this change, developers only need to add a start_version or
end_version in the utils.arg wrap, cinderclient will support
the microversion for that arguement.
Reviewed: https:/ /review. openstack. org/340129 /git.openstack. org/cgit/ openstack/ python- cinderclient/ commit/ ?id=b76f5944130 e29ee1bf3095c96 6a393c489c05e6
Committed: https:/
Submitter: Jenkins
Branch: master
commit b76f5944130e29e e1bf3095c966a39 3c489c05e6
Author: Cao Shufeng <email address hidden>
Date: Sun Jul 10 19:08:06 2016 +0800
Add "start_version" and "end_version" support to argparse
Now, "cinder help subcommand" can not show whether an argument
is supported for a specific microversion.
With this change, developers only need to add a start_version or
end_version in the utils.arg wrap, cinderclient will support
the microversion for that arguement.
@utils.arg(
start_ version= '3.1')
start_ version= '3.2',
end_version= '3.5')
'--foo',
@utils.arg(
'--bar',
def do_some_action():
......
In previous example, an exception will be raised for such command: api-version 3.6 --bar some-ation
$ cinder --os-volume-
And only "--foo" will show up for such help command: api-version 3.1 help some-ation
$ cinder --os-volume-
Change-Id: I74137486992846 bbf9fdff53c0098 51db2356eef
Partial-Bug: #1600567
Co-Authored-By: Nate Potter <email address hidden>