Abiquo 2.6


Skip to end of metadata
Go to start of metadata

Machines Resource

Exposed Resources Hierarchy
Machines Resource

Contents:

This resource allows you to manage physical machines in the cloud infrastructure.

Main URI of the Resource

This class operates mainly over the Resource URI: /admin/datacenters/{datacenter}/racks/{rack}/machines

Exposed Methods

Retrieve a list of machines

Returns all physical machines from a rack

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS
Request Headers: Accept: application/vnd.abiquo.machines+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

filter

false

 

filter

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Machines Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a list of machines example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines -X GET -H "accept:application/vnd.abiquo.machines+xml;version=2.4"

> GET /api/admin/datacenters/1/racks/1/machines HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.machines+xml
 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTYzNDM5OTEyMTpkNDRlYjI0NzEyMTQzYjU2MjE2MzA2MTkzZTBlYjVmODpBQklRVU8; Expires=Thu, 31-Jan-2013 12:13:19 GMT; Path=/api
< Set-Cookie: JSESSIONID=55340F92C47D6232C8FCF728EEECBC2E; Path=/api
< Content-Type: application/vnd.abiquo.machines+xml
< Content-Length: 3145
< Date: Thu, 31 Jan 2013 11:43:19 GMT
 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machines>
    <machine>
        <link rel="checkipmi" href="http://example.com/api/admin/datacenters/1/racks/1/machines/1/action/checkipmi"/>
        <link rel="checkipmistate" type="application/vnd.abiquo.machineipmistate+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/1/action/checkipmistate"/>
        <link rel="checkstate" type="application/vnd.abiquo.machinestate+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/1/action/checkstate"/>
        <link rel="datastores" type="application/vnd.abiquo.datastores+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/1/datastores"/>
        <link rel="edit" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/1"/>
        <link rel="rack" type="application/vnd.abiquo.rack+xml" href="http://example.com/api/admin/datacenters/1/racks/1"/>
        <link rel="reenableafterha" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/1/action/reenableafterha"/>
        <link rel="refreshnics" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/1/action/nics/refresh"/>
        <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/1/action/sendmail"/>
        <link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/1/virtualmachines"/>
        <id>1</id>
        <name>kvm</name>
        <description>kvm</description>
        <state>MANAGED</state>
        <type>KVM</type>
        <ip>10.60.1.62</ip>
        <ipService>10.60.1.62</ipService>
        <port>8889</port>
        <ram>497</ram>
        <ramUsed>0</ramUsed>
        <cpu>2</cpu>
        <cpuUsed>0</cpuUsed>
        <initiatorIQN>iqn.1994-05.com.redhat:8e729755888</initiatorIQN>
        <ipmiIP></ipmiIP>
        <ipmiPort>0</ipmiPort>
        <ipmiUser></ipmiUser>
        <ipmiPassword></ipmiPassword>
        <datastores>
            <datastore>
                <id>1</id>
                <name>/dev/mapper/VolGroup00-LogVol00</name>
                <rootPath>/</rootPath>
                <directory></directory>
                <size>4030406656</size>
                <usedSize>1061359616</usedSize>
                <enabled>false</enabled>
                <datastoreUUID>c0209ca2-96eb-4fca-a845-4961c5c28e5f</datastoreUUID>
            </datastore>
            <datastore>
                <id>2</id>
                <name>10.60.1.104:/volume1/nfs-devel</name>
                <rootPath>/opt/vm_repository</rootPath>
                <directory></directory>
                <size>7856958996480</size>
                <usedSize>3251171753984</usedSize>
                <enabled>false</enabled>
                <datastoreUUID>d04745d7-b002-4499-82da-c3aa49d35803</datastoreUUID>
            </datastore>
        </datastores>
        <networkInterfaces>
            <networkinterface>
                <name>eth0.2</name>
                <mac>08:00:27:74:f0:4a</mac>
            </networkinterface>
            <networkinterface>
                <name>abiquo_2</name>
                <mac>08:00:27:74:f0:4a</mac>
            </networkinterface>
            <networkinterface>
                <name>virbr0.2</name>
                <mac>00:00:00:00:00:00</mac>
            </networkinterface>
            <networkinterface>
                <name>virbr0</name>
                <mac>00:00:00:00:00:00</mac>
            </networkinterface>
            <networkinterface>
                <link rel="networkservicetype" type="application/vnd.abiquo.networkservicetype+xml" href="http://example.com/api/admin/datacenters/1/networkservicetypes/1"/>
                <name>eth0</name>
                <mac>08:00:27:74:f0:4a</mac>
            </networkinterface>
        </networkInterfaces>
    </machine>
</machines>

Create a machine

The best way to create a machine is to call the Retrieve remote machine information of the DatacenterResourceDatacenterResource#Retrieve remote machine information to get all the properties of the machine.

After you retrieve the virtual machine definition in XML format, edit this definition to enable a network interface and datastore(s).

Given the following example machine.xml retrieved from the DatacenterResource. 

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machine>
    <datastores>
        <datastore>
            <datastoreUUID>4f1097e7-94ca-42a9-8c13-1c8918508248</datastoreUUID>
            <directory></directory>
            <enabled>false</enabled>
            <name>datastore1</name>
            <rootPath>datastore1</rootPath>
            <size>67914170368</size>
            <usedSize>50602180608</usedSize>
        </datastore>
    </datastores>
    <description>bc2blade6.bcn.abiquo.com.</description>
    <initiatorIQN>iqn.1998-01.com.vmware:bc2blade6-0880960b</initiatorIQN>
    <ip>192.168.2.56</ip>
    <ipService>192.168.2.56</ipService>
    <name>bc2blade6.bcn.abiquo.com.</name>
    <networkInterfaces>
        <networkinterface>
            <mac>00:15:c5:ff:1b:8a</mac>
            <name>vSwitch0</name>
        </networkinterface>
        <networkinterface>
            <mac>00:15:c5:ff:1b:8c</mac>
            <name>vSwitch1</name>
        </networkinterface>
    </networkInterfaces>
    <port>8889</port>
    <state>MANAGED</state>
    <type>VMX_04</type>
    <cpu>8</cpu>
    <cpuUsed>0</cpuUsed>
    <ram>8191</ram>
    <ramUsed>0</ramUsed>
</machine>

Enable at least one network interface and datastore to create a virtual machine.

To enable at least one network interface:

To enable at least one datastore:

  • All of the datastores start with <enabled> tag set to false
  • Edit one and set enabled to true before creating the machine
    • <enabled>true</enabled>

Add the hypervisor credentials if necessary

  • <user>myUser</user>
  • <password>myPassword</password>

