12.9. sub-Collections
12.9.1. files Sub-Collection 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
每个存储域下的
文件 子集合提供了一种方式,供客户端列出可用的文件。此子集合专门针对 ISO 存储域,其中包含管理员通过 Red Hat Virtualization Manager 上传的 ISO 镜像和虚拟软盘磁盘(VFD)。
向虚拟机添加 CD-ROM 设备需要 ISO 镜像,来自 ISO 存储域
的文件 子集合。
例 12.15. 列出 ISO 存储域的文件子集合
GET /ovirt-engine/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da/files HTTP/1.1
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
<files>
<file id="en_winxp_pro_with_sp2.iso"
href="/ovirt-engine/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da/files/
en_winxp_pro_with_sp2.iso">
<name>en_winxp_pro_with_sp2.iso</name>
<type>iso</type>
<storage_domain id="00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da"
href="/ovirt-engine/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da"/>
</file>
<file id="boot.vfd"
href="/ovirt-engine/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da/files/
boot.vfd">
<name>boot.vfd</name>
<type>vfd</type>
<storage_doman id="00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da"
href="/ovirt-engine/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da"/>
</file>
</files>
与其他资源一样,文件具有不透明
ID 和 href 属性。name 元素包含 filename。