Previous Topic: vdc ObjectNext Topic: template Object


srv Object

Use this object to manage servers of a VDC through its controller.

Method

Description

list

Retrieve list of servers

list_verbose

Retrieve information for all servers

list_extended

Retrieve extended information for all servers

list_map

Retrieve list of components running on each server

info

Retrieve information for a server

info_verbose

Retrieve verbose information for a server

info_extended

Retrieve extended information for a server

reboot

Reboot a server

shutdown

Shut a server down

enable

Enable a server for scheduling

disable

Disable a server for scheduling

set

Set the server's role in the grid for controller high-availability

power_on

Power on a server

power_off

Power off a server

power_cycle

Power cycle a server

identify

Identify server and NICs

list Method (srv Object)
Description

Retrieve a list of servers

Syntax
/api/v2/srv/list?vdc=controller-name 
Arguments
vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

List servers.

GET http://192.168.123.200/api/v2/srv/list?vdc=mygrid 
Sample Output
XML:
<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>
JSON:
{
   "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"
      },
      .
      .
      .
   ]
} 
HTTP Error Codes
404

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

list_verbose Method (srv Object)

Note: This method has been deprecated and is included here for compatibility with existing user scripts. New users should use the option flag &verbose.

Description

Retrieve information for all servers

Syntax
/api/v2/srv/list_verbose?vdc=controller-name 
Arguments
vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

List servers.

GET http://192.168.123.200/api/v2/srv/list_verbose?vdc=mygrid 
Sample Output
XML:
<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>
JSON:
{ 
   "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" 
      . 
      . 
      . 
   ] 
} 

HTTP Error Codes
404

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

list_extended Method (srv Object)

Note: This method has been deprecated and is included here for compatibility with existing user scripts. New users should use the option flag &extended.

Description

Retrieve extended information for all servers

Syntax
/api/v2/srv/list_extended?vdc=controller-name 
Arguments
vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Show extended list of servers.

GET http://192.168.123.200/api/v2/srv/list_extended?vdc=mygrid 
Sample Output
XML:
<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>
JSON:
{
   "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"
      }, 
      .
      .
      .
   ]
} 
HTTP Error Codes
404

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

list_map Method (srv Object)

Note: This method has been deprecated and is included here for compatibility with existing user scripts. New users should use the option flag &map.

Description

Retrieve list of components running on each server

Syntax
/api/v2/srv/list_map?vdc=controller-name 
Arguments
vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Retrieve list of components running on each server.

GET http://192.168.123.200/api/v2/srv/list_map?vdc=mygrid 
Sample Output
XML:
<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>

JSON:
{
   "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"
      }
   ]
}

HTTP Error Codes
404

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

info Method (srv Object)
Description

Retrieve information for a server

Syntax
/api/v2/srv/info?srv=srv&vdc=controller-name 
Arguments
srv

Name of the server

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Retrieve information for server.

GET http://192.168.123.200/api/v2/srv/info?srv=srv1&vdc=mygrid 
Sample Output
XML:
<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>
JSON:
{ 
   "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" 
} 
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 (srv) - Argument srv=srv-name was not specified.

404.1

Entity not found - Failed to display info for server srv - it doesn't exist. An invalid server name was specified in the request.

info_verbose Method (srv Object)

Note: This method has been deprecated and is included here for compatibility with existing user scripts.

Description

Retrieve verbose information for a server

Syntax
/api/v2/srv/info_verbose?srv=srv&vdc=controller-name 
Arguments
srv

Name of the server

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Show verbose information for srv1.

GET http://192.168.123.200/api/v2/srv/info_verbose?srv=srv1&vdc=mygrid 
Sample Output
XML:
<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>
JSON:
{
   "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"
} 
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 (srv) - Argument srv=srv-name was not specified.

info_extended Method (srv Object)

Note: This method has been deprecated and is included here for compatibility with existing user scripts. New users should use the option flag &extended.

Description

Retrieve extended information for a server

Syntax
/api/v2/srv/info_extended?srv=srv&vdc=controller-name 
Arguments
srv

Name of the server

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Retrieve extended information for srv1.

GET http://192.168.123.200/api/v2/srv/info_extended?srv=srv1&vdc=mygrid 
Sample Output
XML:
<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>
JSON:
   "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", 
} 
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 (srv). - Argument srv=srv-name was not specified.

404.1

Entity not found - Failed to display info for server srv - it doesn't exist. An invalid server name was specified in the request.

reboot Method (srv Object)
Description

Reboot a server

Syntax
/api/v2/srv/reboot?srv=srv&vdc=controller-name 
Arguments
srv

Name of the server

vdc

Name of the target virtual data center

Options
reason

Reason why the server is being rebooted.

Transaction Type

asynchronous

Request Type

GET

Examples

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
Sample Output
XML:
<message></message>

JSON:
{
   "message" :""
}
HTTP Error Codes
404

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

shutdown Method (srv Object)
Description

Shut a server down

Syntax

/api/v2/srv/shutdown?srv=srv&vdc=controller-name

/api/v2/srv/shutdown?&all&vdc=controller-name

Arguments
srv

Name of the server to be shutdown.

vdc

Name of the target virtual data center

Options
&all

Shut all servers down. Exclusive of the srv argument.

reason