After you make these modifications, the XML file would be something like this.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machine>
    <user>root</user>
    <password>temporal</password>
    <datastores>
        <datastore>
            <datastoreUUID>4f1097e7-94ca-42a9-8c13-1c8918508248</datastoreUUID>
            <directory></directory>
            <enabled>true</enabled>
            <name>datastore1</name>
            <rootPath>datastore1</rootPath>
            <size>67914170368</size>
            <usedSize>50602180608</usedSize>
        </datastore>
    </datastores>
    <description>bc2blade6.bcn.abiquo.com.</description>
    <initiatorIQN>iqn.1998-01.com.vmware:bc2blade6-0880960b</initiatorIQN>
    <ip>192.168.2.56</ip>
    <ipService>192.168.2.56</ipService>
    <name>bc2blade6.bcn.abiquo.com.</name>
    <networkInterfaces>
        <networkinterface>
            <mac>00:15:c5:ff:1b:8a</mac>
            <name>vSwitch0</name>
        </networkinterface>
        <networkinterface>
            <link rel="networkservicetype" type="application/vnd.abiquo.networkservicetype+xml" href="http://10.60.13.4:80/api/admin/datacenters/1/networkservicetypes/1"/>
            <mac>00:15:c5:ff:1b:8c</mac>
            <name>vSwitch1</name>
        </networkinterface>
    </networkInterfaces>
    <port>8889</port>
    <state>MANAGED</state>
    <type>VMX_04</type>
    <cpu>8</cpu>
    <cpuUsed>0</cpuUsed>
    <ram>8191</ram>
    <ramUsed>0</ramUsed>
</machine>

 

Synopsis: POST http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: application/vnd.abiquo.machine+xml; version=2.4; Content-type: application/vnd.abiquo.machine+xml; version=2.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: Machine Media Type
Response Message Body Entity: Machine Media Type
Request Example:

 Click here to show or hide the request example
Create a machine example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines -X POST -H "accept:application/vnd.abiquo.machine+xml;version=2.4" -H "content-type:application/vnd.abiquo.machine+xml;version=2.4" -d @dtos/machine-creation.xml

> POST /api/admin/datacenters/1/racks/1/machines HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.machine+xml
> content-type:application/vnd.abiquo.machine+xml
> Content-Length: 2112

< HTTP/1.1 201 Creado
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTY0Mjc5OTE5Mjo4MWM4ZDZkOWM1OTNkOGIxYmI3M2VlNTkzOTQyNzQyNDpBQklRVU8; Expires=Thu, 31-Jan-2013 14:33:19 GMT; Path=/api
< Location: http://example.com/api/admin/datacenters/1/racks/1/machines/4
< Set-Cookie: JSESSIONID=4EA8CE4B4D7BA9E6FBE9192ECF9D1C1A; Path=/api
< Content-Type: application/vnd.abiquo.machine+xml
< Content-Length: 3102
< Date: Thu, 31 Jan 2013 14:03:20 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machine>
    <link rel="rack" type="application/vnd.abiquo.rack+xml" href="http://example.com/api/admin/datacenters/1/racks/1"/>
    <link rel="edit" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/4"/>
    <link rel="datastores" type="application/vnd.abiquo.datastores+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/4/datastores"/>
    <link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/4/virtualmachines"/>
    <link rel="checkstate" type="application/vnd.abiquo.machinestate+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/4/action/checkstate"/>
    <link rel="reenableafterha" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/4/action/reenableafterha"/>
    <link rel="checkipmi" href="http://example.com/api/admin/datacenters/1/racks/1/machines/4/action/checkipmi"/>
    <link rel="checkipmistate" type="application/vnd.abiquo.machineipmistate+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/4/action/checkipmistate"/>
    <link rel="refreshnics" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/4/action/nics/refresh"/>
    <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/4/action/sendmail"/>
    <id>4</id>
    <name>kvm</name>
    <description>kvm</description>
    <state>MANAGED</state>
    <type>KVM</type>
    <ip>10.60.1.62</ip>
    <ipService>10.60.1.62</ipService>
    <port>8889</port>
    <ram>497</ram>
    <ramUsed>0</ramUsed>
    <cpu>2</cpu>
    <cpuUsed>0</cpuUsed>
    <initiatorIQN>iqn.1994-05.com.redhat:8e729755888</initiatorIQN>
    <ipmiIP></ipmiIP>
    <ipmiPort>0</ipmiPort>
    <ipmiUser></ipmiUser>
    <ipmiPassword></ipmiPassword>
    <datastores>
        <datastore>
            <id>7</id>
            <name>/dev/mapper/VolGroup00-LogVol00</name>
            <rootPath>/</rootPath>
            <directory></directory>
            <size>4030406656</size>
            <usedSize>0</usedSize>
            <enabled>true</enabled>
            <datastoreUUID>c0209ca2-96eb-4fca-a845-4961c5c28e5f</datastoreUUID>
        </datastore>
        <datastore>
            <id>8</id>
            <name>10.60.1.104:/volume1/nfs-devel</name>
            <rootPath>/opt/vm_repository</rootPath>
            <directory><directory>
            <size>7856958996480</size>
            <usedSize>0</usedSize>
            <enabled>false</enabled>
            <datastoreUUID>d04745d7-b002-4499-82da-c3aa49d35803</datastoreUUID>
        </datastore>
    </datastores>
    <networkInterfaces>
        <networkinterface>
            <name>eth0.2</name>
            <mac>08:00:27:74:f0:4a</mac>
        </networkinterface>
        <networkinterface>
            <name>abiquo_2</name>
            <mac>08:00:27:74:f0:4a</mac>
        </networkinterface>
        <networkinterface>
            <name>virbr0.2</name>
            <mac>00:00:00:00:00:00</mac>
        </networkinterface>
        <networkinterface>
            <name>virbr0</name>
            <mac>00:00:00:00:00:00</mac>
        </networkinterface>
        <networkinterface>
            <link rel="networkservicetype" type="application/vnd.abiquo.networkservicetype+xml" href="http://example.com/api/admin/datacenters/1/networkservicetypes/1"/>
            <name>eth0</name>
            <mac>08:00:27:74:f0:4a</mac>
        </networkinterface>
    </networkInterfaces>
</machine>


Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Create multiple machines

This functionality enables you to add multiple physical machines that will be discovered by the discovery manager. Is important to know that the datastore with most free space will be enabled automatically for each discovered physical machine. This feature cannot be executed if the machine belongs to a UCS Rack. Machines in a UCS Rack (See UcsRack Data Model) 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/{datacenter}/racks/{rack}/machines
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: application/vnd.abiquo.machines+xml; version=2.4; Content-type: application/vnd.abiquo.multiplemachines+xml; version=2.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: MachinesToCreate Media Type
Response Message Body Entity: Machines Media Type
Request Example:

 Click here to show or hide the request example
Create multiple machines example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines -X POST -H "accept:application/vnd.abiquo.machines+xml;version=2.4" -H "content-type:application/vnd.abiquo.multiplemachines+xml;version=2.4" -d @dtos/multiplemachines-creation.xml

> POST /api/admin/datacenters/1/racks/1/machines HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.machines+xml
> content-type:application/vnd.abiquo.multiplemachines+xml
> Content-Length: 282

< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTY0NTkyODczNTo1YWIyZWM4MTMxZTZlZTIwOTkxNGI0YjAzMTQ1MTZmNzpBQklRVU8; Expires=Thu, 31-Jan-2013 15:25:28 GMT; Path=/api
< Set-Cookie: JSESSIONID=8E31DCBB7A2F4A31373EAACCDC117F95; Path=/api
< Content-Type: application/vnd.abiquo.machines+xml
< Content-Length: 3056
< Date: Thu, 31 Jan 2013 14:55:49 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machines>
    <machine>
        <link rel="rack" type="application/vnd.abiquo.rack+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1"/>
        <link rel="edit" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5"/>
        <link rel="datastores" type="application/vnd.abiquo.datastores+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/datastores"/>
        <link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/virtualmachines"/>
        <link rel="checkstate" type="application/vnd.abiquo.machinestate+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/checkstate"/>
        <link rel="reenableafterha" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/reenableafterha"/>
        <link rel="checkipmi" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/checkipmi"/>
        <link rel="checkipmistate" type="application/vnd.abiquo.machineipmistate+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/checkipmistate"/>
        <link rel="refreshnics" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/nics/refresh"/>
        <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/sendmail"/>
        <id>5</id>
        <name>kvm</name>
        <description>kvm</description>
        <state>MANAGED</state>
        <type>KVM</type>
        <ip>10.60.1.62</ip>
        <ipService>10.60.1.62</ipService>
        <port>8889</port>
        <ram>497</ram>
        <ramUsed>0</ramUsed>
        <cpu>2</cpu>
        <cpuUsed>0</cpuUsed>
        <initiatorIQN>iqn.1994-05.com.redhat:8e729755888</initiatorIQN>
        <datastores>
            <datastore>
                <id>9</id>
                <name>/dev/mapper/VolGroup00-LogVol00</name>
                <rootPath>/</rootPath>
                <directory></directory>
                <size>4030406656</size>
                <usedSize>1061404672</usedSize>
                <enabled>false</enabled>
                <datastoreUUID>c0209ca2-96eb-4fca-a845-4961c5c28e5f</datastoreUUID>
            </datastore>
            <datastore>
                <id>10</id>
                <name>10.60.1.104:/volume1/nfs-devel</name>
                <rootPath>/opt/vm_repository</rootPath>
                <directory></directory>
                <size>7856958996480</size>
                <usedSize>3251287097344</usedSize>
                <enabled>true</enabled>
                <datastoreUUID>d04745d7-b002-4499-82da-c3aa49d35803</datastoreUUID>
            </datastore>
        </datastores>
        <networkInterfaces>
            <networkinterface>
                <link rel="networkservicetype" type="application/vnd.abiquo.networkservicetype+xml" href="http://example.com:80/api/admin/datacenters/1/networkservicetypes/1"/>
                <name>eth0</name>
                <mac>08:00:27:74:f0:4a</mac>
            </networkinterface>
            <networkinterface>
                <name>eth0.2</name>
                <mac>08:00:27:74:f0:4a</mac>
            </networkinterface>
            <networkinterface>
                <name>abiquo_2</name>
                <mac>08:00:27:74:f0:4a</mac>
            </networkinterface>
            <networkinterface>
                <name>virbr0</name>
                <mac>00:00:00:00:00:00</mac>
            </networkinterface>
            <networkinterface>
                <name>virbr0.2</name>
                <mac>00:00:00:00:00:00</mac>
            </networkinterface>
        </networkInterfaces>
    </machine>
</machines>


Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Refresh machines

Refeshes the list of physical machines on a managed rack (UCS) using hypervisor-specific data. This will add to the database all machines discovered on a managed rack.

Synopsis: PUT http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: application/vnd.abiquo.machines+xml; version=2.4; Content-type: application/vnd.abiquo.hypervisordiscovery+xml; version=2.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: HypervisorDiscovery Media Type
Response Message Body Entity: Machines Media Type
Request Example:

 Click here to show or hide the request example
Refresh machines example
curl --verbose -X GET -u user:password -H 'Content-type: application/vnd.abiquo.hypervisordiscovery+xml; version=2.4' -H 'Accept: application/vnd.abiquo.machines+xml; version=2.4' -d '<hypervisor><port>80</port><ipFrom>10.60.1.62</ipFrom><ipTo>10.60.1.64</ipTo><type>VMX_04</type><user>username</user><password>password</password><vSwitch>vSwitch0</vSwitch></hypervisor>' 'http://example.com/api/admin/datacenters/1/racks/1/machines/'

> POST /api/admin/datacenters/1/racks/1/machines HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.machines+xml
> content-type:application/vnd.abiquo.hypervisordiscovery+xml
> Content-Length: 2112

< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTY0NTkyODczNTo1YWIyZWM4MTMxZTZlZTIwOTkxNGI0YjAzMTQ1MTZmNzpBQklRVU8; Expires=Thu, 31-Jan-2013 15:25:28 GMT; Path=/api
< Set-Cookie: JSESSIONID=8E31DCBB7A2F4A31373EAACCDC117F95; Path=/api
< Content-Type: application/vnd.abiquo.machines+xml
< Content-Length: 3056
< Date: Thu, 31 Jan 2013 14:55:49 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machines>
    <machine>
        <link rel="rack" type="application/vnd.abiquo.rack+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1"/>
        <link rel="edit" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5"/>
        <link rel="datastores" type="application/vnd.abiquo.datastores+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/datastores"/>
        <link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/virtualmachines"/>
        <link rel="checkstate" type="application/vnd.abiquo.machinestate+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/checkstate"/>
        <link rel="reenableafterha" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/reenableafterha"/>
        <link rel="checkipmi" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/checkipmi"/>
        <link rel="checkipmistate" type="application/vnd.abiquo.machineipmistate+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/checkipmistate"/>
        <link rel="refreshnics" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/nics/refresh"/>
        <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/sendmail"/>
        <id>5</id>
        <name>kvm</name>
        <description>kvm</description>
        <state>MANAGED</state>
        <type>KVM</type>
        <ip>10.60.1.62</ip>
        <ipService>10.60.1.62</ipService>
        <port>8889</port>
        <ram>497</ram>
        <ramUsed>0</ramUsed>
        <cpu>2</cpu>
        <cpuUsed>0</cpuUsed>
        <initiatorIQN>iqn.1994-05.com.redhat:8e729755888</initiatorIQN>
        <datastores>
            <datastore>
                <id>9</id>
                <name>/dev/mapper/VolGroup00-LogVol00</name>
                <rootPath>/</rootPath>
                <directory></directory>
                <size>4030406656</size>
                <usedSize>1061404672</usedSize>
                <enabled>false</enabled>
                <datastoreUUID>c0209ca2-96eb-4fca-a845-4961c5c28e5f</datastoreUUID>
            </datastore>
            <datastore>
                <id>10</id>
                <name>10.60.1.104:/volume1/nfs-devel</name>
                <rootPath>/opt/vm_repository</rootPath>
                <directory></directory>
                <size>7856958996480</size>
                <usedSize>3251287097344</usedSize>
                <enabled>true</enabled>
                <datastoreUUID>d04745d7-b002-4499-82da-c3aa49d35803</datastoreUUID>
            </datastore>
        </datastores>
        <networkInterfaces>
            <networkinterface>
                <link rel="networkservicetype" type="application/vnd.abiquo.networkservicetype+xml" href="http://example.com:80/api/admin/datacenters/1/networkservicetypes/1"/>
                <name>eth0</name>
                <mac>08:00:27:74:f0:4a</mac>
            </networkinterface>
            <networkinterface>
                <name>eth0.2</name>
                <mac>08:00:27:74:f0:4a</mac>
            </networkinterface>
            <networkinterface>
                <name>abiquo_2</name>
                <mac>08:00:27:74:f0:4a</mac>
            </networkinterface>
            <networkinterface>
                <name>virbr0</name>
                <mac>00:00:00:00:00:00</mac>
            </networkinterface>
            <networkinterface>
                <name>virbr0.2</name>
                <mac>00:00:00:00:00:00</mac>
            </networkinterface>
        </networkInterfaces>
    </machine>
