Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Error in adding interface in router using curl command

HI,

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 http://192.168.2.40:9696/v2.0/routers/68d958cd-779b-4449-8846-fb7c01c0b51d -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" http://192.168.2.40:9696/v2.0/routers | 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