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 2.6


Skip to end of metadata
Go to start of metadata

Tiers Resource

Exposed Resources Hierarchy
Tiers Resource

Contents:

The Tier Resource enables you to manage QoS for volumes. Tiers are logical levels of QoS, but the real QoS (networking speed, volume replication, availability) must be configured by the Storage Administrators outside of Abiquo.

Main URI of the Resource

This class operates mainly over the Resource URI: /admin/datacenters/{datacenter}/storage/tiers

Exposed Methods

Retrieve the list of tiers

Retrieves the list of tiers in a specified datacenter

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/storage/tiers
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS,ROLE_VDC_MANAGE_STORAGE,ROLE_VAPP_CREATE_STATEFUL,ROLE_PRICING_VIEW,ROLE_USERS_MANAGE_ENTERPRISE
Request Headers: Accept: application/vnd.abiquo.tiers+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

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

> GET /api/admin/datacenters/1/storage/tiers 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.tiers+xml;version=2.4
 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTcyMDY2NjIzODpjMGM1ZmY5ZDIyY2E2MjFjMjhlYjEwNzg1YmRkMTZmODpBQklRVU8; Expires=Fri, 01-Feb-2013 12:11:06 GMT; Path=/api
< Set-Cookie: JSESSIONID=67227AEEDE9575D37325A015AC2789EC; Path=/api
< Content-Type: application/vnd.abiquo.tiers+xml;version=2.4
< Content-Length: 3738
< Date: Fri, 01 Feb 2013 11:41:06 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tiers>
    <tier>
        <link rel="allowallenterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/1/action/allowallenterprises"/>
        <link rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="http://example.com/api/admin/datacenters/1"/>
        <link rel="edit" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/1"/>
        <link rel="enterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/1/enterprises"/>
        <link rel="pools" type="application/vnd.abiquo.storagepools+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/1/pools"/>
        <link rel="restrictallenterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/1/action/restrictallenterprises"/>
        <id>1</id>
        <name>Default Tier 1</name>
        <description>Description of the default tier 1</description>
        <enabled>true</enabled>
        <defaultAllowed>true</defaultAllowed>
    </tier>
    <tier>
        <link rel="allowallenterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/2/action/allowallenterprises"/>
        <link rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="http://example.com/api/admin/datacenters/1"/>
        <link rel="edit" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/2"/>
        <link rel="enterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/2/enterprises"/>
        <link rel="pools" type="application/vnd.abiquo.storagepools+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/2/pools"/>
        <link rel="restrictallenterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/2/action/restrictallenterprises"/>
        <id>2</id>
        <name>Default Tier 2</name>
        <description>Description of the default tier 2</description>
        <enabled>true</enabled>
        <defaultAllowed>true</defaultAllowed>
    </tier>
    <tier>
        <link rel="allowallenterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/3/action/allowallenterprises"/>
        <link rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="http://example.com/api/admin/datacenters/1"/>
        <link rel="edit" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/3"/>
        <link rel="enterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/3/enterprises"/>
        <link rel="pools" type="application/vnd.abiquo.storagepools+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/3/pools"/>
        <link rel="restrictallenterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/3/action/restrictallenterprises"/>
        <id>3</id>
        <name>Default Tier 3</name>
        <description>Description of the default tier 3</description>
        <enabled>true</enabled>
        <defaultAllowed>true</defaultAllowed>
    </tier>
    <tier>
        <link rel="allowallenterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/4/action/allowallenterprises"/>
        <link rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="http://example.com/api/admin/datacenters/1"/>
        <link rel="edit" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/4"/>
        <link rel="enterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/4/enterprises"/>
        <link rel="pools" type="application/vnd.abiquo.storagepools+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/4/pools"/>
        <link rel="restrictallenterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/4/action/restrictallenterprises"/>
        <id>4</id>
        <name>Default Tier 4</name>
        <description>Description of the default tier 4</description>
        <enabled>true</enabled>
        <defaultAllowed>true</defaultAllowed>
    </tier>
