查询镜像列表详情(废弃)
URI
GET /v2.1/{project_id}/images/detail?name={name}&status={status}&changes-since={changes-since}&minRam={minRam}&minDisk={inDisk}
可以将如下作为URI参数,过滤查询结果。使用方式:/v2/{project_id}/images/detail? name ={name}&status={status}
查询参数如表2所示。
| 
       参数  | 
     
       是否必选  | 
     
       参数类型  | 
     
       描述  | 
    
|---|---|---|---|
| 
       name  | 
     
       否  | 
     
       String  | 
     
       镜像名称  | 
    
| 
       status  | 
     
       否  | 
     
       String  | 
     
       镜像状态。 不支持使用“deleted”状态过滤查询,且指定的状态必须是镜像在glance中的状态。nova和glance中的镜像状态映射关系如表3所示。  | 
    
| 
       changes-since  | 
     
       否  | 
     
       String  | 
     
       过滤在changes-since时间之后更新过的镜像。ISO8601时间格式,例如:2013-06-09T06:42:18Z  | 
    
| 
       minRam  | 
     
       否  | 
     
       Integer  | 
     
       镜像要求的最小内存大小,单位MiB。  | 
    
| 
       minDisk  | 
     
       否  | 
     
       Integer  | 
     
       镜像要求的最小磁盘大小,单位GiB。  | 
    
| 
       glance中的镜像状态  | 
     
       nova显示的镜像状态  | 
    
|---|---|
| 
       queued  | 
     
       saving  | 
    
| 
       saving  | 
     
       saving  | 
    
| 
       active  | 
     
       active  | 
    
| 
       deleted  | 
     
       deleted  | 
    
请求消息
无
响应消息
响应参数如表4所示。
| 
        参数  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|
| 
        id  | 
      
        String  | 
      
        镜像ID,UUID格式。  | 
     
| 
        links  | 
      
        Array of objects  | 
      
        镜像相关快捷链接地址  | 
     
| 
        name  | 
      
        String  | 
      
        镜像名称  | 
     
| 
        metadata  | 
      
        Object  | 
      
        metadata键值对  | 
     
| 
        OS-EXT-IMG-SIZE:size  | 
      
        Integer  | 
      
        镜像大小。 大于0。  | 
     
| 
        minDisk  | 
      
        Integer  | 
      
        镜像要求的最小磁盘大小。 大于0。  | 
     
| 
        minRam  | 
      
        Integer  | 
      
        镜像要求的最小内存大小。 大于0。  | 
     
| 
        progress  | 
      
        Integer  | 
      
        镜像上传百分比。 大于0。  | 
     
| 
        status  | 
      
        String  | 
      
        镜像状态  | 
     
| 
        created  | 
      
        String  | 
      
        镜像创建时间。 ISO8601时间格式,例如:2013-06-09T06:42:18Z  | 
     
| 
        updated  | 
      
        String  | 
      
        镜像更新时间。 ISO8601时间格式,例如:2013-06-09T06:42:18Z  | 
     
| 
        参数  | 
      
        是否必选  | 
      
        参数类型  | 
      
        描述  | 
     
|---|---|---|---|
| 
        href  | 
      
        是  | 
      
        String  | 
      
        相应资源的链接。  | 
     
| 
        rel  | 
      
        是  | 
      
        String  | 
      
        有三种取值。self:自助链接包含版本链接的资源。立即链接后使用这些链接。bookmark:书签链接提供了一个永久资源的永久链接,该链接适合于长期存储。alternate:备用链接可以包含资源的替换表示形式。例如,OpenStack计算映像可能在OpenStack映像服务中有一个替代表示。  | 
     
| 
        type  | 
      
        否  | 
      
        String  | 
      
        type属性提供了一个提示,用于在跟踪该链接时期望的表示类型。  | 
     
请求示例
GET https://{endpoint}/v2.1/9c53a566cb3443ab910cf0daebca90c4/images/detail
 响应示例
{
    "image": {
        "OS-EXT-IMG-SIZE:size": 20578304,
        "created": "2014-02-10T17:05:01Z",
        "id": "ee10f19c-503c-44af-af2f-73d5e42f7a17",
        "links": [
            {
                "href": "http://xxx/v2/d9ebe43510414ef590a4aa158605329e/images/ee10f19c-503c-44af-af2f-73d5e42f7a17",
                "rel": "self"
            },
            {
                "href": "http://xxx/d9ebe43510414ef590a4aa158605329e/images/ee10f19c-503c-44af-af2f-73d5e42f7a17",
                "rel": "bookmark"
            },
            {
                "href": "http://xxx/d9ebe43510414ef590a4aa158605329e/images/ee10f19c-503c-44af-af2f-73d5e42f7a17",
                "rel": "alternate",
                "type": "application/vnd.openstack.image"
            }
        ],
        "metadata": {
            "clean_attempts": "3",
            "image_location": "snapshot",
            "image_state": "available",
            "image_type": "snapshot",
            "instance_type_ephemeral_gb": "0",
            "instance_type_flavorid": "6",
            "instance_type_id": "7",
            "instance_type_memory_mb": "256",
            "instance_type_name": "wj.ssd",
            "instance_type_root_gb": "2",
            "instance_type_rxtx_factor": "1.0",
            "instance_type_swap": "0",
            "instance_type_vcpus": "1",
            "instance_uuid": "b600b5b1-ed8c-4814-aefa-8b903c894c20",
            "os_type": "None",
            "owner_id": "d9ebe43510414ef590a4aa158605329e",
            "user_id": "74fe4ff0674b434b8a274077d8106c5b"
        },
        "minDisk": 2,
        "minRam": 0,
        "name": "image1",
        "progress": 100,
        "server": {
            "id": "b600b5b1-ed8c-4814-aefa-8b903c894c20",
            "links": [
                {
                    "href": "http://xxx/v2/d9ebe43510414ef590a4aa158605329e/servers/b600b5b1-ed8c-4814-aefa-8b903c894c20",
                    "rel": "self"
                },
                {
                    "href": "http://xxx/d9ebe43510414ef590a4aa158605329e/servers/b600b5b1-ed8c-4814-aefa-8b903c894c20",
                    "rel": "bookmark"
                }
            ]
        },
        "status": "ACTIVE",
        "updated": "2014-02-10T17:05:07Z"
    }
}
 返回值
请参考通用请求返回值。
  
    