<Glance Server Location>/images/<ID>
Glance Server Location是镜像的所在位置, ID是镜像在Glance的唯一标识。
2.Image Statuses 共四种状态。
queued 标识该镜像ID已经被保留,但是镜像还未上传。
saving 标识镜像正在被上传。
active 标识镜像在Glance中完全可用。
killed 标识镜像上传过程中出错,镜像完全不可用。
3.Disk and Container format
Disk Format:raw vhd vmdk vdi iso qcow2 aki ari ami
Container Format: ovf bare aki ari ami
当disk format为aki ari ami时,disk format 和container format一致。
4.Image Registries
使用Glance,镜像metadata可以注册至image registries。
只要为image metadata提供了rest like API,任何web程序可以作为image registries与Glance对接。
当然,Glance也提供了参考实现。
更多信息可以参考on
Controlling Servers,来自于Glance提供的Glance registry server。
Glance提供了如下Rest-like API:
GET /images Return brief information about public images
GET /images/detail Return detailed information about public images
GET /images/<ID> Return metadata about an image in HTTP headers
POST /images Register metadata about a new image
PUT /images/<ID> Update metadata about an existing image
DELETE /images/<ID> Remove an image's metadata from the registry
通过 GET /images and GET /images/detail对镜像过滤查询
支持以下参数:
name=NAME
Filters images having a name attribute
matching NAME.
container_format=FORMAT
Filters images having a container_format attribute
matching FORMAT
For more information, see About Disk and Container Formats
disk_format=FORMAT
Filters images having a disk_format attribute
matching FORMAT
For more information, see About Disk and Container Formats
status=STATUS
Filters images having a status attribute
matching STATUS
For more information, see About Image Statuses
size_min=BYTES
Filters images having a size attribute
greater than or equal to BYTES
size_max=BYTES
Filters images having a size attribute
less than or equal to BYTES
These two resources also accept sort parameters:
sort_key=KEY
Results will be ordered by the specified image attribute KEY.
Accepted values include id, name, status, disk_format,container_format, size, created_at (default)
and updated_at.
sort_dir=DIR
Results will be sorted in the direction DIR.
Accepted values are asc for
ascending or desc (default)
for descending.