</tiers>


Retrieve a tier

Retrieve a tier.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/storage/tiers/{tier}
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS,ROLE_VDC_MANAGE_STORAGE,ROLE_VAPP_CREATE_STATEFUL,ROLE_PRICING_VIEW,ROLE_USERS_MANAGE_ENTERPRISE
Request Headers: Accept: application/vnd.abiquo.tier+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

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

> GET /api/admin/datacenters/1/storage/tiers/1 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.tier+xml;version=2.4
 
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTcyMDg1ODkwNzpmMWMwYTRmYTc5MzM5NzVkNmFkZTMzOGY1ZjIwMzIyNDpBQklRVU8; Expires=Fri, 01-Feb-2013 12:14:18 GMT; Path=/api
< Set-Cookie: JSESSIONID=22A964B6705EE09CF122EEEF830F4A01; Path=/api
< Content-Type: application/vnd.abiquo.tier+xml;version=2.4
< Content-Length: 972
< Date: Fri, 01 Feb 2013 11:44:18 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tier>
    <link rel="allowallenterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/1/action/allowallenterprises"/>
    <link rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="http://example.com/api/admin/datacenters/1"/>
    <link rel="edit" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/1"/>
    <link rel="enterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/1/enterprises"/>
    <link rel="pools" type="application/vnd.abiquo.storagepools+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/1/pools"/>
    <link rel="restrictallenterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/1/action/restrictallenterprises"/>
    <id>1</id>
    <name>Default Tier 1</name>
    <description>Description of the default tier 1</description>
    <enabled>true</enabled>
    <defaultAllowed>true</defaultAllowed>
</tier>


Update a tier

Update a tier.

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

Parameter

Required

Default Value

Description

 

 

 

 

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

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

> PUT /api/admin/datacenters/1/storage/tiers/1 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.tier+xml;version=2.4
> content-type:application/vnd.abiquo.tier+xml;version=2.4
> Content-Length: 199

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTcyMTAyNTE0OTo1MTdmZWFjZTYyOWMyY2UxMjE4ODQxOWZkZDQzZTY2YjpBQklRVU8; Expires=Fri, 01-Feb-2013 12:17:05 GMT; Path=/api
< Set-Cookie: JSESSIONID=1CAA4ACADE4B18C73B555B9ABF28EDE6; Path=/api
< Content-Type: application/vnd.abiquo.tier+xml;version=2.4
< Content-Length: 981
< Date: Fri, 01 Feb 2013 11:47:05 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<tier>
    <link rel="allowallenterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/1/action/allowallenterprises"/>
    <link rel="datacenter" type="application/vnd.abiquo.datacenter+xml" href="http://example.com/api/admin/datacenters/1"/>
    <link rel="edit" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/1"/>
    <link rel="enterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/1/enterprises"/>
    <link rel="pools" type="application/vnd.abiquo.storagepools+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/1/pools"/>
    <link rel="restrictallenterprises" href="http://example.com/api/admin/datacenters/1/storage/tiers/1/action/restrictallenterprises"/>
    <id>1</id>
    <name>Default Tier 1 MODIFIED</name>
    <description>Description of the default tier 1</description>
    <enabled>true</enabled>
    <defaultAllowed>true</defaultAllowed>
</tier>


Download a template

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

Retrieve a list of pools with device

Retrieve a list of pools by tier, including the representation of the device that each pool belongs to.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/storage/tiers/{tier}/pools
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS,ROLE_VAPP_CREATE_STATEFUL
Request Headers: Accept: application/storagepoolswithdevice+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

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

