OAPI: add operation to fetch all workers
This introduces a new tag `worker-mgt` for worker management operations. These are used by the web interface to display & manage workers.
This commit is contained in:
parent
723855a9d5
commit
311887bff7
@ -249,6 +249,20 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/Error"
|
$ref: "#/components/schemas/Error"
|
||||||
|
|
||||||
|
# Worker Management
|
||||||
|
/api/worker-mgt/workers:
|
||||||
|
summary: Obtain list of Workers known to the Manager.
|
||||||
|
get:
|
||||||
|
operationId: fetchWorkers
|
||||||
|
summary: Get list of workers.
|
||||||
|
tags: [worker-mgt]
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: Known workers
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema: { $ref: "#/components/schemas/WorkerList" }
|
||||||
|
|
||||||
## Jobs
|
## Jobs
|
||||||
|
|
||||||
/api/jobs/types:
|
/api/jobs/types:
|
||||||
@ -656,6 +670,8 @@ tags:
|
|||||||
description: Job & task queries, submission, and management.
|
description: Job & task queries, submission, and management.
|
||||||
- name: worker
|
- name: worker
|
||||||
description: API for Flamenco Workers to communicate with Flamenco Manager.
|
description: API for Flamenco Workers to communicate with Flamenco Manager.
|
||||||
|
- name: worker-mgt
|
||||||
|
description: Worker Management API, for the web interface to query and control Workers.
|
||||||
- name: shaman
|
- name: shaman
|
||||||
description: Shaman API, for file uploading & creating job checkouts.
|
description: Shaman API, for file uploading & creating job checkouts.
|
||||||
|
|
||||||
@ -1341,6 +1357,36 @@ components:
|
|||||||
enum: [job, tasklog]
|
enum: [job, tasklog]
|
||||||
description: What kind of thing to subscribe to / unsubscribe from.
|
description: What kind of thing to subscribe to / unsubscribe from.
|
||||||
|
|
||||||
|
# Worker Management
|
||||||
|
|
||||||
|
WorkerList:
|
||||||
|
type: object
|
||||||
|
description: List of workers.
|
||||||
|
properties:
|
||||||
|
"workers":
|
||||||
|
type: array
|
||||||
|
items: { $ref: "#/components/schemas/WorkerSummary" }
|
||||||
|
required: [workers]
|
||||||
|
|
||||||
|
WorkerSummary:
|
||||||
|
type: object
|
||||||
|
description: Basic information about a Worker.
|
||||||
|
properties:
|
||||||
|
"id": { type: string, format: uuid }
|
||||||
|
"nickname": { type: string }
|
||||||
|
"status": { $ref: "#/components/schemas/WorkerStatus" }
|
||||||
|
"status_requested": { $ref: "#/components/schemas/WorkerStatus" }
|
||||||
|
# These will be implemented soon:
|
||||||
|
# "task_id":
|
||||||
|
# type: string
|
||||||
|
# format: uuid
|
||||||
|
# description: The worker's current/last-worked-on task.
|
||||||
|
# "last_seen":
|
||||||
|
# type: string
|
||||||
|
# format: date-time
|
||||||
|
# description: Last time this worker was seen by the Manager.
|
||||||
|
required: [id, nickname, status]
|
||||||
|
|
||||||
securitySchemes:
|
securitySchemes:
|
||||||
worker_auth:
|
worker_auth:
|
||||||
description: Username is the worker ID, password is the secret given at worker registration.
|
description: Username is the worker ID, password is the secret given at worker registration.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user