</machines>


Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Refresh remote machines

Refeshes the list of physical machines on a managed rack (UCS) for any hpervisor. This will add to the database all machines discovered from a managed rack.

Synopsis: PUT http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: application/vnd.abiquo.machines+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Machines Media Type
Request Example:

 Click here to show or hide the request example
Refresh remote machines example
curl --verbose -X GET -u user:password -H 'Accept: application/vnd.abiquo.machines+xml; version=2.4' 'http://example.com/api/admin/datacenters/1/racks/1/machines'

> POST /api/admin/datacenters/1/racks/1/machines HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.machines+xml
> Content-Length: 2112

< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTY0NTkyODczNTo1YWIyZWM4MTMxZTZlZTIwOTkxNGI0YjAzMTQ1MTZmNzpBQklRVU8; Expires=Thu, 31-Jan-2013 15:25:28 GMT; Path=/api
< Set-Cookie: JSESSIONID=8E31DCBB7A2F4A31373EAACCDC117F95; Path=/api
< Content-Type: application/vnd.abiquo.machines+xml
< Content-Length: 3056
< Date: Thu, 31 Jan 2013 14:55:49 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machines>
    <machine>
        <link rel="rack" type="application/vnd.abiquo.rack+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1"/>
        <link rel="edit" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5"/>
        <link rel="datastores" type="application/vnd.abiquo.datastores+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/datastores"/>
        <link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/virtualmachines"/>
        <link rel="checkstate" type="application/vnd.abiquo.machinestate+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/checkstate"/>
        <link rel="reenableafterha" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/reenableafterha"/>
        <link rel="checkipmi" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/checkipmi"/>
        <link rel="checkipmistate" type="application/vnd.abiquo.machineipmistate+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/checkipmistate"/>
        <link rel="refreshnics" type="application/vnd.abiquo.machine+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/nics/refresh"/>
        <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com:80/api/admin/datacenters/1/racks/1/machines/5/action/sendmail"/>
        <id>5</id>
        <name>kvm</name>
        <description>kvm</description>
        <state>MANAGED</state>
        <type>KVM</type>
        <ip>10.60.1.62</ip>
        <ipService>10.60.1.62</ipService>
        <port>8889</port>
        <ram>497</ram>
        <ramUsed>0</ramUsed>
        <cpu>2</cpu>
        <cpuUsed>0</cpuUsed>
        <initiatorIQN>iqn.1994-05.com.redhat:8e729755888</initiatorIQN>
        <datastores>
            <datastore>
                <id>9</id>
                <name>/dev/mapper/VolGroup00-LogVol00</name>
                <rootPath>/</rootPath>
                <directory></directory>
                <size>4030406656</size>
                <usedSize>1061404672</usedSize>
                <enabled>false</enabled>
                <datastoreUUID>c0209ca2-96eb-4fca-a845-4961c5c28e5f</datastoreUUID>
            </datastore>
            <datastore>
                <id>10</id>
                <name>10.60.1.104:/volume1/nfs-devel</name>
                <rootPath>/opt/vm_repository</rootPath>
                <directory></directory>
                <size>7856958996480</size>
                <usedSize>3251287097344</usedSize>
                <enabled>true</enabled>
                <datastoreUUID>d04745d7-b002-4499-82da-c3aa49d35803</datastoreUUID>
            </datastore>
        </datastores>
        <networkInterfaces>
            <networkinterface>
                <link rel="networkservicetype" type="application/vnd.abiquo.networkservicetype+xml" href="http://example.com:80/api/admin/datacenters/1/networkservicetypes/1"/>
                <name>eth0</name>
                <mac>08:00:27:74:f0:4a</mac>
            </networkinterface>
            <networkinterface>
                <name>eth0.2</name>
                <mac>08:00:27:74:f0:4a</mac>
            </networkinterface>
            <networkinterface>
                <name>abiquo_2</name>
                <mac>08:00:27:74:f0:4a</mac>
            </networkinterface>
            <networkinterface>
                <name>virbr0</name>
                <mac>00:00:00:00:00:00</mac>
            </networkinterface>
            <networkinterface>
                <name>virbr0.2</name>
                <mac>00:00:00:00:00:00</mac>
            </networkinterface>
        </networkInterfaces>
    </machine>
</machines>


Retrieves logic server associated with a machine in a Cisco UCS

Retrieves the logic server.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/logicserver
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS
Request Headers: Accept: application/vnd.abiquo.logicserver+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: LogicServer Media Type
Request Example:

 Click here to show or hide the request example

 

curl --verbose -X POST -u user:password -H 'Accept: application/vnd.abiquo.logicserver+xml' http://example.com/api/admin/datacenters/1/racks/1/machines/4/action/logicserver

> POST /api/admin/datacenters/1/racks/1/machines/4/action/logicserver HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.logicserver+xml

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTY1MDU1OTYxMjpjOTA4YTI4MjFkNmE4NjFlNjA1NDA5YmM4MDkzYzk2NzpBQklRVU8; Expires=Thu, 31-Jan-2013 16:42:39 GMT; Path=/api
< Set-Cookie: JSESSIONID=BAFE24E484DF29B3BCF675428F4E9848; Path=/api
< Content-Type: application/vnd.abiquo.logicserver+xml;version=2.4
< Content-Length: 3044
< Date: Thu, 31 Jan 2013 16:12:40 GMT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<logicServer>
<name>org/ls-1</name>
<type>instance</type>
<associated>true</associated>
<associatedTo>org/machine</associatedTo>
<description>Logic server 1</description>
<policies />
</logicServer>

Retrieve a machine

Returns an existing physical machine.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS
Request Headers: Accept: application/vnd.abiquo.machine+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

credentials

false

 

boolean to indicate if the machine credentials will be returned

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Machine Media Type
Request Example:

 Click here to show or hide the request example
Retrieve a machine example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/5 -X GET -H "accept:application/vnd.abiquo.machine+xml;version=2.4" | xmlindent -nbe -f