> GET /api/admin/datacenters/1/storage/tiers/1/pools 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/storagepoolswithdevice+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTczNTY1NTU1MTowM2I2ODI0ODg3NmNjMjZkZGViNzg1NmVmMmQ0NjQ3ZDpBQklRVU8; Expires=Fri, 01-Feb-2013 16:20:55 GMT; Path=/api
< Set-Cookie: JSESSIONID=9AAA09471DC841BAFD06A000E210B1DF; Path=/api
< Content-Type: application/storagepoolswithdevice+xml;version=2.4
< Content-Length: 1236
< Date: Fri, 01 Feb 2013 15:50:55 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<storagePoolsWithDevice>
    <storagePoolWithDevice>
        <link rel="device" type="application/vnd.abiquo.storagedevice+xml" href="http://example.com/api/admin/datacenters/1/storage/devices/1"/>
        <link rel="edit" type="application/vnd.abiquo.storagepool+xml" href="http://example.com/api/admin/datacenters/1/storage/devices/1/pools/4ac0d9bf-2cfe-470f-af6b-c0bf5e0487e8"/>
        <link rel="tier" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/1"/>
        <link rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml; version=2.4" href="http://example.com/api/admin/datacenters/1/storage/devices/1/pools/4ac0d9bf-2cfe-470f-af6b-c0bf5e0487e8/action/volumes"/>
        <idStorage>4ac0d9bf-2cfe-470f-af6b-c0bf5e0487e8</idStorage>
        <name>abiquo</name>
        <totalSizeInMb>15360</totalSizeInMb>
        <usedSizeInMb>7075</usedSizeInMb>
        <availableSizeInMb>8284</availableSizeInMb>
        <enabled>false</enabled>
        <device>
            <id>1</id>
            <name>LVMmmmmm</name>
            <storageTechnology>LVM</storageTechnology>
            <managementIp>10.60.12.177</managementIp>
            <managementPort>8180</managementPort>
            <iscsiIp>10.60.12.177</iscsiIp>
            <iscsiPort>3260</iscsiPort>
        </device>
    </storagePoolWithDevice>
</storagePoolsWithDevice>


Retrieve a list of pools

Retrieve a list of pools by tier.

Synopsis: GET http://example.com/api/admin/datacenters/{datacenter}/storage/tiers/{tier}/pools
Roles Required: ROLE_PHYS_DC_RETRIEVE_DETAILS,ROLE_VAPP_CREATE_STATEFUL
Request Headers: Accept: application/vnd.abiquo.storagepools+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

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

> GET /api/admin/datacenters/1/storage/tiers/1/pools 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.storagepools+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTcyOTM5ODAxMjphNDJjN2M0NTQ5MDAzN2FjYjdhYTY3YjkxYTVjYTZmMzpBQklRVU8; Expires=Fri, 01-Feb-2013 14:36:38 GMT; Path=/api
< Set-Cookie: JSESSIONID=D7BE7A66740365BE46646EF61A8EDBE2; Path=/api
< Content-Type: application/vnd.abiquo.storagepools+xml;version=2.4
< Content-Length: 970
< Date: Fri, 01 Feb 2013 14:06:38 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<storagePools>
    <storagePool>
        <link rel="device" type="application/vnd.abiquo.storagedevice+xml" href="http://example.com/api/admin/datacenters/1/storage/devices/1"/>
        <link rel="edit" type="application/vnd.abiquo.storagepool+xml" href="http://example.com/api/admin/datacenters/1/storage/devices/1/pools/4ac0d9bf-2cfe-470f-af6b-c0bf5e0487e8"/>
        <link rel="tier" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/1"/>
        <link rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml; version=2.4" href="http://example.com/api/admin/datacenters/1/storage/devices/1/pools/4ac0d9bf-2cfe-470f-af6b-c0bf5e0487e8/action/volumes"/>
        <idStorage>4ac0d9bf-2cfe-470f-af6b-c0bf5e0487e8</idStorage>
        <name>abiquo</name>
        <totalSizeInMb>15360</totalSizeInMb>
        <usedSizeInMb>7075</usedSizeInMb>
        <availableSizeInMb>8284</availableSizeInMb>
        <enabled>false</enabled>
    </storagePool>
