HP Insight Control Server Provisioning 7.2 Administrator Guide

DescriptionREST component
{"type":"OSDIlo","username":”<iLO-administrator-user>,"password":
"<iLO-administrator-password>","port":<port>,"ipAddress":"<iLO-IP-address>"}
Request Body:
Type is the resource name.
You supply the <iLO-administrator-user>, <iLO-administrator-password>,
the port to use in connecting to iLO and the IPv4 <iLO-IP-address>
{"uri":"/rest/os-deployment-jobs/JobID"}
will return URI with Job ID.
Response Body:
You invoke cURL as follows and will see the associated response shown below:
cURL command on Linux:
curl -i -k -X POST -H "auth: <user-authorization-token>" -H "content-type:application/json"
-H "accept:application/json" -H "accept-language:en-us"
https://<appliance-hostname-or-address>/rest/os-deployment-ilos
-d {"type":"OSDIlo","username":"<iLO-administrator-user>,
password:<iLO-administrator-password>,
port:443,ipAddress:<iLO-IP-address>}
cURL command on Windows:
curl -i -k -X POST -H "auth: <user-authorization-token>" -H "content-type:application/json"
-H "accept:application/json" -H "accept-language:en-us"
https://<appliance-hostname-or-address>/rest/os-deployment-ilos
-d {\"type\":\"OSDIlo\",\"username\":\"<iLO-administrator-use>r\,
\password\:\<iLO-administrator-password>\,
\port\:443,\ipAddress\:\<iLO-IP-address>\}
Response on success:
HTTP/1.1 202 Accepted
Date: Wed, 20 Feb 2013 17:33:30 GMT
Content-Type: application/json
Via: 1.1 cic.dns.hp
cache-control: no-cache
Transfer-Encoding: chunked
This response is accompanied by returned job URI.
Below is an example script that logs into the appliance, adds the server via iLO and logs out. This
script uses cURL.
#!/bin/sh
# login
AUTH=`curl -k -X POST -H "accept:application/json" -H "content-type: application/json"
https://<appliance-hostname-or-address>/rest/login-sessions?action=login
-d '{"userName":"<administrator-name>","password":"<administrator-password>"}' | perl -e 'while (<>)
{/{"sessionID":"(.*)"}/ && print $1;}'`
# This script invokes a job to add iLO-managed server.
curl -i -k -X POST -H "auth:${AUTH}" -H "content-type:application/json" -H "accept:application/json"
-H "accept-language:en-us" https://<appliance-hostname-or-address>/rest/os-deployment-ilos
-d '{"type":"OSDIlo","username":"<administrator-name>","password":"<administrator-password>",
"port":443,"ipAddress":"<iLO-IP-address>"}'
# logout
curl -k -i -X DELETE -H "auth:${AUTH}"
https://<appliance-hostname-or-address>/rest/login-sessions?action=logout
REST call to add a server via iLO and server will not boot into a maintenance mode:
A list of the components of the REST call is shown below:
DescriptionREST component
https://<appliance-hostname-or-address>/rest/os-deployment-ilos/?addstyle=old
where you supply <appliance-hostname-or-address>
URL:
POSTMessage Type:
38 Advanced topics