@ -3,150 +3,50 @@
openapi : 3.0 .3
info:
title : ResourcePool API
title : Container API
version : 0.0 .1
paths:
/v1/ available/nodes :
/v1/ container :
get:
tags:
- ResourcePool
operationId : ResourcePool_GetAvailableNodes
responses:
"200" :
description : OK
content:
application/json:
schema:
$ref : '#/components/schemas/AvailableNodesResponse'
default:
description : Default error response
content:
application/json:
schema:
$ref : '#/components/schemas/Status'
/v1/resource/pool/create:
post:
tags:
- ResourcePool
operationId : ResourcePool_Create
requestBody:
content:
application/json:
schema:
$ref : '#/components/schemas/ResourcePoolCreateRequest'
required : true
responses:
"200" :
description : OK
content:
application/json:
schema:
$ref : '#/components/schemas/BaseResponse'
default:
description : Default error response
content:
application/json:
schema:
$ref : '#/components/schemas/Status'
/v1/resource/pool/delete:
post:
tags:
- ResourcePool
operationId : ResourcePool_Delete
requestBody:
content:
application/json:
schema:
$ref : '#/components/schemas/ResourcePoolDeleteRequest'
required : true
responses:
"200" :
description : OK
content:
application/json:
schema:
$ref : '#/components/schemas/BaseResponse'
default:
description : Default error response
content:
application/json:
schema:
$ref : '#/components/schemas/Status'
/v1/resource/pool/detail:
post:
tags:
- ResourcePool
operationId : ResourcePool_GetDetail
- Container
operationId : Container_GetContainer
parameters:
- name : poolId
- name : name
in : query
schema:
type : string
responses:
"200" :
description : OK
content:
application/json:
schema:
$ref : '#/components/schemas/ResourcePoolDetailResponse'
default:
description : Default error response
content:
application/json:
schema:
$ref : '#/components/schemas/Status'
/v1/resource/pool/list:
get:
tags:
- ResourcePool
operationId : ResourcePool_List
responses:
"200" :
description : OK
content:
application/json:
schema:
$ref : '#/components/schemas/ResourcePoolListResponse'
default:
description : Default error response
content:
application/json:
- name : podUid
in : query
schema:
$ref : '#/components/schemas/Status'
/v1/resource/pool/removeNode:
post:
tags:
- ResourcePool
operationId : ResourcePool_RemoveNode
requestBody:
content:
application/json:
type : string
- name : deviceId
in : query
schema:
$ref : '#/components/schemas/RemoveNodeRequest'
required : true
type : string
responses:
"200" :
description : OK
content:
application/json:
schema:
$ref : '#/components/schemas/ BaseResponse '
$ref : '#/components/schemas/ContainerReply'
default:
description : Default error response
content:
application/json:
schema:
$ref : '#/components/schemas/Status'
/v1/ resource/pool/update :
/v1/containers:
post:
tags:
- ResourcePool
operationId : ResourcePool_Update
- Container
operationId : Container_GetAllContainers
requestBody:
content:
application/json:
schema:
$ref : '#/components/schemas/ ResourcePoolUpdateRequest '
$ref : '#/components/schemas/GetAllContainersReq'
required : true
responses:
"200" :
@ -154,7 +54,7 @@ paths:
content:
application/json:
schema:
$ref : '#/components/schemas/ BaseResponse '
$ref : '#/components/schemas/ ContainersReply '
default:
description : Default error response
content:
@ -163,177 +63,114 @@ paths:
$ref : '#/components/schemas/Status'
components:
schemas:
AvailableNodesInfo:
type : object
properties:
nodeName:
type : string
cpuCores:
type : string
gpuNum:
type : string
gpuMemory:
type : string
totalMemory:
type : string
diskSize:
type : string
nodeIp:
type : string
AvailableNodesResponse:
type : object
properties:
data:
type : array
items:
$ref : '#/components/schemas/AvailableNodesInfo'
BaseResponse:
ContainerReply:
type : object
properties:
code:
type : integer
format : int32
message:
name:
type : string
data:
type : object
GoogleProtobufAny:
type : object
properties:
'@type' :
status:
type : string
description : The type of the serialized message.
additionalProperties : true
description : Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
Nodes:
type : object
properties:
nodeIp:
appName:
type : string
nodeName:
type : string
PoolNodeReply:
type : object
properties:
ip:
type : string
isSchedulable:
type : boolean
isReady:
type : boolean
type:
type : array
items:
type : string
vgpuUsed:
allocatedDevices:
type : integer
format : int32
vgpuTotal :
allocatedCores:
type : integer
format : int32
coreUsed :
allocatedMem:
type : integer
format : int32
coreTotal :
type:
type : string
memoryUsed :
createTime:
type : string
memoryTotal :
startTime:
type : string
uid :
endTime :
type : string
name :
podUid :
type : string
cardCnt:
type : integer
format : int32
osImage:
nodeUid:
type : string
operatingSystem:
resourcePools:
type : array
items:
type : string
kernelVersion:
flavor :
type : string
containerRuntimeVersion :
priority :
type : string
kubeletVersion :
namespace :
type : string
kubeProxyVersion:
deviceIds:
type : array
items:
type : string
architecture:
podNam e:
type : string
creationTimestamp :
taskType :
type : string
diskSiz e:
shixunNam e:
type : string
nodeId :
role :
type : string
RemoveNodeRequest:
type : object
properties:
nodeId:
username:
type : string
ResourcePoolCreateRequest :
ContainersReply:
type : object
properties:
poolName:
type : string
nodes:
items:
type : array
items:
$ref : '#/components/schemas/Nodes'
ResourcePoolDeleteRequest:
type : object
properties:
poolId:
type : string
ResourcePoolDetailResponse:
$ref : '#/components/schemas/ContainerReply'
GetAllContainersReq:
type : object
properties:
list :
type: array
items :
$ref : '#/components/schemas/ PoolNodeReply '
ResourcePoolListData :
filters:
$ref : '#/components/schemas/GetAllContainersReq_Filters'
pageSize:
$ref : '#/components/schemas/ GetAllContainersReq_PageSize '
GetAllContainersReq_Filters :
type : object
properties:
poolId:
type : string
poolName:
name:
type : string
cpuCores :
nodeName:
type : string
nodeNum :
status :
type : string
gpuNum :
deviceId :
type : string
availableMemory :
nodeUid :
type : string
totalMemory :
resourceGroup :
type : string
diskSize :
priority :
type : string
nodeList:
type : array
items:
$ref : '#/components/schemas/Nodes'
ResourcePoolListResponse:
GetAllContainersReq_PageSize:
type : object
properties:
data:
type : array
items:
$ref : '#/components/schemas/ResourcePoolListData'
ResourcePoolUpdateRequest:
pageSize:
type : integer
format : int32
pageNo:
type : integer
format : int32
sort:
type : string
sortField:
type : string
GoogleProtobufAny:
type : object
properties:
poolId:
type : string
poolName:
'@type' :
type : string
nodes:
type : array
items:
$ref : '#/components/schemas/Nodes'
description : The type of the serialized message.
additionalProperties : true
description : Contains an arbitrary serialized message along with a @type that describes the type of the serialized message.
Status:
type : object
properties:
@ -351,4 +188,4 @@ components:
description : A list of messages that carry the error details. There is a common set of message types for APIs to use.
description: 'The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data : error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors).'
tags:
- name : ResourcePool
- name : Container