</storagePools>


Retrieve a list of allowed enterprises for a tier

Retrieve the list of enterprises that are allowed to access the given tier.

Paging Method

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

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

Parameter

Required

Default Value

Description

startwith

false

0

first element to retrieve

limit

false

25

number of elements to return

by

false

name

ordering the request.

has

false

 

filter the request. With this parameter the response just contains the elements
which name matches the filter value.

asc

false

true

order ascendant or descendant. By default the sort mode is ascending.

 

 

 

 

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

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

> GET /api/admin/datacenters/1/storage/tiers/1/enterprises 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.enterprises+xml;version=2.4

< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTczNTk3MTc3NzpkZWUwMWRiY2MxY2I0OWM5YWQ0MjZjOTYyMjBkNDI1ZDpBQklRVU8; Expires=Fri, 01-Feb-2013 16:26:11 GMT; Path=/api
< Set-Cookie: JSESSIONID=6C431F1B8A516B0BA944889A2EEF81FD; Path=/api
< Content-Type: application/vnd.abiquo.enterprises+xml;version=2.4
< Content-Length: 2829
< Date: Fri, 01 Feb 2013 15:56:11 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<enterprises>
    <link rel="first" href="http://example.com/api/admin/datacenters/1/storage/tiers/1/enterprises?limit=25&amp;by=name"/>
    <link rel="last" href="http://example.com/api/admin/datacenters/1/storage/tiers/1/enterprises?startwith=0&amp;limit=25&amp;by=name"/>
    <totalSize>1</totalSize>
    <enterprise>
        <link rel="appslib/templateDefinitionLists" type="application/vnd.abiquo.templatedefinitionlists+xml" href="http://example.com/api/admin/enterprises/1/appslib/templateDefinitionLists"/>
        <link rel="appslib/templateDefinitions" type="application/vnd.abiquo.templatedefinitions+xml" href="http://example.com/api/admin/enterprises/1/appslib/templateDefinitions"/>
        <link rel="cloud/virtualdatacenters" type="application/vnd.abiquo.virtualdatacenters+xml" href="http://example.com/api/admin/enterprises/1/action/virtualdatacenters"/>
        <link rel="datacenterrepositories" type="application/vnd.abiquo.datacenterrepositories+xml" href="http://example.com/api/admin/enterprises/1/datacenterrepositories"/>
        <link rel="edit" type="application/vnd.abiquo.enterprise+xml" href="http://example.com/api/admin/enterprises/1"/>
        <link rel="externalnetworks" type="application/vnd.abiquo.vlans+xml" href="http://example.com/api/admin/enterprises/1/action/externalnetworks"/>
        <link title="ips" rel="ips" href="http://example.com/api/admin/enterprises/1/action/ips"/>
        <link rel="limits" type="application/vnd.abiquo.limits+xml" href="http://example.com/api/admin/enterprises/1/limits"/>
        <link rel="properties" type="application/vnd.abiquo.enterpriseproperties+xml" href="http://example.com/api/admin/enterprises/1/properties"/>
        <link rel="reservedmachines" type="application/vnd.abiquo.machines+xml" href="http://example.com/api/admin/enterprises/1/reservedmachines"/>
        <link rel="users" type="application/vnd.abiquo.users+xml" href="http://example.com/api/admin/enterprises/1/users"/>
        <link rel="virtualappliances" type="application/vnd.abiquo.virtualappliances+xml" href="http://example.com/api/admin/enterprises/1/action/virtualappliances"/>
        <link rel="virtualmachines" type="application/vnd.abiquo.virtualmachines+xml" href="http://example.com/api/admin/enterprises/1/action/virtualmachines"/>
        <link rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml" href="http://example.com/api/admin/enterprises/1/action/volumes"/>
        <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>
        <name>Abiquo</name>
        <repositoryHard>0</repositoryHard>
        <repositorySoft>0</repositorySoft>
        <isReservationRestricted>false</isReservationRestricted>
    </enterprise>
