Files
cloudpods/docs/image/image.yaml
2019-10-22 17:35:32 +08:00

221 lines
6.6 KiB
YAML

parameters:
- $ref: "../parameters/image.yaml#/imageId"
head:
summary: 获取指定镜像详情信息
responses:
200:
description: 镜像信息
headers:
x-image-meta-checksum:
type: string
#example: ef7a1c502ee2c9a288486f91d24330f0
description: 镜像md5值
x-image-meta-created_at:
type: string
#example: 2019-05-30T09:23:16.000000Z
description: 镜像创建时间
x-image-meta-disk_format:
type: string
#example: qcow2
description: 镜像格式
x-image-meta-fast_hash:
type: string
#example: da6b40721d34676116d6ad8c446e7d29
description: 待补充
x-image-meta-id:
type: string
#example: b66e2776-5eca-4330-8706-f340415adf03
description: 镜像ID
x-image-meta-is_public:
type: boolean
#example: true
description: 是否是标准镜像
x-image-meta-min_disk:
type: integer
#example: 30720
description: 磁盘最低大小
x-image-meta-min_ram:
type: integer
#example: 0
description: 内存最低要求
x-image-meta-name:
type: string
#example: ubuntu-16.04.5-server-20181117.qcow2
description: 镜像名称
x-image-meta-owner:
type: string
#example: a7f2e2a81a1e4850a41eae5f140ceb14
description: 所属用户
x-image-meta-pending_deleted:
type: boolean
#example: true
description: 是否是在回收站
x-image-meta-property-os_arch:
type: string
#example: x86
description: 操作系统架构
x-image-meta-property-os_distribution:
type: string
#example: Ubuntu
description: 操作系统发行版
x-image-meta-property-os_type:
type: string
#example: Linux
description: 操作系统类型
x-image-meta-property-os_version:
type: string
#example: 16.0
description: 操作系统版本
x-image-meta-protected:
type: boolean
#example: true
description: 镜像是否受保护
x-image-meta-size:
type: integer
#example: 792592384
description: 镜像大小
x-image-meta-status:
type: string
#example: active
description: 镜像状态
x-image-meta-tenant_id:
type: string
#example: true
description: 镜像所属项目ID
x-image-meta-updated_at:
type: string
#example: 2019-05-30T09:26:41.000000Z
description: 镜像最近一次更新时间
x-image-meta-is_data:
type: boolean
description: 是否是数据盘镜像
x-image-meta-is_guest_image:
type: boolean
description: 镜像是否是主机镜像的一部分
tags:
- images
put:
parameters:
- $ref: "../parameters/image.yaml#/x-image-meta-name"
- $ref: "../parameters/image.yaml#/x-image-meta-is_public"
- $ref: "../parameters/image.yaml#/x-image-meta-description"
- $ref: "../parameters/image.yaml#/x-image-meta-property-os_arch"
- $ref: "../parameters/image.yaml#/x-image-meta-property-os_distribution"
- $ref: "../parameters/image.yaml#/x-image-meta-property-os_version"
- in: body
type: file
description: 镜像二进制文件内容
summary: 更新镜像信息或上传镜像文件
responses:
200:
description: 镜像信息
schema:
$ref: "../schemas/image.yaml#/ImageResponse"
tags:
- images
get:
parameters:
- in: query
name: format
enum: [vhd,vmdk,qcow2]
type: string
description: 镜像下载格式
- in: query
name: torrent
type: boolean
description: 下载torrent种子
tags:
- images
summary: 下载镜像
responses:
200:
description: 镜像信息
schema:
type: file
headers:
x-image-meta-checksum:
type: string
#example: ef7a1c502ee2c9a288486f91d24330f0
description: 镜像md5值
x-image-meta-created_at:
type: string
#example: 2019-05-30T09:23:16.000000Z
description: 镜像创建时间
x-image-meta-disk_format:
type: string
#example: qcow2
description: 镜像格式
x-image-meta-fast_hash:
type: string
#example: da6b40721d34676116d6ad8c446e7d29
description: 待补充
x-image-meta-id:
type: string
#example: b66e2776-5eca-4330-8706-f340415adf03
description: 镜像ID
x-image-meta-is_public:
type: boolean
#example: true
description: 是否是标准镜像
x-image-meta-min_disk:
type: integer
#example: 30720
description: 磁盘最低大小
x-image-meta-min_ram:
type: integer
#example: 0
description: 内存最低要求
x-image-meta-name:
type: string
#example: ubuntu-16.04.5-server-20181117.qcow2
description: 镜像名称
x-image-meta-owner:
type: string
#example: a7f2e2a81a1e4850a41eae5f140ceb14
description: 所属用户
x-image-meta-pending_deleted:
type: boolean
#example: true
description: 是否是在回收站
x-image-meta-property-os_arch:
type: string
#example: x86
description: 操作系统架构
x-image-meta-property-os_distribution:
type: string
#example: Ubuntu
description: 操作系统发行版
x-image-meta-property-os_type:
type: string
#example: Linux
description: 操作系统类型
x-image-meta-property-os_version:
type: string
#example: 16.0
description: 操作系统版本
x-image-meta-protected:
type: boolean
#example: true
description: 镜像是否受保护
x-image-meta-size:
type: integer
#example: 792592384
description: 镜像大小
x-image-meta-status:
type: string
#example: active
description: 镜像状态
x-image-meta-tenant_id:
type: string
#example: true
description: 镜像所属项目ID
x-image-meta-updated_at:
type: string
#example: 2019-05-30T09:26:41.000000Z
description: 镜像最近一次更新时间