Move API version string location to Daemon

Prevents a startup bug with pvcapid-manage.py.
This commit is contained in:
Joshua Boniface 2021-05-30 00:09:39 -04:00
parent c23a53d082
commit 25f80a4478
2 changed files with 6 additions and 6 deletions

View File

@ -24,9 +24,12 @@ import yaml
from distutils.util import strtobool as dustrtobool
# Version string for startup output
# Daemon version
version = '0.9.18'
# API version
API_VERSION = 1.0
##########################################################
# Helper Functions
@ -123,7 +126,7 @@ print('| ## ## ## ## ## |')
print('| ## ### ###### |')
print('|--------------------------------------------------|')
print('| Parallel Virtual Cluster API daemon v{0: <11} |'.format(version))
print('| API version: v{0: <34} |'.format(pvc_api.API_VERSION))
print('| API version: v{0: <34} |'.format(API_VERSION))
print('| Listen: {0: <40} |'.format('{}:{}'.format(config['listen_address'], config['listen_port'])))
print('| SSL: {0: <43} |'.format(str(config['ssl_enabled'])))
print('| Authentication: {0: <32} |'.format(str(config['auth_enabled'])))

View File

@ -25,7 +25,7 @@ from functools import wraps
from flask_restful import Resource, Api, reqparse, abort
from celery import Celery
from pvcapid.Daemon import config, strtobool
from pvcapid.Daemon import config, strtobool, API_VERSION
import pvcapid.helper as api_helper
import pvcapid.provisioner as api_provisioner
@ -34,9 +34,6 @@ import pvcapid.ova as api_ova
from flask_sqlalchemy import SQLAlchemy
# API version
API_VERSION = 1.0
# Create Flask app and set config values
app = flask.Flask(__name__)