Add doc endpoint
This commit is contained in:
parent
2dec61ce88
commit
ebcf0cee43
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env python3
|
#!/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
|
# Part of the Parallel Virtual Cluster (PVC) system
|
||||||
#
|
#
|
||||||
# Copyright (C) 2018-2019 Joshua M. Boniface <joshua@boniface.me>
|
# Copyright (C) 2018-2019 Joshua M. Boniface <joshua@boniface.me>
|
||||||
|
@ -29,15 +29,7 @@ import difflib
|
||||||
import re
|
import re
|
||||||
import colorama
|
import colorama
|
||||||
import yaml
|
import yaml
|
||||||
|
import requests
|
||||||
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
|
|
||||||
|
|
||||||
myhostname = socket.gethostname().split('.')[0]
|
myhostname = socket.gethostname().split('.')[0]
|
||||||
zk_host = ''
|
zk_host = ''
|
||||||
|
|
|
@ -925,6 +925,20 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/v1/doc": {
|
||||||
|
"get": {
|
||||||
|
"description": "",
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"summary": "Provide the Swagger API documentation",
|
||||||
|
"tags": [
|
||||||
|
"root"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/v1/initialize": {
|
"/api/v1/initialize": {
|
||||||
"post": {
|
"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",
|
"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",
|
||||||
|
|
Loading…
Reference in New Issue