API Changelog v3.0

Abiquo API Changes

Abiquo is committed to maintaing backwards compatibility for 2 minor releases. If for some reason, backwards compatibility were not possible to maintain, Abiquo would detail the changes in the API Changelog. For example, Abiquo 2.6 should be compatible with 2.4 and 2.3. The best practice to ensure compatibility is to use the version number in the header of your API request with the media type and content type.
For major versions such as 3.0, Abiquo will make a best effort to maintain compatibility with at least the previous version. Abiquo will provide details of any changes in the API Changelog. 

Abiquo API 3.0 Changelog

 

The Abiquo 3.0 API will officially include support for public cloud based plugins, starting with the Amazon provider.

There are some changes in the cloud resources and a new infrastructure top level resource split (publiccloudregion resource will complement the datacenter resource).
And we have introduced locations to abstract private and public cloud infrastructure.

Media types

The Abiquo API now works with JSON media type by default. Previous versions of Abiquo expected and returned XML media types.

Specify media types

 If you created an integration with an earlier version of Abiquo without using Accept headers to specify the XML media type, your integration will not be compatible with Abiquo 3.0.

Example of request without Accept header

Will accept the default media type, which in Abiquo 2.6 is XML and in Abiquo 3.0 is JSON.

$ curl -X GET http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/2\
      -u user:password --verbose

Example of request with Accept header

Will accept XML media type for the latest version of Abiquo.

$ curl -X GET http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/2\
     -H 'Accept: application/vnd.abiquo.networkservicetype+xml'    \
     -u user:password --verbose

Example of request with Accept header and version

Will accept XML media type for Abiquo 2.4.

$ curl -X GET http://10.60.20.60:80/api/admin/datacenters/1/networkservicetypes/2\
     -H 'Accept: application/vnd.abiquo.networkservicetype+xml; version=2.4'    \
     -u user:password --verbose

 

New, Deprecations and Changes of Media Types

  • application and applications media types added for OAUTH
  • virtualmachinenode(question) has been deprecated
  • credentials has changed to publiccloudcredentials

New allowResize attribute in Volume media type

The API now will tell you if the volume can be resized, depending on the capacities of the storage device. This will work for Generic ISCSI but also for storage plugins that don't support the volume resize operation.
Here is an example output for the volume list, including the new "allowResize" attribute (values: true/false) for each volume:

