Add DB migration update script

This commit is contained in:
2020-02-15 23:23:09 -05:00
parent 760805fec1
commit c67fc05219
2 changed files with 13 additions and 0 deletions

24
gen-api-doc Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env python3
# gen-doc.py - Generate a Swagger JSON document for the API
# Part of the Parallel Virtual Cluster (PVC) system
from flask_swagger import swagger
import os
import sys
import json
os.environ['PVC_CONFIG_FILE'] = "./api-daemon/pvcapid.sample.yaml"
sys.path.append('api-daemon')
import pvcapid.flaskapi as pvc_api
swagger_file = "docs/manuals/swagger.json"
swagger_data = swagger(pvc_api.app)
swagger_data['info']['version'] = "1.0"
swagger_data['info']['title'] = "PVC Client and Provisioner API"
swagger_data['host'] = "pvc.local:7370"
with open(swagger_file, 'w') as fd:
fd.write(json.dumps(swagger_data, sort_keys=True, indent=4))