响应消息 响应参数 参数 参数类型 描述 visibility String 其他租户是否可见。取值为private。 name String 镜像名称,如果未指定name的取值,则默认为空,但是使用该镜像创建虚拟机会失败。名称的长度为1~128位。name参数说明请参考镜像属性。 protected Boolean 镜像是否被保护,保护后的镜像不可删除。取值为false。 container_format String 容器格式。 取值为bare。 disk_format String 镜像格式,目前支持zvhd2、vhd、raw、qcow2、iso。非iso格式时默认值是zvhd2。 tags Array of strings 镜像标签列表。长度为1~255位。 min_ram Integer 镜像运行最小内存,单位为MB。取值参考E
CS 规格限制,一般设置为0。 云服务器的规格限制,请参见规格清单。 min_disk Integer 镜像运行需要的最小磁盘容量,单位为GB 。linux操作系统取值为10~1024GB,Windows操作系统取值为20~1024GB。必须大于镜像系统盘容量,否则创建云服务器可能失败。 status String 镜像状态。取值如下: queued:表示镜像元数据已经创建成功,等待上传镜像文件。 saving:表示镜像正在上传文件到后端存储。 deleted:表示镜像已经删除。 killed:表示镜像上传错误。 active:表示镜像可以正常使用。 created_at String 创建时间。格式为UTC时间。 updated_at String 更新时间。格式为UTC时间。 self String 本镜像链接。 id String 镜像ID。用户调用创建镜像接口后,需保存该镜像的ID,用来调用上传镜像接口完成镜像上传。 file String 上传下载镜像文件的地址链接。 schema String 视图链接。 __image_source_type String 镜像后端存储类型,目前支持uds。 __image_size String 镜像大小。单位为字节。 __isregistered String 镜像是否注册。只有已注册的镜像才能在Portal界面上查询到。取值为true。 __os_version String 镜像的操作系统具体版本,取值范围见相关参数取值列表。 __os_type String 镜像的操作系统类型,取值由__os_version确定。支持Windows、Linux、other。 __platform String 表示镜像支持的操作系统平台。取值由__os_version确定。 __os_bit String 表示操作系统位数。取值由__os_version确定,取值为32或64。 __imagetype String 镜像类型。取值为private,表示私有镜像。 virtual_env_type String 平台类型。 镜像使用环境类型:FusionCompute、Ironic、DataImage、IsoImage。 如果是云服务器镜像,则取值为FusionCompute。 如果是数据盘镜像,则取值为DataImage。 如果是裸金属服务器镜像,则取值为Ironic。 如果是ISO镜像,则取值是IsoImage。 owner String 镜像所属项目ID。 __root_origin String 表示当前镜像来源是从外部导入。取值:file。 checksum String 镜像文件md5值。 size Long 目前暂时不使用。 virtual_size Integer 镜像虚拟大小。单位为字节。 properties Properties object 镜像属性的集合,不表示具体的镜像属性。 响应样例 STATUS CODE 201 {
"schema": "/v2/schemas/image",
"min_disk": 100,
"created_at": "2016-06-02T07:49:48Z",
"__image_source_type": "uds",
"container_format": "bare",
"__image_size": "0",
"file": "/v2/images/4ca46bf1-5c61-48ff-b4f3-0ad4e5e3ba86/file",
"updated_at": "2016-06-02T07:49:49Z",
"protected": false,
"id": "4ca46bf1-5c61-48ff-b4f3-0ad4e5e3ba86",
"__isregistered": "true",
"min_ram": 1024,
"owner": "b912fb4a4c464b568ecfca1071b21b10",
"__os_type": "Linux",
"__imagetype": "private",
"visibility": "private",
"virtual_env_type": "FusionCompute",
"tags": [
"test=testvalue",
"image=imagevalue"
],
"__platform": "Ubuntu",
"__os_bit": "64",
"__os_version": "Ubuntu 14.04 server 64bit",
"name": "test",
"self": "/v2/images/4ca46bf1-5c61-48ff-b4f3-0ad4e5e3ba86",
"disk_format": "vhd",
"status": "queued"
}