nova-volume api

Asked by dimas zakky nalendra

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

and the response is :

<html>
 <head>
  <title>404 Not Found</title>
 </head>
 <body>
  <h1>404 Not Found</h1>
  The resource could not be found.<br /><br />
 </body>

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

thanks for advice

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
dimas zakky nalendra
Solved:
Last query:
Last reply:
Revision history for this message
Everett Toews (everett-toews) said :
#1

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 -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 -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 -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"
<email address hidden> wrote:

>New question #213261 on OpenStack Compute (nova):
>https://answers.launchpad.net/nova/+question/213261
>
>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
>
>and the response is :
>
><html>
> <head>
> <title>404 Not Found</title>
> </head>
> <body>
> <h1>404 Not Found</h1>
> The resource could not be found.<br /><br />
> </body>
>
>in 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).

Revision history for this message
dimas zakky nalendra (dimas-zakky) said :
#2

thanks a lot
like this: )