router-interface-add/delete does not support 'port_id'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-neutronclient |
Fix Released
|
Medium
|
Akihiro Motoki |
Bug Description
In router-
There needs a consideration to support it. We cannot specify both 'port_id' and 'subnet_id', but in the current CLI commandline 'subnet_id' is a positional parameter and we cannot make a positional parameter "Optional" due to argparse specification.
To address it, there are several options:
(1) Change 'subnet_id' to an optional parameter '--subnet subnet_id' and add '--port_id port_id'
(2) Change 'subnet_id' positional parameter to 'subnet_or_port_id' and introduce an boolean parameter '--port_id' (False means subnet_or_port_id is a subnet_id and True means subnet_or_port_id is a port_id).
(3) Add '--port_id port_id' parameter and just ignore 'subnet_id' when a port_id is specified.
Pros and Cons:
(1) It is the most reasonable for me, but it requires the change of the command line from the release version of CLI.
(2) There is no need to change the commandline of the release version of quantumclient, but it is a little confusing.
(3) Same as (2).
Similarly, router-
router-
If we want to support (2) port_id only, we need the same consideration as router-
Any advice or comment will be appreciated.
Note that this bug exists only for CLI and python client library does not have this bug.
description: | updated |
Changed in python-quantumclient: | |
importance: | Undecided → Medium |
milestone: | none → 2.2 |
Changed in python-quantumclient: | |
milestone: | 2.2 → none |
milestone: | none → 2.2.1 |
Changed in python-neutronclient: | |
status: | Fix Committed → Fix Released |
how about adding two commands: interface- add-by- port interface- remove- by-port
router-
router-