Add fetching of qe deployments in config tool
This commit is contained in:
parent
2c61c87712
commit
3d4e43c8d1
24 changed files with 484 additions and 18 deletions
|
@ -1,6 +1,6 @@
|
|||
import logging
|
||||
|
||||
from flask import Blueprint, request
|
||||
from flask import Blueprint, request, abort
|
||||
from flask_restful import Resource, Api
|
||||
from flask_restful.utils.cors import crossdomain
|
||||
from email.utils import formatdate
|
||||
|
@ -8,7 +8,7 @@ from calendar import timegm
|
|||
from functools import partial, wraps
|
||||
from jsonschema import validate, ValidationError
|
||||
|
||||
from config_app.c_app import app
|
||||
from config_app.c_app import app, IS_KUBERNETES
|
||||
from config_app.config_endpoints.exception import InvalidResponse, InvalidRequest
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
@ -128,6 +128,14 @@ def validate_json_request(schema_name, optional=False):
|
|||
return wrapped
|
||||
return wrapper
|
||||
|
||||
def kubernetes_only(f):
|
||||
@wraps(f)
|
||||
def abort_if_not_kube(*args, **kwargs):
|
||||
if not IS_KUBERNETES:
|
||||
abort(400)
|
||||
|
||||
return f(*args, **kwargs)
|
||||
return abort_if_not_kube
|
||||
|
||||
nickname = partial(add_method_metadata, 'nickname')
|
||||
|
||||
|
|
Reference in a new issue