Positional arguments not consistent

Bug #1281878 reported by Mat Lowery
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-troveclient
Fix Released
Medium
Peter Stachowski

Bug Description

$ trove help database-create
usage: trove database-create <instance> <name>
                             [--character_set <character_set>]
                             [--collate <collate>]

Creates a database on an instance.

Positional arguments:
  <instance> UUID of the instance.
  <name> Name of the database.

$ trove help backup-create
usage: trove backup-create <name> <instance>
                           [--description <description>] [--parent <parent>]

Creates a backup.

Positional arguments:
  <name> Name of the backup.
  <instance> UUID of the instance.

Shouldn't name and instance be consistently ordered?

Changed in python-troveclient:
assignee: nobody → Peter Stachowski (petel)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to python-troveclient (master)

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

Changed in python-troveclient:
status: New → In Progress
Changed in python-troveclient:
importance: Undecided → Medium
milestone: none → python-troveclient-v1
Revision history for this message
Peter Stachowski (peterstac) wrote :

This is also the case with configuration-attach:

ubuntu:/opt/stack/python-troveclient> trove help configuration-attach
usage: trove configuration-attach <configuration> <instance>

Attaches a configuration group to an instance.

Positional arguments:
  <configuration> ID of the configuration group to attach to the instance.
  <instance> ID of the instance.

All other commands have 'instance' first

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

Reviewed: https://review.openstack.org/92408
Committed: https://git.openstack.org/cgit/openstack/python-troveclient/commit/?id=30c924e343a80b2ac6b576393ccb5a15b4185d54
Submitter: Jenkins
Branch: master

commit 30c924e343a80b2ac6b576393ccb5a15b4185d54
Author: Peter Stachowski <email address hidden>
Date: Tue May 6 12:42:48 2014 -0400

    Fixed positional order of arguments

    The positional arguments of backup-create and configuration-attach
    were different from all other commands. 'Instance' is now the
    first argument for these commands as well.

    DocImpact: This potentially affects any user scripts that may
    exist. Any instructions like:
    'trove backup-create mybackup myinstance'
    'trove configuration-attach myconfig myinstance'
    should be changed to:
    'trove backup-create myinstance mybackup.'
    'trove configuration-attach myinstance myconfig'

    Change-Id: I2ff93a1a6e26f3e33a60cbf3d9ad5ee074307e8f
    Closes-Bug: #1281878

Changed in python-troveclient:
status: In Progress → Fix Committed
Zhao Chao (zhaochao1984)
Changed in python-troveclient:
status: Fix Committed → 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.