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

Storage Pool Resource

Exposed Resources Hierarchy
Storage Pool Resource

Contents:

This resource exposes the management operations for the storage pools. Storage pools are configured in the target storage devices, and will be used as the backend storage for the iSCSI volumes. Abiquo will create those volumes in the different storage pools that are enabled in the corresponding storage devices.

Main URI of the Resource

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

Exposed Methods

Get the list of storage pools

Get the information of the storage pools for the current storage device. If the 'sync' flag is set to 'true', then Abiquo will try to discover the pools in the target storage device and return them. This flag can be specially useful when adding storage pools, in order to provide accurate information about the storage pool being added.

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

Parameter

Required

Default Value

Description

sync

false

 

Synchronize and update remote Storage Pool with the database (Synchronize ->
true)

 

 

 

 

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

 Click here to show or hide the request example
Get the list of storage pools example
curl http://example.com/api/admin/datacenters/1/storage/devices/1/pools \
    -v -u user:pass \
    -X GET \
    -H "application/vnd.abiquo.storagepools+xml;version=2.4"
    
GET http://example.com/api/admin/datacenters/1/storage/devices/1/pool HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.storagepools+xml;version=2.4

HTTP/1.1 200 OK
Date: Mon, 28 Jan 2013 10:55:29 GMT
Keep-Alive: timeout=15, max=98
Set-Cookie: JSESSIONID=30C8A4DF51D393B2C4ECC2F75F7B3DB7.node1; Path=/api
Set-Cookie: auth=YWRtaW46MTM1OTM3MjMyOTE2OTplNjIwNjNkMGU1ZGJiYzYzMDE4MzU4MzljMTNlMWE1OTpBQklRVU8; Expires=Mon, 28-Jan-2013 11:25:29 GMT; Path=/api
Connection: Keep-Alive
Content-Type: application/vnd.abiquo.storagepools+xml;version=2.4
Content-Length: 970

<?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/40697fdb-e159-473d-89b4-f93b6b10482f"/>
        <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/40697fdb-e159-473d-89b4-f93b6b10482f/action/volumes"/>
        <idStorage>40697fdb-e159-473d-89b4-f93b6b10482f</idStorage>
        <name>abiquo</name>
        <totalSizeInMb>15360</totalSizeInMb>
        <usedSizeInMb>6113</usedSizeInMb>
        <availableSizeInMb>9246</availableSizeInMb>
        <enabled>false</enabled>
    </storagePool>
</storagePools>



Get the list of storage pools including the tier information

Get the information of the storage pools for the current storage device, including the tier that each pool belongs to.

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

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Get the list of storage pools including the tier information example
curl http://example.com/api/admin/datacenters/1/storage/devices/1/pools \
    -v -u user:pass \
    -X GET \
    -H "application/storagepoolswithtier+xml;version=2.4"
    
GET http://example.com/api/admin/datacenters/1/storage/devices/1/pool HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/storagepoolswithtier+xml;version=2.4

HTTP/1.1 200 OK
Date: Mon, 28 Jan 2013 10:55:29 GMT
Keep-Alive: timeout=15, max=98
Set-Cookie: JSESSIONID=30C8A4DF51D393B2C4ECC2F75F7B3DB7.node1; Path=/api
Set-Cookie: auth=YWRtaW46MTM1OTM3MjMyOTE2OTplNjIwNjNkMGU1ZGJiYzYzMDE4MzU4MzljMTNlMWE1OTpBQklRVU8; Expires=Mon, 28-Jan-2013 11:25:29 GMT; Path=/api
Connection: Keep-Alive
Content-Type: application/storagepoolswithtier+xml;version=2.4
Content-Length: 970

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<storagePoolsWithTier>
    <storagePoolWithTier>
        <link rel="device" type="application/vnd.abiquo.storagedevice+xml" href="http://example.com/api/admin/datacenters/2/storage/devices/4"/>
        <link rel="edit" type="application/vnd.abiquo.storagepool+xml" href="http://example.com/api/admin/datacenters/2/storage/devices/4/pools/f1c6d03b-dd88-4fad-82eb-1a6aee257066"/>
        <link rel="tier" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/admin/datacenters/2/storage/tiers/15"/>
        <idStorage>f1c6d03b-dd88-4fad-82eb-1a6aee257066</idStorage>
        <name>iscsi_pool</name>
        <totalSizeInMb>9223372036854775807</totalSizeInMb>
        <usedSizeInMb>0</usedSizeInMb>
        <availableSizeInMb>9223372036854775807</availableSizeInMb>
        <enabled>false</enabled>
        <tier>
            <id>15</id>
            <name>Tier 2 (High Performance)</name>
            <description>Description of default tier 2</description>
            <enabled>true</enabled>
        </tier>
    </storagePoolWithTier>
