Use this object to manage servers of a VDC through its controller.
|
Method |
Description |
|
Retrieve list of servers |
|
|
Retrieve information for all servers |
|
|
Retrieve extended information for all servers |
|
|
Retrieve list of components running on each server |
|
|
Retrieve information for a server |
|
|
Retrieve verbose information for a server |
|
|
Retrieve extended information for a server |
|
|
Reboot a server |
|
|
Shut a server down |
|
|
Enable a server for scheduling |
|
|
Disable a server for scheduling |
|
|
Set the server's role in the grid for controller high-availability |
|
|
Power on a server |
|
|
Power off a server |
|
|
Power cycle a server |
|
|
Identify server and NICs |
Retrieve a list of servers
/api/v2/srv/list?vdc=controller-name
Name of the target virtual data center
synchronous
GET
List servers.
GET http://192.168.123.200/api/v2/srv/list?vdc=mygrid
<servers> <server> <name>srv1</name> <bw_alloc>350000000</bw_alloc> <bw_free>1650000000</bw_free> <cpu_alloc>0.55</cpu_alloc> <cpu_free>1.35</cpu_free> <enabled>1</enabled> <mem_alloc>738197504</mem_alloc> <mem_free>11534336</mem_free> <role>primary</role> <state>up</state> </server> <server> <name>srv2</name> <bw_alloc>900000000</bw_alloc> <bw_free>1100000000</bw_free> <cpu_alloc>1.10</cpu_alloc> <cpu_free>0.90</cpu_free> <enabled>1</enabled> <mem_alloc>1476395008</mem_alloc> <mem_free>78643200</mem_free> <role>secondary</role> <state>up</state> </server> . . . </servers>
{
"server" : [
{
"name" : "srv1",
"cpu_free" : "1.35",
"state" : "up",
"bw_free" : "1650000000",
"cpu_alloc" : "0.55",
"mem_alloc" : "738197504",
"mem_free" : "11534336",
"role" : "primary",
"bw_alloc" : "350000000",
"enabled" : "1"
},
{
"name" : "srv2",
"cpu_free" : "0.90",
"state" : "up",
"bw_free" : "1100000000",
"cpu_alloc" : "1.10",
"mem_free" : "78643200",
"mem_alloc" : "1476395008",
"role" : "secondary",
"bw_alloc" : "900000000",
"enabled" : "1"
},
.
.
.
]
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Note: This method has been deprecated and is included here for compatibility with existing user scripts. New users should use the option flag &verbose.
Retrieve information for all servers
/api/v2/srv/list_verbose?vdc=controller-name
Name of the target virtual data center
synchronous
GET
List servers.
GET http://192.168.123.200/api/v2/srv/list_verbose?vdc=mygrid
<servers> <server> <name>srv1</name> <bw_alloc>720000000</bw_alloc> <bw_free>1280000000</bw_free> <bw_reserved>0</bw_reserved> <bw_total>2000000000</bw_total> <cpu_alloc>1.69</cpu_alloc> <cpu_bogomips>3991</cpu_bogomips> <cpu_free>2.21</cpu_free> <cpu_freq>1995</cpu_freq> <cpu_load>0.06</cpu_load> <cpu_phy_total>2</cpu_phy_total> <cpu_reserved>0.10</cpu_reserved> <cpu_total>4</cpu_total> <cpu_type>Intel(R) Xeon(R) CPU 5130 @ 2.00GHz </cpu_type> <disk_free>1143356945142</disk_free> <disk_reserved>10737418240</disk_reserved> <disk_total>1493697126400</disk_total> <enabled>1</enabled> <ha_role>primary</ha_role> <hvm_support>1</hvm_support> <mem_alloc>1610612736</mem_alloc> <mem_free>1246756864</mem_free> <mem_reserved>1435500544</mem_reserved> <mem_service>0</mem_service> <mem_total>4292870144</mem_total> <n_disks>1</n_disks> <state>up</state> </server> . . . </servers>
{
"server" : ["
{
"cpu_freq" : "1995",
"cpu_type" : "Intel(R) Xeon(R) CPU 5130 @ 2.00GHz ",
"cpu_bogomips" : "3991",
"state" : "up",
"cpu_total" : "4",
"cpu_alloc" : "1.69",
"mem_alloc" : "1610612736",
"hvm_support" : "1",
"enabled" : "1",
"bw_total" : "2000000000",
"cpu_reserved" : "0.10",
"mem_total" : "4292870144",
"name" : "srv1",
"disk_reserved" : "10737418240",
"disk_total" : "1493697126400",
"cpu_phy_total" : "2",
"cpu_free" : "2.21",
"ha_role" : "primary",
"mem_reserved" : "1435500544",
"mem_service" : "0",
"bw_free" : "1280000000",
"disk_free" : "1143356945142",
"bw_reserved" : "0",
"mem_free" : "1246756864",
"cpu_load" : "0.30",
"bw_alloc" : "720000000",
"n_disks" : "1"
.
.
.
]
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Note: This method has been deprecated and is included here for compatibility with existing user scripts. New users should use the option flag &extended.
Retrieve extended information for all servers
/api/v2/srv/list_extended?vdc=controller-name
Name of the target virtual data center
synchronous
GET
Show extended list of servers.
GET http://192.168.123.200/api/v2/srv/list_extended?vdc=mygrid
<servers> <server> <name>srv1</name> <bw_alloc>350000000</bw_alloc> <bw_free>1650000000</bw_free> <cpu_alloc>0.55</cpu_alloc> <cpu_free>1.35</cpu_free> <enabled>1</enabled> <mem_alloc>738197504</mem_alloc> <mem_free>11534336</mem_free> <role>primary</role> <state>up</state> </server> <server> <name>srv2</name> <bw_alloc>900000000</bw_alloc> <bw_free>1100000000</bw_free> <cpu_alloc>1.10</cpu_alloc> <cpu_free>0.90</cpu_free> <enabled>1</enabled> <mem_alloc>1476395008</mem_alloc> <mem_free>78643200</mem_free> <role>secondary</role> <state>up</state> </server> . . . </servers>
{
"server" : [
{
"name" : "srv1",
"cpu_free" : "1.35",
"state" : "up",
"bw_free" : "1650000000",
"cpu_alloc" : "0.55",
"mem_alloc" : "738197504",
"mem_free" : "11534336",
"role" : "primary",
"bw_alloc" : "350000000",
"enabled" : "1"
},
{
"name" : "srv2",
"cpu_free" : "0.90",
"state" : "up",
"bw_free" : "1100000000",
"cpu_alloc" : "1.10",
"mem_free" : "78643200",
"mem_alloc" : "1476395008",
"role" : "secondary",
"bw_alloc" : "900000000",
"enabled" : "1"
},
.
.
.
]
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Note: This method has been deprecated and is included here for compatibility with existing user scripts. New users should use the option flag &map.
Retrieve list of components running on each server
/api/v2/srv/list_map?vdc=controller-name
Name of the target virtual data center
synchronous
GET
Retrieve list of components running on each server.
GET http://192.168.123.200/api/v2/srv/list_map?vdc=mygrid
<servers>
<server>
<bw_alloc>621000000</bw_alloc>
<bw_free>1379000000</bw_free>
<components>
<component>
<bw>0</bw>
<cpu>1.00</cpu>
<mem>1073741824</mem>
<name>_sys.controller</name>
<state>running</state>
</component>
.
.
.
</component>
</components>
<cpu_alloc>1.05</cpu_alloc>
<cpu_free>1.95</cpu_free>
<enabled>1</enabled>
<mem_alloc>1946157056</mem_alloc>
<mem_free>4286578688</mem_free>
<name>srv1</name>
<reboot_required>0</reboot_required>
<role>primary</role>
<state>up</state>
</server>
<server>
<bw_alloc>0</bw_alloc>
<bw_free>2000000000</bw_free>
<cpu_alloc>0.00</cpu_alloc>
<cpu_free>4.00</cpu_free>
<enabled>1</enabled>
<mem_alloc>0</mem_alloc>
<mem_free>7341080576</mem_free>
<name>srv2</name>
<reboot_required>0</reboot_required>
<role>secondary</role>
<state>up</state>
</server>
</servers>
{
"server" : [
{
"reboot_required" : "0",
"name" : "srv1",
"cpu_free" : "1.95",
"state" : "up",
"bw_free" : "1379000000",
"component" : [
{
"bw" : "0",
"cpu" : "1.00",
"name" : "_sys.controller",
"mem" : "1073741824",
"state" : "running"
},
.
.
.
}
],
"cpu_alloc" : "1.05",
"mem_free" : "4286578688",
"mem_alloc" : "1946157056",
"role" : "primary",
"enabled" : "1",
"bw_alloc" : "621000000"
},
{
"reboot_required" : "0",
"name" : "srv2",
"cpu_free" : "4.00",
"state" : "up",
"bw_free" : "2000000000",
"cpu_alloc" : "0.00",
"mem_free" : "7341080576",
"mem_alloc" : "0",
"role" : "secondary",
"bw_alloc" : "0",
"enabled" : "1"
}
]
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Retrieve information for a server
/api/v2/srv/info?srv=srv&vdc=controller-name
Name of the server
Name of the target virtual data center
synchronous
GET
Retrieve information for server.
GET http://192.168.123.200/api/v2/srv/info?srv=srv1&vdc=mygrid
<server> <name>srv1</name> <bw_alloc>720000000</bw_alloc> <bw_free>1280000000</bw_free> <bw_reserved>0</bw_reserved> <bw_total>2000000000</bw_total> <cpu_alloc>1.69</cpu_alloc> <cpu_bogomips>3991</cpu_bogomips> <cpu_free>2.21</cpu_free> <cpu_freq>1995</cpu_freq> <cpu_load>0.06</cpu_load> <cpu_phy_total>2</cpu_phy_total> <cpu_reserved>0.10</cpu_reserved> <cpu_total>4</cpu_total> <cpu_type>Intel(R) Xeon(R) CPU 5130 @ 2.00GHz </cpu_type> <disk_free>1143356945142</disk_free> <disk_reserved>10737418240</disk_reserved> <disk_total>1493697126400</disk_total> <enabled>1</enabled> <ha_role>primary</ha_role> <hvm_support>1</hvm_support> <mem_alloc>1610612736</mem_alloc> <mem_free>1246756864</mem_free> <mem_reserved>1435500544</mem_reserved> <mem_service>0</mem_service> <mem_total>4292870144</mem_total> <n_disks>1</n_disks> <state>up</state> </server>
{
"cpu_freq" : "1995",
"cpu_type" : "Intel(R) Xeon(R) CPU 5130 @ 2.00GHz ",
"cpu_bogomips" : "3991",
"state" : "up",
"cpu_total" : "4",
"cpu_alloc" : "1.69",
"mem_alloc" : "1610612736",
"hvm_support" : "1",
"enabled" : "1",
"bw_total" : "2000000000",
"cpu_reserved" : "0.10",
"mem_total" : "4292870144",
"name" : "srv1",
"disk_reserved" : "10737418240",
"disk_total" : "1493697126400",
"cpu_phy_total" : "2",
"cpu_free" : "2.21",
"ha_role" : "primary",
"mem_reserved" : "1435500544",
"mem_service" : "0",
"bw_free" : "1280000000",
"disk_free" : "1143356945142",
"bw_reserved" : "0",
"mem_free" : "1246756864",
"cpu_load" : "0.30",
"bw_alloc" : "720000000",
"n_disks" : "1"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (srv) - Argument srv=srv-name was not specified.
Entity not found - Failed to display info for server srv - it doesn't exist. An invalid server name was specified in the request.
Note: This method has been deprecated and is included here for compatibility with existing user scripts.
Retrieve verbose information for a server
/api/v2/srv/info_verbose?srv=srv&vdc=controller-name
Name of the server
Name of the target virtual data center
synchronous
GET
Show verbose information for srv1.
GET http://192.168.123.200/api/v2/srv/info_verbose?srv=srv1&vdc=mygrid
<server> <name>srv1</name> <bw_alloc>350000000</bw_alloc> <bw_free>1650000000</bw_free> <bw_reserved>0</bw_reserved> <bw_total>2000000000</bw_total> <cpu_alloc>0.55</cpu_alloc> <cpu_bogomips>4019</cpu_bogomips> <cpu_free>1.35</cpu_free> <cpu_freq>2009</cpu_freq> <cpu_load>0.10</cpu_load> <cpu_phy_total>2</cpu_phy_total> <cpu_reserved>0.10</cpu_reserved> <cpu_total>2</cpu_total> <cpu_type>AMD Opteron(tm) Processor 246 </cpu_type> <disk_free>1421930467533</disk_free> <disk_reserved>10737418240</disk_reserved> <disk_total>1493697126400</disk_total> <enabled>1</enabled> <ha_role>primary</ha_role> <hvm_support>0</hvm_support> <mem_alloc>738197504</mem_alloc> <mem_free>11534336</mem_free> <mem_reserved>1395654656</mem_reserved> <mem_service>0</mem_service> <mem_total>2145386496</mem_total> <n_disks>1</n_disks> <state>up</state> </server>
{
"cpu_freq" : "2009",
"cpu_type" : "AMD Opteron(tm) Processor 246 ",
"cpu_bogomips" : "4019",
"state" : "up",
"cpu_total" : 2",
"cpu_alloc" : "0.55",
"mem_alloc" : "738197504",
"hvm_support" : "0",
"enabled" : "1",
"bw_total" : "2000000000",
"cpu_reserved" : "0.10",
"mem_total" : "2145386496",
"name" : "srv1",
"disk_reserved" : "10737418240",
"disk_total" : "1493697126400",
"cpu_phy_total" : "2",
"cpu_free" : "1.35",
"ha_role" : "primary",
"mem_reserved" : "1395654656",
"mem_service" : "0",
"bw_free" : "1650000000",
"disk_free" : "1421930467533",
"bw_reserved" : "0",
"mem_free" : "11534336",
"cpu_load" : "0.38",
"bw_alloc" : "350000000",
"n_disks" : "1"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (srv) - Argument srv=srv-name was not specified.
Note: This method has been deprecated and is included here for compatibility with existing user scripts. New users should use the option flag &extended.
Retrieve extended information for a server
/api/v2/srv/info_extended?srv=srv&vdc=controller-name
Name of the server
Name of the target virtual data center
synchronous
GET
Retrieve extended information for srv1.
GET http://192.168.123.200/api/v2/srv/info_extended?srv=srv1&vdc=mygrid
<server> <name>srv1</name> <bios_date>03/23/2006</bios_date> <bios_vendor>HP</bios_vendor> <bios_version>2.16 </bios_version> <boot_id>1dd11bbb-0a09-410f-b602-b264ee60f8fc</boot_id> <bw_alloc>350000000</bw_alloc> <bw_free>1650000000</bw_free> <bw_reserved>0</bw_reserved> <bw_total>2000000000</bw_total> <cpu_alloc>0.55</cpu_alloc> <cpu_bogomips>4019</cpu_bogomips> <cpu_free>1.35</cpu_free> <cpu_freq>2009</cpu_freq> <cpu_load>0.10</cpu_load> <cpu_phy_total>2</cpu_phy_total> <cpu_reserved>0.10</cpu_reserved> <cpu_total>2</cpu_total> <cpu_type>AMD Opteron(tm) Processor 246 </cpu_type> <disk_free>1421930467533</disk_free> <disk_reserved>10737418240</disk_reserved> <disk_total>1493697126400</disk_total> <enabled>1</enabled> <ha_role>primary</ha_role> <hvm_support>0</hvm_support> <mem_alloc>738197504</mem_alloc> <mem_free>11534336</mem_free> <mem_reserved>1395654656</mem_reserved> <mem_service>0</mem_service> <mem_total>2145386496</mem_total> <motherboard_manufacturer>Wistron Corporation</motherboard_manufacturer> &ly;motherboard_model>K85NL</motherboard_model> <motherboard_version>-1</motherboard_version> <n_disks>1</n_disks> <power_control_enabled>0</power_control_enabled> <state>up</state> <uid>6dc242e202d44eaba074dda981bcf139</uid> <uptime>545854</uptime> </server>
"cpu_freq" : "2009", "bios_version" : "2.16 "," cpu_type" : "AMD Opteron(tm) Processor 246 ", "cpu_bogomips" : "4019", "state" : "up", "cpu_total" : 2", "bios_vendor" : "HP", "cpu_alloc" : "0.55", "mem_alloc" : "738197504", "hvm_support" : "0", "enabled" : "1", "bw_total" : "2000000000", "cpu_reserved" : "0.10", "motherboard_manufacturer" : "Wistron Corporation", "uid" : "6dc242e202d44eaba074dda981bcf139", "mem_total" : "2145386496", "power_control_enabled" : "0", "name" : "srv1", "disk_reserved" : "10737418240", "disk_total" : "1493697126400", "cpu_phy_total" : "2", "motherboard_version" : "-1 ", "cpu_free" : "1.35", "ha_role" : "primary", "mem_reserved" : "1395654656", "mem_service" : "0", "bw_free" : "1650000000", "disk_free" : "1421930467533", "bw_reserved" : "0", "mem_free" : "11534336", "cpu_load" : "0.38", "bw_alloc" : "350000000", "n_disks" : "1" "motherboard_model" : "K85NL", }
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (srv). - Argument srv=srv-name was not specified.
Entity not found - Failed to display info for server srv - it doesn't exist. An invalid server name was specified in the request.
Reboot a server
/api/v2/srv/reboot?srv=srv&vdc=controller-name
Name of the server
Name of the target virtual data center
Reason why the server is being rebooted.
asynchronous
GET
Reboot srv1.
GET http://192.168.123.200/api/v2/srv/reboot?srv=srv1&vdc=mygrid GET http://aux/api/v2/srv/reboot?srv=srv1&reason=stuck%20mount&vdc=mygrid
<message></message>
{
"message" :""
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Shut a server down
/api/v2/srv/shutdown?srv=srv&vdc=controller-name
/api/v2/srv/shutdown?&all&vdc=controller-name
Name of the server to be shutdown.
Name of the target virtual data center
Shut all servers down. Exclusive of the srv argument.
Reason why the server is being shut down.
asynchronous
GET
Shut server srv1 down.
GET http://aux/api/v2/srv/shutdown?srv=srv1&reason=maintenance&vdc=mygrid
Shut all servers down on mygrid.
GET http://192.168.123.200/api/v2/srv/shutdown?&all&vdc=mygrid
<message></message>
{
"message" :""
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Enable a server for scheduling
/api/v2/srv/enable?srv=srv&vdc=controller-name
Name of the server
Enable all servers. Exclusive of the srv argument.
Name of the target virtual data center
synchronous
GET
Enable srv1.
GET http://192.168.123.200/api/v2/srv/enable?srv=srv1&vdc=mygrid
<message></message>
{
"message" :""
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (srv). - Argument srv=srv-name was not specified.
Entity not found - Failed to enable server srv - Failed to retrieve server information.
Disable a server for scheduling
/api/v2/srv/disable?srv=srv&vdc=controller-name
Name of the server
Disable all servers. Exclusive of the srv argument.
Name of the target virtual data center
synchronous
GET
Disable srv1.
GET http://192.168.123.200/api/v2/srv/disable?srv=srv1&vdc=mygrid
<message></message>
{
"message" :""
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (srv). - Argument srv=srv-name was not specified.
Entity not found - Failed to disable server srv - it doesn't exist. An invalid server name was specified in the request.
Set the server's role in the grid for controller high-availability
/api/v2/srv/set?srv=srv&role=role&vdc=controller-name
Name of the server
Server's HA role. Can be 'primary', 'secondary' or 'none'
Name of the target virtual data center
Server's High Availability role. May be one of the following:
Server that is currently running the CA AppLogic grid controller
Server that may run the CA AppLogic grid controller in case of a controller server failure
Server will never run the CA AppLogic grid controller and does not participate in controller HA
Enable/disable network HA for the server (both external and backbone)
Enable/disable network HA on the backbone network
Enable/disable network HA on the external network
specify which switch is active for the backbone network
Specify which switch is active for the external network
Name of the hypervisor
Hypervisor license key
Enable/disable NCQ
asynchronous
GET
Set role for srv1 to secondary.
GET http://192.168.123.200/api/v2/srv/set?srv=srv1&role=secondary&vdc=mygrid
<message></message>
{
"message" :""
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Missing required arguments (role). - Argument role=ha-role was not specified.
Missing required arguments (srv). - Argument srv=srv-name was not specified.
Power on a server
/api/v2/srv/power_on?srv=srv&vdc=controller-name
Name of the server
Power all servers on. Exclusive of the srv argument.
Name of the target virtual data center
asynchronous
GET
Power on srv1.
GET http://192.168.123.200/api/v2/srv/power_on?srv=srv1&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da7</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da7"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Only valid when "Power Control" is enabled
Power off a server
/api/v2/srv/power_off?srv=srv&vdc=controller-name
Name of the server
Power all servers off. Exclusive of the srv argument.
Name of the target virtual data center
Reason why the server is being rebooted.
asynchronous
GET
Power off srv1.
GET http://192.168.123.200/api/v2/srv/power_off?srv=srv1&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66da8</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66da8"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Only valid when "Power Control" is enabled.
Power cycle a server
/api/v2/srv/power_cycle?srv=srv&vdc=controller-name
Name of the server
Power cycle all servers. Exclusive of the srv argument.
Name of the target virtual data center
asynchronous
GET
Power cycle srv1.
GET http://192.168.123.200/api/v2/vdc/power_cycle?srv=srv1&vdc=mygrid
<job>be805915-76b2-48c8-b8a0-b881cca66d10</job>
{
"job" : "be805915-76b2-48c8-b8a0-b881cca66d10"
}
Entity vdc mygrid not found - A VDC name was specified that is not configured in the WS_API application.
Only valid when "Power Control" is enabled
Identify server and NICs by having the specified NIC on the server blink/flash its LED for a minute.
/api/v2/srv/identify?srv=server&nic=nic&vdc=controller-name
Name of the server
Name of the NIC to blink
Name of the target virtual data center
asynchronous
GET
Blink eth0 on srv1.
GET http://192.168.123.200/api/v2/srv/identify?srv=srv1&nic=eth0&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 (srv,nic) - Argument srv=srv and nic=nic missing
Missing required arguments (srv) - Argument srv=srv missing
Missing required arguments (nic) - Argument nic=nic missing
To get the status of job, issue a /api/v2/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 © 2013 CA Technologies.
All rights reserved.
|
|