StoragePoolsResource


Create a storage pool with a tier


Create a storage pool in the API so it will be available for creating volumes.
Obtain the storage pool entity to use in this request from a storage device using List storage pools with sync. For this request you must associate the storage pool with a tier by adding a tier object to the storage pool entity.

POST https://example.com/api/admin/datacenters/{datacenter}/storage/devices/{device}/pools

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_STORAGE]

Content-Type : storagepoolwithtier Accept : storagepoolwithtier

Example

Create a storage pool with a tier link


Create a storage pool in the API so it will be available for creating volumes.
Obtain the storage pool entity to use in this request from a storage device using List storage pools with sync. For this request you must associate the storage pool with a tier by adding a link to the tier in the storage pool entity.

POST https://example.com/api/admin/datacenters/{datacenter}/storage/devices/{device}/pools

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_STORAGE]

Content-Type : storagepool Accept : storagepool

Error Codes

  • CONSTR-RANGE - The property 'availableSizeInMb' must be between 0 and 9223372036854775807.
  • CONSTR-REQUIRED - The property 'name' must have a value.
  • DC-0 - The requested datacenter does not exist
  • DEVICE-0 - The requested device does not exist
  • GEN-6 - Invalid link reference
  • SP-15 - The storage pool cannot be added because it is the NFS repository of the Appliance Manager
  • SP-8 - Duplicate storage pool
  • SP-9 - Tier is disabled
  • TIER-0 - The requested storage tier does not exist
  • TIER-2 - Missing link to storage tier
  • TIER-5 - The storage tier is not in the datacenter where you are trying to create the storage pool

Example

Create multiple storage pools


Add a list of storage pools for a storage device.
You must associate each storage pool with a tier by supplying a link to the tier or a tier entity in each storage pool entity in the list.

POST https://example.com/api/admin/datacenters/{datacenter}/storage/devices/{device}/pools

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_STORAGE]

Content-Type : storagepools Accept : storagepools

Example

List storage pools


List the storage pools of a storage device.

GET https://example.com/api/admin/datacenters/{datacenter}/storage/devices/{device}/pools

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
sync Boolean If true, return the storage pools from the storage device itself, for use when adding or updating storage pools. If false or not supplied, return pools as registered in the platform

Accept : storagepools

Error Codes

  • DC-0 - The requested datacenter does not exist
  • DEVICE-0 - The requested device does not exist

Example

List storage pools with tiers


Get the storage pools of a storage device, including the tier that each pool belongs to.

GET https://example.com/api/admin/datacenters/{datacenter}/storage/devices/{device}/pools

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Example

Delete a storage pool


Remove the storage pool from the storage device in the platform.

DELETE https://example.com/api/admin/datacenters/{datacenter}/storage/devices/{device}/pools/{pool}

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_STORAGE]

Example

Get a storage pool


Retrieve a storage pool

GET https://example.com/api/admin/datacenters/{datacenter}/storage/devices/{device}/pools/{pool}

Roles : [ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
sync Boolean If true, return the storage pool from the storage device itself, for use when adding or updating the storage pool. If false or not supplied, return the storage pool as registered in the platform

Accept : storagepool

Error Codes

  • DEVICE-0 - The requested device does not exist
  • SP-3 - The requested storage pool does not exist

Example

Update a storage pool


Change the tier that the storage pool is assigned to.
Supply the new tier as a link

PUT https://example.com/api/admin/datacenters/{datacenter}/storage/devices/{device}/pools/{pool}

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_STORAGE]

Content-Type : storagepool Accept : storagepool

Error Codes

  • CONSTR-RANGE - The property 'maxVolumes' must be between 0 and 999999.
  • SP-9 - Tier is disabled

Example

List volumes in a storage pool


GET https://example.com/api/admin/datacenters/{datacenter}/storage/devices/{device}/pools/{pool}/action/volumes

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_STORAGE, ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String id How to order the search. Available values are: \{NAME, VIRTUALDATACENTER, VIRTUALAPPLIANCE, VIRUTALMACHINE, TIER, TOTALSIZE, USEDSIZE, AVAILABLESIZE\}
has String How to filter the search. It can be filtered by text of: Volume name, Virtual Datacenter name, Virtual Appliance name, Virtual Machine name, Tier name, Total size
limit Integer 25 The number of entities to retrieve
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)

Accept : volumes

Error Codes

  • QUERY-0 - Invalid 'by' parameter

Example

List volumes in a storage pool with virtual machine information


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

GET https://example.com/api/admin/datacenters/{datacenter}/storage/devices/{device}/pools/{pool}/action/volumes

Roles : [ROLE_PHYS_DC_ALLOW_MODIFY_STORAGE, ROLE_PHYS_DC_RETRIEVE_DETAILS]

Parameter Type Default Value Description
startwith Integer 0 The first element to be retrieved of the filtered search
by String id How to order the search. Available values are: \{NAME, VIRTUALDATACENTER, VIRTUALAPPLIANCE, VIRUTALMACHINE, TIER, TOTALSIZE, USEDSIZE, AVAILABLESIZE\}
has String How to filter the search. It can be filtered by text of: Volume name, Virtual Datacenter name, Virtual Appliance name, Virtual Machine name, Tier name, Total size
limit Integer 25 The number of entities to retrieve
asc Boolean true If the value of the 'by' parameter must be sorted in ascending order (true) or descending order (false)

Example