9.5.3. Quota Sub-Collection
9.5.3.1. Quota Sub-Collection
配额子集合列出了 Red Hat Virtualization Manager 对资源实施的限制。API 用户使用
GET
方法查看此子集合及其资源。
例 9.13. 配额的 XML 表示
<quota href="/ovirt-engine/api/datacenters/56087282-d7a6-11e1-af44-001a4a400e0c /quotas/e13ff85a-b2ba-4f7b-8010-e0d057c03dfe" id="e13ff85a-b2ba-4f7b-8010-e0d057c03dfe"> <name>MyQuota</name> <description>A quota for my Red Hat Enterprise Virtualization environment</description> <data_center href= "/ovirt-engine/api/datacenters/56087282-d7a6-11e1-af44-001a4a400e0c" id="56087282-d7a6-11e1-af44-001a4a400e0c"/> </quota>
创建新配额需要
name
和 description
元素。
例 9.14. 创建配额
POST /ovirt-engine/api/datacenters/56087282-d7a6-11e1-af44-001a4a400e0c/quotas HTTP/1.1 Accept: application/xml Content-type: application/xml <quota> <name>VMQuota</name> <description>My new quota for virtual machines</description> </quota>
删除配额需要
DELETE
请求。
例 9.15. 删除配额
DELETE /ovirt-engine/api/datacenters/01a45ff0-915a-11e0-8b87-5254004ac988/quotas/e13ff85a-b2ba-4f7b-8010-e0d057c03dfe HTTP/1.1 HTTP/1.1 204 No Content