Skip to content

Commit

Permalink
Add first few methods into openapi definition
Browse files Browse the repository at this point in the history
  • Loading branch information
mdujava committed Dec 21, 2023
1 parent 601a471 commit fc10f75
Show file tree
Hide file tree
Showing 2 changed files with 162 additions and 0 deletions.
138 changes: 138 additions & 0 deletions documentation/labcontroller-proxy-openapi.yaml
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!"
24 changes: 24 additions & 0 deletions documentation/server-openapi.yaml
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!"

0 comments on commit fc10f75

Please sign in to comment.