naming of args and metavars are inconsistent

Bug #1420318 reported by Ruby Loo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-ironicclient
Fix Released
Low
Ruby Loo

Bug Description

We are inconsistent in the naming of arguments for the CLI commands:
  --instance
  --chassis_uuid
  --driver_info
  --sort-key
  --sort-dir
  --http_method

Where the name consists of more than one word, I think we should use hyphen (-) not underscore (_).

The metavars (strings displayed in help messages) are also inconsistent:
  <sort-key>
  <chassis uuid>

I think (to avoid confusion between hyphen and underscore) we should use a space to separate the words.

Ruby Loo (rloo)
summary: - naming of args is inconsistent
+ naming of args and metavars are inconsistent
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-ironicclient (master)

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

Changed in python-ironicclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-ironicclient (master)

Reviewed: https://review.openstack.org/155031
Committed: https://git.openstack.org/cgit/openstack/python-ironicclient/commit/?id=7961c60f339ae59977b6927d69ad84c71b4604bb
Submitter: Jenkins
Branch: master

commit 7961c60f339ae59977b6927d69ad84c71b4604bb
Author: Ruby Loo <email address hidden>
Date: Wed Feb 11 19:40:03 2015 +0000

    Consistent names of args and metavars, and help strings

    This modifies the CLI so that the argument names, metavar names
    and help strings are more consistent.

    Argument names that consist of more than one word are now separated
    by hyphens instead of underscores. Existing argument names with
    underscores are still supported but not displayed via help. The new
    argument names are: http_method -> http-method, chassis_uuid -> chassis,
    driver_info -> driver-info, node_uuid -> node.

    Metavars are only used in the help strings displayed to the user. For
    consistency, they are lowercased with hyphens to separate the
    words. (Using spaces might make someone think that more than one argument
    is needed.)

    Help strings were updated. Among other things, they are treated like
    sentences with the first letter in upper case, and a period at the end.

    Closes-Bug: #1420318
    Change-Id: If05d51b09d787ccfbf6f6d35d8e752d42f673601

Changed in python-ironicclient:
status: In Progress → Fix Committed
Changed in python-ironicclient:
milestone: none → 0.7.0
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.