12.8. 子集合
12.8.1. 文件子集合 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
每个存储域中的
files 子集合可以被客户端使用来列出有效的文件。这个子集合只针对于那些包括了管理员通过 Red Hat Enterprise Virtualization Manager 上传的 ISO 镜像和虚拟软硬(VFD)的 ISO 存储域。
添加到虚拟机上的 CD-ROM 设备需要 ISO 存储域中的
files 子集合中的一个 ISO 镜像。
例 12.15. 列出一个 ISO 存储域中的文件子集合
GET /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="/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="/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da"/>
</file>
<file id="boot.vfd"
href="/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="/api/storagedomains/00f0d9ce-da15-4b9e-9e3e-3c898fa8b6da"/>
</file>
</files>
和其它资源一样,
files 包括了 id 和 href 属性。name 项包括了文件名。