</storagePoolsWithTier>



Create a Storage Pool means registering an existing Storage Pool obtained from the Get
remote list of Pools method and sending the POST to store it in the DB as a pool
available for creating volumes. The Storage Pools must be associated with a Tier. You
can also create it by using a RESTLink to the corresponding tier.

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

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Create a storage pool with a tier link example
curl http://example.com/api/admin/datacenters/1/storage/devices/1/pools \
    -v -u user:pass \
    -X POST \
    -d @entity.xml \
    -H "Accept: application/vnd.abiquo.storagepool+xml;version=2.4" \
    -H "Content-Type: application/vnd.abiquo.storagepool+xml;version=2.4"
    
POST http://example.com/api/admin/datacenters/1/storage/devices/1/pools HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.storagepool+xml;version=2.4
Content-Type: application/vnd.abiquo.storagepool+xml;version=2.4
Content-Length: 355

HTTP/1.1 201 Created
Date: Mon, 28 Jan 2013 10:55:03 GMT
Location: http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f
Keep-Alive: timeout=15, max=84
Set-Cookie: JSESSIONID=29E6828CFC3A10AF2769B09D9DB54F39.node1; Path=/api
Set-Cookie: auth=YWRtaW46MTM1OTM3MjMwMzA4NDpkNWViNGNlMjk3NTgwMGFhMDFhYmYxMWEzODBiMTcxYzpBQklRVU8; Expires=Mon, 28-Jan-2013 11:25:03 GMT; Path=/api
Connection: Keep-Alive
Content-Type: application/vnd.abiquo.storagepool+xml;version=2.4
Content-Length: 941

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<storagePool>
    <link rel="edit" type="application/vnd.abiquo.storagepool+xml" href="http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f"/>
    <link rel="tier" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/1"/>
    <link rel="device" type="application/vnd.abiquo.storagedevice+xml" href="http://example.com/api/admin/datacenters/1/storage/devices/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/40697fdb-e159-473d-89b4-f93b6b10482f/action/volumes"/>
    <idStorage>40697fdb-e159-473d-89b4-f93b6b10482f</idStorage>
    <name>abiquo</name>
    <totalSizeInMb>15360</totalSizeInMb>
    <usedSizeInMb>6113</usedSizeInMb>
    <availableSizeInMb>9246</availableSizeInMb>
    <enabled>false</enabled>
</storagePool>



Download a template

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

Add a storage pool to a storage tier using the tier representation

Add a storage pool to the platform and associate it with the given tier. The XML representing the tier must be embedded inside the XML describing the storage pool to add.

Synopsis: POST http://example.com/api/admin/datacenters/{datacenter}/storage/devices/{device}/pools
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_STORAGE
Request Headers: Accept: application/storagepoolwithtier+xml; version=2.4; Content-type: application/storagepoolwithtier+xml; version=2.4;
Request Parameters:

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Add a storage pool to a storage tier using the tier representation example
curl http://example.com/api/admin/datacenters/1/storage/devices/1/pools \
    -v -u user:pass \
    -X POST \
    -d @entity.xml \
    -H "Accept: application/storagepoolwithtier+xml;version=2.4" \
    -H "Content-Type: application/storagepoolwithtier+xml;version=2.4"
    
POST http://example.com/api/admin/datacenters/1/storage/devices/1/pools HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/storagepoolwithtier+xml;version=2.4
Content-Type: application/storagepoolwithtier+xml;version=2.4
Content-Length: 355

HTTP/1.1 201 Created
Date: Mon, 28 Jan 2013 10:55:03 GMT
Location: http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f
Keep-Alive: timeout=15, max=84
Set-Cookie: JSESSIONID=29E6828CFC3A10AF2769B09D9DB54F39.node1; Path=/api
Set-Cookie: auth=YWRtaW46MTM1OTM3MjMwMzA4NDpkNWViNGNlMjk3NTgwMGFhMDFhYmYxMWEzODBiMTcxYzpBQklRVU8; Expires=Mon, 28-Jan-2013 11:25:03 GMT; Path=/api
Connection: Keep-Alive
Content-Type: application/storagepoolwithtier+xml;version=2.4
Content-Length: 941

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<storagePool>
    <link rel="edit" type="application/vnd.abiquo.storagepool+xml" href="http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f"/>
    <link rel="tier" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/1"/>
    <link rel="device" type="application/vnd.abiquo.storagedevice+xml" href="http://example.com/api/admin/datacenters/1/storage/devices/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/40697fdb-e159-473d-89b4-f93b6b10482f/action/volumes"/>
    <idStorage>40697fdb-e159-473d-89b4-f93b6b10482f</idStorage>
    <name>abiquo</name>
    <totalSizeInMb>15360</totalSizeInMb>
    <usedSizeInMb>6113</usedSizeInMb>
    <availableSizeInMb>9246</availableSizeInMb>
    <enabled>false</enabled>
    <tier>
        <id>1</id>
        <name>Tier 1 (High Perf, Replicated)</name>
        <description>Description of default tier 1</description>
        <enabled>true</enabled>
    </tier>
</storagePool>



Download a template

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

Add a list of storage pools

Add a list of storage pools in a specified storage device.

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

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Add a list of storage pools example
curl http://example.com/api/admin/datacenters/1/storage/devices/1/pools \
    -v -u user:pass \
    -X POST \
    -d @entity.xml \
    -H "Accept: application/vnd.abiquo.storagepools+xml;version=2.4" \
    -H "Content-Type: application/vnd.abiquo.storagepools+xml;version=2.4"
    
POST http://example.com/api/admin/datacenters/1/storage/devices/1/pools HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.storagepools+xml;version=2.4
Content-Type: application/vnd.abiquo.storagepools+xml;version=2.4
Content-Length: 355

HTTP/1.1 201 Created
Date: Mon, 28 Jan 2013 10:55:03 GMT
Keep-Alive: timeout=15, max=84
Set-Cookie: JSESSIONID=29E6828CFC3A10AF2769B09D9DB54F39.node1; Path=/api
Set-Cookie: auth=YWRtaW46MTM1OTM3MjMwMzA4NDpkNWViNGNlMjk3NTgwMGFhMDFhYmYxMWEzODBiMTcxYzpBQklRVU8; Expires=Mon, 28-Jan-2013 11:25:03 GMT; Path=/api
Connection: Keep-Alive
Content-Type: application/vnd.abiquo.storagepools+xml;version=2.4
Content-Length: 941

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<storagePools>
    <storagePool>
        <link rel="edit" type="application/vnd.abiquo.storagepool+xml" href="http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f"/>
        <link rel="tier" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/1"/>
        <link rel="device" type="application/vnd.abiquo.storagedevice+xml" href="http://example.com/api/admin/datacenters/1/storage/devices/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/40697fdb-e159-473d-89b4-f93b6b10482f/action/volumes"/>
        <idStorage>40697fdb-e159-473d-89b4-f93b6b10482f</idStorage>
        <name>abiquo</name>
        <totalSizeInMb>15360</totalSizeInMb>
        <usedSizeInMb>6113</usedSizeInMb>
        <availableSizeInMb>9246</availableSizeInMb>
        <enabled>false</enabled>
    </storagePool>
</storagePools>

Download a template

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

Get the information about a storage pool

Get the information about a storage pool.

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

Parameter

Required

Default Value

Description

sync

false

 

Synchronize and update remote Storage Pool with the database (Synchronize ->
true)

 

 

 

 

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

 Click here to show or hide the request example
Get the information about a storage pool example
curl http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f \
    -v -u user:pass \
    -X GET \
    -H "Accept: application/vnd.abiquo.storagepool+xml;version=2.4"
    
GET http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.storagepool+xml;version=2.4

HTTP/1.1 200 OK
Date: Mon, 28 Jan 2013 10:55:29 GMT
Keep-Alive: timeout=15, max=92
Set-Cookie: JSESSIONID=F71F5017E365813CDA479BF04B0E6455.node1; Path=/api
Set-Cookie: auth=YWRtaW46MTM1OTM3MjMyOTM2NTo2YTI1Yzc4NTI0NWRjNDU5YTQ2MGE2NWU5OWVkYmQ5YTpBQklRVU8; Expires=Mon, 28-Jan-2013 11:25:29 GMT; Path=/api
Connection: Keep-Alive
Content-Type: application/vnd.abiquo.storagepool+xml;version=2.4
Content-Length: 941

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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/40697fdb-e159-473d-89b4-f93b6b10482f"/>
    <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/40697fdb-e159-473d-89b4-f93b6b10482f/action/volumes"/>
    <idStorage>40697fdb-e159-473d-89b4-f93b6b10482f</idStorage>
    <name>abiquo</name>
    <totalSizeInMb>15360</totalSizeInMb>
    <usedSizeInMb>6113</usedSizeInMb>
    <availableSizeInMb>9246</availableSizeInMb>
    <enabled>true</enabled>
</storagePool>



Modify an existing storage pool

Change the storage tier where the pool is assigned.

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

Parameter

Required

Default Value

Description

 

 

 

 

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

 Click here to show or hide the request example
Modify an existing storage pool example
curl http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f \
    -v -u user:pass \
    -X PUT \
    -d @entity.xml \
    -H "Accept: application/vnd.abiquo.storagepool+xml;version=2.4" \
    -H "Content-Type: application/vnd.abiquo.storagepool+xml;version=2.4"
    
PUT http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.storagepool+xml;version=2.4
Content-Type: application/vnd.abiquo.storagepool+xml;version=2.4
Content-Length: 994

HTTP/1.1 200 OK
Date: Mon, 28 Jan 2013 10:55:16 GMT
Keep-Alive: timeout=15, max=63
Set-Cookie: JSESSIONID=B4282E88C1A2EFF4EC5CECB427796F02.node1; Path=/api
Set-Cookie: auth=YWRtaW46MTM1OTM3MjMxNjc2Nzo5NGY0NzliNzU2ZTkxNzIzMmY5MGY5NDViZTJmZmM2NDpBQklRVU8; Expires=Mon, 28-Jan-2013 11:25:16 GMT; Path=/api
Connection: Keep-Alive
Content-Type: application/vnd.abiquo.storagepool+xml;version=2.4
Content-Length: 941

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<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/40697fdb-e159-473d-89b4-f93b6b10482f"/>
    <link rel="tier" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/admin/datacenters/1/storage/tiers/2"/>
    <link rel="volumes" type="application/vnd.abiquo.iscsivolumes+xml; version=2.4" href="http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f/action/volumes"/>
    <idStorage>40697fdb-e159-473d-89b4-f93b6b10482f</idStorage>
    <name>abiquo</name>
    <totalSizeInMb>15360</totalSizeInMb>
    <usedSizeInMb>6113</usedSizeInMb>
    <availableSizeInMb>9246</availableSizeInMb>
    <enabled>false</enabled>
</storagePool>



Download a template

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

Remove a storage pool

Unassign the storage pool from the storage device.

Synopsis: DELETE http://example.com/api/admin/datacenters/{datacenter}/storage/devices/{device}/pools/{pool}
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
Remove a storage pool example
curl http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f \
    -v -u user:pass \
    -X DELETE
    
DELETE http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==

HTTP/1.1 204 No Content
Date: Mon, 28 Jan 2013 10:56:33 GMT
Keep-Alive: timeout=15, max=60
Set-Cookie: JSESSIONID=217CD3EF8EF4F16ACAF6348BA656A61F.node1; Path=/api
Set-Cookie: auth=YWRtaW46MTM1OTM3MjM5MzEwNjowOTE2NTA2MGVkMmVhZTZlNDY5YmJmMWFjZTc2YWFkNjpBQklRVU8; Expires=Mon, 28-Jan-2013 11:26:33 GMT; Path=/api
Connection: Keep-Alive



Get the volumes in a storage pool

Retrieve the list of volumes in a storage pool.

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/devices/{device}/pools/{pool}/action/volumes
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_STORAGE, ROLE_PHYS_DC_RETRIEVE_DETAILS
Request Headers: Accept: application/vnd.abiquo.iscsivolumes+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

First element to retrieve

by

false

id

How to order the search. Available values are: {NAME, VIRTUALDATACENTER,
VIRTUALAPPLIANCE, VIRUTALMACHINE, TIER, TOTALSIZE, USEDSIZE, AVAILABLESIZE}

has

false

 

A way to filter the search. It can be filtered by: Volume name, Virtual Datacenter
name, Virtual Appliance name, Virtual Machine name, Tier name, Total size

limit

false

25

Number of elements to retrieve.

asc

false

true

The way to order the search (ascendant -> true, descendant -> false). Ascendant by
default.

 

 

 

 

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

 Click here to show or hide the request example
Get the volumes in a storage pool example
curl http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f/action/volumes \
    -v -u user:pass \
    -X GET \
    -H "Accept: application/vnd.abiquo.iscsivolumes+xml;version=2.4"
    
GET http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f/action/volumes HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.iscsivolumes+xml;version=2.4

HTTP/1.1 200 OK
Date: Mon, 28 Jan 2013 10:55:29 GMT
Keep-Alive: timeout=15, max=92
Set-Cookie: JSESSIONID=F71F5017E365813CDA479BF04B0E6455.node1; Path=/api
Set-Cookie: auth=YWRtaW46MTM1OTM3MjMyOTM2NTo2YTI1Yzc4NTI0NWRjNDU5YTQ2MGE2NWU5OWVkYmQ5YTpBQklRVU8; Expires=Mon, 28-Jan-2013 11:25:29 GMT; Path=/api
Connection: Keep-Alive
Content-Type: application/vnd.abiquo.iscsivolumes+xml;version=2.4
Content-Length: 941

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<volumes>
    <link rel="first" href="http://example.com/api/admin/datacenters/2/storage/devices/11/pools/e17538fa-4013-414d-9083-9e912943ce3b/action/volumes"/>
    <link rel="last" href="http://example.com/api/admin/datacenters/2/storage/devices/11/pools/e17538fa-4013-414d-9083-9e912943ce3b/action/volumes?startwith=0"/>
    <totalSize>1</totalSize>
    <volume>
        <link rel="edit" type="application/vnd.abiquo.volume+xml" href="http://example.com/api/cloud/virtualdatacenters/66/volumes/88313"/>
        <link rel="initiator mappings" type="application/vnd.abiquo.initiatormappings+xml" href="http://example.com/api/cloud/virtualdatacenters/66/volumes/88313/action/initiatormappings"/>
        <link title="Tier 1 (High Perf, Replicated)" rel="tier" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/cloud/virtualdatacenters/66/tiers/1"/>
        <link title="6 Development (ESX)" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/66"/>
        <id>88313</id>
        <uuid>091a2908-8400-4614-93f4-d2beea6d351b</uuid>
        <name>__1</name>
        <state>DETACHED</state>
        <sizeInMB>102</sizeInMB>
    </volume>
</volumes>




Get volumes in a storage pool with virtual machine information

Retrieve the list of volumes in a storage pool, including the representation of the virtual machine, virtual appliance and virtual datacenter if the volume is attached to a virtual machine.

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/devices/{device}/pools/{pool}/action/volumes
Roles Required: ROLE_PHYS_DC_ALLOW_MODIFY_STORAGE, ROLE_PHYS_DC_RETRIEVE_DETAILS
Request Headers: Accept: application/vnd.abiquo.iscsivolumeswithvirtualmachine+xml; version=2.4; Content-type: ;
Request Parameters:

Parameter

Required

Default Value

Description

startwith

false

0

First element to retrieve

by

false

id

How to order the search. Available values are: {NAME, VIRTUALDATACENTER,
VIRTUALAPPLIANCE, VIRUTALMACHINE, TIER, TOTALSIZE, USEDSIZE, AVAILABLESIZE}

has

false

 

A way to filter the search. It can be filtered by: Volume name, Virtual Datacenter
name, Virtual Appliance name, Virtual Machine name, Tier name, Total size

limit

false

25

Number of elements to retrieve.

asc

false

true

The way to order the search (ascendant -> true, descendant -> false). Ascendant by
default.

 

 

 

 

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

 Click here to show or hide the request example
Get volumes in a storage pool with virtual machine information example
curl http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f/action/volumes \
    -v -u user:pass \
    -X GET \
    -H "Accept: application/vnd.abiquo.iscsivolumeswithvirtualmachine+xml;version=2.4"
    
