Comment 3 for bug 1600567

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-cinderclient (master)

Reviewed: https://review.openstack.org/340129
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=b76f5944130e29ee1bf3095c966a393c489c05e6
Submitter: Jenkins
Branch: master

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.

        @utils.arg(
        '--foo',
        start_version='3.1')
        @utils.arg(
        '--bar',
        start_version='3.2',
        end_version='3.5')
        def do_some_action():
            ......

    In previous example, an exception will be raised for such command:
       $ cinder --os-volume-api-version 3.6 --bar some-ation

    And only "--foo" will show up for such help command:
       $ cinder --os-volume-api-version 3.1 help some-ation

    Change-Id: I74137486992846bbf9fdff53c009851db2356eef
    Partial-Bug: #1600567
    Co-Authored-By: Nate Potter <email address hidden>