> GET /api/admin/datacenters/1/racks/1/machines/5 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.machine+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTY0ODY1Mjc3Nzo4ZTRkOTI5ZTllNTQ4YWQ4YmI5NTgxY2E4YmQ5ZmI1YzpBQklRVU8; Expires=Thu, 31-Jan-2013 16:10:52 GMT; Path=/api
< Set-Cookie: JSESSIONID=DAE9DF388C8D09C227C92BBE0F6DC889; Path=/api
< Content-Type: application/vnd.abiquo.machine+xml;version=2.4
< Content-Length: 3035
< Date: Thu, 31 Jan 2013 15:40:52 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machine>
    <link rel="checkipmi" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/checkipmi"/>
    <link rel="checkipmistate" type="application/vnd.abiquo.machineipmistate+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/checkipmistate"/>
    <link rel="checkstate" type="application/vnd.abiquo.machinestate+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/checkstate"/>
    <link rel="datastores" type="application/vnd.abiquo.datastores+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/datastores"/>
    <link rel="edit" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5"/>
    <link rel="rack" type="application/vnd.abiquo.rack+xml" href="http://example.com/api/admin/datacenters/1/racks/1"/>
    <link rel="reenableafterha" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/reenableafterha"/>
    <link rel="refreshnics" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/nics/refresh"/>
    <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/sendmail"/>
    <link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/virtualmachines"/>
    <id>5</id>
    <name>kvm</name>
    <description>kvm</description>
    <state>MANAGED</state>
    <type>KVM</type>
    <ip>10.60.1.62</ip>
    <ipService>10.60.1.62</ipService>
    <port>8889</port>
    <ram>497</ram>
    <ramUsed>0</ramUsed>
    <cpu>2</cpu>
    <cpuUsed>0</cpuUsed>
    <initiatorIQN>iqn.1994-05.com.redhat:8e729755888</initiatorIQN>
    <datastores>
        <datastore>
            <id>9</id>
            <name>/dev/mapper/VolGroup00-LogVol00</name>
            <rootPath>/</rootPath>
            <directory></directory>
            <size>4030406656</size>
            <usedSize>1061416960</usedSize>
            <enabled>false</enabled>
            <datastoreUUID>c0209ca2-96eb-4fca-a845-4961c5c28e5f</datastoreUUID>
        </datastore>
        <datastore>
            <id>10</id>
            <name>10.60.1.104:/volume1/nfs-devel</name>
            <rootPath>/opt/vm_repository</rootPath>
            <directory></directory>
            <size>7856958996480</size>
            <usedSize>3251287097344</usedSize>
            <enabled>true</enabled>
            <datastoreUUID>d04745d7-b002-4499-82da-c3aa49d35803</datastoreUUID>
        </datastore>
    </datastores>
    <networkInterfaces>
        <networkinterface>
            <link rel="networkservicetype" type="application/vnd.abiquo.networkservicetype+xml" href="http://example.com/api/admin/datacenters/1/networkservicetypes/1"/>
            <name>eth0</name>
            <mac>08:00:27:74:f0:4a</mac>
        </networkinterface>
        <networkinterface>
            <name>eth0.2</name>
            <mac>08:00:27:74:f0:4a</mac>
        </networkinterface>
        <networkinterface>
            <name>abiquo_2</name>
            <mac>08:00:27:74:f0:4a</mac>
        </networkinterface>
        <networkinterface>
            <name>virbr0</name>
            <mac>00:00:00:00:00:00</mac>
        </networkinterface>
        <networkinterface>
            <name>virbr0.2</name>
            <mac>00:00:00:00:00:00</mac>
        </networkinterface>
    </networkInterfaces>
</machine>


Update a machine

Modifies an existing physical machine.

Synopsis: PUT http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: application/vnd.abiquo.machine+xml; version=2.4; Content-type: application/vnd.abiquo.machine+xml; version=2.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity: Machine Media Type
Response Message Body Entity: Machine Media Type
Request Example:

 Click here to show or hide the request example
Update a machine example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/5 -X PUT -H "accept:application/vnd.abiquo.machine+xml;version=2.4" -H "content-type:application/vnd.abiquo.machine+xml;version=2.4" -d @dtos/machine-modification.xml

> PUT /api/admin/datacenters/1/racks/1/machines/5 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.machine+xml;version=2.4
> content-type:application/vnd.abiquo.machine+xml;version=2.4
> Content-Length: 2078

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTY0OTgxNTgwNjozYjQxYmJjMGQ5MDFlMGFjNmI0YTUyMjc1MDYxMzE3NjpBQklRVU8; Expires=Thu, 31-Jan-2013 16:30:15 GMT; Path=/api
< Set-Cookie: JSESSIONID=8E9575D67D404B964D80F27A31E7F218; Path=/api
< Content-Type: application/vnd.abiquo.machine+xml;version=2.4
< Content-Length: 3044
< Date: Thu, 31 Jan 2013 16:00:16 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machine>
    <link rel="checkipmi" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/checkipmi"/>
    <link rel="checkipmistate" type="application/vnd.abiquo.machineipmistate+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/checkipmistate"/>
    <link rel="checkstate" type="application/vnd.abiquo.machinestate+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/checkstate"/>
    <link rel="datastores" type="application/vnd.abiquo.datastores+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/datastores"/>
    <link rel="edit" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5"/>
    <link rel="rack" type="application/vnd.abiquo.rack+xml" href="http://example.com/api/admin/datacenters/1/racks/1"/>
    <link rel="reenableafterha" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/reenableafterha"/>
    <link rel="refreshnics" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/nics/refresh"/>
    <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/sendmail"/>
    <link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/virtualmachines"/>
    <id>5</id>
    <name>kvm-modified</name>
    <description>kvm</description>
    <state>MANAGED</state>
    <type>KVM</type>
    <ip>10.60.1.62</ip>
    <ipService>10.60.1.62</ipService>
    <port>8889</port>
    <ram>497</ram>
    <ramUsed>0</ramUsed>
    <cpu>2</cpu>
    <cpuUsed>0</cpuUsed>
    <initiatorIQN>iqn.1994-05.com.redhat:8e729755888</initiatorIQN>
    <datastores>
        <datastore>
            <id>9</id>
            <name>/dev/mapper/VolGroup00-LogVol00</name>
            <rootPath>/</rootPath>
            <directory></directory>
            <size>4030406656</size>
            <usedSize>1061425152</usedSize>
            <enabled>false</enabled>
            <datastoreUUID>c0209ca2-96eb-4fca-a845-4961c5c28e5f</datastoreUUID>
        </datastore>
        <datastore>
            <id>10</id>
            <name>10.60.1.104:/volume1/nfs-devel</name>
            <rootPath>/opt/vm_repository</rootPath>
            <directory></directory>
            <size>7856958996480</size>
            <usedSize>3251287097344</usedSize>
            <enabled>true</enabled>
            <datastoreUUID>d04745d7-b002-4499-82da-c3aa49d35803</datastoreUUID>
        </datastore>
    </datastores>
    <networkInterfaces>
        <networkinterface>
            <link rel="networkservicetype" type="application/vnd.abiquo.networkservicetype+xml" href="http://example.com/api/admin/datacenters/1/networkservicetypes/1"/>
            <name>eth0</name>
            <mac>08:00:27:74:f0:4a</mac>
        </networkinterface>
        <networkinterface>
            <name>eth0.2</name>
            <mac>08:00:27:74:f0:4a</mac>
        </networkinterface>
        <networkinterface>
            <name>abiquo_2</name>
            <mac>08:00:27:74:f0:4a</mac>
        </networkinterface>
        <networkinterface>
            <name>virbr0</name>
            <mac>00:00:00:00:00:00</mac>
        </networkinterface>
        <networkinterface>
            <name>virbr0.2</name>
            <mac>00:00:00:00:00:00</mac>
        </networkinterface>
    </networkInterfaces>
</machine>


Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Delete a machine

Deletion of a physical machine with virtual machines deployed on it will cause the virtual machines to become unallocated. If the same physical machine is added again, the virtual machines could be synchronized with the import virtual machines feature. See

