Add more detail to router set exception message

Bug #1658199 reported by Trevor McCasland
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
New
Undecided
Anindita Das

Bug Description

When trying to set the external-gateway of a router to a network that is an internal network it would be nice to inform the user that it is not possible because it is not an external network.

The console output shows:
    HttpException: Bad Request

It would be nice if I saw the message in the responses body here:

REQ: curl -g -i -X PUT http://10.1.2.20:9696/v2.0/routers/86290947-8edc-4802-ab0d-5c6296a7cee7 -H "User-Agent: openstacksdk/0.9.12 keystoneauth1/2.16.0 python-requests/2.12.4 CPython/2.7.6" -H "Content-Type: application/json" -H "X-Auth-Token: {SHA1}812c4a71c63336091ea46fdfd4657a468f99f5ea" -d '{"router": {"external_gateway_info": {"network_id": "a98d6817-5190-4440-bc42-a6360c5ec65f"}}}'
http://10.1.2.20:9696 "PUT /v2.0/routers/86290947-8edc-4802-ab0d-5c6296a7cee7 HTTP/1.1" 400 161
RESP: [400] Content-Type: application/json Content-Length: 161 X-Openstack-Request-Id: req-f99c4981-47ec-4874-8d5e-ba06a1ba3012 Date: Fri, 20 Jan 2017 20:46:57 GMT Connection: keep-alive
RESP BODY: {"NeutronError": {"message": "Bad router request: Network a98d6817-5190-4440-bc42-a6360c5ec65f is not an external network.", "type": "BadRequest", "detail": ""}}

specifically the message in the error: ""Bad router request: Network a98d6817-5190-4440-bc42-a6360c5ec65f is not an external network."

Changed in python-openstackclient:
assignee: nobody → Anindita Das (anindita-das)
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.