-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [wip] list images and build image api * Fix existing api-test * Update open api spec * Generate SDK client * Fix lint * Update specs/ensembler-images.yaml * Implement image building API in SDK * Pin pytest version * Revert turing/version.py * Update api test * Fix lint api * Fix lint api
- Loading branch information
Arief Rahmansyah
authored
May 7, 2024
1 parent
b4bc519
commit 9b21e1b
Showing
56 changed files
with
4,313 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: Endpoints and schemas of Turing ensembler images | ||
version: 0.0.1 | ||
|
||
.tags: &tags | ||
- "Ensembler Images" | ||
|
||
.id: &id | ||
type: "integer" | ||
format: "int32" | ||
|
||
paths: | ||
"/projects/{project_id}/ensemblers/{ensembler_id}/images": | ||
get: | ||
tags: *tags | ||
operationId: "ListEnsemblerImages" | ||
summary: Returns a list of ensembler images that belong to the ensembler | ||
parameters: | ||
- in: path | ||
name: project_id | ||
schema: | ||
<<: *id | ||
required: true | ||
- in: path | ||
name: ensembler_id | ||
schema: | ||
<<: *id | ||
required: true | ||
- in: query | ||
name: runner_type | ||
schema: | ||
"$ref": "#/components/schemas/EnsemblerImageRunnerType" | ||
required: false | ||
responses: | ||
"200": | ||
description: A JSON object | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "#/components/schemas/EnsemblerImages" | ||
"400": | ||
description: Invalid request body | ||
"404": | ||
description: Ensembler not found | ||
"500": | ||
description: Unable to list ensembler images | ||
put: | ||
tags: *tags | ||
operationId: "CreateEnsemblerImage" | ||
summary: Creates a new ensembler image | ||
parameters: | ||
- in: path | ||
name: project_id | ||
schema: | ||
<<: *id | ||
required: true | ||
- in: path | ||
name: ensembler_id | ||
schema: | ||
<<: *id | ||
required: true | ||
requestBody: | ||
description: A JSON object containing information about the ensembler | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
$ref: "#/components/schemas/BuildEnsemblerImageRequest" | ||
responses: | ||
"202": | ||
description: Accepted | ||
"400": | ||
description: Invalid request body | ||
"404": | ||
description: Ensembler not found | ||
"500": | ||
description: Unable to build ensembler image | ||
|
||
components: | ||
schemas: | ||
EnsemblerId: | ||
$ref: "./common.yaml#/components/schemas/IdObject" | ||
|
||
EnsemblerImages: | ||
type: array | ||
items: | ||
$ref: "#/components/schemas/EnsemblerImage" | ||
|
||
EnsemblerImage: | ||
type: object | ||
properties: | ||
project_id: | ||
type: integer | ||
format: int32 | ||
ensembler_id: | ||
type: integer | ||
format: int32 | ||
runner_type: | ||
"$ref": "#/components/schemas/EnsemblerImageRunnerType" | ||
image_ref: | ||
type: string | ||
exists: | ||
type: boolean | ||
image_building_job_status: | ||
"$ref": "#/components/schemas/ImageBuildingJobStatus" | ||
|
||
EnsemblerImageRunnerType: | ||
type: string | ||
nullable: true | ||
enum: | ||
- job | ||
- service | ||
|
||
ImageBuildingJobStatus: | ||
type: object | ||
properties: | ||
state: | ||
"$ref": "#/components/schemas/ImageBuildingJobState" | ||
message: | ||
type: string | ||
ImageBuildingJobState: | ||
type: string | ||
enum: | ||
- active | ||
- succeeded | ||
- failed | ||
- unknown | ||
|
||
BuildEnsemblerImageRequest: | ||
type: object | ||
properties: | ||
runner_type: | ||
"$ref": "#/components/schemas/EnsemblerImageRunnerType" | ||
required: | ||
- runner_type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.