Synopsis: DELETE http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: ; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity:
Request Example:

 Click here to show or hide the request example
Delete a machine example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/5 -X DELETE

> DELETE /api/admin/datacenters/1/racks/1/machines/5 HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> Accept: */*
 
< HTTP/1.1 204 Sin Contenido


Reenable physical machine

Manually enables a physical machine again after HA processes disabled it.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}//action/reenableafterha
Roles Required:
Request Headers: Accept: application/vnd.abiquo.machine+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Machine Media Type
Request Example:

 Click here to show or hide the request example
Reenable physical machine example
 curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/reenableafterha -X GET -H "accept:application/vnd.abiquo.machine+xml;version=2.4" -d @dtos/machine-modification.xml

> GET /api/admin/datacenters/1/racks/1/machines/5/action/reenableafterha HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.machine+xml;version=2.4
> Content-Length: 2078
> Content-Type: application/x-www-form-urlencoded

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTY1MDU1OTYxMjpjOTA4YTI4MjFkNmE4NjFlNjA1NDA5YmM4MDkzYzk2NzpBQklRVU8; Expires=Thu, 31-Jan-2013 16:42:39 GMT; Path=/api
< Set-Cookie: JSESSIONID=BAFE24E484DF29B3BCF675428F4E9848; Path=/api
< Content-Type: application/vnd.abiquo.machine+xml;version=2.4
< Content-Length: 3044
< Date: Thu, 31 Jan 2013 16:12:40 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machine>
    <link rel="checkipmi" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/checkipmi"/>
    <link rel="checkipmistate" type="application/vnd.abiquo.machineipmistate+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/checkipmistate"/>
    <link rel="checkstate" type="application/vnd.abiquo.machinestate+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/checkstate"/>
    <link rel="datastores" type="application/vnd.abiquo.datastores+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/datastores"/>
    <link rel="edit" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5"/>
    <link rel="rack" type="application/vnd.abiquo.rack+xml" href="http://example.com/api/admin/datacenters/1/racks/1"/>
    <link rel="reenableafterha" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/reenableafterha"/>
    <link rel="refreshnics" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/nics/refresh"/>
    <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/sendmail"/>
    <link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/virtualmachines"/>
    <id>5</id>
    <name>kvm-modified</name>
    <description>kvm</description>
    <state>MANAGED</state>
    <type>KVM</type>
    <ip>10.60.1.62</ip>
    <ipService>10.60.1.62</ipService>
    <port>8889</port>
    <ram>497</ram>
    <ramUsed>0</ramUsed>
    <cpu>2</cpu>
    <cpuUsed>0</cpuUsed>
    <initiatorIQN>iqn.1994-05.com.redhat:8e729755888</initiatorIQN>
    <datastores>
        <datastore>
            <id>9</id>
            <name>/dev/mapper/VolGroup00-LogVol00</name>
            <rootPath>/</rootPath>
            <directory></directory>
            <size>4030406656</size>
            <usedSize>1061425152</usedSize>
            <enabled>false</enabled>
            <datastoreUUID>c0209ca2-96eb-4fca-a845-4961c5c28e5f</datastoreUUID>
        </datastore>
        <datastore>
            <id>10</id>
            <name>10.60.1.104:/volume1/nfs-devel</name>
            <rootPath>/opt/vm_repository</rootPath>
            <directory></directory>
            <size>7856958996480</size>
            <usedSize>3251287097344</usedSize>
            <enabled>true</enabled>
            <datastoreUUID>d04745d7-b002-4499-82da-c3aa49d35803</datastoreUUID>
        </datastore>
    </datastores>
    <networkInterfaces>
        <networkinterface>
            <link rel="networkservicetype" type="application/vnd.abiquo.networkservicetype+xml" href="http://example.com/api/admin/datacenters/1/networkservicetypes/1"/>
            <name>eth0</name>
            <mac>08:00:27:74:f0:4a</mac>
        </networkinterface>
        <networkinterface>
            <name>eth0.2</name>
            <mac>08:00:27:74:f0:4a</mac>
        </networkinterface>
        <networkinterface>
            <name>abiquo_2</name>
            <mac>08:00:27:74:f0:4a</mac>
        </networkinterface>
        <networkinterface>
            <name>virbr0</name>
            <mac>00:00:00:00:00:00</mac>
        </networkinterface>
        <networkinterface>
            <name>virbr0.2</name>
            <mac>00:00:00:00:00:00</mac>
        </networkinterface>
    </networkInterfaces>
</machine>


Power off an existing machine in Cisco UCS

Changes the operPower state to down. Actually turns the blade associated with the given logic server (LS) off. The machine must belong to a UCS Rack {@see UcsRack} otherwise an error with a code 400 (Bad Request) is thrown. The blade must belong to a logic server (the power off is an operation performed on a LS), otherwise an error with code 409 (Conflict) is thrown. This action sets the state of a given machine to STOPPED. Also sends a stop request to Cisco UCS to shut down the machine. The given machine must be a Physical Machine inside a Cisco UCS. Although it is a put, it expects a null body. When successful, it will return a 204 (No Content) response. It will return a 409 (Conflict) if the blade is not associated with a Logic Server in the UCS.

Synopsis: PUT http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/action/poweroff
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: ; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity:
Request Example:

 Click here to show or hide the request example

 

curl --verbose -X POST -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/4/action/poweroff

> POST /api/admin/datacenters/1/racks/1/machines/4/action/poweroff HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:*/*

< HTTP/1.1 204 No Content

Power on an existing machine in Cisco UCS

Changes the operPower state to up. Actually turns the blade associated with the given logic server on. The machine must belong to a UCS Rack {@see UcsRack} otherwise an error with a code 400 (Bad Request) is thrown. The blade must belong to a Logic Server (the power on is an operation performed on an LS) otherwise an error with code 409 (Conflict) is thrown.

Synopsis: PUT http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/action/poweron
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS
Request Headers: Accept: ; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity:
Request Example:

 Click here to show or hide the request example
Power on an existing machine in Cisco UCS example
curl --verbose -X POST -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/4/action/poweron
> POST /api/admin/datacenters/1/racks/1/machines/4/action/poweron HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:*/*


< HTTP/1.1 204 No Content


Light on the locator LED of an existing machine in Cisco UCS

Changes the LED status to down. Actually turns blade LED on. The machine must belong to a UCS Rack {@see UcsRack}, otherwise an error with a code 400 (Bad Request) is thrown. The blade must belong to a Logic Server (the LED power on is an operation performed on an LS) otherwise an error with code 409 (Conflict) is thrown.

Synopsis: POST http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}//action/ledon
Roles Required:
Request Headers: Accept: ; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity:
Request Example:

 Click here to show or hide the request example
Light on the locator LED of an existing machine in Cisco UCS example
curl --verbose -X POST -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/4/action/ledon
> POST /api/admin/datacenters/1/racks/1/machines/4/action/ledon HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:*/*


< HTTP/1.1 204 No Content




Light off the locator LED of an existing machine in a Cisco UCS

Changes the LED status to up. Actually turns blade LED off. The machine must belong to a UCS Rack, otherwise an error with a code 400 (Bad Request) is thrown. The blade must belong to a Logic Server (the LED power off is an operation performed on an LS) otherwise an error with code 409 (Conflict) is thrown.