$ curlhttp://localhost/api/cloud/virtualdatacenters/1/volumes | json_pp 
{ 
   "collection" : [ 
      { 
         "sequence" : 0, 
         "name" : "Normal", 
         "sizeInMB" : 1024, 
         "id" : 255, 
         "allowResize" : true, 
         "state" : "DETACHED", 
         "links" : [ 
            { 
               "rel" : "edit", 
               "href" : "http://localhost:80/api/cloud/virtualdatacenters/1/volumes/255", 
               "type" : "application/vnd.abiquo.volume+json", 
               "title" : "Normal" 
            }, 
            { 
               "rel" : "tier", 
               "href" : "http://localhost:80/api/cloud/virtualdatacenters/1/tiers/2", 
               "type" : "application/vnd.abiquo.tier+json", 
               "title" : "Default Tier 2" 
            }, 
            { 
               "rel" : "initiatormappings", 
               "href" : "http://localhost:80/api/cloud/virtualdatacenters/1/volumes/255/action/initiatormappings", 
               "type" : "application/vnd.abiquo.initiatormappings+json", 
               "title" : "initiator mappings" 
            }, 
            { 
               "rel" : "virtualdatacenter", 
               "href" : "http://localhost:80/api/cloud/virtualdatacenters/1", 
               "type" : "application/vnd.abiquo.virtualdatacenter+json", 
               "title" : "KVM" 
            } 
         ] 
      }, 
      { 
         "sequence" : 0, 
         "name" : "GenericIscsi", 
         "sizeInMB" : 1024, 
         "id" : 256, 
         "allowResize" : false, 
         "state" : "DETACHED", 
         "links" : [ 
            { 
               "rel" : "edit", 
               "href" : "http://localhost:80/api/cloud/virtualdatacenters/1/volumes/256", 
               "type" : "application/vnd.abiquo.volume+json", 
               "title" : "GenericIscsi" 
            }, 
            { 
               "rel" : "tier", 
               "href" : "http://localhost:80/api/cloud/virtualdatacenters/1/tiers/1", 
               "type" : "application/vnd.abiquo.tier+json", 
               "title" : "Default Tier 1" 
            }, 
            { 
               "rel" : "initiatormappings", 
               "href" : "http://localhost:80/api/cloud/virtualdatacenters/1/volumes/256/action/initiatormappings", 
               "type" : "application/vnd.abiquo.initiatormappings+json", 
               "title" : "initiator mappings" 
            }, 
            { 
               "rel" : "virtualdatacenter", 
               "href" : "http://localhost:80/api/cloud/virtualdatacenters/1", 
               "type" : "application/vnd.abiquo.virtualdatacenter+json", 
               "title" : "KVM" 
            } 
         ] 
      } 
   ], 
   "totalSize" : 2, 
   "links" : [ 
      { 
         "rel" : "first", 
         "href" : "http://localhost:80/api/cloud/virtualdatacenters/1/volumes?limit=25&by=id" 
      }, 
      { 
         "rel" : "last", 
         "href" : "http://localhost:80/api/cloud/virtualdatacenters/1/volumes?startwith=0&limit=25&by=id" 
      } 
   ] 

 

Deprecations of Resources and Methods

Machine Discovery

  • action/discoversingle
  • action/discovermultiple

The above links have also been removed from the Datacenter model. Always use action/discovery

UCS racks

The following specific resources for UCS racks have been deprecated:

  • POST racks with media-type application/vnd.abiquo.ucsrack
  • refreshMachines PUT machines with content-type application/vnd.abiquo.hypervisordiscovery and accept application/vnd.abiquo.machines
  • refreshRemoteMachines PUT machines with accept application/vnd.abiquo.machines

Plugin Changes

Hypervisor Type Resource

Now there are plugins implementing additional functionality:

  • Base of all plugins:  RetrieveVirtualMachine, ICompute, Mac, Poll (optional)
  • Hypervisors should implement:  IHypervisor (get a single host definition)
  • ManagedHypervisors should implement: IManagerHypervisor (get a list of host definitions)
  • CloudProviders should implement: ICloudProvider
    • ability to retrieve regions establishes the public cloud provider nature of the plugin
  • Optionally, these additional modules can be implemented: Templates, PublicIps, Vpc

Plugins implementing the ICloudProvider interface return links to the public cloud provider's regions

GET /api/config/hypervisortypes/AMAZON 
Accept: application/vnd.abiquo.hypervisortype+xml; version=2.9.
--
Content-Type: application/vnd.abiquo.hypervisortype+xml;version=2.9.

<hypervisortype>
    <link title="Amazon" rel="self" type="application/vnd.abiquo.hypervisortype+xml" href="http://example.com/api/config/hypervisortypes/AMAZON"/>
    <link title="regions" rel="regions" type="application/vnd.abiquo.regions+xml" href="http://example.com/api/config/hypervisortypes/AMAZON/regions"/>
    <link title="us-east-1" rel="region" type="application/vnd.abiquo.region+xml" href="http://example.com/api/config/hypervisortypes/AMAZON/regions/us-east-1"/>
    <link title="us-west-1" rel="region" type="application/vnd.abiquo.region+xml" href="http://example.com/api/config/hypervisortypes/AMAZON/regions/us-west-1"/>
...
    <baseformat>AMI</baseformat>
    <compatibleformats>
        <format>AMI</format>
    </compatibleformats>
    <constraints>
...
    </constraints>
    <name>AMAZON</name>
    <realName>Amazon</realName>
</hypervisortype>

Regions and their Hardware Profiles

Note that region information is static and can be retrieved once the plugin is loaded.
This Region includes the endpoint and information about accepted hardware profiles for each region. Abiquo will update the regions and hardware plugins for each release.

GET /api/config/hypervisortypes/AMAZON/regions/eu-west-1 HTTP/1.1.
Accept: application/vnd.abiquo.region+xml; version=2.9.
--
Content-Type: application/vnd.abiquo.region+xml;version=2.9.
<region>
    <link title="Amazon" rel="hypervisortype" type="application/vnd.abiquo.hypervisortype+xml" href="http://example.com/api/config/hypervisortypes/AMAZON"/>
    <link title="eu-west-1" rel="self" type="application/vnd.abiquo.region+xml" href="http://example.com/api/config/hypervisortypes/AMAZON/regions/eu-west-1"/>
    <link title="eu-west-1" rel="checkcredentials" type="application/vnd.abiquo.publiccloudcredentials+xml" href="http://example.com/api/config/hypervisortypes/AMAZON/regions/eu-west-1/action/checkcredentials"/>
    <link title="hardwareprofiles" rel="hardwareprofiles" type="application/vnd.abiquo.hardwareprofiles+xml" href="http://example.com/api/config/hypervisortypes/AMAZON/regions/eu-west-1/hardwareprofiles"/>
    <link title="m3.2xlarge" rel="hardwareprofile" type="application/vnd.abiquo.hardwareprofile+xml" href="http://example.com/api/config/hypervisortypes/AMAZON/regions/eu-west-1/hardwareprofiles/m3.2xlarge"/>
    <link title="m1.medium" rel="hardwareprofile" type="application/vnd.abiquo.hardwareprofile+xml" href="http://example.com/api/config/hypervisortypes/AMAZON/regions/eu-west-1/hardwareprofiles/m1.medium"/>
...
    <endpoint>ec2.eu-west-1.amazonaws.com</endpoint>
    <name>eu-west-1</name>
</region>

Admin Changes

Public Cloud Credential Resource

Enterprises have to add their credentials for each provider, e.g. AWS. The credentials will be used in all of the public cloud regions that are allowed for the enterprise.

POST /api/admin/enterprises/1/credentials
Accept: application/vnd.abiquo.publiccloudcredentials+xml; version=2.9.
Content-Type: application/vnd.abiquo.publiccloudcredentials+xml; version=2.9.
<publiccloudcredentials>
    <provider>AMAZON</provider>
    <key>CHANGE ME</key>
    <access>CHANGE ME</access>
</publiccloudcredentials>

---
Content-Type: application/vnd.abiquo.publiccloudcredentials+xml; version=2.9.
<publiccloudcredentials>
    <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1"/>
    <link title="edit public cloud credentials" rel="edit" type="application/vnd.abiquo.publiccloudcredentials+xml" href="http://example.com/api/admin/enterprises/1/credentials/1"/>
    <id>1</id>
    <provider>AMAZON</provider>
    <key>CHANGE ME</key>    
</publiccloudcredentials>

Infrastructure Changes

The main idea is that cloud/datacenters remains compatible and a brand new cloud/publiccloudregions path will hold the public cloud infrastructure resource.

Public Cloud Region Resource

This is a new resource that is a public cloud version of the Datacenter concept in private clouds.

You need the HypervisorType-Region link to create it:

POST /api/admin/publiccloudregions
Accept: application/vnd.abiquo.publiccloudregion+xml; version=2.9.
Content-Type: application/vnd.abiquo.publiccloudregion+xml; version=2.9.
<publicCloudRegion>
    <link rel="region" href="http://example.com/api/config/hypervisortypes/AMAZON/regions/eu-west-1" />
    <name>eu-west-1</name>
    <remoteServices>
        <remoteService>
            <type>NODE_COLLECTOR</type>
            <uri>http://example.com/nodecollector</uri>
        </remoteService>
        <remoteService>
            <type>VIRTUAL_SYSTEM_MONITOR</type>
            <uri>http://example.com/vsm</uri>
        </remoteService>
        <remoteService>
            <type>VIRTUAL_FACTORY</type>
            <uri>http://example.com/virtualfactory</uri>
        </remoteService>
        <remoteService>
            <type>CLOUD_PROVIDER_PROXY</type>
            <uri>http://example.com/cpp</uri>            
        </remoteService>
    </remoteServices>
</publicCloudRegion>
--
Content-Type: application/vnd.abiquo.publiccloudregion+xml; version=2.9.
<publicCloudRegion>
    <link title="eu-west-1" rel="edit" type="application/vnd.abiquo.publiccloudregion+xml" href="http://example.com/api/admin/publiccloudregions/1"/>
    <link title="eu-west-1" rel="remoteservices" type="application/vnd.abiquo.publiccloudregion+xml" href="http://example.com/api/admin/publiccloudregions/1/remoteservices"/>
    <link title="Amazon" rel="hypervisortype" type="application/vnd.abiquo.hypervisortype+xml" href="http://example.com/api/config/hypervisortypes/AMAZON"/>
    <link title="eu-west-1" rel="region" type="application/vnd.abiquo.region+xml" href="http://example.com/api/config/hypervisortypes/AMAZON/regions/eu-west-1"/>
    <id>1</id>
    <name>eu-west-1</name>
    <remoteServices>
        <remoteService>
            <id>1</id>
            <type>NODE_COLLECTOR</type>
            <uri>http://example.com/nodecollector</uri>
            <status>1</status>
        </remoteService>
        <remoteService>
            <id>2</id>
            <type>VIRTUAL_SYSTEM_MONITOR</type>
            <uri>http://example.com/vsm</uri>
            <status>1</status>
        </remoteService>
        <remoteService>
            <id>3</id>
            <type>VIRTUAL_FACTORY</type>
            <uri>http://example.com/virtualfactory</uri>
            <status>1</status>
        </remoteService>
        <remoteService>
            <id>4</id>
            <type>CLOUD_PROVIDER_PROXY</type>
            <uri>http://example.com/cpp</uri>
            <status>1</status>
        </remoteService>
    </remoteServices>
</publicCloudRegion>

Datacenter Limit Resource

You will need to allow public cloud regions as well as datacenters.

POST /api/admin/enterprises/1/limits HTTP/1.1.
Accept: application/vnd.abiquo.limit+xml; version=2.9.
Content-Type: application/vnd.abiquo.limit+xml; version=2.9.
<limit>
    <link title="eu-west-1" rel="publiccloudregion" type="application/vnd.abiquo.publiccloudregion+xml" href="http://example.com/api/admin/publiccloudregions/1" />    
</limit>
---
Content-Type: application/vnd.abiquo.limit+xml; version=2.9.
<limit>
    <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1" />
    <link title="eu-west-1" rel="location" type="application/vnd.abiquo.publiccloudregion+xml" href="http://example.com/api/admin/publiccloudregions/1" />
    <link title="eu-west-1" rel="datacenterByLimit" type="application/vnd.abiquo.publiccloudregion+xml"
        href="http://example.com/api/admin/enterprises/1/limits/1/datacenter" />
    <link title="hypervisors" rel="hypervisors" type="application/vnd.abiquo.hypervisortypes+xml"
        href="http://example.com/api/admin/enterprises/1/limits/1/hypervisors" />
    <link title="edit datacenter limits 1" rel="edit" type="application/vnd.abiquo.limit+xml" href="http://example.com/api/admin/enterprises/1/limits/1" />
    <link title="external networks" rel="externalnetworks" type="application/vnd.abiquo.vlans+xml"
        href="http://example.com/api/admin/enterprises/1/limits/1/externalnetworks" />
    <link title="virtualappliances" rel="action" type="application/vnd.abiquo.virtualappliances+xml"
        href="http://example.com/api/admin/enterprises/1/limits/1/action/virtualappliances" />
    <cpuHard>0</cpuHard>
    <cpuSoft>0</cpuSoft>
    <ramHard>0</ramHard>
    <ramSoft>0</ramSoft>
    <hdHard>0</hdHard>
    <hdSoft>0</hdSoft>
    <storageHard>0</storageHard>
    <storageSoft>0</storageSoft>
    <vlansHard>0</vlansHard>
    <vlansSoft>0</vlansSoft>
    <publicIpsHard>0</publicIpsHard>
    <publicIpsSoft>0</publicIpsSoft>
    <repositoryHard>0</repositoryHard>
    <repositorySoft>0</repositorySoft>
    <id>1</id>
</limit>

The location link contains the type of location (datacenter or publiccloudregion) and the href points to infrastructure (/datacenters/1 or /publiccloudregion/1).

Virtual Machine Template Resource

First you should retrieve the available virtual machine templates from the provider plugin (using &source=REMOTE, which is the same as Remote search in the UI)

GET /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates?source=REMOTE&path=ami-ce7b6fba 
Accept: application/vnd.abiquo.virtualmachinetemplates+xml; version=2.9.
---
Content-Type: application/vnd.abiquo.virtualmachinetemplates+xml;version=2.9.
<virtualMachineTemplates>
    <virtualMachineTemplate>
        <link title="eu-west-1" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="http://example.com/api/admin/datacenters/1" />
        <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1" />
        <link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="http://example.com/api/config/categories/1" />
        <link title="templatedefinition" rel="templatedefinition" href="ami-ce7b6fba" />
        <name>ubuntu/images/ebs/ubuntu-precise-12.04-amd64-server-20130411.1</name>
        <description>ubuntu-precise-12.04-amd64-server-20130411.1</description>
        <osType>OTHER_64</osType>
        <path>ami-ce7b6fba</path>
        <diskFormatType>AMI</diskFormatType>
        <diskFileSize>0</diskFileSize>
        <cpuRequired>2</cpuRequired>
        <ramRequired>60</ramRequired>
        <hdRequired>8589934592</hdRequired>
        <shared>false</shared>
        <state>DONE</state>
        <creationUser>099720109477</creationUser>
        <chefEnabled>false</chefEnabled>
        <iconUrl>http://www.thinkalytic.com/wp-content/uploads/2013/03/amazon-logo-10.png</iconUrl>
        <loginUser>ubuntu</loginUser>
    </virtualMachineTemplate>
</virtualMachineTemplates>


Then you can use the returned representation to create it in Abiquo database, which is the same as importing the template details into the Apps library template cache in the UI.

POST /api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates
Accept: application/vnd.abiquo.virtualmachinetemplates+xml; version=2.9.
Content-Type: application/vnd.abiquo.virtualmachinetemplates+xml; version=2.9.
<virtualMachineTemplate>
    <link title="eu-west-1" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="http://example.com/api/admin/datacenters/1" />
    <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1" />
    <link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="http://example.com/api/config/categories/1" />
    <link title="templatedefinition" rel="templatedefinition" href="ami-ce7b6fba" />
    <name>ubuntu/images/ebs/ubuntu-precise-12.04-amd64-server-20130411.1</name>
    <description>ubuntu-precise-12.04-amd64-server-20130411.1</description>
    <osType>OTHER_64</osType>
    <path>ami-ce7b6fba</path>
    <diskFormatType>AMI</diskFormatType>
    <diskFileSize>0</diskFileSize>
    <cpuRequired>2</cpuRequired>
    <ramRequired>60</ramRequired>
    <hdRequired>8589934592</hdRequired>
    <shared>false</shared>
    <state>DONE</state>
    <creationUser>099720109477</creationUser>
    <chefEnabled>false</chefEnabled>
    <iconUrl>http://www.thinkalytic.com/wp-content/uploads/2013/03/amazon-logo-10.png</iconUrl>
    <loginUser>ubuntu</loginUser>
</virtualMachineTemplate>
---
Content-Type: application/vnd.abiquo.virtualmachinetemplates+xml; version=2.9.
<virtualMachineTemplate>
    <link title="eu-west-1" rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="http://example.com/api/admin/datacenters/1"/>
    <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1"/>
    <link title="Others" rel="category" type="application/vnd.abiquo.category+xml" href="http://example.com/api/config/categories/1"/>
   
 <link 
title="ubuntu/images/ebs/ubuntu-precise-12.04-amd64-server-20130411.1" 
rel="edit" type="application/vnd.abiquo.virtualmachinetemplate+xml" 
href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1"/>
    <link title="templatedefinition" rel="templatedefinition" href="ami-ce7b6fba"/>
    <id>1</id>
    <name>ubuntu/images/ebs/ubuntu-precise-12.04-amd64-server-20130411.1</name>
    <description>ubuntu-precise-12.04-amd64-server-20130411.1</description>
    <osType>OTHER_64</osType>
    <path>ami-ce7b6fba</path>
    <diskFormatType>AMI</diskFormatType>
    <diskFileSize>0</diskFileSize>
    <cpuRequired>2</cpuRequired>
    <ramRequired>60</ramRequired>
    <hdRequired>8589934592</hdRequired>
    <shared>false</shared>
    <state>DONE</state>
    <creationDate>2013-11-25T18:50:39+01:00</creationDate>
    <creationUser>099720109477</creationUser>
    <chefEnabled>false</chefEnabled>
    <iconUrl>http://www.thinkalytic.com/wp-content/uploads/2013/03/amazon-logo-10.png</iconUrl>
    <loginUser>ubuntu</loginUser>
</virtualMachineTemplate>

Cloud Changes

Location Resource

The location resource replaces many uses of the DatacenterLimit. We added an abstraction to work with _datacenters_ and _publiccloudregions_  from cloud/ URIs.
This is also helpful because the '/admin/datacenters' URI should not be visible to regular users because it is part of the infrastructure.

Both public and private (allowed) infrastructure can be retrieved from this endpoint, but each one holds its own representation, so a user should perform these two calls in order to know where can i deploy? 

curl -XGET "admin:xabiquo@localhost/api/cloud/locations" -H "Accept: application/vnd.abiquo.datacenters+xml"
-- 
<datacenters>....</datacenters>

curl -XGET "admin:xabiquo@localhost/api/cloud/locations" -H "Accept: application/vnd.abiquo.publiccloudregions+xml"
--
<publiccloudregions>....</publiccloudregions>

Use Location links instead of datacenter in VirtualDatacenter, and other cloud resources:

Note 1: use the location URI but with the appropriate media-type (application/vnd.abiquo.publiccloudregion)
Note 2: you do not need to specify the ''hypervisorType'' as the provider is implicit in the selected region

POST /api/cloud/virtualdatacenters
Accept: application/vnd.abiquo.virtualdatacenter+xml; version=2.9.
Content-Type: application/vnd.abiquo.virtualdatacenter+xml; version=2.9.
<virtualDatacenter>
    <link rel="location" type="application/vnd.abiquo.publiccloudregion+xml; version=2.9" href="http://example.com/api/cloud/locations/1" />
    <link rel="enterprise" href="http://example.com/api/admin/enterprises/1" />
    <name>default</name>
    <network>
        <name>default</name>
        <address>192.168.1.0</address>
        <mask>24</mask>
        <gateway>192.168.1.1</gateway>
        <ipv6>false</ipv6>
        <strict>false</strict>
    </network>
</virtualDatacenter>
---
Content-Type: application/vnd.abiquo.virtualdatacenter+xml; version=2.9.
<virtualDatacenter>
    <link title="default" rel="edit" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/1"/>
    <link title="private networks" rel="privatenetworks" type="application/vnd.abiquo.vlans+xml" href="http://example.com/api/cloud/virtualdatacenters/1/privatenetworks"/>
    <link title="public networks" rel="network" type="application/vnd.abiquo.vlans+xml" href="http://example.com/api/admin/datacenters/1/network"/>
    <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1"/>
    <link title="virtual appliances" rel="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances"/>
    <link title="default network" rel="defaultvlan" type="application/vnd.abiquo.vlan+xml" href="http://example.com/api/cloud/virtualdatacenters/1/privatenetworks/1"/>
    <link title="private ips" rel="privateips" type="application/vnd.abiquo.privateips+xml" href="http://example.com/api/cloud/virtualdatacenters/1/action/privateips"/>
    <link title="external ips" rel="externalips" type="application/vnd.abiquo.externalips+xml" href="http://example.com/api/cloud/virtualdatacenters/1/action/externalips"/>
    <link title="unmanaged ips" rel="unmanagedips" type="application/vnd.abiquo.unmanagedips+xml" href="http://example.com/api/cloud/virtualdatacenters/1/action/unmanagedips"/>
    <link title="GET" rel="defaultvlan" type="application/vnd.abiquo.vlan+xml" href="http://example.com/api/cloud/virtualdatacenters/1/action/defaultvlan"/>
    <link title="PUT" rel="defaultvlan" type="application/vnd.abiquo.links+xml" href="http://example.com/api/cloud/virtualdatacenters/1/action/defaultvlan"/>
    <link title="volumes" rel="volumes" type="application/vnd.abiquo.volumes+xml" href="http://example.com/api/cloud/virtualdatacenters/1/volumes"/>
    <link title="disks" rel="disks" type="application/vnd.abiquo.harddisks+xml" href="http://example.com/api/cloud/virtualdatacenters/1/disks"/>
    <link title="ips to purchase" rel="topurchase" type="application/vnd.abiquo.publicips+xml" href="http://example.com/api/cloud/virtualdatacenters/1/publicips/topurchase"/>
    <link title="ips purchased" rel="purchased" type="application/vnd.abiquo.publicips+xml" href="http://example.com/api/cloud/virtualdatacenters/1/publicips/purchased"/>
    <link title="volumes" rel="statefulcandidates" type="application/vnd.abiquo.volumes+xml" href="http://example.com/api/cloud/virtualdatacenters/1/volumes/action/statefulcandidates"/>
    <link title="tiers" rel="tiers" type="application/vnd.abiquo.tiers+xml" href="http://example.com/api/cloud/virtualdatacenters/1/tiers"/>
    <link title="available templates" rel="templates" type="application/vnd.abiquo.virtualmachinetemplates+xml" href="http://example.com/api/cloud/virtualdatacenters/1/action/templates"/>
    <link title="eu-west-1" rel="location" type="application/vnd.abiquo.publiccloudregion+xml" href="http://example.com/api/cloud/locations/1"/>
    <cpuHard>0</cpuHard>
    <cpuSoft>0</cpuSoft>
    <ramHard>0</ramHard>
    <ramSoft>0</ramSoft>
    <hdHard>0</hdHard>
    <hdSoft>0</hdSoft>
    <storageHard>0</storageHard>
    <storageSoft>0</storageSoft>
    <vlansHard>0</vlansHard>
    <vlansSoft>0</vlansSoft>
    <publicIpsHard>0</publicIpsHard>
    <publicIpsSoft>0</publicIpsSoft>
    <id>1</id>
    <hypervisorType>AMAZON</hypervisorType>
    <name>default</name>
    <network>
        <link title="default" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/1"/>
        <link title="vpc-5c151e3e:subnet-047a2f42" rel="edit" type="application/vnd.abiquo.vlan+xml" href="http://example.com/api/cloud/virtualdatacenters/1/privatenetworks/1"/>
        <link title="ips" rel="ips" type="application/vnd.abiquo.privateips+xml" href="http://example.com/api/cloud/virtualdatacenters/1/privatenetworks/1/ips"/>
        <id>1</id>
        <name>vpc-5c151e3e:subnet-047a2f42</name>
        <address>192.168.1.0</address>
        <mask>24</mask>
        <gateway>192.168.1.1</gateway>
        <type>INTERNAL</type>
        <dhcpOptions/>
        <ipv6>false</ipv6>
        <strict>false</strict>
    </network>
    <providerId>vpc-5c151e3e</providerId>
</virtualDatacenter>

Virtual Machine Resource

For public cloud only you will need an additional HardwareProfile link for creating a virtual machine.

POST /api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines
Accept: application/vnd.abiquo.virtualmachine+xml; version=2.9.
Content-Type: application/vnd.abiquo.virtualmachine+xml; version=2.9.
<virtualMachine>
    <link rel="virtualmachinetemplate" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1" />
    <link rel="hardwareprofile" href="http://example.com/api/config/hypervisortypes/AMAZON/regions/eu-west-1/hardwareprofiles/t1.micro" />
    <label>default</label>
</virtualMachine>
---
Content-Type: application/vnd.abiquo.virtualmachine+xml; version=2.9.
<virtualMachine>
    <link title="ABQ_1ae7fabf-cb23-4c3b-81e1-18481767c23f" rel="edit" type="application/vnd.abiquo.virtualmachine+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1"/>
    <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1"/>
    <link title="Cloud" rel="user" type="application/vnd.abiquo.user+xml" href="http://example.com/api/admin/enterprises/1/users/1"/>
    <link title="AMAZON" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/1"/>
    <link title="default" rel="virtualappliance" type="application/vnd.abiquo.virtualappliance+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1"/>
   
 <link title="vlan network configurations" rel="configurations" 
type="application/vnd.abiquo.virtualmachinenetworkconfigurations+xml" 
href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/configurations"/>
    <link title="nics" rel="nics" type="application/vnd.abiquo.nics+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/network/nics"/>
    <link title="disks" rel="harddisks" type="application/vnd.abiquo.harddisks+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/storage/disks"/>
    <link title="NOT_ALLOCATED" rel="state" type="application/vnd.abiquo.virtualmachinestate+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/state"/>
    <link title="virtual machine undeploy" rel="undeploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/undeploy"/>
    <link title="virtual machine deploy" rel="deploy" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/deploy"/>
    <link title="virtual machine reset" rel="reset" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/reset"/>
    <link title="virtual machine snapshot" rel="instance" type="application/vnd.abiquo.acceptedrequest+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/action/instance"/>
    <link title="remote access" rel="rdpaccess" type="text/plain" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/config/rdpaccess"/>
    <link title="tasks" rel="tasks" type="application/vnd.abiquo.tasks+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/tasks"/>
    <link title="volumes" rel="volumes" type="application/vnd.abiquo.volumes+xml" href="http://example.com/api/cloud/virtualdatacenters/1/virtualappliances/1/virtualmachines/1/storage/volumes"/>
    <link title="t1.micro" rel="hardwareprofile" type="application/vnd.abiquo.hardwareprofile+xml" href="http://example.com/api/config/hypervisortypes/AMAZON/regions/eu-west-1/hardwareprofiles/t1.micro"/>
    <link title="0ae26e0b-6495-4759-b3fd-6262496004d9" rel="disk0" type="application/vnd.abiquo.harddisk+xml" href="http://example.com/api/cloud/virtualdatacenters/1/disks/255"/>
   
 <link 
title="ubuntu/images/ebs/ubuntu-precise-12.04-amd64-server-20130411.1" 
rel="virtualmachinetemplate" 
type="application/vnd.abiquo.virtualmachinetemplate+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/1"/>
    <link title="t1.micro" rel="hardwareprofile" type="application/vnd.abiquo.hardwareprofile+xml" href="http://example.com/api/config/hypervisortypes/AMAZON/regions/eu-west-1/hardwareprofiles/t1.micro"/>
    <id>1</id>
    <uuid>1ae7fabf-cb23-4c3b-81e1-18481767c23f</uuid>
    <name>ABQ_1ae7fabf-cb23-4c3b-81e1-18481767c23f</name>
    <cpu>1</cpu>
    <ram>630</ram>
    <hdInBytes>8589934592</hdInBytes>
    <vdrpEnabled>false</vdrpEnabled>
    <vdrpPort>0</vdrpPort>
    <idState>1</idState>
    <state>NOT_ALLOCATED</state>
    <idType>0</idType>
    <type>MANAGED</type>
    <highDisponibility>0</highDisponibility>
    <password>zS79191X</password>
</virtualMachine>

Elastic IP changes

IP Resource

In the initial AWS integration in Abiquo 2.7, the concept of elastic IPs was introduced as IPs that belong to an unmanaged network.

Now in 3.0 the concept of an unmanaged network for Elastic IPs has been changed and Elastic IPs will behave in the same way as public IPs in a private datacenter. 

The difference is that in a private datacenter we can create a pool of public IPs that are available to be purchased to be used in a virtual datacenter. In a public cloud region we can create the public IPs that are available to be purchased in the virtual datacenter.

curl -XPOST "admin:xabiquo@localhost/api/cloud/locations/1/ips" -H "Accept: application/vnd.abiquo.publicip+xml"
-- 
creates an public ip available to be purchased in the virtualdatacenters of location with id 1.

Example of creating a public IP available to be purchased in public virtual datacenters.

curl -X POST http://example.com/api/cloud/locations/1/ips\
     -H 'Accept: application/vnd.abiquo.publicip+xml; version=3.0'  \
     -u user:password --verbose
 
> POST /api/cloud/locations/1/ips HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> User-Agent: curl/7.29.0
> Host: localhost
> Accept: */*
> 
< HTTP/1.1 201 Created
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM4NjE2ODQ1OTExMDo3OTljM2Q4NWQwYmQzZjRkMTY2Y2MxOTQ2ODlhZmY0NjpBQklRVU8; Expires=Wed, 04-Dec-2013 14:47:39 GMT; Path=/api
< Set-Cookie: JSESSIONID=FE2157AFAE56392B0B9649DCCAF5A605; Path=/api
< Content-Type: application/vnd.abiquo.publicip+xml;version=2.9
< Content-Length: 368
< Date: Wed, 04 Dec 2013 14:17:39 GMT
< 
{ [data not shown]
100   368  100   368    0     0    433      0 --:--:-- --:--:-- --:--:--   433
* Connection #0 to host localhost left intact
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<publicip>
    <link title="54.194.94.248" rel="self" type="application/vnd.abiquo.publicip+xml" href="http://example.com/api/cloud/locations/1/ips/770"/>
    <id>770</id>
    <ip>54.194.94.248</ip>
    <ipv6>false</ipv6>
    <available>false</available>
    <quarantine>false</quarantine>
    <providerId>eipalloc-81e6eee3</providerId>
</publicip>

Copyright © 2006-2022, Abiquo Holdings SL. All rights reserved