Retrieve list of detailed information for a volume
/api/v1/vol/info?app=application&vol=volume&vdc=controller-name
Name of the application
Name of the volume
Name of the target virtual data center
synchronous
GET
Retrieve list of detailed information for test:vol1.
GET http://192.168.123.200/api/v1/vol/info?app=test&vol=vol1&vdc=mygrid
<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>
{
"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"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
Missing required arguments (vol). - Argument vol=vol missing in the request.
Volume 'test:data' does not exist. - Invalid application or volume specified in the request.
Create a volume
/api/v1/vol/create?app=application&vol=volume&fs=filesystem&size=size&vdc=controller-name
Name of the application
Name of the volume
Filesystem of the volume to be created
Size of the volume
Name of the target virtual data center
asynchronous
GET
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
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
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 a volume
/api/v1/vol/destroy?app=application&vol=volume&vdc=controller-name
Name of the application
Name of the volume
Name of the target virtual data center
asynchronous
GET
Destroy a volume test:vol1.
GET http://192.168.123.200/api/v1/vol/destroy?app=test&vol=vol1&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
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 an existing volume
/api/v1/vol/format?app=application&vol=volume&fs=filesystem&vdc=controller-name
Name of the application
Name of the volume
Filesystem of the volume to be created
Name of the target virtual data center
asynchronous
GET
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
<job>be805915-76b2-48c8-b8a0-b881cca66da6</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da6"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (app). - Argument app=app missing in the request.
Missing required arguments (vol). - Argument vol=vol missing in the request.
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.
|
Copyright © 2012 CA.
All rights reserved.
|
|