Abiquo Documentation Cookies Policy

Our Documentation website uses cookies to improve your experience. Please visit our Cookie Policy page for more information about cookies and how we use them.


Abiquo 4.4

Skip to end of metadata
Go to start of metadata

Contents:


Datacenter Repositories Resource

A datacenter repository stores the VM templates for the enterprise in a datacenter. For a public cloud region, cloud, or technology with its own repository, the datacenter repository stores a cache of template details.

Main URI of the Resource

This class operates mainly over the Resource URI: /admin/enterprises/{enterprise}/datacenterrepositories  

Exposed Methods

List datacenter repositories

Retrieve all the datacenter repositories for allowed datacenters of the current enterprise. See EnterpriseLimitsByDatacentersResource. Datacenter repositories are used to store VM templates or template details for each enterprise.

Synopsis: GET http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories
Roles Required: VDC_MANAGE_VAPP,APPLIB_VIEW
Request Headers: Accept: application/vnd.abiquo.datacenterrepositories+json; version=4.4; application/vnd.abiquo.datacenterrepositories+xml; version=4.4;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example


GET_adm_ents_X_dcrpos_AC_dcrpos_j.0002.txt

cURL:

curl -X GET http://localhost:9000/api/admin/enterprises/1094/datacenterrepositories \ 
	 -H 'Accept:application/vnd.abiquo.datacenterrepositories+json; version=4.2' \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

--none--

Response payload:

{
  "links": [], 
  "collection": [
    {
      "repositoryLocation": "endpoint", 
      "name": "virtual image repo", 
      "links": [
        {
          "href": "http://localhost:9009/api/admin/enterprises/1094", 
          "type": "application/vnd.abiquo.enterprise+json", 
          "rel": "enterprise", 
          "title": "293"
        }, 
        {
          "href": "http://localhost:9009/api/admin/enterprises/1094/datacenterrepositories/829", 
          "type": "application/vnd.abiquo.datacenterrepository+json", 
          "rel": "edit", 
          "title": "endpoint"
        }, 
        {
          "href": "http://localhost:9009/api/admin/enterprises/1094/datacenterrepositories/829/virtualmachinetemplates", 
          "type": "application/vnd.abiquo.virtualmachinetemplates+json", 
          "rel": "virtualmachinetemplates", 
          "title": "virtual machine templates"
        }, 
        {
          "href": "http://localhost:9009/api/admin/enterprises/1094/datacenterrepositories/829/action/disks", 
          "type": "application/vnd.abiquo.disks+json", 
          "rel": "disks", 
          "title": "disks"
        }, 
        {
          "href": "http://localhost:9009/api/admin/publiccloudregions/829", 
          "type": "application/vnd.abiquo.publiccloudregion+json", 
          "rel": "publiccloudregion", 
          "title": "name"
        }
      ]
    }
  ]
}

Get a datacenter repository

Get information about a datacenter repository, and optionally synchronize with the repository filesystem.

Synopsis: GET http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}
Roles Required: VDC_MANAGE_VAPP,APPLIB_VIEW, VAPP_CUSTOMISE_SETTINGS
Request Headers: Accept: application/vnd.abiquo.datacenterrepository+json; version=4.4; application/vnd.abiquo.datacenterrepository+xml; version=4.4;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

refresh

false

 

communicate with the datacenter services to add new VM templates
present in the repository filesystem but not in the abiquo API. @deprecated use
''refreshDatacenterRepository'' method

usage

false

 

communicate with the datacenter services in order to include the repository filesytem usage.

 

 

 

 

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

 Click here to show or hide the request example

GET_adm_ents_X_dcrpos_X_AC_dcrpo_j.0001.txt

cURL:

curl -X GET http://localhost:9000/api/admin/enterprises/1059/datacenterrepositories/804 \ 
	 -H 'Accept:application/vnd.abiquo.datacenterrepository+json; version=4.2' \ 
	 -u user:password --verbose 

Success status code: 200

Request payload:

--none--

Response payload:

{
  "repositoryLocation": "61", 
  "name": "virtual image repo", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/enterprises/1059", 
      "type": "application/vnd.abiquo.enterprise+json", 
      "rel": "enterprise", 
      "title": "60"
    }, 
    {
      "href": "http://localhost:9009/api/admin/enterprises/1059/datacenterrepositories/804", 
      "type": "application/vnd.abiquo.datacenterrepository+json", 
      "rel": "edit", 
      "title": "61"
    }, 
    {
      "href": "http://localhost:9009/api/admin/enterprises/1059/datacenterrepositories/804/virtualmachinetemplates", 
      "type": "application/vnd.abiquo.virtualmachinetemplates+json", 
      "rel": "virtualmachinetemplates", 
      "title": "virtual machine templates"
    }, 
    {
      "href": "http://localhost:9009/api/admin/enterprises/1059/datacenterrepositories/804/action/disks", 
      "type": "application/vnd.abiquo.disks+json", 
      "rel": "disks", 
      "title": "disks"
    }, 
    {
      "href": "http://localhost:9009/api/admin/publiccloudregions/804", 
      "type": "application/vnd.abiquo.publiccloudregion+json", 
      "rel": "publiccloudregion", 
      "title": "Cloud Provider"
    }
  ]
}

