以下の例では、mydata および myisos ストレージドメインを Default データセンターにアタッチします。
mydata ストレージドメインをアタッチするには、以下のように要求を送信します。
POST /ovirt-engine/api/datacenters/001/storagedomains HTTP/1.1
Accept: application/xml
Content-type: application/xml
POST /ovirt-engine/api/datacenters/001/storagedomains HTTP/1.1
Accept: application/xml
Content-type: application/xml
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
リクエスト本文は以下のようになります。
<storage_domain>
<name>mydata</name>
</storage_domain>
<storage_domain>
<name>mydata</name>
</storage_domain>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
curl コマンドを使用して、同じ要求を行います。
curl \
--cacert '/etc/pki/ovirt-engine/ca.pem' \
--user 'admin@internal:mypassword' \
--request POST \
--header 'Version: 4' \
--header 'Content-Type: application/xml' \
--header 'Accept: application/xml' \
--data '
# curl \
--cacert '/etc/pki/ovirt-engine/ca.pem' \
--user 'admin@internal:mypassword' \
--request POST \
--header 'Version: 4' \
--header 'Content-Type: application/xml' \
--header 'Accept: application/xml' \
--data '
<storage_domain>
<name>mydata</name>
</storage_domain>
' \
https://myengine.example.com/ovirt-engine/api/datacenters/001/storagedomains
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
myisos ストレージドメインをアタッチするには、以下のような要求を送信します。
POST /ovirt-engine/api/datacenters/001/storagedomains HTTP/1.1
Accept: application/xml
Content-type: application/xml
POST /ovirt-engine/api/datacenters/001/storagedomains HTTP/1.1
Accept: application/xml
Content-type: application/xml
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
リクエスト本文は以下のようになります。
<storage_domain>
<name>myisos</name>
</storage_domain>
<storage_domain>
<name>myisos</name>
</storage_domain>
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
curl コマンドを使用して、同じ要求を行います。
curl \
--cacert '/etc/pki/ovirt-engine/ca.pem' \
--user 'admin@internal:mypassword' \
--request POST \
--header 'Version: 4' \
--header 'Content-Type: application/xml' \
--header 'Accept: application/xml' \
--data '
# curl \
--cacert '/etc/pki/ovirt-engine/ca.pem' \
--user 'admin@internal:mypassword' \
--request POST \
--header 'Version: 4' \
--header 'Content-Type: application/xml' \
--header 'Accept: application/xml' \
--data '
<storage_domain>
<name>myisos</name>
</storage_domain>
' \
https://myengine.example.com/ovirt-engine/api/datacenters/001/storagedomains
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow