@ -3,50 +3,151 @@
openapi : 3.0 .3
info:
title : Container API
title : ResourcePool API
version : 0.0 .1
paths:
/v1/ container :
/v1/ available/nodes :
get:
tags:
- Container
operationId : Container_GetContainer
parameters:
- name : name
in : query
- ResourcePool
operationId : ResourcePool_GetAvailableNodes
responses:
"200" :
description : OK
content:
application/json:
schema:
type : string
- name : podUid
in : query
$ref : '#/components/schemas/AvailableNodesResponse'
default:
description : Default error response
content:
application/json:
schema:
type : string
- name : deviceId
in : query
$ref : '#/components/schemas/Status'
/v1/resource/pool/create:
post:
tags:
- ResourcePool
operationId : ResourcePool_Create
requestBody:
content:
application/json:
schema:
type : string
$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
requestBody:
content:
application/json:
schema:
$ref : '#/components/schemas/ResourcePoolDetailRequest'
required : true
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:
schema:
$ref : '#/components/schemas/Status'
/v1/resource/pool/removeNode:
post:
tags:
- ResourcePool
operationId : ResourcePool_RemoveNode
requestBody:
content:
application/json:
schema:
$ref : '#/components/schemas/RemoveNodeRequest'
required : true
responses:
"200" :
description : OK
content:
application/json:
schema:
$ref : '#/components/schemas/ContainerReply'
$ref : '#/components/schemas/ BaseResponse '
default:
description : Default error response
content:
application/json:
schema:
$ref : '#/components/schemas/Status'
/v1/containers:
/v1/ resource/pool/update :
post:
tags:
- Container
operationId : Container_GetAllContainers
- ResourcePool
operationId : ResourcePool_Update
requestBody:
content:
application/json:
schema:
$ref : '#/components/schemas/GetAllContainersReq'
$ref : '#/components/schemas/ ResourcePoolUpdateRequest '
required : true
responses:
"200" :
@ -54,7 +155,7 @@ paths:
content:
application/json:
schema:
$ref : '#/components/schemas/ ContainersReply '
$ref : '#/components/schemas/ BaseResponse '
default:
description : Default error response
content:
@ -63,119 +164,191 @@ paths:
$ref : '#/components/schemas/Status'
components:
schemas:
ContainerReply :
AvailableNodesInfo :
type : object
properties:
name:
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:
type : object
properties:
code:
type : integer
format : int32
message:
type : string
status:
data:
type : object
GoogleProtobufAny:
type : object
properties:
'@type' :
type : string
appName:
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:
type : string
nodeName:
type : string
allocatedDevices:
PoolNodeReply:
type : object
properties:
ip:
type : string
isSchedulable:
type : boolean
isReady:
type : boolean
type:
type : array
items:
type : string
vgpuUsed:
type : integer
format : int32
allocatedCores:
vgpuTot al:
type : integer
format : int32
allocatedMem:
coreUsed :
type : integer
format : int32
type:
type : string
createTime:
type : string
startTime:
coreTotal:
type : integer
format : int32
memoryUsed:
type : integer
format : int32
memoryTotal:
type : integer
format : int32
uid:
type : string
endTime:
na me:
type : string
podUid:
cardCnt:
type : integer
format : int32
osImage:
type : string
nodeUid:
operatingSystem :
type : string
resourcePools:
type : array
items:
kernelVersion:
type : string
flavor :
containerRuntimeVersion:
type : string
priority :
kubeletVersion :
type : string
namespace :
kubeProxyVersion :
type : string
deviceIds:
type : array
items:
architecture:
type : string
podName :
creationTimestamp:
type : string
taskTyp e:
diskSiz e:
type : string
shixunName :
nodeId :
type : string
role :
cpuCores :
type : string
username :
totalMemory :
type : string
requestedCpuCores :
type : number
format : float
requestedMemory :
RemoveNodeRequest :
type : object
properties:
nodeId :
type : string
ContainersReply :
ResourcePoolCreateRequest :
type : object
properties:
items:
poolName:
type : string
nodes:
type : array
items:
$ref : '#/components/schemas/ ContainerReply '
GetAllContainersReq :
$ref : '#/components/schemas/ Nodes '
ResourcePoolDeleteRequest :
type : object
properties:
filters:
$ref : '#/components/schemas/GetAllContainersReq_Filters'
pageSize:
$ref : '#/components/schemas/GetAllContainersReq_PageSize'
GetAllContainersReq_Filters:
poolId:
type : string
ResourcePoolDetailRequest:
type : object
properties:
name :
poolId :
type : string
nodeName:
ResourcePoolDetailResponse:
type : object
properties:
list:
type : array
items:
$ref : '#/components/schemas/PoolNodeReply'
ResourcePoolListData:
type : object
properties:
poolId:
type : string
status:
poolName :
type : string
deviceId:
cpuCores :
type : string
nodeUid:
node Num :
type : string
resourceGroup:
gpuNum :
type : string
priority:
availableMemor y:
type : string
GetAllContainersReq_PageSize:
type : object
properties:
pageSize:
type : integer
format : int32
pageNo:
type : integer
format : int32
sort:
totalMemory:
type : string
sortField :
diskSize:
type : string
GoogleProtobufAny:
nodeList:
type : array
items:
$ref : '#/components/schemas/Nodes'
linkUrl:
type : string
ResourcePoolListResponse:
type : object
properties:
'@type' :
data:
type : array
items:
$ref : '#/components/schemas/ResourcePoolListData'
ResourcePoolUpdateRequest:
type : object
properties:
poolId:
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.
poolName:
type : string
nodes:
type : array
items:
$ref : '#/components/schemas/Nodes'
Status:
type : object
properties:
@ -193,4 +366,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 : Container
- name : ResourcePool