Router create optional argument "distributed/ha" accepts only Camel case

Bug #1368934 reported by Swaminathan Vasudevan
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-neutronclient
Fix Released
Wishlist
Swaminathan Vasudevan

Bug Description

Router create command does not accept "lower case" value for the optional argument "distributed" such as "true/false" (as it used to).

Previously it used to accept
1. router_create --distributed=true r1
2. router_create --distributed=false r1
3. router_create --distributed=True r1
4. router_create --distributed=False r1
5. rotuer_create --distributed r1

Now it does not accept the Lower case "true/false".

Changed in python-neutronclient:
assignee: nobody → Swaminathan Vasudevan (swaminathan-vasudevan)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-neutronclient (master)

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

Changed in python-neutronclient:
status: New → In Progress
Revision history for this message
Carl Baldwin (carl-baldwin) wrote : Re: Router create optional argument "distributed" accepts only Camel case. Does not accept lower case, it used to accept lower case before.

This was discussed here [1]. Assaf turned down the idea because all four choices show up in the help. I don't feel strongly either way. I'll point out that there are two other options in the CLI that take True/False and don't appear to accept the lower-case equivalents. We may want to preserve consistency by not fixing this bug.

  neutronclient/neutron/v2_0/fw/firewallrule.py: dest='enabled', choices=['True', 'False'],
  neutronclient/neutron/v2_0/nec/packetfilter.py: '--admin-state', choices=['True', 'False'],

Since DVR hasn't been released yet, do we need to be concerned about backwards compatibility?

[1] https://review.openstack.org/#/c/114263/4/neutronclient/neutron/v2_0/router.py

Changed in python-neutronclient:
importance: Undecided → Wishlist
Revision history for this message
Swaminathan Vasudevan (swaminathan-vasudevan) wrote :

I felt that this was annoying for the end user. Not only for backward compatibility but also for the current users.

We went for the choices because we did not have any option with the fix that was made for the positional argument.

But if the community is ok with this usability requirement, then its ok.

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

I'd second Carl's sentiment. The distributed flag used to work with both True, true, False, false combinations, but that was a side-effect of lack of validation on the client part. Only the NSX folks would feel the pain of the mismatch, but I don't think that's really that high priority. I'd say, less churn at this point it's a good thing: 142 jobs in the gate it's scary.

Changed in python-neutronclient:
status: In Progress → Opinion
Revision history for this message
Carl Baldwin (carl-baldwin) wrote :

I'd personally be okay with this change but it may not get attention right away because of the current state of the gate queue and where the project is.

Revision history for this message
Swaminathan Vasudevan (swaminathan-vasudevan) wrote :

No problem, let us first push in the highs and critical.

Changed in python-neutronclient:
status: Opinion → In Progress
Changed in python-neutronclient:
assignee: Swaminathan Vasudevan (swaminathan-vasudevan) → Akihiro Motoki (amotoki)
Akihiro Motoki (amotoki)
Changed in python-neutronclient:
assignee: Akihiro Motoki (amotoki) → Swaminathan Vasudevan (swaminathan-vasudevan)
summary: - Router create optional argument "distributed" accepts only Camel case.
- Does not accept lower case, it used to accept lower case before.
+ Router create optional argument "distributed/ha" accepts only Camel case
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-neutronclient (master)

Reviewed: https://review.openstack.org/121219
Committed: https://git.openstack.org/cgit/openstack/python-neutronclient/commit/?id=66612c9de835bd080a9f43d91aa65e5e8639fd26
Submitter: Jenkins
Branch: master

commit 66612c9de835bd080a9f43d91aa65e5e8639fd26
Author: Swaminathan Vasudevan <email address hidden>
Date: Fri Sep 12 13:16:29 2014 -0700

    Router create distributed accepts lower case

    Neutron router-create optional argument distributed
    does not accept "true/false" anymore.
    It only accepts value with Camel case "True/False".

    This patch will allow the users to provide both
    True/true or False/false.

    Change-Id: I79577bd70a796543b9dea53b4839512eb8944d7c
    Closes-bug: #1368934

Changed in python-neutronclient:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in python-neutronclient:
milestone: none → 2.3.10
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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