Retrieve list of classes in a package
/api/v1/class/list?class=class&vdc=controller-name
Name of the package
Name of the target virtual data center
synchronous
GET
Retrieve list of classes in /test.
GET http://192.168.123.200/api/v1/class/list?class=/test&vdc=mygrid
<catalog> <name>filer</name> <class> <class> <name>Filer_Linux</name> <category>Filer</category> <description>Linux Filer based on Ubuntu 7.04 (v3.1.2-1)</description> <locked>1</locked> </class> <class> <name>Filer_Solaris</name> <category>Filer</category> <description>Solaris Filer based on OpenSolaris build 2008.11 (v3.1.5-1)</description> <locked>1</locked> </class> </class> </catalog>
{
"name" : "filer",
"class" : [
{
"locked" : 1,
"name" : "Filer_Linux",
"category" : "Filer",
"description" : "Linux Filer based on Ubuntu 7.04 v3.1.2-1)"
},
{
"locked" : 1,
"name" : "Filer_Solaris",
"category" : "Filer",
"description" : "Solaris Filer based on OpenSolaris build 2008.11 (v3.1.5-1)"
}
]
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (class). - Argument class=entity missing in the request.
Application test does not exist. - Invalid application specified in the request.
Global catalog 'test' not found. - Invalid global catalog specified in the request.
Rename a class, or move a class from one package to another
/api/v1/class/move?class=class&new_name=new-class&vdc=controller-name
Name of the class to be moved
Name of the new class
Name of the target virtual data center
synchronous
GET
Move /test:LUX5 to /test2:LUX5.
GET http://192.168.123.200/api/v1/class/move?class=/test:LUX5&new_name=/test2:LUX5&vdc=mygrid
None
None
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (class). - Argument class=entity missing in the request.
Missing required arguments (new_name). - Argument new_name=new-name missing in the request.
Could not find class LUX5 in source package. - Invalid class specified in the request.
Unable to move class '/system:LUX5' from read-only catalog 'system'. - Read-only source catalog specified in the request.
Unable to move class '/test:LUX5' into read-only catalog 'system'. - Read-only destination catalog specified in the request.
Global catalog 'test' not found. - Invalid source/destination catalog name specified in the request.
Failed to move volume boot. - Class volume is in-use or same source and destination catalog specified.
Copy a class from one package to another
/api/v1/class/copy?class=class&new_name=new-class&vdc=controller-name
Name of the class to be copied
Name of the new class
Name of the target virtual data center
asynchronous
GET
Copy /system:LUX5 to /test:LUX5.
GET http://192.168.123.200/api/v1/class/copy?class=/system:LUX5&new_name=/test:LUX5&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 (class). - Argument class=entity missing in the request.
Missing required arguments (new_name). - Argument new_name=new-name 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.
Destroy a class
/api/v1/class/destroy?class=class&vdc=controller-name
Name of the class to be destroyed
Name of the target virtual data center
asynchronous
GET
Destroy /test:LUX5.
GET http://192.168.123.200/api/v1/class/destroy?class=/test:LUX5&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 (class). - Argument class=entity 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.
|
Copyright © 2012 CA.
All rights reserved.
|
|