cinder list --group_id should be --group-id

Bug #1710713 reported by cripps
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cinderclient
In Progress
Undecided
Robert Ellis

Bug Description

cinder list takes a group id argument, but this argument is group_id and not group-id. As far as I can see, most options use - and not _.

# cinder help list
usage: cinder list [--group_id <group_id>] [--all-tenants [<0|1>]]
                   [--name <name>] [--status <status>]

# cinder help create
usage: cinder create [--consisgroup-id <consistencygroup-id>]
                     [--group-id <group-id>] [--snapshot-id <snapshot-id>]
                     [--source-volid <source-volid>]
                     [--source-replica <source-replica>]
                     [--image-id <image-id>] [--image <image>] [--name <name>]
                     [--description <description>]
                     [--volume-type <volume-type>]
                     [--availability-zone <availability-zone>]
                     [--metadata [<key=value> [<key=value> ...]]]
                     [--hint <key=value>] [--allow-multiattach] [--poll]
                     [<size>]

Creates a volume.

Positional arguments:
  <size> Size of volume, in GiBs. (Required unless snapshot-id
                        /source-volid is specified).

Optional arguments:
  --consisgroup-id <consistencygroup-id>
                        ID of a consistency group where the new volume belongs
                        to. Default=None.
  --group-id <group-id>
                        ID of a group where the new volume belongs to.
                        Default=None. (Supported by API version 3.13 and
                        later)

# cinder help group-snapshot-list
usage: cinder group-snapshot-list [--all-tenants [<0|1>]] [--status <status>]
                                  [--group-id <group_id>]
                                  [--filters [<key=value> [<key=value> ...]]]

Lists all group snapshots.

Optional arguments:
  --all-tenants [<0|1>]
                        Shows details for all tenants. Admin only.
  --status <status> Filters results by a status. Default=None. This option
                        is deprecated and will be removed in newer release.
                        Please use '--filters' option which is introduced
                        since 3.33 instead.
  --group-id <group_id>
                        Filters results by a group ID. Default=None. This
                        option is deprecated and will be removed in newer
                        release. Please use '--filters' option which is
                        introduced since 3.33 instead.

Tags: groups
cripps (cripps)
description: updated
Changed in python-cinderclient:
assignee: nobody → Robert Ellis (bob-ellis42)
Changed in python-cinderclient:
status: New → Incomplete
Revision history for this message
Robert Ellis (bob-ellis42) wrote :

Which version of Openstack was this seen in? I have just checked the latest Pike devstack, and at least with my configuration the group-id is not an argument for create or list. If it was pike, then I may need a different configuration.

Revision history for this message
cripps (cripps) wrote :

I'm using version is 3.1.0 from Pike, I believe generic groups were introduced in Newton though.
To get the option you need to run "export OS_VOLUME_API_VERSION=3.10" or --os-volume-api-version=3.10.

This appears to be the commit that introduced it.
https://github.com/openstack/python-cinderclient/commit/aaffe41e3161ff5684eb87202780680f2a006fbe

Looking at the code this option might be deprecated already in favor of --filters?

https://github.com/openstack/python-cinderclient/blob/b7d34684607bbc0d8c507970661d0b1d3bed7843/cinderclient/v3/shell.py#L1289

@utils.arg('--group-id',
           metavar='<group_id>',
           default=None,
           help="Filters results by a group ID. Default=None. "
"%s" % FILTER_DEPRECATED)

FILTER_DEPRECATED = ("This option is deprecated and will be removed in "
                     "newer release. Please use '--filters' option which "
                     "is introduced since 3.33 instead.")

https://github.com/openstack/python-cinderclient/commit/a6affea92157a5656ba4beae6ffd059d12e23bdc

Changed in python-cinderclient:
status: Incomplete → In Progress
Revision history for this message
Robert Ellis (bob-ellis42) wrote :

Thanks Cripps. Didn't know the default devstack API version was so old, I assumed it would be a recent one. I will look into updating this.

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/494286

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-cinderclient (master)

Change abandoned by Sean McGinnis (<email address hidden>) on branch: master
Review: https://review.openstack.org/494286
Reason: No update for some time. Feel free to restore and address comments if you wish to pursue this.

Revision history for this message
Rajat Dhasmana (whoami-rajat) wrote :

Is anyone working on this,
I would like to take this issue. Thanks

Revision history for this message
Robert Ellis (bob-ellis42) wrote : Re: [Bug 1710713] Re: cinder list --group_id should be --group-id
Download full text (3.3 KiB)

Hey Rajat,

FYI, I wrote up a fix for this issue, but at the time the key code
reviewers didn't think it was worth fixing unless grouped with other
interface changes. That is why I dropped fixing it.

Bob

On Tue, Jul 24, 2018 at 5:56 AM Rajat Dhasmana <email address hidden>
wrote:

> Is anyone working on this,
> I would like to take this issue. Thanks
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1710713
>
> Title:
> cinder list --group_id should be --group-id
>
> Status in python-cinderclient:
> In Progress
>
> Bug description:
> cinder list takes a group id argument, but this argument is group_id
> and not group-id. As far as I can see, most options use - and not _.
>
> # cinder help list
> usage: cinder list [--group_id <group_id>] [--all-tenants [<0|1>]]
> [--name <name>] [--status <status>]
>
> # cinder help create
> usage: cinder create [--consisgroup-id <consistencygroup-id>]
> [--group-id <group-id>] [--snapshot-id
> <snapshot-id>]
> [--source-volid <source-volid>]
> [--source-replica <source-replica>]
> [--image-id <image-id>] [--image <image>] [--name
> <name>]
> [--description <description>]
> [--volume-type <volume-type>]
> [--availability-zone <availability-zone>]
> [--metadata [<key=value> [<key=value> ...]]]
> [--hint <key=value>] [--allow-multiattach] [--poll]
> [<size>]
>
> Creates a volume.
>
> Positional arguments:
> <size> Size of volume, in GiBs. (Required unless
> snapshot-id
> /source-volid is specified).
>
> Optional arguments:
> --consisgroup-id <consistencygroup-id>
> ID of a consistency group where the new volume
> belongs
> to. Default=None.
> --group-id <group-id>
> ID of a group where the new volume belongs to.
> Default=None. (Supported by API version 3.13 and
> later)
>
> # cinder help group-snapshot-list
> usage: cinder group-snapshot-list [--all-tenants [<0|1>]] [--status
> <status>]
> [--group-id <group_id>]
> [--filters [<key=value> [<key=value>
> ...]]]
>
> Lists all group snapshots.
>
> Optional arguments:
> --all-tenants [<0|1>]
> Shows details for all tenants. Admin only.
> --status <status> Filters results by a status. Default=None. This
> option
> is deprecated and will be removed in newer
> release.
> Please use '--filters' option which is introduced
> since 3.33 instead.
> --group-id <group_id>
> Filters results by a group ID. Default=None. This
> option is deprecated and will be removed in newer
> release. P...

Read more...

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.