Error in adding interface in router using curl command

asked 2017-02-15 06:52:25 -0600

Nek gravatar image


I 'm trying to add an interface to a router, using this command I found in another thread in this forum:

curl -i -X PUT ( -H "User-Agent: python-neutronclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: $TOKEN" -d '{"subnet_id": "97ac7815-a1f0-470a-ac1b-a5c126f401af"}'

where {68d958cd-779b-4449-8846-fb7c01c0b51d} is the router_id I get from this command: curl -s -k -H "X-Auth-Token: $TOKEN" | python -m json.tool

and "subnet_id" is the id of the interface I want to add to the router,

but I 'm getting error: NeutronError": {"message": "Unable to find 'router' in request body", "type": "HTTPBadRequest", "detail": ""}.

Can you understand what goes wrong? Thanx

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2017-02-15 16:13:55 -0600

Your API is updating a router, not adding an interface. Append add_router_interface to the API request, i.e. See

edit flag offensive delete link more

answered 2017-02-16 01:17:37 -0600

Nek gravatar image

Hi, you are right! Now it worked!

Thank you!

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2017-02-15 06:52:25 -0600

Seen: 53 times

Last updated: Feb 15 '17