Ask Your Question
0

nova-volume api

asked 2012-11-04 18:34:35 -0500

dimas-zakky gravatar image

where is the nova-volume api ??

I try using curl -H "X-Auth-Token:b1a1ab453f8140a08cbf8eac753696dc" -H 'Content-type: application/json' http://192.168.1.25:8774/v2/9df7566c066f4ce2b5acbb1aabbf816a/volumes (http://192.168.1.25:8774/v2/9df7566c0...)

and the response is :

<html> <head> <title>404 Not Found</title> </head> <body>

404 Not Found

The resource could not be found.

</body>

in http://api.openstack.org explain that list volume can access with v1/{tenant_id}/volumes

thanks for advice

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2012-11-05 17:21:15 -0500

dimas-zakky gravatar image

thanks a lot like this: )

edit flag offensive delete link more
0

answered 2012-11-05 14:39:06 -0500

everett-toews gravatar image

The nova-volume API is an extension of the Nova API. To see if it's supported by your deployment of OpenStack do

curl -s http://166.78.1.82:8774/v2/71af7f7c547e49219d40e738968cdf07/extensions (http://166.78.1.82:8774/v2/71af7f7c54...) -H "X-Auth-Token: $TOKEN" -H "Content-type: application/json" | python -mjson.tool | grep volume

If it's supported you'll see

"alias": "os-volume-types", "namespace": "http://docs.openstack.org/compute/ext/volume_types/api/v1.1", "alias": "os-volumes", "namespace": "http://docs.openstack.org/compute/ext/volumes/api/v1.1",

This means you can access volumes like so

curl -s http://166.78.1.82:8774/v2/71af7f7c547e49219d40e738968cdf07/os-volumes (http://166.78.1.82:8774/v2/71af7f7c54...) -H "X-Auth-Token: $TOKEN" -H "Content-type: application/json" | python -mjson.tool

Note the v2 in the URL. That's because it's v2 of the Nova API.

If you're working with OpenStack Folsom and you're using the Cinder API then you would do something like

curl -s http://166.78.1.82:8776/v1/71af7f7c547e49219d40e738968cdf07/volumes (http://166.78.1.82:8776/v1/71af7f7c54...) -H "X-Auth-Token: $TOKEN" -H "Content-type: application/json" | python -mjson.tool

Note the port 8776 and v1 in the URL. That's because it's v1 of the Cinder API.

Hope this helps, Everett

On 11/4/12 12:35 PM, "dimas zakky nalendra" question213261@answers.launchpad.net wrote:

New question #213261 on OpenStack Compute (nova): https://answers.launchpad.net/nova/+question/213261 (https://answers.launchpad.net/nova/+q...)

where is the nova-volume api ??

I try using curl -H "X-Auth-Token:b1a1ab453f8140a08cbf8eac753696dc" -H 'Content-type: application/json' http://192.168.1.25:8774/v2/9df7566c066f4ce2b5acbb1aabbf816a/volumes (http://192.168.1.25:8774/v2/9df7566c0...)

and the response is :

<html> <head> <title>404 Not Found</title> </head> <body>

404 Not Found

The resource could not be found.

</body>

in http://api.openstack.org explain that list volume can access with v1/{tenant_id}/volumes

thanks for advice


You received this question notification because you are an answer contact for OpenStack Compute (nova).

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2012-11-04 18:34:35 -0500

Seen: 82 times

Last updated: Nov 05 '12