storagedomains
collection provides information about the storage domains in a Red Hat Enterprise Virtualization environment. An API user accesses this information through the rel="storagedomains"
link obtained from the entry point URI (see Chapter 4, Entry Point).
Element | Type | Description | Properties |
---|---|---|---|
name
| string |
A user-supplied human readable name for the storage domain. The name is unique across all storage domain resources.
| |
link rel="permissions"
| string | A link to the sub-collection for storage domain permissions. See Section 8.3.9, “ Permissions ” | |
link rel="files"
| string | A link to the files sub-collection for this storage domains | |
type
| enumerated |
The storage domain type. A list of enumerated values are available in capabilities . See Section 7.1.7, “Storage Domain Types”.
| |
master
| boolean: true or false |
true if this is the master storage domain of a data center
| |
host
| complex | A reference to the host on which this storage domain should be initialized. The only restriction on this host is that it should have access to the physical storage specified. | |
storage
| complex | Describes the underlying storage of the storage domain. For more information see Section 12.1, “ Storage types ”. | |
available
| integer | Space available in bytes | |
used
| integer | Space used in bytes | |
committed
| integer | Space committed in bytes | |
storage_format
| enumerated |
Describes the storage format version for the storage domain. A list of enumerated values are available in capabilities . See Section 7.1.19, “Storage Formats”
|
<storage_domain id="fabe0451-701f-4235-8f7e-e20e458819ed" href="/rhevm-api/storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed"> <name>data0</name> <link rel="permissions" href="/rhevm-api/storagedomains/be24cd98-8e23-49c7-b425-1a12bd12abb0/permissions"/> <link rel="files" href="/rhevm-api/storagedomains/be24cd98-8e23-49c7-b425-1a12bd12abb0/files"/> <type>data</type> <master>true</master> <storage> <type>nfs</type> <address>172.31.0.6</address> <path>/exports/RHEVX/images/0</path> </storage> <available>156766306304</available> <used>433791696896</used> <committed>617401548800</committed> <storage_format>v1</storage_format> </storage_domain>
name
, type
and storage
elements are required. See Section 8.3.2, “ Creating a Resource ” for more information.
POST /rhevm-api/storagedomains HTTP/1.1 Accept: application/xml Content-type: application/xml <storage_domain> <name>data1</name> <type>data</type> <storage> <type>nfs</type> <address>172.31.0.6</address> <path>/exports/RHEVX/images/0</path> </storage> </storage_domain>
name
element may be updated post-creation. See Section 8.3.4, “ Updating a Resource ” for more information.
PUT /rhevm-api/storagedomains HTTP/1.1 Accept: application/xml Content-type: application/xml <storage_domain> <name>data1</name> <type>data</type> <storage> <type>nfs</type> <address>172.31.0.6</address> <path>/exports/RHEVX/images/0</path> </storage> </storage_domain>
storage
element contains a type
element, which is an enumerated value found under the capabilities
collection. See Section 7.1.6, “Storage Types”.
type
. The next few section examine these additional storage type
elements.
nfs
specific elements in a storage
description are:
Element | Type | Description | Properties |
---|---|---|---|
address
| string | The host name or IP address of the NFS server | |
path
| string | The path of NFS mountable directory on the server |
iscsi
and fcp
specific elements in a storage
description are:
Element | Type | Description | Properties |
---|---|---|---|
logical_unit id
| complex | A storage domain may be composed of multiple iSCSI or FCP logical units | |
volume_group id
| complex | Alternatively, a storage domain may be based on a single LVM Volume Group which, in turn, may be composed of multiple iSCSI or FCP logical units |
logical_unit
description also contains details of the iSCSI target containing the LUN in question, the target will be automatically logged into when the storage domain is created.
local
specific elements in a storage
description are:
Element | Type | Description | Properties |
---|---|---|---|
path
| string | The path of local storage domain on the host |
local
storage domain requires a data center with storage_type
set to LOCAL (see Chapter 9, Data Centers). This data center only contains a single host cluster, and the host cluster only contains a single host.