yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #43521
[Bug 1527129] Re: enhance the help info of "neutron router-gateway-set"
** Project changed: neutron => python-neutronclient
** Changed in: python-neutronclient
Importance: Undecided => Low
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1527129
Title:
enhance the help info of "neutron router-gateway-set"
Status in python-neutronclient:
New
Bug description:
[Summary]
enhance the help info of "neutron router-gateway-set"
[Topo]
devstack all-in-one node
[Description and expect result]
enhance the help info of "neutron router-gateway-set"
[Reproduceable or not]
reproduceable
[Recreate Steps]
1) below is the help info of "neutron router-gateway-set" :
root@45-59:~/heat# neutron router-gateway-set
usage: neutron router-gateway-set [-h] [--request-format {json,xml}]
[--disable-snat] [--fixed-ip FIXED_IP]
ROUTER EXTERNAL-NETWORK
neutron router-gateway-set: error: too few arguments
root@45-59:~/heat#
2) if use --fixed-ip option to set gateway for a router, simply specify the fixed ip, got an error:
root@45-59:~/heat# neutron router-gateway-set --fixed-ip 172.168.0.7 r1 ext-net
invalid key-value '172.168.0.7', expected format: key=value
root@45-59:~/heat#
3) actually, need to specify subnet_id and ip_address as below, the router-gateway-set command can work:
root@45-59:/opt/stack/devstack# neutron router-gateway-set --fixed-ip subnet_id=8295a105-c11e-4e41-91d0-da5fe9d60c33,ip_address=172.168.0.077 r1 ext-net
Set gateway for router r1
root@45-59:/opt/stack/devstack# neutron router-show r1
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| admin_state_up | True |
| distributed | False |
| external_gateway_info | {"network_id": "7ba41081-66c1-422e-9aee-861c2e664473", "enable_snat": true, "external_fixed_ips": [{"subnet_id": "8295a105-c11e-4e41-91d0-da5fe9d60c33", "ip_address": "172.168.0.077"}]} |
| ha | False |
| id | 7153e0c1-502f-4160-ad20-d86c3bf43ff2 |
| name | r1 |
| routes | |
| status | ACTIVE |
| tenant_id | 6c15aacc1cfe4a9fac35a0c7f8c3e912 |
+-----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
root@45-59:/opt/stack/devstack#
So, the the help info of "neutron router-gateway-set" is not much helpful.
should modify it as below:
root@45-59:~/heat# neutron router-gateway-set
usage: neutron router-gateway-set [-h] [--request-format {json,xml}]
[--disable-snat] [--fixed-ip subnet_id=SUBNET,ip_address=IP_ADDR]
ROUTER EXTERNAL-NETWORK
neutron router-gateway-set: error: too few arguments
[Configration]
reproduceable bug, no need
[logs]
reproduceable bug, no need
[Root cause anlyze or debug inf]
reproduceable bug
[Attachment]
None
To manage notifications about this bug go to:
https://bugs.launchpad.net/python-neutronclient/+bug/1527129/+subscriptions
References