Comment 2 for bug 911330

Revision history for this message
Michael Fork (mjfork) wrote :

I had a copy and paste error originally. Here is the syntax against a *Diablo* node (I do not have a newer one to test). Note that the one using the documented syntax (flavorRef: URL) fails with a bad request where as the other syntax (flavorRef: integer) succeeds with a 202:

# curl -v -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 999888777666" -d '{"resize":{"flavorRef":"http://localhost:8774/v1.1/nuvemcpca/flavors/1"}}' http://localhost:8774/v1.1/nuvemcpca/servers/22/action
{"badRequest": {"message": "Unable to locate requested flavor.", "code": 400}}[root@c46074 ~]# curl -v -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 999888777666" -d '{"resize":{"flavorRef":"4"}}' http://localhost:8774/v1.1/nuvemcpca/servers/22/action

# curl -v -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: 999888777666" -d '{"resize":{"flavorRef":"4"}}' http://localhost:8774/v1.1/nuvemcpca/servers/22/action

HTTP/1.1 202 Accepted