|
Method |
Description |
|
Retrieve list of application components |
|
|
Retrieve component information |
|
|
Log in an application component and run a specified shell command. |
|
|
Start a component |
|
|
Stop a component |
|
|
Continue starting of component |
|
|
Restart a component |
Retrieve list of application components
/api/v1/comp/list?app=application&vdc=controller-name
Name of the application
Name of the target virtual data center
synchronous
GET
Retrieve list of components in application test.
GET http://192.168.123.200/api/v1/comp/list?app=test&vdc=mygrid
<application> <name>Lamp</name> <components> <component> <name>main.admin</name> <bw>50000000</bw> <cpu>0.05</cpu> <mem>67108864</mem> <server>srv2</server> <state>running</state> </component> <component> <name>main.config</name> <bw>150000000</bw> <cpu>0.20</cpu> <mem>268435456</mem> <server>srv3</server> <state>running</state> </component> <component> <name>main.dbase</name> <bw>100000000</bw> <cpu>0.40</cpu> <mem>536870912</mem> <server>srv1</server> <state>running</state> </component> . . . </components> </application>
{
"component" : [
{
"bw" : "50000000",
nbsp; "cpu" : "0.05",
"name" : "main.admin",
"mem" : "67108864",
"server" : "srv2",
"state" : "running"
},
{
"bw" : "150000000",
"cpu" : "0.20",
"name" : "main.config",
"mem" : "268435456",
"server" : "srv3",
"state" : "running"
},
{
"bw" : "100000000",
"cpu" : "0.40",
"name" : "main.dbase",
"mem" : "536870912",
"server" : "srv1",
"state" : "running"
},
.
.
.
],
"name" : "Lamp"
}
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 is missing from the request.
Failed to list components for application 'test' - it is not installed. - An invalid application name was specified in the request.
Failed to list components for application 'ws_api' - get info failed - may be due to it not running. Component list is requested for an application in stopped state.
Retrieve component information
/api/v1/comp/info?app=application&comp=component&vdc=controller-name
Name of the application
Name of the component
Name of the target virtual data center
synchronous
GET
Retrieve information for main.LUX5 in application test.
GET http://192.168.123.200/api/v1/comp/info?app=test&comp=main.LUX5&vdc=mygrid
<component> <name>main.vds64_centos50</name> <bw>250000000</bw> <class>.LUX5</class> <console_options>ssh:22,text</console_options> <cpu>0.25</cpu> <dflt_ip>10.144.12.1</dflt_ip> <mem>268435456</mem> <mem_service>0</mem_service> <os_guess>Linux</os_guess> <os_kernel>Linux 2.6.18.8-xenU #1 SMP Mon Aug 18 14:00:41 PDT 2008</os_kernel> <os_name>!CentOS</os_name> <os_type>Linux</os_type> <os_version>5</os_version> <pv_driver>unknown</pv_driver> <server>srv1</server> <state>running</state> <t_start>1271891904</t_start> <t_state_chg>1271891904</t_state_chg> </component>
{
"os_guess" : "Linux",
"state" : "running",
"pv_driver" : "unknown",
"os_version" : "5",
"server" : "srv1",
"os_type" : "Linux",
"t_state_chg" : "1272066766",
"console_options" : "ssh:22,text",
"dflt_ip" : "10.144.12.1",
"cpu" : "0.25",
"os_name" : "CentOS",
"name" : "main.vds64_centos50",
"mem_service" : "0",
"bw" : "250000000",
"os_kernel" : "Linux 2.6.18.8-xenU #1 SMP Mon Aug 18 14:00:41 PDT 2008",
"t_start" : "1272066766",
"mem" : "268435456",
"class" : ".VDS64_CENTOS50"
}
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 (comp). - Argument comp=comp missing in the request.
Failed to display info for component test:main.srv - does not exist. - Application/component specified in the request is invalid or not running.
|
Copyright © 2012 CA.
All rights reserved.
|
|