Method: OvirtSDK4::StorageDomainsService#add
- Defined in:
- lib/ovirtsdk4/services.rb
#add(storage_domain, opts = {}) ⇒ StorageDomain
Adds a new storage domain.
Creation of a new StorageDomain requires the name, type, host, and storage
attributes. Identify the host attribute with the id or name attributes. In product-name 3.6 and
later you can enable the wipe after delete option by default on the storage domain. To configure this, specify
wipe_after_delete in the POST request. This option can be edited after the domain is created, but doing so will
not change the wipe after delete property of disks that already exist.
To add a new storage domain with specified name, type, storage.type, storage.address, and storage.path,
and using a host with an id 123, send a request like this:
POST /ovirt-engine/api/storageDomains HTTP/1.1
With a request body like this:
<storage_domain>
<name>mydata</name>
<type>data</type>
<storage>
<type>nfs</type>
<address>mynfs.example.com</address>
<path>/exports/mydata</path>
</storage>
<host>
<name>myhost</name>
</host>
</storage_domain>
To create a new NFS ISO storage domain send a request like this:
<storage_domain>
<name>myisos</name>
<type>iso</type>
<storage>
<type>nfs</type>
<address>mynfs.example.com</address>
<path>/export/myisos</path>
</storage>
<host>
<name>myhost</name>
</host>
</storage_domain>
To create a new iSCSI storage domain send a request like this:
<storage_domain>
<name>myiscsi</name>
<type>data</type>
<storage>
<type>iscsi</type>
<logical_units>
<logical_unit id="3600144f09dbd050000004eedbd340001"/>
<logical_unit id="3600144f09dbd050000004eedbd340002"/>
</logical_units>
</storage>
<host>
<name>myhost</name>
</host>
</storage_domain>
24085 24086 24087 |
# File 'lib/ovirtsdk4/services.rb', line 24085 def add(storage_domain, opts = {}) internal_add(storage_domain, StorageDomain, ADD, opts) end |