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