Exposed Resources Hierarchy
Machine Resource
- Machine Data Model
- Datastore Data Model
- Methods related to Machine Resource
- Create a machine
- Create multiple physical machines
- Retrieve a Machine
- Update an existing Machine
- Delete a Machine
- Retrieve the list of virtual machines by machine's hypervisor
- Delete virtual machines not managed by Abiquo on the hypervisor machine
- Power off an existing Machine in Cisco UCS
- Power on an existing Machine in Cisco UCS
Machine Data Model
| Field Name | Type | Occurs | Required | Description |
|---|---|---|---|---|
| name | String | 1 | true | The name of the rack |
| cpu | Integer | 1 | true | The number of CPUs of the Machine. Should be bigger than 0 |
| cpuRatio | Integer | 1 | optional | Virtual to Physical CPU ratio |
| cpuUsed | Integer | 1 | false | The number of CPUs currently used |
| description | String | 1 | optional | A brief description of the machine |
| hd | Long | 1 | true | The value of the Hard Disk size (in bytes). That is the sum of the datastores. Currently is not used internally, because we use Datastores |
| hdUsed | Long | 1 | true | The value of used Hard Disk (in bytes). This is the sum of used sizes of Datastores. Deprecated. |
| readHd | Long | 1 | true | The value of the read Hard Disk. This is currently deprecated because we use allocation limits. Put the same value as hd |
| ram | Integer | 1 | true | The value of RAM (in Megas) |
| ramUsed | Integer | 1 | true | The value of RAM used (in Megas) |
| realRam | Intger | 1 | true | The value of Real RAM. Currently is not used for anything and we keep it in the object for backwards compatibility. Put the same value as 'ram' |
| state | String | 1 | true | The state of the machine |
| virtualSwitch | String | 1 | true | The IP of the virtual switch for the default VLAN |
| datastores | String | 1...n | true | List of Datastores |
| ip | String | 1 | true | IP address of the hypervisor |
| ipService | String | 1 | true | IP address service of the hypervisor. Currently is not used for anything and it is here for backwards compatibility. Put the same value as IP |
| type | String | 1 | true | Type of the hypervisor. Available values are {VMX_04, XENSERVER, HYPER-V, XEN-03, KVM, VBOX} |
| user | String | 1 | true | User to log in |
| password | String | 1 | true | Password to authenticate at Hypervisor |
Datastore Data Model
| Field Name | Type | Occurs | Required | Description |
|---|---|---|---|---|
| rootPath | string | 1 | true | Base path (mount point) of the datastore |
| directory | string | 1 | true | Directory in the root path where the images of the virtual machines will be copied |
| enabled | boolean | 1 | true | If the datastore is enabled to use it to copy virtual images |
| size | string | 1 | true | Size in bytes of the datastore |
| usedSize | string | 1 | true | Used size in bytes of the datastore |
Methods related to Machine Resource
Create a machine
The best way to create a machine is to first call the Retrieve remote machine information function to get all its properties. Once the properties are retrieved, the next step is to edit the <vswitch> to choose one. The following step is to enable a Datastore. All datastores initially have an <enabled> tag set to false. You should enable a datastore and call this method.
| Incompatible with UCS Racks This feature cannot be executed if the machine has to belong to a UCS Rack. Machines on a UCS Rack are auto-discovered and the only way to create them is by creating the UCS Rack itself . |
Synopsis: POST http://example.com/api/admin/datacenters/{$datacenterId}/racks/{$rackId}/machines
Roles needed: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS (Check out role definitions here)
REQUEST
Request Headers: Accept, Content-Type.
Request Parameters: N/A.
Request Message Body: A Machine type.
Request example:
% curl --verbose -X POST "http://example.com/api/admin/datacenters/2/racks/2/machines" \ -H "Content-type:application/xml" \ -H "Accept:application/sml" \ -d @createmachine.xml \ -u user:admin > POST /api/admin/datacenters/2/racks/2/machines HTTP/1.1 > Authorization: Basic YWRtaW46eGFiaXF1bw== > User-Agent: curl/7.21.3 (x86_64-pc-linux-gnu) libcurl/7.21.3 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18 > Host: localhost > Accept: */* > Content-type:application/xml > Content-Length: 1143
| Download the template Even though the best way to create a machine is to do the steps at the beginning of this section, you can download the template of the file @createmachine.xml here (click right mouse button and 'Save Link As..') |
RESPONSE
Response Message Body: Machine.
Response example:
< HTTP/1.1 201 Created < Server: Apache-Coyote/1.1 < Set-Cookie: auth=YWRtaW46MTMwODIxODUwNTI3MTpiZGY1ZjkyMzU4NzdlMTA5YjU4NWNhYTk1YTllZGY0Y0FCSVFVTw; Expires=Thu, 16-Jun-2011 10:01:45 GMT; Path=/api < Location: http://localhost:80/api/admin/datacenters/2/racks/2/machines/4 < Set-Cookie: JSESSIONID=3867292D43549056202D4B5B83E68602; Path=/api < Content-Type: application/machinedto+xml < Content-Length: 1516 < Date: Thu, 16 Jun 2011 09:31:46 GMT < <machine> <link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/4/action/reenableafterha" rel="action" title="machines"/> <link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/4/action/virtualmachines" rel="action" title="virtualmachines"/> <link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/4/datastores" rel="datastores"/> <link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/4" rel="edit"/> <link href="http://localhost:80/api/admin/datacenters/2/racks/2" rel="rack"/> <datastores> <datastore> <directory></directory> <enabled>true</enabled> <id>29</id> <name>datastore1 (1)</name> <rootPath>datastore1 (1)</rootPath> <size>244544700416</size> <usedSize>30331109376</usedSize> </datastore> <datastore> <directory></directory> <enabled>false</enabled> <id>30</id> <name>nfsrepository-10.60.1.72</name> <rootPath>nfsrepository-10.60.1.72</rootPath> <size>332900368384</size> <usedSize>6662184960</usedSize> </datastore> </datastores> <description></description> <id>4</id> <ip>10.60.1.71</ip> <ipService>10.60.1.71</ipService> <name>thunder01.bcn.abiquo.com.</name> <password>temporal</password> <realCpu>4</realCpu> <realHd>332900368384</realHd> <realRam>4085</realRam> <state>MANAGED</state> <type>VMX_04</type> <user>root</user> <cpu>4</cpu> <cpuRatio>0</cpuRatio> <cpuUsed>0</cpuUsed> <hd>332900368384</hd>
<hdUsed>6662184960</hdUsed>
<ram>4085</ram>
<ramUsed>0</ramUsed>
<virtualSwitch>vSwitch1</virtualSwitch>
</machine>
Create multiple physical machines
| New Feature This feature has been available since version 1.8.0 |
In line with the functionality of Retrieve multiple physical machines, you can take advantage of this feature using its response body to create multiple machines in the same time.
| Incompatible with UCS Racks This feature cannot be executed if the machine has to belong to a UCS Rack. Machines on UCS Racks are auto-discovered and the only way to create them is by creating the UCS Rack itself . |
Synopsis: POST http://example.com/api/admin/datacenters/{$datacenterId}/racks/{$rackId}/machines
Roles needed: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS (Check out role definitions here)
REQUEST
Request Headers: Accept("application/machinesdto+xml"), Content-Type("application/machinesdto+xml).
Request Parameters: N/A.
Request Message Body: A List of Machine type.
Request example:
% curl --verbose -X POST "http://example.com/api/admin/datacenters/2/racks/2/machines" \n -H "Content-type:application/machinesdto+xml" \ -H "Accept:application/machinesdto+xml" \ -d @createmultiplemachine.xml \n -u user:password > POST /api/admin/datacenters/2/racks/2/machines HTTP/1.1 > Authorization: Basic YWRtaW46eGFiaXF1bw== > User-Agent: curl/7.21.3 (x86_64-pc-linux-gnu) libcurl/7.21.3 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18 > Host: localhost > Content-type:application/machinesdto+xml > Accept:application/machinesdto+xml > Content-Length: 2602
| Download the template Although the best way to create a machine is to do the steps given at the beginning of this section, you can download the template of the file @createmultiplemachine.xml [here | ^createmultiplemachine.xml] (click right mouse button and 'Save Link As..') |
RESPONSE
Response Message Body: A list of Machine.
Response example:
< HTTP/1.1 201 Created < Server: Apache-Coyote/1.1 < Set-Cookie: auth=YWRtaW46MTMwODIxOTc0MTEwNDo0OGMwMjkyMTljZTgzMGM5MWRhZGRkOWViYTFkZGNkMUFCSVFVTw; Expires=Thu, 16-Jun-2011 10:22:21 GMT; Path=/api < Set-Cookie: JSESSIONID=9F737B771690F358C5D304A194F5EE65; Path=/api < Content-Type: application/machinesdto+xml < Content-Length: 2983 < Date: Thu, 16 Jun 2011 09:52:21 GMT < <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <machines> <machine> <link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/5/action/reenableafterha" rel="action" title="machines"/> <link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/5/action/virtualmachines" rel="action" title="virtualmachines"/> <link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/5/datastores" rel="datastores"/> <link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/5" rel="edit"/> <link href="http://localhost:80/api/admin/datacenters/2/racks/2" rel="rack"/> <datastores> <datastore> <directory></directory> <enabled>true</enabled> <id>35</id> <name>datastore1 (1)</name> <rootPath>datastore1 (1)</rootPath> <size>244544700416</size> <usedSize>30896291840</usedSize> </datastore> <datastore> <directory></directory> <enabled>false</enabled> <id>36</id> <name>nfsrepository-10.60.1.72</name> <rootPath>nfsrepository-10.60.1.72</rootPath> <size>332900368384</size> <usedSize>32551583744</usedSize> </datastore> </datastores> <description></description> <id>5</id> <ip>10.60.1.71</ip> <ipService>10.60.1.71</ipService> <name>thunder01.bcn.abiquo.com.</name> <password>temporal</password> <realCpu>4</realCpu> <realHd>332900368384</realHd> <realRam>4085</realRam> <state>MANAGED</state> <type>VMX_04</type> <user>root</user> <cpu>4</cpu> <cpuRatio>0</cpuRatio> <cpuUsed>0</cpuUsed> <hd>332900368384</hd> <hdUsed>32551583744</hdUsed> <ram>4085</ram> <ramUsed>0</ramUsed> <virtualSwitch>vSwitch1</virtualSwitch> </machine> <machine> <link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/6/action/reenableafterha" rel="action" title="machines"/> <link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/6/action/virtualmachines" rel="action" title="virtualmachines"/> <link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/6/datastores" rel="datastores"/> <link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/6" rel="edit"/> <link href="http://localhost:80/api/admin/datacenters/2/racks/2" rel="rack"/> <datastores> <datastore> <directory></directory> <enabled>true</enabled> <id>37</id> <name>datastore1 (3)</name> <rootPath>datastore1 (3)</rootPath> <size>244544700416</size> <usedSize>56222547968</usedSize> </datastore> <datastore> <directory></directory> <enabled>false</enabled> <id>38</id> <name>nfsrepository-10.60.1.72</name> <rootPath>nfsrepository-10.60.1.72</rootPath> <size>332900368384</size> <usedSize>32551591936</usedSize> </datastore> </datastores> <description></description> <id>6</id> <ip>10.60.1.73</ip> <ipService>10.60.1.73</ipService> <name>esxi1.</name> <password>temporal</password> <realCpu>4</realCpu> <realHd>332900368384</realHd> <realRam>4085</realRam> <state>MANAGED</state> <type>VMX_04</type> <user>root</user> <cpu>4</cpu> <cpuRatio>0</cpuRatio> <cpuUsed>0</cpuUsed> <hd>332900368384</hd> <hdUsed>32551591936</hdUsed> <ram>4085</ram> <ramUsed>0</ramUsed> <virtualSwitch>vSwitch2</virtualSwitch> </machine> </machines>
Retrieve a Machine
Synopsis: GET http://example.com/api/admin/datacenters/{$datacenterId}/racks/{$rackId}/machines/{$machineId}
Roles needed: ROLE_PHYS_DC_RETRIEVE_DETAILS (Check out role definitions here)
REQUEST
Request Headers: Accept
Request Parameters: N/A.
Request Message Body: N/A.
Example Request:
% curl --verbose 'http://example.com/api/admin/datacenters/3/racks/2/machines/7' \ -X GET \ -H "Accept:application/xml" \ -u user:password > GET /api/admin/datacenters/3/racks/2/machines/7 HTTP/1.1 > Authorization: Basic YWRtaW46eGFiaXF1bw== > User-Agent: curl/7.21.0 (x86_64-pc-linux-gnu) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.18 > Host: localhost > Accept: */*
REQUEST
Response Message Body: Machine.
Example Response:
< HTTP/1.1 200 OK < Server: Apache-Coyote/1.1 < Content-Type: application/xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <machine> <link href="http://localhost:80/api/admin/datacenters/3/racks/2" rel="rack"/> <link href="http://localhost:80/api/admin/datacenters/3/racks/2/machines/7" rel="edit"/> <link href="http://localhost:80/api/admin/datacenters/3/racks/2/machines/7/datastores" rel="datastores"/> <link href="http://localhost:80/api/admin/datacenters/3/racks/2/machines/7/action/virtualmachines" rel="action" title="virtualmachines"/> <datastores/> <description>machine 3</description> <id>7</id> <ip>192.1.1.45</ip> <ipService>192.1.1.45</ipService> <name>machine_3</name> <password>xabiquo</password> <realCpu>1</realCpu> <realHd>1</realHd> <realRam>1</realRam> <state>STOPPED</state> <type>KVM</type> <user>admin</user> <cpu>2</cpu> <cpuRatio>1</cpuRatio> <cpuUsed>1</cpuUsed> <hd>1000000</hd> <hdUsed>1</hdUsed> <ram>512</ram> <ramUsed>1</ramUsed> <virtualSwitch>192.168.1.10</virtualSwitch> </machine>
Update an existing Machine
Synopsis: PUT http://example.com/api/admin/datacenters/{$datacenterId}/racks/{$rackId}/machines/{$machineId}
Roles needed: ROLE_PHYS_DC_RETRIEVE_DETAILS (Check out role definitions here)
REQUEST
Request Headers: Accept, Content-Type.
Request Parameters: N/A.
Request Message Body: Machine.
Example Request: Update Machine entity.
% curl --verbose 'http://example.com/api/admin/datacenters/1/racks/1/machines/3' \ -X PUT \ -H "Content-type:application/xml" \ -H "Accept:application/xml" \ -d @createmachine.xml \ -u user:password > PUT /api/admin/datacenters/1/racks/1/machines/3 HTTP/1.1 > User-Agent: curl/7.19.5 (i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15 > Host: example.com > Content-type:application/xml > Accept:application/xml >
| Use your downloaded template You can use the template of the file @createmachine.xml (click right mouse button and 'Save Link As..') and modify its parameters to perform the Update, since the message body is the same than the creation one. Remember to update the <id> tab with the correct value. |
RESPONSE
Response Message Body: N/A.
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTMwODczNTcwMTIwNToxMDg3ZWVkMTdhNmNmZDAzOGYyMjBlOWY3NTk3N2IyZEFCSVFVTw; Expires=Wed, 22-Jun-2011 09:41:41 GMT; Path=/api
< Set-Cookie: JSESSIONID=101738418162EF6CA23B073D5530F76D; Path=/api
< Content-Type: application/xml
< Content-Length: 1278
< Date: Wed, 22 Jun 2011 09:11:41 GMT
<
<machine>
<link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/4/action/reenableafterha" rel="action" title="machines"/>
<link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/4/action/virtualmachines" rel="action" title="virtualmachines"/>
<link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/4/datastores" rel="datastores"/>
<link href="http://localhost:80/api/admin/datacenters/2/racks/2/machines/4" rel="edit"/>
<link href="http://localhost:80/api/admin/datacenters/2/racks/2" rel="rack"/>
<datastores>
<datastore>
<directory></directory>
<enabled>true</enabled>
<id>3</id>
<name>datastore1</name>
<rootPath>datastore1</rootPath>
<size>244544700416</size>
<usedSize>5489295360</usedSize>
</datastore>
</datastores>
<description></description>
<id>4</id>
<ip>10.60.1.77</ip>
<ipService>10.60.1.77</ipService>
<name>localhost.bcn.abiquo.com.</name>
<password>temporal</password>
<realCpu>4</realCpu>
<realHd>244544700416</realHd>
<realRam>4085</realRam>
<state>MANAGED</state>
<type>VMX_04</type>
<user>root</user>
<cpu>4</cpu>
<cpuRatio>1</cpuRatio>
<cpuUsed>0</cpuUsed>
<hd>244813135872</hd>
<hdUsed>0</hdUsed>
<ram>4085</ram>
<ramUsed>0</ramUsed>
<virtualSwitch>vSwitch0</virtualSwitch>
</machine>
Delete a Machine
Synopsis: DELETE http://example.com/api/admin/datacenters/{$datacenterId}/racks/{$rackId}/machines/{$machineId}
Roles needed: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS (Check out role definitions here)
REQUEST
Request Headers: N/A.
Request Parameters: N/A.
Request Message Body: N/A.
Example Request: Delete Machine entity.
% curl --verbose 'http://example.com/api/admin/datacenters/1/racks/1/machines/3' \
-X DELETE \
-u user:password
> DELETE /api/admin/datacenters/1/racks/1/pm/3 HTTP/1.1
> User-Agent: curl/7.19.5 (i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15
> Host: example.com
> Content-type:application/xml
> Accept:application/xml
RESPONSE
Response Message Body: N/A.
Example Response:
< HTTP/1.1 204 No Content < Server: Apache-Coyote/1.1 < Set-Cookie: auth=YWRtaW46MTMwODczNjM0NDA1NDozOGJmYTY4ZDNhZDdiMzcwYjcxYmRiMThiZTc1ZTU3ZUFCSVFVTw; Expires=Wed, 22-Jun-2011 09:52:24 GMT; Path=/api < Set-Cookie: JSESSIONID=D60DC726F7CC9D2578030BC6A0FFCA75; Path=/api < Date: Wed, 22 Jun 2011 09:22:24 GMT < * Connection #0 to host localhost left intact * Closing connection #0
Retrieve the list of virtual machines by machine's hypervisor
Synopsis: GET http://example.com/api/admin/datacenters/{$datacenterId}/racks/{$rackId}/machines/{$machineId}/action/virtualmachines
Roles needed: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS (Check out role definitions here)
REQUEST
Request Headers: Accept.
Request Parameters: N/A.
Request Message Body: N/A.
Request example: Retrieve the list of virtual machines for an hypervisor
% curl --verbose 'http://example.com/api/admin/datacenters/1/racks/1/machines/1/action/virtualmachines' \ -X GET \ -H "Accept:application/xml" \ > GET /api/admin/datacenters/1/racks/1/machines/1/action/virtualMachines HTTP/1.1 > User-Agent: curl/7.19.5 (i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15 > Host: example.com > Accept:application/xml
RESPONSE
Response Message Body: List of Virtual Machines
Response Status: 200, 400, 401, 403.
Response example: Retrieve response
< HTTP/1.1 200 OK < Server: Apache-Coyote/1.1 < Content-Type: application/xml < <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <virtualMachines> <virtualMachine> <link href="http://example.com/api/admin/datacenters/1/racks/1/machines/1" rel="machine"/> <link href="http://example.com/api/admin/enterprises/1" rel="enterprise"/> <link href="http://example.com/api/admin/enterprises/1/users/1" rel="user"/> <cpu>2</cpu> <description>vmdesc</description> <hd>2048</hd> <highDisponibility>0</highDisponibility> <id>1</id> <idState>0</idState> <idType>0</idType> <name>vm</name> <ram>1024</ram> <vdrpPort>8080</vdrpPort> </virtualMachine> </virtualMachines>
Delete virtual machines not managed by Abiquo on the hypervisor machine
This action removes from our system the virtual machines that we do not manage but that exist in the hypervisor.
Synopsis: DELETE http://example.com/api/admin/datacenters/{$datacenterId}/racks/{$rackId}/machines/{$machineId}/action/virtualmachines
Roles needed: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS (Check out role definitions here)
REQUEST
Request Headers: N/A.
Request Parameters: N/A.
Request Message Body: N/A.
Request example: Delete non managed virtual machines for a hypervisor
% curl --verbose 'http://example.com/api/admin/datacenters/1/racks/1/machines/1/action/virtualmachines' \
-X DELETE
> DELETE /api/admin/datacenters/1/racks/1/machines/1/action/virtualMachines HTTP/1.1
> User-Agent: curl/7.19.5 (i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15
> Host: example.com
RESPONSE
Response Headers: N/A.
Response Message Body: N/A.
Response Status: 204, 400, 401, 403.
Response example: Delete response
< HTTP/1.1 204 No Content < Server: Apache-Coyote/1.1 < Content-Type: application/xml <
Power off an existing Machine in Cisco UCS
| New Feature This feature has been available since version 1.8 |
| Enterprise Edition Functionality This feature is available in Abiquo Enterprise Edition |
This action sets the state of the machine supplied to STOPPED. Also sends a stop request to Cisco UCS to shut down the machine. The machine supplied must be a Physical Machine inside a Cisco UCS. Although it is a put, it expects a null as a body. When successful it will return a 204 (No Content) response. It can also return a 409 (Conflict) if the blade is not associated with a Logic Server in UCS.
Synopsis: PUT http://example.com/api/admin/datacenters/{$datacenterId}/racks/{$rackId}/machines/{$machineId}/action/powerOff
Roles needed: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS (Check out role definitions here)
REQUEST
Request Headers: Accept, Content-Type.
Request Parameters: N/A.
Request Message Body: Machine.
Example Request: Update Machine entity.
% curl --verbose 'http://example.com/api/admin/datacenters/1/racks/1/machines/3/action/powerOff' \ -X PUT \ -H "Content-type:application/xml" \ -H "Accept:application/xml" \ > PUT /api/admin/datacenters/1/racks/1/machines/3 HTTP/1.1 > User-Agent: curl/7.19.5 (i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15 > Host: example.com > Content-type:application/xml > Accept:application/xml >
RESPONSE
Response Headers: Content-Length, Content-Type.
Response Message Body: N/A.
Response Status: 204, 400, 401, 403, 409.
< HTTP/1.1 204 No Content < Server: Apache-Coyote/1.1 < Content-Type: application/xml < Content-Length: 0 <
Power on an existing Machine in Cisco UCS
| New Feature This feature has been available since version 1.8 |
| Enterprise Edition Functionality This feature is available in Abiquo Enterprise Edition |
This action sets the state to the given machine to PROVISIONED. Also sends a power on request to Cisco UCS to start the machine. The machine supplied must be a Physical Machine inside a Cisco UCS. Although it is a put, it expects a null as a body. When successful it will return a 204 (No Content) response. It can also return a 409 (Conflict) if the blade is not associated with a Logic Server in UCS.
Synopsis: PUT http://example.com/api/admin/datacenters/{$datacenterId}/racks/{$rackId}/machines/{$machineId}/action/powerOn
Roles needed: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS (Check out role definitions here)
REQUEST
Request Headers: Accept, Content-Type.
Request Parameters: N/A.
Request Message Body: Machine.
Example Request: Update Machine entity.
% curl --verbose 'http://example.com/api/admin/datacenters/1/racks/1/machines/3/action/powerOn' \ -X PUT \ -H "Content-type:application/xml" \ -H "Accept:application/xml" \ > PUT /api/admin/datacenters/1/racks/1/machines/3 HTTP/1.1 > User-Agent: curl/7.19.5 (i486-pc-linux-gnu) libcurl/7.19.5 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15 > Host: example.com > Content-type:application/xml > Accept:application/xml >
RESPONSE
Response Headers: Content-Length, Content-Type.
Response Message Body: N/A.
Response Status: 204, 400, 401, 403, 409.
< HTTP/1.1 204 No Content < Server: Apache-Coyote/1.1 < Content-Type: application/xml < Content-Length: 0 <

