12.9. アクション
12.9.1. 既存のストレージドメインのインポート
API は、下層のストレージの再フォーマットせずに、Red Hat Enterprise Virtualization Manager の 1 つのインスタンスから ISO ストレージドメインまたはエクスポートストレージドメインを削除して、そのドメインを別のインスタンスにインポートする機能を提供しています。インポートの操作は、新規ストレージドメインの追加と同じですが、
name
は指定しません。
例12.16 既存のエクスポートストレージドメインのインポート
POST /api/storagedomains HTTP/1.1 Accept: application/xml Content-Type: application/xml <storage_domain> <type>export</type> <storage> <type>nfs</type> <address>172.31.0.6</address> <path>/exports/RHEVX/export-domain</path> </storage> <host id="2ab5e1da-b726-4274-bbf7-0a42b16a0fc3"/> </storage_domain> HTTP/1.1 201 Created Content-Type: application/xml <storage_domain id="fabe0451-701f-4235-8f7e-e20e458819ed" href="/api/storagedomains/fabe0451-701f-4235-8f7e-e20e458819ed"> <name>export1</name> ... </storage_domain>
12.9.2. ストレージドメインの削除
storage_domain
参照をストレージドメインの DELETE
要求の本文に渡します。storage_domain
参照は以下のような形式です。
<storage_domain> <host id="..."/> </storage_domain>
または、
<storage_domain> <host> <name>...</name> </host> </storage_domain>
ストレージドメインのフォーマット
オプションの format
要素で、ストレージドメインを削除した後にフォーマットするかどうかを指定します。
例12.17 ストレージドメイン削除後のフォーマット
<storage_domain> <host id="..."/> <format>true</format> </storage_domain>
format
要素が渡されない場合には、ストレージドメインはフォーマットされない状態のままとなります。
ストレージドメインの論理削除
API はストレージドメインの論理削除する機能も提供します。これにより、ストレージドメインのインポート用データが保持されます。destroy
要素を使用してストレージドメインを論理的に削除し、データを保持します。
例12.18 ストレージドメインの論理削除
<storage_domain> <host id="..."/> <destroy>true</destroy> </storage_domain>