From 71c04ebe966d75ca0bd9724d57f10aa9e15f630e Mon Sep 17 00:00:00 2001 From: debuggy Date: Fri, 3 Jul 2020 16:06:47 +0800 Subject: [PATCH 1/9] Add more debug info in job detail --- src/rest-server/src/models/v2/job/k8s.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/rest-server/src/models/v2/job/k8s.js b/src/rest-server/src/models/v2/job/k8s.js index ae18ca1644..54f6504ce4 100644 --- a/src/rest-server/src/models/v2/job/k8s.js +++ b/src/rest-server/src/models/v2/job/k8s.js @@ -213,6 +213,8 @@ const convertTaskDetail = async (taskStatus, ports, logPathPrefix) => { const containerGpus = null; const completionStatus = taskStatus.attemptStatus.completionStatus; + const diagnostics = completionStatus ? completionStatus.diagnostics : null; + const exitDiagnostics = generateExitDiagnostics(diagnostics); return { taskIndex: taskStatus.index, taskState: convertState( @@ -222,10 +224,16 @@ const convertTaskDetail = async (taskStatus, ports, logPathPrefix) => { ), containerId: taskStatus.attemptStatus.podUID, containerIp: taskStatus.attemptStatus.podHostIP, + podNodeName: taskStatus.attemptStatus.podNodeName, containerPorts, containerGpus, containerLog: `http://${taskStatus.attemptStatus.podHostIP}:${process.env.LOG_MANAGER_PORT}/log-manager/tail/${logPathPrefix}/${taskStatus.attemptStatus.podUID}/`, containerExitCode: completionStatus ? completionStatus.code : null, + containerExitSpec: completionStatus ? generateExitSpec(completionStatus.code) : generateExitSpec(null), + containerExitDiagnostics: exitDiagnostics ? exitDiagnostics.diagnosticsSummary : null, + totalRetriedCount: taskStatus.retryPolicyStatus.totalRetriedCount, + startTime: taskStatus.attemptStatus.startTime, + completionTime: taskStatus.attemptStatus.completionTime, ...launcherConfig.enabledHived && { hived: { affinityGroupName, From abc96edfcca3e4c6c730a409aa0a63b69bb4e148 Mon Sep 17 00:00:00 2001 From: debuggy Date: Sun, 5 Jul 2020 17:33:06 +0800 Subject: [PATCH 2/9] 533 --- src/webportal/src/app/home/home/conn.js | 6 +++--- .../job/job-submit-v1/job-submit.component.js | 4 ++-- .../app/job/job-view/fabric/JobList/index.jsx | 4 ++-- .../job-detail/components/task-role.jsx | 1 + .../job/job-view/fabric/job-detail/conn.js | 20 +++++++++---------- 5 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/webportal/src/app/home/home/conn.js b/src/webportal/src/app/home/home/conn.js index 7d4afb482d..3f741e7c85 100644 --- a/src/webportal/src/app/home/home/conn.js +++ b/src/webportal/src/app/home/home/conn.js @@ -45,7 +45,7 @@ async function fetchWrapper(...args) { export async function listJobs() { return fetchWrapper( - `${config.restServerUri}/api/v1/jobs?${querystring.stringify({ + `${config.restServerUri}/api/v2/jobs?${querystring.stringify({ username, })}`, { @@ -57,7 +57,7 @@ export async function listJobs() { } export async function listAllJobs() { - return fetchWrapper(`${config.restServerUri}/api/v1/jobs`, { + return fetchWrapper(`${config.restServerUri}/api/v2/jobs`, { headers: { Authorization: `Bearer ${token}`, }, @@ -133,7 +133,7 @@ export async function getLowGpuJobInfos() { export async function stopJob(job) { const { name, username } = job; const res = await fetch( - `${config.restServerUri}/api/v1/jobs/${username}~${name}/executionType`, + `${config.restServerUri}/api/v2/jobs/${username}~${name}/executionType`, { method: 'PUT', headers: { diff --git a/src/webportal/src/app/job/job-submit-v1/job-submit.component.js b/src/webportal/src/app/job/job-submit-v1/job-submit.component.js index 9c1dfc0ea5..95241e35c5 100644 --- a/src/webportal/src/app/job/job-submit-v1/job-submit.component.js +++ b/src/webportal/src/app/job/job-submit-v1/job-submit.component.js @@ -96,7 +96,7 @@ const submitJob = jobConfig => { const user = cookies.get('user'); loading.showLoading(); $.ajax({ - url: `${webportalConfig.restServerUri}/api/v1/jobs/${user}~${jobConfig.jobName}`, + url: `${webportalConfig.restServerUri}/api/v2/jobs/${user}~${jobConfig.jobName}`, data: JSON.stringify(jobConfig), headers: { Authorization: `Bearer ${token}`, @@ -205,7 +205,7 @@ $(document).ready(() => { if (type != null && username != null && jobName != null) { const url = username === '' - ? `${webportalConfig.restServerUri}/api/v1/jobs/${jobName}/config` + ? `${webportalConfig.restServerUri}/api/v2/jobs/${jobName}/config` : `${webportalConfig.restServerUri}/api/v2/jobs/${username}~${jobName}/config`; $.ajax({ url: url, diff --git a/src/webportal/src/app/job/job-view/fabric/JobList/index.jsx b/src/webportal/src/app/job/job-view/fabric/JobList/index.jsx index 9c64c9926a..09a3489586 100644 --- a/src/webportal/src/app/job/job-view/fabric/JobList/index.jsx +++ b/src/webportal/src/app/job/job-view/fabric/JobList/index.jsx @@ -107,7 +107,7 @@ export default function JobList() { jobs.forEach(job => { const { name, username } = job; fetch( - `${webportalConfig.restServerUri}/api/v1/jobs/${username}~${name}/executionType`, + `${webportalConfig.restServerUri}/api/v2/jobs/${username}~${name}/executionType`, { method: 'PUT', headers: { @@ -146,7 +146,7 @@ export default function JobList() { const refreshJobs = useCallback(function refreshJobs() { setAllJobs(null); const token = userAuth.checkToken(); - fetch(`${webportalConfig.restServerUri}/api/v1/jobs`, { + fetch(`${webportalConfig.restServerUri}/api/v2/jobs`, { headers: { Authorization: `Bearer ${token}`, }, diff --git a/src/webportal/src/app/job/job-view/fabric/job-detail/components/task-role.jsx b/src/webportal/src/app/job/job-view/fabric/job-detail/components/task-role.jsx index 5a2e600546..9e50add68f 100644 --- a/src/webportal/src/app/job/job-view/fabric/job-detail/components/task-role.jsx +++ b/src/webportal/src/app/job/job-view/fabric/job-detail/components/task-role.jsx @@ -117,6 +117,7 @@ export default class TaskRole extends React.Component { render() { const { className, name, taskInfo, isFailed } = this.props; + console.log(taskInfo); const { containerListExpanded } = this.state; const { semanticColors } = getTheme(); const { rawJobConfig } = this.context; diff --git a/src/webportal/src/app/job/job-view/fabric/job-detail/conn.js b/src/webportal/src/app/job/job-view/fabric/job-detail/conn.js index 79b93b6bdf..a77ad4250d 100644 --- a/src/webportal/src/app/job/job-view/fabric/job-detail/conn.js +++ b/src/webportal/src/app/job/job-view/fabric/job-detail/conn.js @@ -58,7 +58,7 @@ export async function fetchJobRetries() { }; } - const listAttemptsUrl = `${config.restServerUri}/api/v1/jobs/${userName}~${jobName}/job-attempts`; + const listAttemptsUrl = `${config.restServerUri}/api/v2/jobs/${userName}~${jobName}/job-attempts`; const token = checkToken(); const listRes = await fetch(listAttemptsUrl, { headers: { @@ -89,8 +89,8 @@ export async function fetchJobRetries() { export async function fetchJobInfo() { const url = userName - ? `${config.restServerUri}/api/v1/jobs/${userName}~${jobName}` - : `${config.restServerUri}/api/v1/jobs/${jobName}`; + ? `${config.restServerUri}/api/v2/jobs/${userName}~${jobName}` + : `${config.restServerUri}/api/v2/jobs/${jobName}`; const token = checkToken(); const res = await fetch(url, { headers: { @@ -107,8 +107,8 @@ export async function fetchJobInfo() { export async function fetchRawJobConfig() { const url = userName - ? `${config.restServerUri}/api/v1/jobs/${userName}~${jobName}/config` - : `${config.restServerUri}/api/v1/jobs/${jobName}/config`; + ? `${config.restServerUri}/api/v2/jobs/${userName}~${jobName}/config` + : `${config.restServerUri}/api/v2/jobs/${jobName}/config`; const token = checkToken(); const res = await fetch(url, { headers: { @@ -131,7 +131,7 @@ export async function fetchRawJobConfig() { export async function fetchJobConfig() { const url = userName ? `${config.restServerUri}/api/v2/jobs/${userName}~${jobName}/config` - : `${config.restServerUri}/api/v1/jobs/${jobName}/config`; + : `${config.restServerUri}/api/v2/jobs/${jobName}/config`; const token = checkToken(); const res = await fetch(url, { headers: { @@ -153,8 +153,8 @@ export async function fetchJobConfig() { export async function fetchSshInfo() { const url = userName - ? `${config.restServerUri}/api/v1/jobs/${userName}~${jobName}/ssh` - : `${config.restServerUri}/api/v1/jobs/${jobName}/ssh`; + ? `${config.restServerUri}/api/v2/jobs/${userName}~${jobName}/ssh` + : `${config.restServerUri}/api/v2/jobs/${jobName}/ssh`; const token = checkToken(); const res = await fetch(url, { headers: { @@ -215,8 +215,8 @@ export function getJobMetricsUrl(jobInfo) { export async function stopJob() { const url = userName - ? `${config.restServerUri}/api/v1/jobs/${userName}~${jobName}/executionType` - : `${config.restServerUri}/api/v1/jobs/${jobName}/executionType`; + ? `${config.restServerUri}/api/v2/jobs/${userName}~${jobName}/executionType` + : `${config.restServerUri}/api/v2/jobs/${jobName}/executionType`; const token = checkToken(); const res = await fetch(url, { method: 'PUT', From 7a778d04a190175b21929bd848010ae56e0248e5 Mon Sep 17 00:00:00 2001 From: debuggy Date: Mon, 6 Jul 2020 13:17:25 +0800 Subject: [PATCH 3/9] comments --- src/rest-server/docs/swagger.yaml | 55 ++++++++++++++++++++++++ src/rest-server/src/models/v2/job/k8s.js | 8 ++-- 2 files changed, 59 insertions(+), 4 deletions(-) diff --git a/src/rest-server/docs/swagger.yaml b/src/rest-server/docs/swagger.yaml index 24062c67c8..bce4a07294 100644 --- a/src/rest-server/docs/swagger.yaml +++ b/src/rest-server/docs/swagger.yaml @@ -1969,10 +1969,16 @@ components: type: string reaction: type: string + reason: + type: string repro: type: array items: type: string + solution: + type: array + items: + type: string appExitDiagnostics: type: string nullable: true @@ -2063,6 +2069,9 @@ components: type: string nullable: true description: ip of the task container + containerNodeName: + type: string + description: node name of task container containerPorts: type: object description: ports of the task container @@ -2077,6 +2086,52 @@ components: type: integer nullable: true description: exit code the task container + containerExitSpec: + type: object + nullable: true + description: container exit spec + properties: + code: + type: integer + phrase: + type: string + issuer: + type: string + causer: + type: string + type: + type: string + stage: + type: string + behavior: + type: string + reaction: + type: string + reason: + type: string + repro: + type: array + items: + type: string + solution: + type: array + items: + type: string + containerExitDiagnostics: + type: string + nullable: true + description: container exit diagnostics + retries: + type: integer + createdTime: + type: string + format: date-time + completedTime: + type: string + format: date-time + hived: + type: object + nullable: true required: - taskRoleStatus - taskStatuses diff --git a/src/rest-server/src/models/v2/job/k8s.js b/src/rest-server/src/models/v2/job/k8s.js index 54f6504ce4..d43ce6519e 100644 --- a/src/rest-server/src/models/v2/job/k8s.js +++ b/src/rest-server/src/models/v2/job/k8s.js @@ -224,16 +224,16 @@ const convertTaskDetail = async (taskStatus, ports, logPathPrefix) => { ), containerId: taskStatus.attemptStatus.podUID, containerIp: taskStatus.attemptStatus.podHostIP, - podNodeName: taskStatus.attemptStatus.podNodeName, + containerNodeName: taskStatus.attemptStatus.podNodeName, containerPorts, containerGpus, containerLog: `http://${taskStatus.attemptStatus.podHostIP}:${process.env.LOG_MANAGER_PORT}/log-manager/tail/${logPathPrefix}/${taskStatus.attemptStatus.podUID}/`, containerExitCode: completionStatus ? completionStatus.code : null, containerExitSpec: completionStatus ? generateExitSpec(completionStatus.code) : generateExitSpec(null), containerExitDiagnostics: exitDiagnostics ? exitDiagnostics.diagnosticsSummary : null, - totalRetriedCount: taskStatus.retryPolicyStatus.totalRetriedCount, - startTime: taskStatus.attemptStatus.startTime, - completionTime: taskStatus.attemptStatus.completionTime, + retries: taskStatus.retryPolicyStatus.totalRetriedCount, + createdTime: taskStatus.attemptStatus.startTime, + completedTime: taskStatus.attemptStatus.completionTime, ...launcherConfig.enabledHived && { hived: { affinityGroupName, From d6a40e79fff1828b2126249afc04235ee91c6023 Mon Sep 17 00:00:00 2001 From: debuggy Date: Mon, 6 Jul 2020 18:17:05 +0800 Subject: [PATCH 4/9] add more properties --- src/rest-server/docs/swagger.yaml | 24 ++++++++++++++++++++---- src/rest-server/src/models/v2/job/k8s.js | 7 +++++-- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/rest-server/docs/swagger.yaml b/src/rest-server/docs/swagger.yaml index ec6dffc6de..59d624a3d6 100644 --- a/src/rest-server/docs/swagger.yaml +++ b/src/rest-server/docs/swagger.yaml @@ -2125,12 +2125,28 @@ components: description: container exit diagnostics retries: type: integer + accountableRetries: + type: integer createdTime: - type: string - format: date-time + type: integer + description: >- + task created time, in number of milliseconds since the Unix + Epoch. completedTime: - type: string - format: date-time + type: integer + description: >- + task completion time, in number of milliseconds since the Unix + Epoch. + currentAttemptLaunchedTime: + type: integer + description: >- + the last attempt launched time, in number of milliseconds since the Unix + Epoch. + currentAttemptCompletedTime: + type: integer + description: >- + the last attempt completion time, in number of milliseconds since the Unix + Epoch. hived: type: object nullable: true diff --git a/src/rest-server/src/models/v2/job/k8s.js b/src/rest-server/src/models/v2/job/k8s.js index d43ce6519e..c3bb93dc1c 100644 --- a/src/rest-server/src/models/v2/job/k8s.js +++ b/src/rest-server/src/models/v2/job/k8s.js @@ -232,8 +232,11 @@ const convertTaskDetail = async (taskStatus, ports, logPathPrefix) => { containerExitSpec: completionStatus ? generateExitSpec(completionStatus.code) : generateExitSpec(null), containerExitDiagnostics: exitDiagnostics ? exitDiagnostics.diagnosticsSummary : null, retries: taskStatus.retryPolicyStatus.totalRetriedCount, - createdTime: taskStatus.attemptStatus.startTime, - completedTime: taskStatus.attemptStatus.completionTime, + accountableRetries: taskStatus.retryPolicyStatus.accountableRetriedCount, + createdTime: new Date(taskStatus.StartTime).getTime(), + completedTime: new Date(taskStatus.completionTime).getTime(), + currentAttemptLaunchedTime: new Date(taskStatus.attemptStatus.runTime || taskStatus.attemptStatus.completionTime).getTime(), + currentAttemptCompletedTime: new Date(taskStatus.attemptStatus.completionTime).getTime(), ...launcherConfig.enabledHived && { hived: { affinityGroupName, From 95af1dd5dfd3dcf1ca9557400fa7e037cbfc2305 Mon Sep 17 00:00:00 2001 From: debuggy Date: Mon, 6 Jul 2020 18:50:58 +0800 Subject: [PATCH 5/9] fix --- src/rest-server/src/models/v2/job/k8s.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rest-server/src/models/v2/job/k8s.js b/src/rest-server/src/models/v2/job/k8s.js index c3bb93dc1c..48da0e221f 100644 --- a/src/rest-server/src/models/v2/job/k8s.js +++ b/src/rest-server/src/models/v2/job/k8s.js @@ -233,9 +233,9 @@ const convertTaskDetail = async (taskStatus, ports, logPathPrefix) => { containerExitDiagnostics: exitDiagnostics ? exitDiagnostics.diagnosticsSummary : null, retries: taskStatus.retryPolicyStatus.totalRetriedCount, accountableRetries: taskStatus.retryPolicyStatus.accountableRetriedCount, - createdTime: new Date(taskStatus.StartTime).getTime(), + createdTime: new Date(taskStatus.startTime).getTime(), completedTime: new Date(taskStatus.completionTime).getTime(), - currentAttemptLaunchedTime: new Date(taskStatus.attemptStatus.runTime || taskStatus.attemptStatus.completionTime).getTime(), + currentAttemptLaunchedTime: new Date(taskStatus.attemptStatus.runTime || taskStatus.attemptStatus.startTime).getTime(), currentAttemptCompletedTime: new Date(taskStatus.attemptStatus.completionTime).getTime(), ...launcherConfig.enabledHived && { hived: { From aa6a039c79787570168f748d58e19e21bb5a0e4e Mon Sep 17 00:00:00 2001 From: debuggy Date: Mon, 6 Jul 2020 18:56:14 +0800 Subject: [PATCH 6/9] remove --- .../app/job/job-view/fabric/job-detail/components/task-role.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/webportal/src/app/job/job-view/fabric/job-detail/components/task-role.jsx b/src/webportal/src/app/job/job-view/fabric/job-detail/components/task-role.jsx index 9e50add68f..5a2e600546 100644 --- a/src/webportal/src/app/job/job-view/fabric/job-detail/components/task-role.jsx +++ b/src/webportal/src/app/job/job-view/fabric/job-detail/components/task-role.jsx @@ -117,7 +117,6 @@ export default class TaskRole extends React.Component { render() { const { className, name, taskInfo, isFailed } = this.props; - console.log(taskInfo); const { containerListExpanded } = this.state; const { semanticColors } = getTheme(); const { rawJobConfig } = this.context; From 1b5fd445520fb768201a5265f48ba443e5a4629d Mon Sep 17 00:00:00 2001 From: debuggy Date: Tue, 7 Jul 2020 15:37:32 +0800 Subject: [PATCH 7/9] last - current --- src/rest-server/docs/swagger.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rest-server/docs/swagger.yaml b/src/rest-server/docs/swagger.yaml index 59d624a3d6..e38c731a13 100644 --- a/src/rest-server/docs/swagger.yaml +++ b/src/rest-server/docs/swagger.yaml @@ -2140,12 +2140,12 @@ components: currentAttemptLaunchedTime: type: integer description: >- - the last attempt launched time, in number of milliseconds since the Unix + the current attempt launched time, in number of milliseconds since the Unix Epoch. currentAttemptCompletedTime: type: integer description: >- - the last attempt completion time, in number of milliseconds since the Unix + the current attempt completion time, in number of milliseconds since the Unix Epoch. hived: type: object From add532023e872366a63a122cc491541c643cda07 Mon Sep 17 00:00:00 2001 From: debuggy Date: Tue, 7 Jul 2020 18:37:15 +0800 Subject: [PATCH 8/9] fix ci --- src/rest-server/docs/swagger.yaml | 633 +++++++++++++++--------------- 1 file changed, 317 insertions(+), 316 deletions(-) diff --git a/src/rest-server/docs/swagger.yaml b/src/rest-server/docs/swagger.yaml index e38c731a13..1b6f2b5ef0 100644 --- a/src/rest-server/docs/swagger.yaml +++ b/src/rest-server/docs/swagger.yaml @@ -9,11 +9,11 @@ info: Version 2.0.4: add default field in get storage list license: name: MIT License - url: 'https://github.com/microsoft/pai/blob/master/LICENSE' + url: "https://github.com/microsoft/pai/blob/master/LICENSE" version: 2.0.3 externalDocs: description: Find out more about OpenPAI - url: 'https://github.com/microsoft/pai' + url: "https://github.com/microsoft/pai" tags: - name: api description: API information @@ -44,7 +44,7 @@ paths: description: Get OpenPAI cluster info. operationId: getClusterInfo responses: - '200': + "200": description: Succeeded content: application/json: @@ -73,10 +73,10 @@ paths: - launcherType - authnMethod example: - name: 'PAI RESTful API' - version: 'v1.0.1' - launcherType: 'k8s' - authnMethod: 'basic' + name: "PAI RESTful API" + version: "v1.0.1" + launcherType: "k8s" + authnMethod: "basic" /api/v2/tokens: get: tags: @@ -87,7 +87,7 @@ paths: security: - bearerAuth: [] responses: - '200': + "200": description: Succeeded content: application/json: @@ -103,10 +103,10 @@ paths: - tokens example: tokens: - - 'JWT Token Example' - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '/api/v2/tokens/{token}': + - "JWT Token Example" + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "/api/v2/tokens/{token}": delete: tags: - token @@ -116,20 +116,20 @@ paths: security: - bearerAuth: [] parameters: - - $ref: '#/components/parameters/token' + - $ref: "#/components/parameters/token" responses: - '200': + "200": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" example: message: revoke successfully - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '403': - $ref: '#/components/responses/ForbiddenUserError' + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "403": + $ref: "#/components/responses/ForbiddenUserError" /api/v2/tokens/application: post: tags: @@ -143,7 +143,7 @@ paths: security: - bearerAuth: [] responses: - '200': + "200": description: Succeeded content: application/json: @@ -155,12 +155,12 @@ paths: description: your access token application: type: boolean - description: 'true' + description: "true" example: - token: 'JWT Token Example' + token: "JWT Token Example" application: true - '401': - $ref: '#/components/responses/UnauthorizedUserError' + "401": + $ref: "#/components/responses/UnauthorizedUserError" /api/v2/authn/oidc/login: get: tags: @@ -169,7 +169,7 @@ paths: description: After call this API in web browser, restserver will redirect your page to Azure AD for authentication. Only be used in webportal. operationId: oidcLogin responses: - '302': + "302": description: Redirect /api/v2/authn/oidc/logout: get: @@ -179,7 +179,7 @@ paths: description: After call this API in web browser, restserver will redirect your page to Azure AD for logout. operationId: oidcLogout responses: - '302': + "302": description: Redirect /api/v2/authn/basic/login: post: @@ -211,7 +211,7 @@ paths: - password required: true responses: - '200': + "200": description: Succeeded content: application/json: @@ -232,17 +232,17 @@ paths: - user - admin example: - token: 'JWT Token Example' - user: 'user' + token: "JWT Token Example" + user: "user" admin: true - '400': + "400": description: NoUserError or IncorrectPasswordError content: application/json: schema: - $ref: '#/components/schemas/Response' - '404': - $ref: '#/components/responses/NoUserError' + $ref: "#/components/schemas/Response" + "404": + $ref: "#/components/responses/NoUserError" /api/v2/authn/basic/logout: delete: tags: @@ -253,24 +253,24 @@ paths: security: - bearerAuth: [] responses: - '200': + "200": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" example: message: Logout successfully - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '403': - $ref: '#/components/responses/ForbiddenUserError' + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "403": + $ref: "#/components/responses/ForbiddenUserError" /api/v2/users: post: tags: - user summary: Create a user in the system. - description: 'Create a user in the system by admin, basic authentication mode only.' + description: "Create a user in the system by admin, basic authentication mode only." operationId: createUser security: - bearerAuth: [] @@ -304,32 +304,32 @@ paths: - password required: true responses: - '201': + "201": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" example: message: User is created successfully - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '403': - $ref: '#/components/responses/ForbiddenUserError' - '409': - $ref: '#/components/responses/ConflictUserError' - '500': - $ref: '#/components/responses/UnknownError' + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "403": + $ref: "#/components/responses/ForbiddenUserError" + "409": + $ref: "#/components/responses/ConflictUserError" + "500": + $ref: "#/components/responses/UnknownError" get: tags: - user summary: Get all users in the system. - description: 'Get all users in the system by admin.' + description: "Get all users in the system by admin." operationId: getAllUser security: - bearerAuth: [] responses: - '200': + "200": description: Succeeded content: application/json: @@ -337,16 +337,16 @@ paths: description: Array with all users in the system. type: array items: - $ref: '#/components/schemas/UserInfo' + $ref: "#/components/schemas/UserInfo" example: - username: username admin: true virtualCluster: [] storageConfig: [] - email: 'email@test.com' + email: "email@test.com" extension: {} - '500': - $ref: '#/components/responses/UnknownError' + "500": + $ref: "#/components/responses/UnknownError" put: tags: - user @@ -414,22 +414,22 @@ paths: type: boolean default: false responses: - '201': + "201": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" example: - message: 'update group {username} successfully.' - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '403': - $ref: '#/components/responses/ForbiddenUserError' - '404': - $ref: '#/components/responses/NoUserError' - '500': - $ref: '#/components/responses/UnknownError' + message: "update group {username} successfully." + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "403": + $ref: "#/components/responses/ForbiddenUserError" + "404": + $ref: "#/components/responses/NoUserError" + "500": + $ref: "#/components/responses/UnknownError" /api/v2/users/me: put: tags: @@ -478,25 +478,25 @@ paths: type: boolean default: false responses: - '201': + "201": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" example: - message: 'update group {username} successfully.' - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '403': - $ref: '#/components/responses/ForbiddenUserError' - '404': - $ref: '#/components/responses/NoUserError' - '500': - $ref: '#/components/responses/UnknownError' - '/api/v2/users/{user}': + message: "update group {username} successfully." + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "403": + $ref: "#/components/responses/ForbiddenUserError" + "404": + $ref: "#/components/responses/NoUserError" + "500": + $ref: "#/components/responses/UnknownError" + "/api/v2/users/{user}": parameters: - - $ref: '#/components/parameters/user' + - $ref: "#/components/parameters/user" get: tags: - user @@ -508,25 +508,25 @@ paths: security: - bearerAuth: [] responses: - '200': + "200": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/UserInfo' + $ref: "#/components/schemas/UserInfo" example: username: username admin: true virtualCluster: [] storageConfig: [] - email: 'email@test.com' + email: "email@test.com" extension: {} - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '404': - $ref: '#/components/responses/NoUserError' - '500': - $ref: '#/components/responses/UnknownError' + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "404": + $ref: "#/components/responses/NoUserError" + "500": + $ref: "#/components/responses/UnknownError" delete: tags: - user @@ -539,25 +539,25 @@ paths: security: - bearerAuth: [] responses: - '200': + "200": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" example: message: user is removed successfully - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '403': - $ref: '#/components/responses/ForbiddenUserError' - '404': - $ref: '#/components/responses/NoUserError' - '500': - $ref: '#/components/responses/UnknownError' - '/api/v2/users/{user}/group/': + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "403": + $ref: "#/components/responses/ForbiddenUserError" + "404": + $ref: "#/components/responses/NoUserError" + "500": + $ref: "#/components/responses/UnknownError" + "/api/v2/users/{user}/group/": parameters: - - $ref: '#/components/parameters/user' + - $ref: "#/components/parameters/user" put: tags: - user @@ -580,22 +580,22 @@ paths: type: string default: the group will be added into the user's grouplist. responses: - '201': + "201": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" example: - message: 'User {username} is added into group {groupname}' - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '403': - $ref: '#/components/responses/ForbiddenUserError' - '404': - $ref: '#/components/responses/NoUserError' - '500': - $ref: '#/components/responses/UnknownError' + message: "User {username} is added into group {groupname}" + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "403": + $ref: "#/components/responses/ForbiddenUserError" + "404": + $ref: "#/components/responses/NoUserError" + "500": + $ref: "#/components/responses/UnknownError" delete: tags: - user @@ -618,25 +618,25 @@ paths: type: string description: the group will be removed from the user's grouplist. responses: - '201': + "201": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" example: - message: 'User {username} is removed from group {groupname}' - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '403': - $ref: '#/components/responses/ForbiddenUserError' - '404': - $ref: '#/components/responses/NoUserError' - '500': - $ref: '#/components/responses/UnknownError' - '/api/v2/users/{user}/grouplist/': + message: "User {username} is removed from group {groupname}" + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "403": + $ref: "#/components/responses/ForbiddenUserError" + "404": + $ref: "#/components/responses/NoUserError" + "500": + $ref: "#/components/responses/UnknownError" + "/api/v2/users/{user}/grouplist/": parameters: - - $ref: '#/components/parameters/user' + - $ref: "#/components/parameters/user" put: tags: - user @@ -661,22 +661,22 @@ paths: items: type: string responses: - '201': + "201": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" example: - message: 'update user grouplist successfully.' - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '403': - $ref: '#/components/responses/ForbiddenUserError' - '404': - $ref: '#/components/responses/NoUserError' - '500': - $ref: '#/components/responses/UnknownError' + message: "update user grouplist successfully." + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "403": + $ref: "#/components/responses/ForbiddenUserError" + "404": + $ref: "#/components/responses/NoUserError" + "500": + $ref: "#/components/responses/UnknownError" /api/v2/groups: get: tags: @@ -687,7 +687,7 @@ paths: security: - bearerAuth: [] responses: - '200': + "200": description: Succeeded content: application/json: @@ -713,8 +713,8 @@ paths: description: description externalName: externalName extension: {} - '500': - $ref: '#/components/responses/UnknownError' + "500": + $ref: "#/components/responses/UnknownError" post: tags: - group @@ -747,20 +747,20 @@ paths: - groupname required: true responses: - '201': + "201": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" example: message: group is created successfully - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '403': - $ref: '#/components/responses/ForbiddenUserError' - '500': - $ref: '#/components/responses/UnknownError' + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "403": + $ref: "#/components/responses/ForbiddenUserError" + "500": + $ref: "#/components/responses/UnknownError" put: tags: - group @@ -799,25 +799,25 @@ paths: default: false required: true responses: - '201': + "201": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" example: - message: 'update group {groupname} successfully.' - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '403': - $ref: '#/components/responses/ForbiddenUserError' - '404': - $ref: '#/components/responses/NoGroupError' - '500': - $ref: '#/components/responses/UnknownError' - '/api/v2/groups/{group}': + message: "update group {groupname} successfully." + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "403": + $ref: "#/components/responses/ForbiddenUserError" + "404": + $ref: "#/components/responses/NoGroupError" + "500": + $ref: "#/components/responses/UnknownError" + "/api/v2/groups/{group}": parameters: - - $ref: '#/components/parameters/group' + - $ref: "#/components/parameters/group" get: tags: - group @@ -828,7 +828,7 @@ paths: security: - bearerAuth: [] responses: - '200': + "200": description: Succeeded content: application/json: @@ -856,12 +856,12 @@ paths: description: description externalName: externalName extension: {} - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '404': - $ref: '#/components/responses/NoGroupError' - '500': - $ref: '#/components/responses/UnknownError' + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "404": + $ref: "#/components/responses/NoGroupError" + "500": + $ref: "#/components/responses/UnknownError" delete: tags: - group @@ -873,23 +873,23 @@ paths: security: - bearerAuth: [] responses: - '201': + "201": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" example: message: group is removed successfully - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '403': - $ref: '#/components/responses/ForbiddenUserError' - '500': - $ref: '#/components/responses/UnknownError' - '/api/v2/groups/{group}/userlist': + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "403": + $ref: "#/components/responses/ForbiddenUserError" + "500": + $ref: "#/components/responses/UnknownError" + "/api/v2/groups/{group}/userlist": parameters: - - $ref: '#/components/parameters/group' + - $ref: "#/components/parameters/group" get: tags: - group @@ -897,7 +897,7 @@ paths: description: Get the user array of a group in the system. operationId: getGroupMembers responses: - '200': + "200": description: Succeeded content: application/json: @@ -916,10 +916,10 @@ paths: example: - username: username clusterAdmin: false - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '500': - $ref: '#/components/responses/UnknownError' + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "500": + $ref: "#/components/responses/UnknownError" /api/v2/virtual-clusters: get: tags: @@ -930,17 +930,17 @@ paths: security: - bearerAuth: [] responses: - '200': + "200": description: Succeeded content: application/json: schema: type: object additionalProperties: - $ref: '#/components/schemas/VirtualCluster' - '500': - $ref: '#/components/responses/UnknownError' - '/api/v2/virtual-clusters/{vc}': + $ref: "#/components/schemas/VirtualCluster" + "500": + $ref: "#/components/responses/UnknownError" + "/api/v2/virtual-clusters/{vc}": get: tags: - virtual cluster @@ -950,14 +950,14 @@ paths: security: - bearerAuth: [] parameters: - - $ref: '#/components/parameters/vc' + - $ref: "#/components/parameters/vc" responses: - '200': + "200": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/VirtualCluster' + $ref: "#/components/schemas/VirtualCluster" example: capacity: 70 usedCapacity: 30 @@ -981,10 +981,10 @@ paths: vCores: 2 GPUs: 2 maxCapacity: 70 - '404': - $ref: '#/components/responses/NoVirtualClusterError' - '500': - $ref: '#/components/responses/UnknownError' + "404": + $ref: "#/components/responses/NoVirtualClusterError" + "500": + $ref: "#/components/responses/UnknownError" /api/v2/storages: get: tags: @@ -1001,20 +1001,20 @@ paths: schema: type: boolean responses: - '200': + "200": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/StorageSummary' + $ref: "#/components/schemas/StorageSummary" example: storages: - name: name share: true volumeName: volumeName - '500': - $ref: '#/components/responses/UnknownError' - '/api/v2/storages/{storage}': + "500": + $ref: "#/components/responses/UnknownError" + "/api/v2/storages/{storage}": get: tags: - storage @@ -1024,14 +1024,14 @@ paths: security: - bearerAuth: [] parameters: - - $ref: '#/components/parameters/storage' + - $ref: "#/components/parameters/storage" responses: - '200': + "200": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/StorageDetail' + $ref: "#/components/schemas/StorageDetail" example: name: nfs-storage-name share: true @@ -1040,21 +1040,21 @@ paths: data: server: path: "/data" - '403': + "403": description: ForbiddenUserError content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: ForbiddenUserError: value: code: ForbiddenUserError - message: 'User {user} is not allowed to access {storage}.' - '404': - $ref: '#/components/responses/NoStorageError' - '500': - $ref: '#/components/responses/UnknownError' + message: "User {user} is not allowed to access {storage}." + "404": + $ref: "#/components/responses/NoStorageError" + "500": + $ref: "#/components/responses/UnknownError" /api/v2/jobs: post: tags: @@ -1069,25 +1069,25 @@ paths: content: text/yaml: schema: - $ref: '#/components/schemas/JobProtocol' + $ref: "#/components/schemas/JobProtocol" required: true responses: - '202': + "202": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" example: - message: 'update job {job} successfully' - '400': - $ref: '#/components/responses/NoVirtualClusterError' - '403': - $ref: '#/components/responses/ForbiddenUserError' - '409': - $ref: '#/components/responses/ConflictJobError' - '500': - $ref: '#/components/responses/UnknownError' + message: "update job {job} successfully" + "400": + $ref: "#/components/responses/NoVirtualClusterError" + "403": + $ref: "#/components/responses/ForbiddenUserError" + "409": + $ref: "#/components/responses/ConflictJobError" + "500": + $ref: "#/components/responses/UnknownError" get: tags: - job @@ -1103,14 +1103,14 @@ paths: schema: type: string responses: - '200': + "200": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/JobSummary' + $ref: "#/components/schemas/JobSummary" example: - - protocolVersion: '2' + - protocolVersion: "2" name: job name username: user name state: SUCCEEDED @@ -1121,9 +1121,9 @@ paths: completedTime: 0 appExitCode: 0 virtualCluster: unknown - '500': - $ref: '#/components/responses/UnknownError' - '/api/v2/jobs/{user}~{job}': + "500": + $ref: "#/components/responses/UnknownError" + "/api/v2/jobs/{user}~{job}": get: tags: - job @@ -1133,15 +1133,15 @@ paths: security: - bearerAuth: [] parameters: - - $ref: '#/components/parameters/user' - - $ref: '#/components/parameters/job' + - $ref: "#/components/parameters/user" + - $ref: "#/components/parameters/job" responses: - '200': + "200": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/JobDetail' + $ref: "#/components/schemas/JobDetail" example: name: job name jobStatus: @@ -1164,11 +1164,11 @@ paths: taskStatuses: - taskIndex: 0 taskState: SUCCEEDED - '404': - $ref: '#/components/responses/NoJobError' - '500': - $ref: '#/components/responses/UnknownError' - '/api/v2/jobs/{user}~{job}/config': + "404": + $ref: "#/components/responses/NoJobError" + "500": + $ref: "#/components/responses/UnknownError" + "/api/v2/jobs/{user}~{job}/config": get: tags: - job @@ -1178,17 +1178,17 @@ paths: security: - bearerAuth: [] parameters: - - $ref: '#/components/parameters/user' - - $ref: '#/components/parameters/job' + - $ref: "#/components/parameters/user" + - $ref: "#/components/parameters/job" responses: - '200': + "200": description: Succeeded content: text/yaml: schema: - $ref: '#/components/schemas/JobProtocol' + $ref: "#/components/schemas/JobProtocol" example: - protocolVersion: '2' + protocolVersion: "2" name: type: job prerequisites: @@ -1205,20 +1205,20 @@ paths: gpu: 1 commands: - python - '404': + "404": description: NoJobError or NoJobConfigError content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: NoJobError: - $ref: '#/components/responses/NoJobError/content/application~1json/examples/NoJobError' + $ref: "#/components/responses/NoJobError/content/application~1json/examples/NoJobError" NoJobConfigError: - $ref: '#/components/responses/NoJobConfigError/content/application~1json/examples/NoJobConfigError' - '500': - $ref: '#/components/responses/UnknownError' - '/api/v2/jobs/{user}~{job}/executionType': + $ref: "#/components/responses/NoJobConfigError/content/application~1json/examples/NoJobConfigError" + "500": + $ref: "#/components/responses/UnknownError" + "/api/v2/jobs/{user}~{job}/executionType": put: tags: - job @@ -1228,8 +1228,8 @@ paths: security: - bearerAuth: [] parameters: - - $ref: '#/components/parameters/user' - - $ref: '#/components/parameters/job' + - $ref: "#/components/parameters/user" + - $ref: "#/components/parameters/job" requestBody: description: Execution type content: @@ -1247,19 +1247,19 @@ paths: - value required: true responses: - '202': + "202": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" example: message: execute job {job} successfully - '404': - $ref: '#/components/responses/NoJobError' - '500': - $ref: '#/components/responses/UnknownError' - '/api/v2/jobs/{user}~{job}/job-attempts/healthz': + "404": + $ref: "#/components/responses/NoJobError" + "500": + $ref: "#/components/responses/UnknownError" + "/api/v2/jobs/{user}~{job}/job-attempts/healthz": get: tags: - job history @@ -1269,14 +1269,14 @@ paths: security: - bearerAuth: [] parameters: - - $ref: '#/components/parameters/user' - - $ref: '#/components/parameters/job' + - $ref: "#/components/parameters/user" + - $ref: "#/components/parameters/job" responses: - '200': + "200": description: OK - '501': + "501": description: Not healthy - '/api/v2/jobs/{user}~{job}/job-attempts': + "/api/v2/jobs/{user}~{job}/job-attempts": get: tags: - job history @@ -1286,17 +1286,17 @@ paths: security: - bearerAuth: [] parameters: - - $ref: '#/components/parameters/user' - - $ref: '#/components/parameters/job' + - $ref: "#/components/parameters/user" + - $ref: "#/components/parameters/job" responses: - '200': + "200": description: Succeeded content: application/json: schema: type: array items: - $ref: '#/components/schemas/JobAttempt' + $ref: "#/components/schemas/JobAttempt" description: job attempts example: - jobName: jobName @@ -1317,7 +1317,7 @@ paths: diagnosticsSummary: Pod succeeded runtime: launcher: Pod succeeded - appExitTriggerMessage: 'All Tasks are completed' + appExitTriggerMessage: "All Tasks are completed" appExitTriggerTaskRoleName: taskrole appExitTriggerTaskIndex: 0 appExitSpec: @@ -1350,11 +1350,11 @@ paths: containerIp: containerExitCode: 0 isLatest: true - '404': - $ref: '#/components/responses/NoJobError' - '501': - $ref: '#/components/responses/UnknownError' - '/api/v2/jobs/{user}~{job}/job-attempts/{attemptIndex}': + "404": + $ref: "#/components/responses/NoJobError" + "501": + $ref: "#/components/responses/UnknownError" + "/api/v2/jobs/{user}~{job}/job-attempts/{attemptIndex}": get: tags: - job history @@ -1364,16 +1364,16 @@ paths: security: - bearerAuth: [] parameters: - - $ref: '#/components/parameters/user' - - $ref: '#/components/parameters/job' - - $ref: '#/components/parameters/attemptIndex' + - $ref: "#/components/parameters/user" + - $ref: "#/components/parameters/job" + - $ref: "#/components/parameters/attemptIndex" responses: - '200': + "200": description: Succeeded content: application/json: schema: - $ref: '#/components/schemas/JobAttempt' + $ref: "#/components/schemas/JobAttempt" example: jobName: jobName frameworkName: frameworkName @@ -1393,7 +1393,7 @@ paths: diagnosticsSummary: Pod succeeded runtime: launcher: Pod succeeded - appExitTriggerMessage: 'All Tasks are completed' + appExitTriggerMessage: "All Tasks are completed" appExitTriggerTaskRoleName: taskrole appExitTriggerTaskIndex: 0 appExitSpec: @@ -1426,10 +1426,10 @@ paths: containerIp: containerExitCode: 0 isLatest: true - '404': - $ref: '#/components/responses/NoJobError' - '501': - $ref: '#/components/responses/UnknownError' + "404": + $ref: "#/components/responses/NoJobError" + "501": + $ref: "#/components/responses/UnknownError" /api/v2/kubernetes/nodes: get: tags: @@ -1440,7 +1440,7 @@ paths: security: - bearerAuth: [] responses: - '200': + "200": description: Succeeded content: application/json: @@ -1448,10 +1448,10 @@ paths: - Please refer to Kubernetes API doc - >- https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#list-node-v1-core - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '403': - $ref: '#/components/responses/ForbiddenUserError' + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "403": + $ref: "#/components/responses/ForbiddenUserError" /api/v2/kubernetes/pods: get: tags: @@ -1468,7 +1468,7 @@ paths: security: - bearerAuth: [] responses: - '200': + "200": description: Succeeded content: application/json: @@ -1476,10 +1476,10 @@ paths: - Please refer to Kubernetes API doc - >- https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/#list-all-namespaces-pod-v1-core - '401': - $ref: '#/components/responses/UnauthorizedUserError' - '403': - $ref: '#/components/responses/ForbiddenUserError' + "401": + $ref: "#/components/responses/UnauthorizedUserError" + "403": + $ref: "#/components/responses/ForbiddenUserError" components: parameters: token: @@ -1524,7 +1524,7 @@ components: framework: name: framework in: path - description: 'framework name defined by {user}~{job}' + description: "framework name defined by {user}~{job}" required: true schema: type: string @@ -2073,6 +2073,7 @@ components: description: ip of the task container containerNodeName: type: string + nullable: true description: node name of task container containerPorts: type: object @@ -2579,7 +2580,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: IncorrectPasswordError: value: @@ -2590,40 +2591,40 @@ components: content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: NoVirtualClusterError: value: code: NoVirtualClusterError - message: 'Virtual cluster {vc} is not found.' + message: "Virtual cluster {vc} is not found." NoGroupError: description: NoGroupError content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: NoGroupError: value: code: NoGroupError - message: 'Group {groupname} is not found.' + message: "Group {groupname} is not found." NoStorageError: description: NoStorageError content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: NoVirtualClusterError: value: code: NoStorageError - message: 'Storage {storage} is not found.' + message: "Storage {storage} is not found." UnauthorizedUserError: description: UnauthorizedUserError content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: UnauthorizedUserError: value: @@ -2634,7 +2635,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: ForbiddenUserError: value: @@ -2649,7 +2650,7 @@ components: content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: ForbiddenKeyError: value: @@ -2660,73 +2661,73 @@ components: content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: NoUserError: value: code: NoUserError - message: 'User {user} is not found.' + message: "User {user} is not found." NoJobError: description: NoJobError content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: NoJobError: value: code: NoJobError - message: 'Job {job} is not found.' + message: "Job {job} is not found." NoJobConfigError: description: NoJobConfigError content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: NoJobConfigError: value: code: NoJobConfigError - message: 'Config of job {job} is not found.' + message: "Config of job {job} is not found." NoJobSshInfoError: description: NoJobSshInfoError content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: NoJobSshInfoError: value: code: NoJobSshInfoError - message: 'SSH info of job {job} is not found.' + message: "SSH info of job {job} is not found." ConflictUserError: description: ConflictUserError content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: ConflictUserError: value: code: ConflictUserError - message: 'User name {user} already exists.' + message: "User name {user} already exists." ConflictJobError: description: ConflictJobError content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: ConflictJobError: value: code: ConflictJobError - message: 'Job name {job} already exists.' + message: "Job name {job} already exists." UnknownError: description: UnknownError content: application/json: schema: - $ref: '#/components/schemas/Response' + $ref: "#/components/schemas/Response" examples: UnknownError: value: From 0ee527a1d5bae831cc09acaee4b299e18109ef0c Mon Sep 17 00:00:00 2001 From: debuggy Date: Tue, 7 Jul 2020 19:16:55 +0800 Subject: [PATCH 9/9] update swagger --- src/rest-server/docs/swagger.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rest-server/docs/swagger.yaml b/src/rest-server/docs/swagger.yaml index 1b6f2b5ef0..5ffda0e0bc 100644 --- a/src/rest-server/docs/swagger.yaml +++ b/src/rest-server/docs/swagger.yaml @@ -10,7 +10,7 @@ info: license: name: MIT License url: "https://github.com/microsoft/pai/blob/master/LICENSE" - version: 2.0.3 + version: 2.0.4 externalDocs: description: Find out more about OpenPAI url: "https://github.com/microsoft/pai"