From ebcf0cee437a9464b8075b70a48b823d382fd3c3 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Mon, 23 Dec 2019 23:11:55 -0500 Subject: [PATCH] Add doc endpoint --- client-cli/pvc.py | 12 ++---------- docs/manuals/swagger.json | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/client-cli/pvc.py b/client-cli/pvc.py index 3741d214..558dd1fd 100755 --- a/client-cli/pvc.py +++ b/client-cli/pvc.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# pvc.py - PVC client command-line interface +# pvc.py - PVC API command-line interface # Part of the Parallel Virtual Cluster (PVC) system # # Copyright (C) 2018-2019 Joshua M. Boniface @@ -29,15 +29,7 @@ import difflib import re import colorama import yaml - -import client_lib.ansiprint as ansiprint -import client_lib.common as pvc_common -import client_lib.cluster as pvc_cluster -import client_lib.node as pvc_node -import client_lib.vm as pvc_vm -import client_lib.network as pvc_network -import client_lib.ceph as pvc_ceph -#import client_lib.provisioner as pvc_provisioner +import requests myhostname = socket.gethostname().split('.')[0] zk_host = '' diff --git a/docs/manuals/swagger.json b/docs/manuals/swagger.json index e5a7c7df..ff982994 100644 --- a/docs/manuals/swagger.json +++ b/docs/manuals/swagger.json @@ -925,6 +925,20 @@ ] } }, + "/api/v1/doc": { + "get": { + "description": "", + "responses": { + "200": { + "description": "OK" + } + }, + "summary": "Provide the Swagger API documentation", + "tags": [ + "root" + ] + } + }, "/api/v1/initialize": { "post": { "description": "Note: Normally used only once during cluster bootstrap; checks for the existence of the \"/primary_node\" key before proceeding and returns 400 if found",