"cinder help" does not support microversion

Bug #1600567 reported by Cao ShuFeng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
Fix Released
Medium
Unassigned

Bug Description

$ cinder --os-volume-api-version 3.0 help upload-to-image
usage: cinder upload-to-image [--force [<True|False>]]
                              [--container-format <container-format>]
                              [--disk-format <disk-format>]
                              [--visibility <public|private>]
                              [--protected <True|False>]
                              <volume> <image-name>

Uploads volume to Image Service as an image.

Positional arguments:
  <volume> Name or ID of volume to snapshot.
  <image-name> The new image name.

Optional arguments:
  --force [<True|False>]
                        Enables or disables upload of a volume that is
                        attached to an instance. Default=False.
  --container-format <container-format>
                        Container format type. Default is bare.
  --disk-format <disk-format>
                        Disk format type. Default is raw.
  --visibility <public|private>
                        Makes image publicly accessible. Default=private.
  --protected <True|False>
                        Prevents image from being deleted. Default=False.

This is the output of "cinder --os-volume-api-version 3.0 help upload-to-image"

But "--visibility" and "--protected" is not supported in 3.0 version. The should not show up in this help message.

Cao ShuFeng (caosf-fnst)
Changed in python-cinderclient:
assignee: nobody → Cao ShuFeng (caosf-fnst)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-cinderclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/340129

Changed in python-cinderclient:
status: New → In Progress
Changed in python-cinderclient:
assignee: Cao ShuFeng (caosf-fnst) → Nate Potter (ntpttr)
Changed in python-cinderclient:
assignee: Nate Potter (ntpttr) → Cao ShuFeng (caosf-fnst)
Changed in python-cinderclient:
assignee: Cao ShuFeng (caosf-fnst) → Nate Potter (ntpttr)
Changed in python-cinderclient:
assignee: Nate Potter (ntpttr) → Cao ShuFeng (caosf-fnst)
Changed in python-cinderclient:
assignee: Cao ShuFeng (caosf-fnst) → Nate Potter (ntpttr)
Revision history for this message
Nate Potter (ntpttr) wrote :

Sorry this keeps getting automatically assigned to me, is there a way to disable it from doing that..?

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>

Changed in python-cinderclient:
importance: Undecided → Medium
Revision history for this message
Sean McGinnis (sean-mcginnis) wrote : Bug Assignee Expired

Unassigning due to no activity for > 6 months.

Changed in python-cinderclient:
assignee: Nate Potter (ntpttr) → nobody
status: In Progress → Triaged
Changed in python-cinderclient:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.