From 9768014a0650ba956165193ea9f4d6142a045c36 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Tue, 23 Feb 2021 02:18:23 +0100 Subject: [PATCH] add OpenAPI spec for VILLASnode relay (closes #271) --- doc/openapi-relay.yaml | 63 ++++++++++++++++++++++++++++++++++++++++++ doc/openapi.yaml | 5 ++-- 2 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 doc/openapi-relay.yaml diff --git a/doc/openapi-relay.yaml b/doc/openapi-relay.yaml new file mode 100644 index 000000000..de6c81ece --- /dev/null +++ b/doc/openapi-relay.yaml @@ -0,0 +1,63 @@ +--- +openapi: '3.0.0' +info: + title: VILLASnode Relay + version: 0.10.0 + description: 'A HTTP/REST API for observing the state of VILLASnode relay.' + termsOfService: 'https://www.fein-aachen.org/projects/villas-node/' + contact: + name: 'Steffen Vogel' + email: svogel2@eonerc.rwth-aachen.de + url: 'https://fein-aachen.org/contact/' + license: + name: GPL-v3 + url: 'https://www.gnu.org/licenses/gpl-3.0.en.html' +externalDocs: + url: 'https://villas.fein-aachen.org/doc/node.html' +servers: + - url: "https://villas.k8s.eonerc.rwth-aachen.de/ws/relay/api/v1" + description: "The production API server in our EONERC OpenStack Kubernetes" +tags: + - name: status + +paths: + "/": + get: + summary: Get the current status of the VILLASnode relay instance including all active sessions. + tags: + - status + responses: + '200': + description: Success + content: + application/json: + examples: + example1: + value: + sessions: + - identifier: node_1 + uuid: 8c58c29d-db3a-821b-7a4c-c4be5930d751 + connections: + - name: "::ffff:10.245.0.66" + ip: 10.245.0.66 + created: 1614042974 + bytes_recv: 3480 + bytes_sent: 3480 + frames_recv: 174 + frames_sent: 174 + - name: "::ffff:10.245.0.66" + ip: 10.245.0.67 + created: 1614042962 + bytes_recv: 5880 + bytes_sent: 3480 + frames_recv: 294 + frames_sent: 174 + created: 1614042962 + connects: 2 + version: v0.11.0 + hostname: villas-relay-cccfdd5bb-bvvwk + uuid: 32dd320b-3f86-497f-a77c-f83ecdb55c54 + options: + loopback: false + port: 8088 + protocol: live diff --git a/doc/openapi.yaml b/doc/openapi.yaml index 3d06d9f2b..d7959bf6b 100644 --- a/doc/openapi.yaml +++ b/doc/openapi.yaml @@ -1,3 +1,4 @@ +--- openapi: '3.0.0' info: title: VILLASnode @@ -14,10 +15,8 @@ info: externalDocs: url: 'https://villas.fein-aachen.org/doc/node.html' servers: - - url: "https://villas-new.k8s.eonerc.rwth-aachen.de/api/v2" + - url: "https://villas.k8s.eonerc.rwth-aachen.de/api/v2" description: "The production API server in our EONERC OpenStack Kubernetes" - - url: "http://ernie.acs-lab.eonerc.rwth-aachen.de:8080/api/v2" - description: "VILLASnode lab instance in ACS laboratory" tags: - name: super-node description: Global super-node related operations.