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>192.168.0.10</address>
<path>/data1</path>
</storage>
<host>
<name>hypervisor</name>
</host>
</storage_domain>
The API creates a NFS data storage domain called data1
with an export path of 192.168.0.10:/data1
and sets access to the storage domain through the hypervisor
host. The API also returns the following representation of the newly created storage domain resource:
HTTP/1.1 200 OK
Accept: application/xml
<storage_domains>
<storage_domain id="9ca7cb40-9a2a-4513-acef-dc254af57aac"
href="/rhevm-api/storagedomains/9ca7cb40-9a2a-4513-acef-dc254af57aac">
<name>data1</name>
<link rel="permissions"
href="/rhevm-api/storagedomains/9ca7cb40-9a2a-4513-acef-dc254af57aac/
permissions"/>
<link rel="files"
href="/rhevm-api/storagedomains/9ca7cb40-9a2a-4513-acef-dc254af57aac/files"/>
<type>data</type>
<master>false</master>
<storage>
<type>nfs</type>
<address>192.168.0.10</address>
<path>/data1</path>
</storage>
<available>175019917312</available>
<used>27917287424</used>
<committed>10737418240</committed>
<storage_format>v1</storage_format>
<host id="0656f432-923a-11e0-ad20-5254004ac988"
href="/rhevm-api/hosts/0656f432-923a-11e0-ad20-5254004ac988">
</storage_domain>
</storage_domains>