Previous Topic: list Method (vol Object)Next Topic: rename Method (vol Object)


info Method (vol Object)
Description

Retrieve list of detailed information for a volume

Syntax
/api/v1/vol/info?app=application&vol=volume&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Retrieve list of detailed information for test:vol1.

GET http://192.168.123.200/api/v1/vol/info?app=test&vol=vol1&vdc=mygrid 
Sample Output
XML:
<volume> 
   <name>vol1</name> 
   <comment></comment> 
   <filesystem>ext3</filesystem> 
   <link></link> 
   <mirror srv1.v-f13f4c46-b84a-496b-9288-188be464ab56> 
      <server>srv1</server> 
      <state>ok</state> 
   </mirror srv1.v-f13f4c46-b84a-496b-9288-188be464ab56> 
   <mount_path>none</mount_path> 
   <mount_state>available</mount_state> 
   <n_mirrors>1</n_mirrors> 
   <n_users>0</n_users> 
   <size>1073741824</size> 
   <state>ok</state> 
   <time_accessed>1272052234</time_accessed> 
   <time_created>1272052031</time_created> 
   <time_written>1272052032</time_written> 
   <uuid>cf432100-63fc-450d-8eb7-2da6deca8627</uuid> 
</volume> 
JSON:
{ 
   "link" : "", 
   "time_created" : "1272052031", 
   "time_accessed" : "1272052240", 
   "name" : "vol1", 
   "uuid" : "cf432100-63fc-450d-8eb7-2da6deca8627", 
   "mount_state" : "available", 
   "mirror srv1.v-f13f4c46-b84a-496b-9288-188be464ab56" : { 
      "server" : "srv1", 
      "state" : "ok" 
   }, 
   "size" : "1073741824", 
   "state" : "ok", 
   "n_users" : "0", 
   "time_written" : "1272052032", 
   "mount_path" : "none", 
   "comment" : "", 
   "filesystem" : "ext3", 
   "n_mirrors" : "1" 
} 

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

404.1

Volume 'test:data' does not exist. - Invalid application or volume specified in the request.

create Method (vol Object)
Description

Create a volume

Syntax
/api/v1/vol/create?app=application&vol=volume&fs=filesystem&size=size&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

fs

Filesystem of the volume to be created

size

Size of the volume

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Create a 1GB, ext3, mirrored volume named test:vol1.

GET http://192.168.123.200/api/v1/vol/create?app=test&vol=vol1&fs=ext3&size=1G&mirrored=1&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

Note: To get the status of job, issue a /api/v1/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

destroy Method (vol Object)
Description

Destroy a volume

Syntax
/api/v1/vol/destroy?app=application&vol=volume&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Destroy a volume test:vol1.

GET http://192.168.123.200/api/v1/vol/destroy?app=test&vol=vol1&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

Note: To get the status of job, issue a /api/v1/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.

format Method (vol Object)
Description

Format an existing volume

Syntax
/api/v1/vol/format?app=application&vol=volume&fs=filesystem&vdc=controller-name 
Arguments
app

Name of the application

vol

Name of the volume

fs

Filesystem of the volume to be created

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Format a volume test:vol1 with fs=ext3.

GET http://192.168.123.200/api/v1/vol/format?app=test&vol=vol1&fs=ext3&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
} 

HTTP Error Codes
404

Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.

400.4

Missing required arguments (app). - Argument app=app missing in the request.

400.4

Missing required arguments (vol). - Argument vol=vol missing in the request.

400.4

Missing required arguments (fs). - Argument fs=fs missing in the request.

Note: This will wipe out all the data that is currently on the volume. To get the status of job, issue a /api/v1/job/info? request with the job_id returned above as the argument. For more information about how to obtain the job status, refer to the job object.