Reason why the server is being shut down.

Transaction Type

asynchronous

Request Type

GET

Examples

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 
Sample Output
XML:
<message></message>
JSON:
{
   "message" :""
}
HTTP Error Codes
404

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

enable Method (srv Object)
Description

Enable a server for scheduling

Syntax
/api/v2/srv/enable?srv=srv&vdc=controller-name 
Arguments
srv

Name of the server

&all

Enable all servers. Exclusive of the srv argument.

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Enable srv1.

GET http://192.168.123.200/api/v2/srv/enable?srv=srv1&vdc=mygrid 
Sample Output
XML:
<message></message>

JSON:
{
   "message" :""
}
HTTP Error Codes
404

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

400.1

Missing required arguments (srv). - Argument srv=srv-name was not specified.

404.1

Entity not found - Failed to enable server srv - Failed to retrieve server information.

disable Method (srv Object)
Description

Disable a server for scheduling

Syntax
/api/v2/srv/disable?srv=srv&vdc=controller-name 
Arguments
srv

Name of the server

&all

Disable all servers. Exclusive of the srv argument.

vdc

Name of the target virtual data center

Transaction Type

synchronous

Request Type

GET

Examples

Disable srv1.

GET http://192.168.123.200/api/v2/srv/disable?srv=srv1&vdc=mygrid 
Sample Output
XML:
<message></message>
JSON:
{
   "message" :""
}

HTTP Error Codes
404

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

400.1

Missing required arguments (srv). - Argument srv=srv-name was not specified.

404.1

Entity not found - Failed to disable server srv - it doesn't exist. An invalid server name was specified in the request.

set Method (srv Object)
Description

Set the server's role in the grid for controller high-availability

Syntax
/api/v2/srv/set?srv=srv&role=role&vdc=controller-name 
Arguments
srv

Name of the server

role

Server's HA role. Can be 'primary', 'secondary' or 'none'

vdc

Name of the target virtual data center

Options
role

Server's High Availability role. May be one of the following:

primary

Server that is currently running the CA AppLogic grid controller

secondary

Server that may run the CA AppLogic grid controller in case of a controller server failure

none

Server will never run the CA AppLogic grid controller and does not participate in controller HA

ha_network

Enable/disable network HA for the server (both external and backbone)

ha_backbone

Enable/disable network HA on the backbone network

ha_external

Enable/disable network HA on the external network

backbone

specify which switch is active for the backbone network

external

Specify which switch is active for the external network

hypervisor_name

Name of the hypervisor

hypervisor_lic_key

Hypervisor license key

disk_ncq_enabled

Enable/disable NCQ

Transaction Type

asynchronous

Request Type

GET

Examples

Set role for srv1 to secondary.

GET http://192.168.123.200/api/v2/srv/set?srv=srv1&role=secondary&vdc=mygrid 
Sample Output
XML:
<message></message>
JSON:
{
   "message" :""
}

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 (role). - Argument role=ha-role was not specified.

400.4

Missing required arguments (srv). - Argument srv=srv-name was not specified.

power_on Method (srv Object)
Description

Power on a server

Syntax
/api/v2/srv/power_on?srv=srv&vdc=controller-name 
Arguments
srv

Name of the server

&all

Power all servers on. Exclusive of the srv argument.

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Power on srv1.

GET http://192.168.123.200/api/v2/srv/power_on?srv=srv1&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da7</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da7"
} 
HTTP Error Codes
404

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

Notes

Only valid when "Power Control" is enabled

power_off Method (srv Object)
Description

Power off a server

Syntax
/api/v2/srv/power_off?srv=srv&vdc=controller-name 
Arguments
srv

Name of the server

&all

Power all servers off. Exclusive of the srv argument.

vdc

Name of the target virtual data center

Options
reason

Reason why the server is being rebooted.

Transaction Type

asynchronous

Request Type

GET

Examples

Power off srv1.

GET http://192.168.123.200/api/v2/srv/power_off?srv=srv1&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da8</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da8"
}
HTTP Error Codes
404

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

Notes

Only valid when "Power Control" is enabled.

power_cycle Method (srv Object)
Description

Power cycle a server

Syntax
/api/v2/srv/power_cycle?srv=srv&vdc=controller-name 
Arguments
srv

Name of the server

&all

Power cycle all servers. Exclusive of the srv argument.

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Power cycle srv1.

GET http://192.168.123.200/api/v2/vdc/power_cycle?srv=srv1&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66d10</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66d10"
}
HTTP Error Codes
404

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

Notes

Only valid when "Power Control" is enabled

identify Method (srv Object)
Description

Identify server and NICs by having the specified NIC on the server blink/flash its LED for a minute.

Syntax
/api/v2/srv/identify?srv=server&nic=nic&vdc=controller-name 
Arguments
server

Name of the server

nic

Name of the NIC to blink

vdc

Name of the target virtual data center

Transaction Type

asynchronous

Request Type

GET

Examples

Blink eth0 on srv1.

GET http://192.168.123.200/api/v2/srv/identify?srv=srv1&nic=eth0&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 (srv,nic) - Argument srv=srv and nic=nic missing

400.4

Missing required arguments (srv) - Argument srv=srv missing

400.4

Missing required arguments (nic) - Argument nic=nic missing

Notes

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.