Add doc endpoint

This commit is contained in:
Joshua Boniface 2019-12-23 23:11:55 -05:00
parent 2dec61ce88
commit ebcf0cee43
2 changed files with 16 additions and 10 deletions

View File

@ -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 <joshua@boniface.me>
@ -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 = ''

View File

@ -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",