mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #2920 from ioito/hotfix/qx-storagecache-docs
hotfix: add storagecache api docs
This commit is contained in:
@@ -49,6 +49,13 @@ paths:
|
||||
/storages/{storageId}/offline:
|
||||
$ref: "./storage/storage.yaml#/offline"
|
||||
|
||||
/storagecaches:
|
||||
$ref: "./storagecache/storagecaches.yaml"
|
||||
/storagecaches/{storagecacheId}:
|
||||
$ref: "./storagecache/storagecache.yaml"
|
||||
/storagecaches/{storagecacheId}/cache-image:
|
||||
$ref: "./storagecache/cache-image.yaml"
|
||||
|
||||
/disks:
|
||||
$ref: "./disk/disks.yaml"
|
||||
/disks/{diskId}:
|
||||
|
||||
@@ -131,3 +131,13 @@ private_cloud:
|
||||
in: query
|
||||
type: boolean
|
||||
description: 过滤公有云资源
|
||||
is_on_premise:
|
||||
name: is_on_premise
|
||||
in: query
|
||||
type: boolean
|
||||
description: 过滤本地IDC资源
|
||||
is_managed:
|
||||
name: is_managed
|
||||
in: query
|
||||
type: boolean
|
||||
description: 过滤通过云账号导入进来的资源
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
storagecacheId:
|
||||
name: storagecacheId
|
||||
required: true
|
||||
in: path
|
||||
type: string
|
||||
description: 存储缓存名称或ID
|
||||
image:
|
||||
name: image
|
||||
in: body
|
||||
required: true
|
||||
type: string
|
||||
description: 镜像名称或ID
|
||||
is_force:
|
||||
name: is_force
|
||||
in: body
|
||||
type: string
|
||||
description: 是否强制缓存镜像(会覆盖之前已缓存的镜像)
|
||||
format:
|
||||
name: format
|
||||
in: body
|
||||
type: string
|
||||
description: 缓存镜像的格式(有的云对镜像有特殊格式要求,会导致此参数失效)
|
||||
@@ -95,7 +95,7 @@ Storage:
|
||||
is_emulated:
|
||||
type: boolean
|
||||
example: false
|
||||
description: 是否是虚拟出来的实例
|
||||
description: 是否是虚拟出来的存储
|
||||
provider:
|
||||
type: string
|
||||
example: Qcloud
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
StorageCacheResponse:
|
||||
type: object
|
||||
properties:
|
||||
storagecache:
|
||||
type: object
|
||||
$ref: '#/StorageCache'
|
||||
|
||||
StorageCache:
|
||||
type: object
|
||||
description: 存储缓存
|
||||
properties:
|
||||
id:
|
||||
type: string
|
||||
example: f227c4ce-6870-19f3-8257-f53e63f40361
|
||||
description: 存储缓存uuid
|
||||
readOnly: true
|
||||
name:
|
||||
type: string
|
||||
description: 存储h缓存名称
|
||||
example: storage-r4hilqks
|
||||
readOnly: true
|
||||
is_emulated:
|
||||
type: boolean
|
||||
example: false
|
||||
description: 是否是虚拟出来的缓存
|
||||
update_version:
|
||||
type: integer
|
||||
example: 2
|
||||
description: 资源被更新的次数
|
||||
updated_at:
|
||||
type: string
|
||||
example: "2019-05-30T06:36:39.000000Z"
|
||||
description: 资源最近一次更新时间
|
||||
external_id:
|
||||
type: string
|
||||
example: f27b21ea-514e-4933-8ff5-4bf0c261873a-Huawei/ap-southeast-1
|
||||
description: 外部id
|
||||
path:
|
||||
type: string
|
||||
example: /vmfs/volumes/5a017148-0fa691a9-6b8a-0022b70cc59e/image_cache
|
||||
description: 镜像存储位置
|
||||
|
||||
StorageCacheListResponse:
|
||||
type: object
|
||||
properties:
|
||||
limit:
|
||||
type: integer
|
||||
example: 20
|
||||
storagecachess:
|
||||
type: array
|
||||
items:
|
||||
$ref: '#/StorageCache'
|
||||
total:
|
||||
type: integer
|
||||
example: 124
|
||||
|
||||
@@ -88,4 +88,4 @@ offline:
|
||||
schema:
|
||||
$ref: '../schemas/storage.yaml#/StorageResponse'
|
||||
tags:
|
||||
- storages
|
||||
- storages
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
post:
|
||||
summary: 缓存镜像到此存储缓存上
|
||||
parameters:
|
||||
- $ref: "../parameters/storagecache.yaml#/storagecacheId"
|
||||
- $ref: "../parameters/storagecache.yaml#/image"
|
||||
- $ref: "../parameters/storagecache.yaml#/is_force"
|
||||
- $ref: "../parameters/storagecache.yaml#/format"
|
||||
responses:
|
||||
200:
|
||||
description: 存储缓存信息
|
||||
schema:
|
||||
$ref: "../schemas/storagecache.yaml#StorageCacheResponse"
|
||||
tags:
|
||||
- storagecaches
|
||||
@@ -0,0 +1,11 @@
|
||||
get:
|
||||
summary: 获取指定存储缓存详情信息
|
||||
parameters:
|
||||
- $ref: '../parameters/storagecache.yaml#/storagecacheId'
|
||||
responses:
|
||||
200:
|
||||
description: 存储缓存详情信息
|
||||
schema:
|
||||
$ref: '../schemas/storagecache.yaml#/StorageCacheResponse'
|
||||
tags:
|
||||
- storagecaches
|
||||
@@ -0,0 +1,19 @@
|
||||
get:
|
||||
summary: 按指定条件列出存储缓存列表
|
||||
parameters:
|
||||
- $ref: '../parameters/common.yaml#/limit'
|
||||
- $ref: '../parameters/common.yaml#/offset'
|
||||
- $ref: '../parameters/common.yaml#/cloudprovider'
|
||||
- $ref: '../parameters/common.yaml#/cloudaccount'
|
||||
- $ref: '../parameters/common.yaml#/provider'
|
||||
- $ref: '../parameters/common.yaml#/brand'
|
||||
- $ref: '../parameters/common.yaml#/cloud_env'
|
||||
- $ref: '../parameters/common.yaml#/is_on_premise'
|
||||
- $ref: '../parameters/common.yaml#/is_managed'
|
||||
responses:
|
||||
200:
|
||||
description: 存储缓存列表信息
|
||||
schema:
|
||||
$ref: '../schemas/storagecache.yaml#/StorageCacheListResponse'
|
||||
tags:
|
||||
- storagecaches
|
||||
Reference in New Issue
Block a user