Refresh a datacenter repository to detect new virtual machine templates

Perform a request inside the datacenter (ApplianceManager service) in order to detect and register new VM templates in the repository filesystem (templates that were added without Abiquo intervention).

Synopsis: PUT http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/action/refresh
Roles Required: USERS_MANAGE_ENTERPRISE,VDC_MANAGE_VAPP,APPLIB_ALLOW_MODIFY
Request Headers: Accept: application/vnd.abiquo.acceptedrequest+json; version=4.4; application/vnd.abiquo.acceptedrequest+xml; version=4.4;  Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example

PUT_adm_ents_X_dcrpos_X_acts_rf_AC_acrq_j.0001.txt

cURL:

curl -X PUT http://localhost:9000/api/admin/enterprises/1708/datacenterrepositories/1064/actions/refresh \ 
	 -H 'Accept:application/xml, application/vnd.abiquo.acceptedrequest+json; version=4.2' \ 
	 -u user:password --verbose 

Success status code: 202

Request payload:

--none--

Response payload:

{
  "message": "You can keep track of the progress in the link", 
  "links": [
    {
      "href": "http://localhost:9009/api/admin/enterprises/1708/datacenterrepositories/1064/tasks/1858c544-cd90-46b6-b8d8-f1a3665e4626", 
      "rel": "status"
    }
  ]
}

 

List disks in a datacenter repository

Retrieve disks from the repository, filtering by disk characteristics.

Paging Method

This method works with paging. Check out Basic Behaviors for information about how it works

Synopsis: GET http://example.com/api/admin/enterprises/{enterprise}/datacenterrepositories/{datacenterrepository}/action/disks
Roles Required: USERS_MANAGE_ENTERPRISE,VDC_MANAGE_VAPP,APPLIB_ALLOW_MODIFY
Request Headers: 

Accept:  application/vnd.abiquo.disks+json; version=4.4; application/vnd.abiquo.disks+xml; version=4.4; ;

Content-type:  application/vnd.abiquo.disks+json; version=4.4; application/vnd.abiquo.disks+xml; version=4.4;


Request Parameters:

Parameter

Required

Default Value

Description

diskformattype

false

default no filter

filter only Disks with the specified diskFormatType (eg ISO)
statesfalsedefault no filterfilter only disks with the specified state, comma separated values (eg DONE, ERROR)

startwith

false

0

number of the page to start from

by

false

name

by default ordered by name

has

false

 

name filter

limit

false

25

number of items to retrieve

asc

false

true

whether the sorting of the list is ascending or descending

Response Message Body Entity : Disks Media Type  
Request Example :

 Click here to show or hide the request example

cURL:

$ curl --verbose -uadmin:xabiquo -XGET http://10.60.1.223/api/admin/enterprises/1/datacenterrepositories/1/action/disks?diskformattype=ISO&states=DONE

Success status code   : 200
Request payload :

--none--

Response payload:

{  
   "totalSize":1,
   "collection":[  
      {  
         "bootable":true,
         "creationDate":"2015-06-11T10:08:55.000+0000",
         "diskControllerType":"IDE",
         "links":[  
            {  
               "href":"http://10.60.1.223:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4/disks/6",
               "type":"application/vnd.abiquo.disk+json",
               "rel":"edit",
               "title":"disk"
            },
            {  
               "href":"http://10.60.1.223:80/api/admin/enterprises/1/datacenterrepositories/1/virtualmachinetemplates/4/disks/6/conversions",
               "type":"application/vnd.abiquo.conversions+json",
               "rel":"conversions",
               "title":"conversions"
            },
            {  
               "href":"http://10.60.1.223:80/am/files/1/10.60.1.223/ef1c4755-ac4f-4a13-bc0e-5f9eef274c69-mini.iso/mini.iso",
               "rel":"diskfile",
               "title":"mini"
            }
         ],
         "label":"Hd",
         "sequence":0,
         "path":"1/10.60.1.223/ef1c4755-ac4f-4a13-bc0e-5f9eef274c69-mini.iso/mini.iso",
         "diskFormatType":"ISO",
         "diskFileSize":34603008,
         "hdRequired":1073741824,
         "state":"DONE"
      }
   ],
   "links":[  
      {  
         "href":"http://10.60.1.223:80/api/admin/enterprises/1/datacenterrepositories/1/action/disks?type=ISO&states=DONE&limit=25&by=id",
         "rel":"first"
      },
      {  
         "href":"http://10.60.1.223:80/api/admin/enterprises/1/datacenterrepositories/1/action/disks?type=ISO&states=DONE&startwith=0&limit=25&by=id",
         "rel":"last"
      }
   ]
}

 

Further request examples: