此内容没有您所选择的语言版本。
3.2. Example: List Data Center Collection
Red Hat Virtualization Manager creates a
Default data center on installation. This example uses the Default data center as the basis for our virtual environment.
The following request retrieves a representation of the data center collection:
Example 3.2. List data center collection
Request:
GET /ovirt-engine/api/datacenters HTTP/1.1 Accept: application/xml
GET /ovirt-engine/api/datacenters HTTP/1.1
Accept: application/xml
cURL command:
curl -X GET -H "Accept: application/xml" -u [USER:PASS] \
--cacert [CERT] \
https://[RHEVM Host]:443/ovirt-engine/api/datacenters
# curl -X GET -H "Accept: application/xml" -u [USER:PASS] \
--cacert [CERT] \
https://[RHEVM Host]:443/ovirt-engine/api/datacenters
Result:
Note the
id code of your Default data center. This code identifies this data center in relation to other resources of your virtual environment.
The data center also contains a link to the
storagedomains sub-collection. The data center uses this sub-collection to attach storage domains from the storagedomains main collection, which this example covers later.