forked from beaker-project/beaker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add first few methods into openapi definition
Resolves: beaker-project#193
- Loading branch information
Showing
2 changed files
with
162 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: Beaker new-gen - Lab Controller | ||
description: This spec showcases a proposal to new REST api for beaker-LC. | ||
version: "29.0-dev" | ||
paths: | ||
/recipes/{recipe_id}/tasks/{task_id}/results/{result_id}/logs/: | ||
parameters: | ||
- in: path | ||
name: recipe_id | ||
schema: | ||
type: integer | ||
required: true | ||
description: recipe ID | ||
- in: path | ||
name: task_id | ||
schema: | ||
type: integer | ||
required: true | ||
description: recipe ID | ||
- in: path | ||
name: result_id | ||
schema: | ||
type: integer | ||
required: true | ||
description: recipe ID | ||
get: | ||
summary: Get existing log names for specific taskrun | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
text/plain: | ||
example: "/var/logs/messages\n/root/ks_original" | ||
'404': | ||
description: "is not a valid RecipeTaskResult" | ||
|
||
/recipes/{recipe_id}/tasks/{task_id}/results/{result_id}/logs/{path}: | ||
parameters: | ||
- in: path | ||
name: recipe_id | ||
schema: | ||
type: integer | ||
required: true | ||
description: recipe ID | ||
- in: path | ||
name: task_id | ||
schema: | ||
type: integer | ||
required: true | ||
description: recipe ID | ||
- in: path | ||
name: result_id | ||
schema: | ||
type: integer | ||
required: true | ||
description: recipe ID | ||
- in: path | ||
name: path | ||
schema: | ||
type: string | ||
required: true | ||
description: recipe ID | ||
get: | ||
summary: Get log of specific taskrun | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
text/plain: | ||
example: "Log line no. 1\nLog line no. 2" | ||
put: | ||
summary: Upload log for specific taskrun | ||
responses: | ||
'204': | ||
description: OK | ||
'409': | ||
description: Cannot register file for finished ... | ||
'403': | ||
description: Too many ... | ||
|
||
/power/{fqdn}/: | ||
put: | ||
summary: Set power to SUT | ||
description: Hit this enpoint to check connection to LC | ||
parameters: | ||
- in: path | ||
name: fqdn | ||
schema: | ||
type: string | ||
required: true | ||
description: fqdn of system under test to set power to | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
action: | ||
type: string | ||
anyOf: | ||
- const: "on" | ||
- const: "off" | ||
- const: "reboot" | ||
application/x-www-form-urlencoded: | ||
schema: | ||
type: object | ||
properties: | ||
action: | ||
type: string | ||
anyOf: | ||
- const: "on" | ||
- const: "off" | ||
- const: "reboot" | ||
responses: | ||
'204': | ||
description: OK | ||
content: | ||
text/plain: | ||
example: "We are healthy!" | ||
|
||
/healthz: | ||
head: | ||
summary: Test | ||
description: Test Description | ||
operationId: nameLength | ||
responses: | ||
'200': | ||
description: OK | ||
get: | ||
summary: ping | ||
description: Hit this enpoint to check connection to LC | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
text/plain: | ||
example: "We are healthy!" |
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,24 @@ | ||
openapi: 3.0.3 | ||
info: | ||
title: Beaker new-gen - Server | ||
description: This spec showcases a proposal to new REST api for beaker-server. | ||
version: "29.0-dev" | ||
paths: | ||
/healthz: | ||
head: | ||
summary: Test | ||
description: Test Description | ||
operationId: nameLength | ||
responses: | ||
'200': | ||
description: OK | ||
get: | ||
summary: ping | ||
description: Hit this enpoint to check connection to beaker server | ||
responses: | ||
'200': | ||
description: OK | ||
content: | ||
text/plain: | ||
example: "We are healthy!" | ||
|