Synopsis: POST http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}//action/ledoff
Roles Required:
Request Headers: Accept: ; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity:
Request Example:

 Click here to show or hide the request example

 

curl --verbose -X POST -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/4/action/ledoff

> POST /api/admin/datacenters/1/racks/1/machines/4/action/ledoff HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:*/*

< HTTP/1.1 204 No Content

Retrieve the locator LED of the blade

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}/led
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS
Request Headers: Accept: application/vnd.abiquo.bladelocatorled+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: BladeLocatorLed Media Type
Request Example:

 Click here to show or hide the request example

 

curl --verbose -X POST -u user:password -H 'Accept: application/vnd.abiquo.bladelocatorled+xml' http://example.com/api/admin/datacenters/1/racks/1/machines/4/action/led

> POST /api/admin/datacenters/1/racks/1/machines/4/action/led HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.bladelocatorled+xml

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTY1MDU1OTYxMjpjOTA4YTI4MjFkNmE4NjFlNjA1NDA5YmM4MDkzYzk2NzpBQklRVU8; Expires=Thu, 31-Jan-2013 16:42:39 GMT; Path=/api
< Set-Cookie: JSESSIONID=BAFE24E484DF29B3BCF675428F4E9848; Path=/api
< Content-Type: application/vnd.abiquo.logicserver+xml;version=2.4
< Content-Length: 3044
< Date: Thu, 31 Jan 2013 16:12:40 GMT
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bladeLocatorLed>
<dn>org/led-1</dn>
<adminStatus>ON</adminStatus>
<color>White</color>
<bladeDn>org/rack/server</bladeDn>

</bladeLocatorLed>

Send mail

Feature to send an email to all Owners and / or ''EnterpriseAdmins'' of all the virtual machines deployed on the current physical machine.

Synopsis: POST http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}//action/sendmail
Roles Required:
Request Headers: Accept: ; Content-type: application/vnd.abiquo.mail+xml; version=2.4;
Request Parameters:

Parameter

Required

Default Value

Description

sendermail

false

false

sendermail

admins

false

false

admins

owners

false

false

owners

 

 

 

 

Request Message Body Entity: Mail Media Type
Response Message Body Entity:
Request Example:

 Click here to show or hide the request example
Send mail example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/sendmail?owners=true -X POST -H "content-type:application/vnd.abiquo.mail+xml;version=2.4" -d @dtos/mail.xml

> POST /api/admin/datacenters/1/racks/1/machines/5/action/sendmail?owners=true HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> Accept: */*
> content-type:application/vnd.abiquo.mail+xml;version=2.4
> Content-Length: 129

< HTTP/1.1 204 No Content


Download a template

You can download the template of the entity here (click right mouse button and 'Save Link As..')

Check Machine state

This feature checks physical machine state using the discovery manager and returns it. The sync query parameter allows you to update the database with the value of state returned by the discovery manager.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}//action/checkstate
Roles Required:
Request Headers: Accept: application/vnd.abiquo.machinestate+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

sync

false

false

Allows you to update the database with the value of state
returned by the discovery manager.

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: MachineState Media Type
Request Example:

 Click here to show or hide the request example
Check Machine state example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/checkstate -X GET -H "accept:application/vnd.abiquo.machinestate+xml;version=2.4"

> GET /api/admin/datacenters/1/racks/1/machines/5/action/checkstate HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.machinestate+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTY1MTcwODgwNTozNDIwNTM2NmIyMGQyYTNjMjAyMmMzZmRjOGE3MmY1MDpBQklRVU8; Expires=Thu, 31-Jan-2013 17:01:48 GMT; Path=/api
< Set-Cookie: JSESSIONID=93846510336C94969C71C00D28423F45; Path=/api
< Content-Type: application/vnd.abiquo.machinestate+xml;version=2.4
< Content-Length: 106
< Date: Thu, 31 Jan 2013 16:31:48 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machinestate>
    <state>MANAGED</state>
</machinestate>


Check the IPMI configuration

Checks the IPMI configuration.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}//action/checkipmistate
Roles Required:
Request Headers: Accept: application/vnd.abiquo.machineipmistate+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: MachineIpmiState Media Type
Request Example:

 Click here to show or hide the request example
Check the IPMI configuration example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/checkipmistate -X GET -H "accept:application/vnd.abiquo.machineipmistate+xml;version=2.4"

> GET /api/admin/datacenters/1/racks/1/machines/5/action/checkipmistate HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.machineipmistate+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTY1MjY1NTYxODo3YWMwN2YxY2RjYTNjYjE2NTAwMGY4ZjZmNGM5MTQ4YzpBQklRVU8; Expires=Thu, 31-Jan-2013 17:17:35 GMT; Path=/api
< Set-Cookie: JSESSIONID=7F1C786042411EA5A01C3FF40A14290D; Path=/api
< Content-Type: application/vnd.abiquo.machineipmistate+xml;version=2.4
< Content-Length: 121
< Date: Thu, 31 Jan 2013 16:47:57 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machineipmistate>
    <state>CONFIGURED</state>
</machineipmistate>


Refresh NICS

Refresh the NICs of the physical machine. The refresh will save in database 'exactly' the same NICs we have retrieved, maintaining the previous network service types.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/{machine}//action/nics/refresh
Roles Required:
Request Headers: Accept: application/vnd.abiquo.machine+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Machine Media Type
Request Example:

 Click here to show or hide the request example
Refresh NICS example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/nics/refresh -X GET -H "accept:application/vnd.abiquo.machine+xml;version=2.4"

