neutron cli puts the required parameters into option arguments group

Bug #1589432 reported by Yang Yu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-manuals
Invalid
Low
Unassigned
python-neutronclient
Won't Fix
Undecided
Ryan Tidwell
python-neutronclient (Ubuntu)
Invalid
Wishlist
Yang Yu

Bug Description

In neutron cli, there are many scenario like below, some parameters such as --peer-ip and --remote-as are defined as required ones, but they are put into optional arguments group. That is wrong.

usage: neutron bgp-peer-create [-h] [-f {json,shell,table,value,yaml}]
                               [-c COLUMN] [--max-width <integer>]
                               [--noindent] [--prefix PREFIX]
                               [--request-format {json}]
                               [--tenant-id TENANT_ID] --peer-ip
                               PEER_IP_ADDRESS --remote-as PEER_REMOTE_AS
                               [--auth-type PEER_AUTH_TYPE]
                               [--password AUTH_PASSWORD]
                               NAME

Create a BGP Peer.

positional arguments:
  NAME Name of the BGP peer to create.

optional arguments:
  -h, --help show this help message and exit
  --request-format {json}
                        DEPRECATED! Only JSON request format is supported.
  --tenant-id TENANT_ID
                        The owner tenant ID.
  --peer-ip PEER_IP_ADDRESS
                        Peer IP address.
  --remote-as PEER_REMOTE_AS
                        Peer AS number. (Integer in [1, 65535] is allowed.)
  --auth-type PEER_AUTH_TYPE
                        Authentication algorithm. Supported algorithms:
                        none(default), md5
  --password AUTH_PASSWORD
                        Authentication password.

Yang Yu (yuyangbj)
Changed in python-neutronclient (Ubuntu):
assignee: nobody → Yang Yu (yuyangbj)
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hi Yang,

Thanks for taking time to report this bug and making Ubuntu and OpenStack better. I'm going to target this bug at upstream python-neutronclient since it is not a package bug.

Thanks,
Corey

Changed in python-neutronclient (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
Changed in python-neutronclient:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
venkatamahesh (venkatamaheshkotha) wrote :

This is a documentation bug

affects: python-neutronclient → openstack-manuals
Changed in openstack-manuals:
assignee: nobody → iswarya vakati (v-iswarya)
Revision history for this message
Andreas Jaeger (jaegerandi) wrote :

Run "neutron help bgp-peer-create", you'll get the following output:

usage: neutron bgp-peer-create [-h] [-f {json,shell,table,value,yaml}]
                               [-c COLUMN] [--max-width <integer>]
                               [--noindent] [--prefix PREFIX]
                               [--request-format {json}]
                               [--tenant-id TENANT_ID] --peer-ip
                               PEER_IP_ADDRESS --remote-as PEER_REMOTE_AS
                               [--auth-type PEER_AUTH_TYPE]
                               [--password AUTH_PASSWORD]
                               NAME

Create a BGP Peer.

positional arguments:
  NAME Name of the BGP peer to create.

optional arguments:
  -h, --help show this help message and exit
  --request-format {json}
                        DEPRECATED! Only JSON request format is supported.
  --tenant-id TENANT_ID
                        The owner tenant ID.
  --peer-ip PEER_IP_ADDRESS
                        Peer IP address.
  --remote-as PEER_REMOTE_AS
                        Peer AS number. (Integer in [1, 65535] is allowed.)
  --auth-type PEER_AUTH_TYPE
                        Authentication algorithm. Supported algorithms:
                        none(default), md5
  --password AUTH_PASSWORD
                        Authentication password.

output formatters:
  output formatter options

  -f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}
                        the output format, defaults to table
  -c COLUMN, --column COLUMN
                        specify the column(s) to include, can be repeated

table formatter:
  --max-width <integer>
                        Maximum display width, 0 to disable

json formatter:
  --noindent whether to disable indenting the JSON

shell formatter:
  a format a UNIX shell can parse (variable="value")

  --prefix PREFIX add a prefix to all variable names

So, not a documentation bug.

Changed in openstack-manuals:
status: Confirmed → Invalid
Revision history for this message
Andreas Jaeger (jaegerandi) wrote :

If there is wrong documentation, please give a link to it.

Changed in openstack-manuals:
assignee: iswarya vakati (v-iswarya) → nobody
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Ryan should give a look at this, please bear in mind that we are in the process of switching to the openstack client and as such we may favor fixing issues in the OSC plugin rather than native neutronclient, which I expect to be signaled for deprecation as soon as Ocata opens up.

Changed in python-neutronclient:
status: New → Incomplete
Changed in python-neutronclient (Ubuntu):
status: Triaged → Invalid
Changed in python-neutronclient:
assignee: nobody → Ryan Tidwell (ryan-tidwell)
Revision history for this message
Akihiro Motoki (amotoki) wrote :

neutron CLI is deprecated and there is no plan to change the existing command lines except bug fixes.

It is a CLI development decision how to implement requires parameters (positional vs option style) from various point of view. The bug reported does not harm any features and we do not change the current behavior anymore.

Changed in python-neutronclient:
status: Incomplete → Won't Fix
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.