Datacenter Update to Ws

This commit is contained in:
mr
2026-04-09 07:49:35 +02:00
parent c87245e83f
commit 74919994c2
20 changed files with 633 additions and 922 deletions

View File

@@ -10,7 +10,7 @@ info:
license:
name: AGPL
url: https://www.gnu.org/licenses/agpl-3.0.html
basePath: /oc/
basePath: /oc
paths:
/:
get:
@@ -21,14 +21,27 @@ paths:
<br>
operationId: DatacenterController.GetAll
parameters:
- in: path
name: type
description: the word type you want to get
required: true
type: string
- in: query
name: is_draft
description: draft wished
type: string
- in: query
name: offset
description: "false"
type: string
- in: query
name: limit
description: "false"
type: string
responses:
"200":
description: '{booking} models.booking'
/{id}:
/{type}/{id}:
get:
tags:
- oc-datacenter/controllersDatacenterController
@@ -42,6 +55,11 @@ paths:
description: the id you want to get
required: true
type: string
- in: path
name: type
description: the word type you want to get
required: true
type: string
- in: query
name: is_draft
description: draft wished
@@ -49,134 +67,24 @@ paths:
responses:
"200":
description: '{booking} models.booking'
/admiralty/kubeconfig/{execution}:
get:
delete:
tags:
- admiralty
parameters:
- in: path
name: execution
description: execution id of the workflow
required: true
type: string
responses:
"200":
description: ""
/admiralty/node/{execution}:
get:
tags:
- admiralty
parameters:
- in: path
name: execution
description: execution id of the workflow
required: true
type: string
responses:
"200":
description: ""
/admiralty/secret/{execution}:
get:
tags:
- admiralty
parameters:
- in: path
name: execution
description: execution id of the workflow
required: true
type: string
responses:
"200":
description: ""
post:
tags:
- admiralty
parameters:
- in: path
name: execution
description: execution id of the workflow
required: true
type: string
- in: body
name: kubeconfig
description: Kubeconfig to use when creating secret
required: true
schema:
$ref: '#/definitions/controllers.RemoteKubeconfig'
responses:
"201":
description: ""
/admiralty/source/{execution}:
post:
tags:
- admiralty
description: |-
Create an Admiralty Source on remote cluster
<br>
operationId: AdmiraltyController.CreateSource
parameters:
- in: path
name: execution
description: execution id of the workflow
required: true
type: string
responses:
"201":
description: ""
/admiralty/target/{execution}:
post:
tags:
- admiralty
description: |-
Create an Admiralty Target in the namespace associated to the executionID
<br>
operationId: AdmiraltyController.CreateAdmiraltyTarget
parameters:
- in: path
name: execution
description: execution id of the workflow
required: true
type: string
responses:
"201":
description: ""
/admiralty/targets:
get:
tags:
- admiralty
description: |-
find all Admiralty Target
<br>
operationId: AdmiraltyController.GetAllTargets
responses:
"200":
description: ""
/admiralty/targets/{execution}:
get:
tags:
- admiralty
description: |-
find one Admiralty Target
<br>
operationId: AdmiraltyController.GetOneTarget
parameters:
- in: path
name: id
description: the name of the target to get
required: true
type: string
responses:
"200":
description: ""
/booking/:
get:
tags:
- booking
- oc-datacenter/controllersDatacenterController
description: |-
find booking by id
<br>
operationId: BookingController.GetAll
operationId: DatacenterController.Delete
parameters:
- in: path
name: id
description: the id you want to get
required: true
type: string
- in: path
name: type
description: the word type you want to get
required: true
type: string
- in: query
name: is_draft
description: draft wished
@@ -184,38 +92,128 @@ paths:
responses:
"200":
description: '{booking} models.booking'
post:
/{type}/search/{search}:
get:
tags:
- booking
- oc-datacenter/controllersDatacenterController
description: |-
create booking
search datacenter
<br>
operationId: BookingController.Post.
operationId: DatacenterController.Search
parameters:
- in: body
name: booking
description: the booking you want to post
- in: path
name: type
description: the type you want to get
required: true
type: string
- in: path
name: search
description: the word search you want to get
required: true
schema:
type: string
type: string
- in: query
name: is_draft
description: draft wished
type: string
- in: query
name: offset
description: "false"
type: string
- in: query
name: limit
description: "false"
type: string
responses:
"200":
description: '{workspace} models.workspace'
/allowed-image/:
get:
tags:
- allowed-image
description: |-
Retourne toutes les images autorisées à persister sur ce peer
<br>
operationId: AllowedImageController.GetAll
parameters:
- in: query
name: offset
description: "false"
type: string
- in: query
name: limit
description: "false"
type: string
responses:
"200":
description: ""
schema:
$ref: '#/definitions/models.object'
/booking/{id}:
type: array
items:
$ref: '#/definitions/allowed_image.AllowedImage'
post:
tags:
- allowed-image
description: |-
Ajoute une image à la liste des images autorisées (peer admin uniquement)
<br>
operationId: AllowedImageController.Post
parameters:
- in: body
name: body
description: Image à autoriser
required: true
schema:
$ref: '#/definitions/allowed_image.AllowedImage'
responses:
"200":
description: ""
schema:
$ref: '#/definitions/allowed_image.AllowedImage'
/allowed-image/{id}:
get:
tags:
- booking
- allowed-image
description: |-
Retourne une image autorisée par son ID
<br>
operationId: AllowedImageController.Get
parameters:
- in: path
name: id
description: ID de l'image autorisée
required: true
type: string
responses:
"200":
description: ""
schema:
$ref: '#/definitions/allowed_image.AllowedImage'
delete:
tags:
- allowed-image
description: |-
Supprime une image de la liste des images autorisées (peer admin uniquement, entrées bootstrap non supprimables)
<br>
operationId: AllowedImageController.Delete
parameters:
- in: path
name: id
description: ID de l'image autorisée
required: true
type: string
responses:
"200":
description: ""
schema:
$ref: '#/definitions/allowed_image.AllowedImage'
/logs/{id}:
get:
tags:
- oc-datacenter/controllersDatacenterController
description: |-
find booking by id
<br>
operationId: BookingController.Get
operationId: DatacenterController.Log
parameters:
- in: path
name: id
@@ -225,107 +223,6 @@ paths:
responses:
"200":
description: '{booking} models.booking'
put:
tags:
- booking
description: |-
create computes
<br>
operationId: BookingController.Update
parameters:
- in: path
name: id
description: the compute id you want to get
required: true
type: string
- in: body
name: body
description: The compute content
required: true
schema:
$ref: '#/definitions/models.compute'
responses:
"200":
description: '{compute} models.compute'
/booking/check/{id}/{start_date}/{end_date}:
get:
tags:
- booking
description: |-
check booking
<br>
operationId: BookingController.Check
parameters:
- in: path
name: id
description: id of the datacenter
type: string
- in: path
name: start_date
description: 2006-01-02T15:04:05
type: string
default: the booking start date
- in: path
name: end_date
description: 2006-01-02T15:04:05
type: string
default: the booking end date
- in: query
name: is_draft
description: draft wished
type: string
responses:
"200":
description: ""
schema:
$ref: '#/definitions/models.object'
/booking/search/{start_date}/{end_date}:
get:
tags:
- booking
description: |-
search bookings
<br>
operationId: BookingController.Search
parameters:
- in: path
name: start_date
description: the word search you want to get
required: true
type: string
- in: path
name: end_date
description: the word search you want to get
required: true
type: string
- in: query
name: is_draft
description: draft wished
type: string
responses:
"200":
description: '{workspace} models.workspace'
/booking/search/execution/{id}:
get:
tags:
- booking
description: |-
search bookings by execution
<br>
operationId: BookingController.Search
parameters:
- in: path
name: id
description: id execution
required: true
type: string
- in: query
name: is_draft
description: draft wished
type: string
responses:
"200":
description: '{workspace} models.workspace'
/session/token/{id}/{duration}:
get:
tags:
@@ -369,28 +266,22 @@ paths:
"200":
description: ""
definitions:
controllers.RemoteKubeconfig:
title: RemoteKubeconfig
type: object
properties:
Data:
type: string
models.compute:
title: compute
type: object
models.object:
title: object
allowed_image.AllowedImage:
title: AllowedImage
type: object
tags:
- name: oc-datacenter/controllersDatacenterController
description: |
Operations about workspace
- name: booking
description: |
Operations about workspace
- name: version
description: |
VersionController operations for Version
- name: admiralty
- name: allowed-image
description: |
Operations about the admiralty objects of the datacenter
AllowedImageController gère la liste locale des images autorisées à persister
sur ce peer après l'exécution d'un workflow.
GET /allowed-image/ → tous les utilisateurs authentifiés
GET /allowed-image/:id → tous les utilisateurs authentifiés
POST /allowed-image/ → peer admin uniquement
DELETE /allowed-image/:id → peer admin uniquement (bloqué si IsDefault)