Quantum API's using curl

asked 2013-12-24 04:04:17 -0600

RHK gravatar image

updated 2013-12-24 08:45:20 -0600

larsks gravatar image

I am trying to update the network name using curl,

curl -s -X PUT -H "X-Auth-Project-Id: kaveri" -H "Accept: application/json" -H "X-Auth-Token: $token_id" -d '<network name="test_network"/>' | python -mjson.tool 

Extra data: line 1 column 4 - line 5 column 4 (char 4 - 52)

How to fix this issue. If i want to create, update, delete (networks, subnets, ports) using curl what was the process? Was there any document?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-12-24 08:46:18 -0600

larsks gravatar image

Remove the pipe to `python -mjson.tool`. What does the actual output from `curl` look like? I suspect you're getting an error rather than a JSON response and this is why `json.tool` is producing an error message.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2013-12-24 04:04:17 -0600

Seen: 170 times

Last updated: Dec 24 '13