11.5.  Delete Storage Domain

A storage_domain reference is passed in the body of a DELETE request for a storage domain. The storage_domain reference is in the following form:
<storage_domain>
    <host id="..."/>
</storage_domain>
OR
<storage_domain>
    <host>
        <name>...</name>
    </host>
</storage_domain>
Format Storage Domain
An API user provides a optional format element to specify whether or not to format the storage domain after deletion.

Example 11.11. Formatting a storage domain after deletion

<storage_domain>
    <host id="..."/>
    <format>true</format>
</storage_domain>

If no format element is passed, the storage domain remains unformatted.
Logical Removal of Storage Domain
The API also provides a function for the logical removal of the storage domain. This retains the storage domain's data for import. Use the destroy element to logically remove the storage domain and retain the data.

Example 11.12. Logical removal of a storage domain

<storage_domain>
    <host id="..."/>
    <destroy>true</destroy>
</storage_domain>