此内容没有您所选择的语言版本。

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
Copy to Clipboard Toggle word wrap

cURL command:

# curl -X GET -H "Accept: application/xml" -u [USER:PASS] \
    --cacert [CERT] \
    https://[RHEVM Host]:443/ovirt-engine/api/datacenters
Copy to Clipboard Toggle word wrap

Result:

HTTP/1.1 200 OK
Content-Type: application/xml

<data_centers>
    <data_center href="/ovirt-engine/api/datacenters/00000002-0002-0002-0002-0000000003ab" id="00000002-0002-0002-0002-0000000003ab">
        <name>Default</name>
        <description>The default Data Center</description>
        <link rel="storagedomains"/>
          href="/ovirt-engine/api/datacenters/00000002-0002-0002-0002-0000000003ab/storagedomains"
        <link rel="clusters"/>
          href="/ovirt-engine/api/datacenters/00000002-0002-0002-0002-0000000003ab/clusters" 
        <link rel="networks"/>
          href="/ovirt-engine/api/datacenters/00000002-0002-0002-0002-0000000003ab/networks" 
        <link rel="permissions"/>
          href="/ovirt-engine/api/datacenters/00000002-0002-0002-0002-0000000003ab/permissions" 
        <link rel="quotas"/>
          href="/ovirt-engine/api/datacenters/00000002-0002-0002-0002-0000000003ab/quotas" 
        <link rel="iscsibonds"/>
          href="/ovirt-engine/api/datacenters/00000002-0002-0002-0002-0000000003ab/iscsibonds" 
        <link rel="qoss"/>
          href="/ovirt-engine/api/datacenters/00000002-0002-0002-0002-0000000003ab/qoss" 
        <local>false</local>
        <storage_format>v3</storage_format>
        <version major="4" minor="0"/>
        <supported_versions>
            <version major="4" minor="0"/>
        </supported_versions>
        <status>
            <state>up</state>
        </status>
    </data_center>
</data_centers>
Copy to Clipboard Toggle word wrap

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.
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat