curl 404 Error The resource could not be found

asked 2016-04-03 17:04:28 -0600

IvanAK gravatar image

updated 2016-04-03 22:35:35 -0600

Bipin gravatar image

Hi all, I'm trying to list some info API style :) and what i have done till now is the following: Using "curl" i can get the token out, with the token i can list the tenants, but after that i can't list the servers and other information. From the conductore if i execute the "nova --debug list --all-tenants" i get the results and get the commands that are executed with curl. So when im trying this from outside i get an error "404" The resource could not be found.

curl -i 'http://x.x.x.x:8774/v2/tenants/' -X GET -H "X-Auth-Token: <Token_ID>" -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json"

And with the following command i don't get errors but i get some strange results:

curl -i 'http://x.x.x.x:8774/v2.0/<Tenant_ID>/servers' -X ET -H "X-Auth-Token: <Token_ID>" -H "X-Auth-Project-Id: <Tenant_ID>" -H "User-Agent: python-novaclient" -H "Accept: application/json"

and the output is:

HTTP/1.1 300 Multiple Choices
Content-Type: application/json
Content-Length: 357 Date: Sun, 03 Apr
2016 21:59:48 GMT Connection: close

{"choices": [{"status": "CURRENT",
"media-types": [{"base":
 "application/xml", "type":
 "application/vnd.openstack.compute+xml;version=2"},
 {"base": "application/json", "type":
 "application/vnd.openstack.compute+json;version=2"}],
 "id": "v2.0", "links": [{"href":
 "http://x.x.x.x:8774/v2/v2.0/<Tenant_ID>/servers",
 "rel": "self"}]}]}

So my question is what is wrong here, i get output for tokens and listing tenants but i can't get output for listing servers ??

Thanks in advanced !

edit retag flag offensive close merge delete

Comments

Anything ?

IvanAK gravatar imageIvanAK ( 2016-04-05 07:31:01 -0600 )edit