> GET /api/admin/datacenters/1/racks/1/machines/5/action/nics/refresh HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.machine+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTY1MzEwMzE2ODoyY2I3N2Y4NzRkNGNkMjg3MzI4ZmE2MGFiMThjZjU2NDpBQklRVU8; Expires=Thu, 31-Jan-2013 17:25:03 GMT; Path=/api
< Set-Cookie: JSESSIONID=53B8FA379B9F94D3B8B14395429BC052; Path=/api
< Content-Type: application/vnd.abiquo.machine+xml;version=2.4
< Content-Length: 3239
< Date: Thu, 31 Jan 2013 16:55:03 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machine>
    <link rel="checkipmi" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/checkipmi"/>
    <link rel="checkipmistate" type="application/vnd.abiquo.machineipmistate+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/checkipmistate"/>
    <link rel="checkstate" type="application/vnd.abiquo.machinestate+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/checkstate"/>
    <link rel="datastores" type="application/vnd.abiquo.datastores+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/datastores"/>
    <link rel="edit" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5"/>
    <link rel="rack" type="application/vnd.abiquo.rack+xml" href="http://example.com/api/admin/datacenters/1/racks/1"/>
    <link rel="reenableafterha" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/reenableafterha"/>
    <link rel="refreshnics" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/nics/refresh"/>
    <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/action/sendmail"/>
    <link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/5/virtualmachines"/>
    <id>5</id>
    <name>kvm-modified</name>
    <description>kvm</description>
    <state>MANAGED</state>
    <type>KVM</type>
    <ip>10.60.1.62</ip>
    <ipService>10.60.1.62</ipService>
    <port>8889</port>
    <ram>497</ram>
    <ramUsed>64</ramUsed>
    <cpu>2</cpu>
    <cpuUsed>1</cpuUsed>
    <initiatorIQN>iqn.1994-05.com.redhat:8e729755888</initiatorIQN>
    <ipmiIP>10.60.1.62</ipmiIP>
    <ipmiPort>8889</ipmiPort>
    <ipmiUser>root</ipmiUser>
    <ipmiPassword>psswd</ipmiPassword>
    <datastores>
        <datastore>
            <id>9</id>
            <name>/dev/mapper/VolGroup00-LogVol00</name>
            <rootPath>/</rootPath>
            <directory></directory>
            <size>4030406656</size>
            <usedSize>1061453824</usedSize>
            <enabled>false</enabled>
            <datastoreUUID>c0209ca2-96eb-4fca-a845-4961c5c28e5f</datastoreUUID>
        </datastore>
        <datastore>
            <id>10</id>
            <name>10.60.1.104:/volume1/nfs-devel</name>
            <rootPath>/opt/vm_repository</rootPath>
            <directory></directory>
            <size>7856958996480</size>
            <usedSize>3251299680256</usedSize>
            <enabled>true</enabled>
            <datastoreUUID>d04745d7-b002-4499-82da-c3aa49d35803</datastoreUUID>
        </datastore>
    </datastores>
    <networkInterfaces>
        <networkinterface>
            <link rel="networkservicetype" type="application/vnd.abiquo.networkservicetype+xml" href="http://example.com/api/admin/datacenters/1/networkservicetypes/1"/>
            <name>eth0</name>
            <mac>08:00:27:74:f0:4a</mac>
        </networkinterface>
        <networkinterface>
            <name>eth0.2</name>
            <mac>08:00:27:74:f0:4a</mac>
        </networkinterface>
        <networkinterface>
            <name>abiquo_2</name>
            <mac>08:00:27:74:f0:4a</mac>
        </networkinterface>
        <networkinterface>
            <name>virbr0</name>
            <mac>00:00:00:00:00:00</mac>
        </networkinterface>
        <networkinterface>
            <name>virbr0.2</name>
            <mac>00:00:00:00:00:00</mac>
        </networkinterface>
        <networkinterface>
            <name>vnet0</name>
            <mac>fe:54:00:7e:1e:18</mac>
        </networkinterface>
    </networkInterfaces>
</machine>


Retrieve bookable machines

Retrieve a list of machines that can be reserved.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/racks/{rack}/machines/action/bookable
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_SERVERS, ROLE_USERS_MANAGE_RESERVED_MACHINES
Request Headers: Accept: application/vnd.abiquo.machines+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

enterprise

false

 

enterpriseId

 

 

 

 

Request Message Body Entity:
Response Message Body Entity: Machines Media Type
Request Example:

 Click here to show or hide the request example
Retrieve bookable machines example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/racks/1/machines/action/bookable -X GET -H "accept:application/vnd.abiquo.machines+xml;version=2.4"

> GET /api/admin/datacenters/1/racks/1/machines/action/bookable HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: example.com
> accept:application/vnd.abiquo.machines+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTcxOTA0NDcwMDowZDAwYjMwYTg1ZjcxMmY5NTU1NzY5OTYyOTg1M2RhNTpBQklRVU8; Expires=Fri, 01-Feb-2013 11:44:04 GMT; Path=/api
< Set-Cookie: JSESSIONID=DA4597EC20486A98F6C20382E9DA9057; Path=/api
< Content-Type: application/vnd.abiquo.machines+xml;version=2.4
< Content-Length: 3230
< Date: Fri, 01 Feb 2013 11:14:04 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<machines>
    <machine>
        <link rel="checkipmi" href="http://example.com/api/admin/datacenters/1/racks/1/machines/6/action/checkipmi"/>
        <link rel="checkipmistate" type="application/vnd.abiquo.machineipmistate+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/6/action/checkipmistate"/>
        <link rel="checkstate" type="application/vnd.abiquo.machinestate+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/6/action/checkstate"/>
        <link rel="datastores" type="application/vnd.abiquo.datastores+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/6/datastores"/>
        <link rel="edit" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/6"/>
        <link rel="rack" type="application/vnd.abiquo.rack+xml" href="http://example.com/api/admin/datacenters/1/racks/1"/>
        <link rel="reenableafterha" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/6/action/reenableafterha"/>
        <link rel="refreshnics" type="application/vnd.abiquo.machine+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/6/action/nics/refresh"/>
        <link rel="sendmail" type="application/vnd.abiquo.mail+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/6/action/sendmail"/>
        <link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="http://example.com/api/admin/datacenters/1/racks/1/machines/6/virtualmachines"/>
        <id>6</id>
        <name>kvm</name>
        <description>kvm</description>
        <state>MANAGED</state>
        <type>KVM</type>
        <ip>10.60.1.62</ip>
        <ipService>10.60.1.62</ipService>
        <port>8889</port>
        <ram>497</ram>
        <ramUsed>64</ramUsed>
        <cpu>2</cpu>
        <cpuUsed>1</cpuUsed>
        <initiatorIQN>iqn.1994-05.com.redhat:8e729755888</initiatorIQN>
        <ipmiIP></ipmiIP>
        <ipmiPort>0</ipmiPort>
        <ipmiUser></ipmiUser>
        <ipmiPassword></ipmiPassword>
        <datastores>
            <datastore>
                <id>11</id>
                <name>/dev/mapper/VolGroup00-LogVol00</name>
                <rootPath>/</rootPath>
                <directory></directory>
                <size>4030406656</size>
                <usedSize>1074679808</usedSize>
                <enabled>true</enabled>
                <datastoreUUID>c0209ca2-96eb-4fca-a845-4961c5c28e5f</datastoreUUID>
            </datastore>
            <datastore>
                <id>12</id>
                <name>10.60.1.104:/volume1/nfs-devel</name>
                <rootPath>/opt/vm_repository</rootPath>
                <directory></directory>
                <size>7856958996480</size>
                <usedSize>3251014467584</usedSize>
                <enabled>false</enabled>
                <datastoreUUID>d04745d7-b002-4499-82da-c3aa49d35803</datastoreUUID>
            </datastore>
        </datastores>
        <networkInterfaces>
            <networkinterface>
                <name>virbr0.2</name>
                <mac>00:00:00:00:00:00</mac>
            </networkinterface>
            <networkinterface>
                <link rel="networkservicetype" type="application/vnd.abiquo.networkservicetype+xml" href="http://example.com/api/admin/datacenters/1/networkservicetypes/1"/>
                <name>eth0</name>
                <mac>08:00:27:74:f0:4a</mac>
            </networkinterface>
            <networkinterface>
                <name>abiquo_2</name>
                <mac>08:00:27:74:f0:4a</mac>
            </networkinterface>
            <networkinterface>
                <name>vnet0</name>
                <mac>fe:54:00:7e:1e:18</mac>
            </networkinterface>
            <networkinterface>
                <name>virbr0</name>
                <mac>00:00:00:00:00:00</mac>
            </networkinterface>
            <networkinterface>
                <name>eth0.2</name>
                <mac>08:00:27:74:f0:4a</mac>
            </networkinterface>
        </networkInterfaces>
    </machine>
</machines>


  • No labels