GET http://example.com/api/admin/datacenters/1/storage/devices/1/pools/40697fdb-e159-473d-89b4-f93b6b10482f/action/volumes HTTP/1.1
Authorization: Basic YWRtaW46eGFiaXF1bw==
Accept: application/vnd.abiquo.iscsivolumeswithvirtualmachine+xml;version=2.4

HTTP/1.1 200 OK
Date: Mon, 28 Jan 2013 10:55:29 GMT
Keep-Alive: timeout=15, max=92
Set-Cookie: JSESSIONID=F71F5017E365813CDA479BF04B0E6455.node1; Path=/api
Set-Cookie: auth=YWRtaW46MTM1OTM3MjMyOTM2NTo2YTI1Yzc4NTI0NWRjNDU5YTQ2MGE2NWU5OWVkYmQ5YTpBQklRVU8; Expires=Mon, 28-Jan-2013 11:25:29 GMT; Path=/api
Connection: Keep-Alive
Content-Type: application/vnd.abiquo.iscsivolumeswithvirtualmachine+xml;version=2.4
Content-Length: 941

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<volumes>
    <link rel="first" href="http://example.com/api/admin/datacenters/2/storage/devices/11/pools/e17538fa-4013-414d-9083-9e912943ce3b/action/volumes"/>
    <link rel="last" href="http://example.com/api/admin/datacenters/2/storage/devices/11/pools/e17538fa-4013-414d-9083-9e912943ce3b/action/volumes?startwith=0"/>
    <totalSize>1</totalSize>
    <volume>
        <link rel="edit" type="application/vnd.abiquo.volume+xml" href="http://example.com/api/cloud/virtualdatacenters/66/volumes/88313"/>
        <link rel="initiator mappings" type="application/vnd.abiquo.initiatormappings+xml" href="http://example.com/api/cloud/virtualdatacenters/66/volumes/88313/action/initiatormappings"/>
        <link title="Tier 1 (High Perf, Replicated)" rel="tier" type="application/vnd.abiquo.tier+xml" href="http://example.com/api/cloud/virtualdatacenters/66/tiers/1"/>
        <link title="6 Development (ESX)" rel="virtualdatacenter" type="application/vnd.abiquo.virtualdatacenter+xml" href="http://example.com/api/cloud/virtualdatacenters/66"/>
        <id>88313</id>
        <uuid>091a2908-8400-4614-93f4-d2beea6d351b</uuid>
        <name>__1</name>
        <state>DETACHED</state>
        <sizeInMB>102</sizeInMB>
        <storagePoolWithDevice>
            <idStorage>e17538fa-4013-414d-9083-9e912943ce3b</idStorage>
            <name>abiquo</name>
            <totalSizeInMb>20377</totalSizeInMb>
            <usedSizeInMb>614</usedSizeInMb>
            <availableSizeInMb>19763</availableSizeInMb>
            <enabled>false</enabled>
            <device>
                <id>11</id>
                <name>Nexenta</name>
                <storageTechnology>NEXENTA</storageTechnology>
                <managementIp>192.168.0.30</managementIp>
                <managementPort>2000</managementPort>
                <iscsiIp>192.168.0.30</iscsiIp>
                <iscsiPort>3260</iscsiPort>
            </device>
        </storagePoolWithDevice>
        <virtualDatacenterWithDatacenter>
            <cpuHard>0</cpuHard>
            <cpuSoft>0</cpuSoft>
            <hdHard>0</hdHard>
            <hdSoft>0</hdSoft>
            <publicIpsHard>0</publicIpsHard>
            <publicIpsSoft>0</publicIpsSoft>
            <ramHard>0</ramHard>
            <ramSoft>0</ramSoft>
            <storageHard>0</storageHard>
            <storageSoft>0</storageSoft>
            <vlansHard>0</vlansHard>
            <vlansSoft>0</vlansSoft>
            <hypervisorType>VMX_04</hypervisorType>
            <id>66</id>
            <name>6 Development (ESX)</name>
            <datacenter>
                <id>2</id>
                <location>London</location>
                <name>London</name>
            </datacenter>
        </virtualDatacenterWithDatacenter>
    </volume>
</volumes>

  • No labels