Move API version string location to Daemon
Prevents a startup bug with pvcapid-manage.py.
This commit is contained in:
parent
c23a53d082
commit
25f80a4478
|
@ -24,9 +24,12 @@ import yaml
|
||||||
|
|
||||||
from distutils.util import strtobool as dustrtobool
|
from distutils.util import strtobool as dustrtobool
|
||||||
|
|
||||||
# Version string for startup output
|
# Daemon version
|
||||||
version = '0.9.18'
|
version = '0.9.18'
|
||||||
|
|
||||||
|
# API version
|
||||||
|
API_VERSION = 1.0
|
||||||
|
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
# Helper Functions
|
# Helper Functions
|
||||||
|
@ -123,7 +126,7 @@ print('| ## ## ## ## ## |')
|
||||||
print('| ## ### ###### |')
|
print('| ## ### ###### |')
|
||||||
print('|--------------------------------------------------|')
|
print('|--------------------------------------------------|')
|
||||||
print('| Parallel Virtual Cluster API daemon v{0: <11} |'.format(version))
|
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('| Listen: {0: <40} |'.format('{}:{}'.format(config['listen_address'], config['listen_port'])))
|
||||||
print('| SSL: {0: <43} |'.format(str(config['ssl_enabled'])))
|
print('| SSL: {0: <43} |'.format(str(config['ssl_enabled'])))
|
||||||
print('| Authentication: {0: <32} |'.format(str(config['auth_enabled'])))
|
print('| Authentication: {0: <32} |'.format(str(config['auth_enabled'])))
|
||||||
|
|
|
@ -25,7 +25,7 @@ from functools import wraps
|
||||||
from flask_restful import Resource, Api, reqparse, abort
|
from flask_restful import Resource, Api, reqparse, abort
|
||||||
from celery import Celery
|
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.helper as api_helper
|
||||||
import pvcapid.provisioner as api_provisioner
|
import pvcapid.provisioner as api_provisioner
|
||||||
|
@ -34,9 +34,6 @@ import pvcapid.ova as api_ova
|
||||||
|
|
||||||
from flask_sqlalchemy import SQLAlchemy
|
from flask_sqlalchemy import SQLAlchemy
|
||||||
|
|
||||||
# API version
|
|
||||||
API_VERSION = 1.0
|
|
||||||
|
|
||||||
|
|
||||||
# Create Flask app and set config values
|
# Create Flask app and set config values
|
||||||
app = flask.Flask(__name__)
|
app = flask.Flask(__name__)
|
||||||
|
|
Loading…
Reference in New Issue