Previous Topic: set Method (srv Object)Next Topic: template Object


power_cycle Method (srv Object)
Description

Power cycle a server

Syntax
/api/v1/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/v1/srv/power_cycle?srv=srv1&vdc=mygrid 
Sample Output
XML:
<job>be805915-76b2-48c8-b8a0-b881cca66da9</job> 
JSON:
{
   "job" : "be805915-76b2-48c8-b8a0-b881cca66da9"
}
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.

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/v1/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/v1/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/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.