</enterprises>


Allow the tier to all enterprises

This action allows the tier to be used by all enterprises that use the tier's
datacenter. It means that if a datacenter limit does not exist between enterprise and
this datacenter, the tier won't be allowed to the enterprise. Property enabled value
does not affect to this feature, the tier will be allowed independently if it's enabled
or disabled, that property will be a second level of restriction. Similarly the
property default allowed value does not affect to the result.

Synopsis: PUT http://example.com/api/admin/datacenters/{datacenter}/storage/tiers/{tier}/action/allowallenterprises
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_STORAGE
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
Allow the tier to all enterprises example
$ curl -X PUT http://10.60.20.60:80/api/admin/datacenters/1/storage/tiers/1/action/allowallenterprises\
	 -u user:password --verbose


PUT http://10.60.20.60:80/api/admin/datacenters/1/storage/tiers/1/action/allowallenterprises HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==


HTTP/1.1 204 No Content
Date: Wed, 16 Jan 2013 14:09:58 GMT
Set-Cookie: JSESSIONID=48F1C7C3984ABA88130120EF83CA0A80; Path=/api
Set-Cookie: auth=YWRtaW46MTM1ODM0NzE5ODk4OToxNzgxNDU1NGQwZTM4ZjM4MjRlYjk5ZWQ2ODcwNmIyYzpBQklRVU8; Expires=Wed, 16-Jan-2013 14:39:58 GMT; Path=/api
Server: Apache-Coyote/1.1


Restrict the tier for all enterprises

This action restricts the tier for all enterprises. This means that the tier cannot be used by any enterprise. This action supports the use of parameter . If the force parameter is and some enterprise have volumes in the tier, then a list of errors will be returned and no action will be executed, it means . If it's and exist some enterprise with volumes in the tier then a list of errors will be returned but the enterprise without volumes will be restricted to use this tier, it means . If all runs ok, the parameter does not modify the result and a 204 (NO CONTENT) response code will be returned

Synopsis: PUT http://example.com/api/admin/datacenters/{datacenter}/storage/tiers/{tier}/action/restrictallenterprises
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_STORAGE
Request Headers: Accept: ; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

force

false

false

force

 

 

 

 

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

 Click here to show or hide the request example
Restrict the tier for all enterprises example
curl --verbose -u user:password http://example.com/api/admin/datacenters/1/storage/tiers/1/action/restrictallenterprises -X PUT

> PUT /api/admin/datacenters/1/storage/tiers/1/action/restrictallenterprises 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



An enterprise won't be restricted if has any volume created:

curl --verbose -u user:password http://example.com/api/admin/datacenters/1/storage/tiers/1/action/restrictallenterprises -X PUT

> PUT /api/admin/datacenters/1/storage/tiers/1/action/restrictallenterprises HTTP/1.1
> Authorization: Basic YWRtaW46eGFiaXF1bw==
> 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 409 Conflicto
< Server: Apache-Coyote/1.1
< Set-Cookie: auth=YWRtaW46MTM1OTczNjU3OTcyMDphZTU1Y2RkMmIyZTM5ZDQxZWU0YzEzN2I4NTY0Nzg1NTpBQklRVU8; Expires=Fri, 01-Feb-2013 16:36:19 GMT; Path=/api
< Set-Cookie: JSESSIONID=57289452E3C67A746A1EF89CC5D9C646; Path=/api
< Content-Type: application/vnd.abiquo.error+xml;version=2.4
< Content-Length: 356
< Date: Fri, 01 Feb 2013 16:06:19 GMT

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<errors>
    <error>
        <link title="Abiquo" rel="enterprise" type="application/vnd.abiquo.enterprise+xml; version=2.4" href="http://example.com/api/admin/enterprises/1"/>
        <code>LIMIT-17</code>
        <message>Cannot restrict the tier because the enterprise has already created volumes in it</message>
    </error>
</errors>


  • No labels