Code Review
/
pti
/
o2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Add the PATCH method for the monitoring API"
[pti/o2.git]
/
o2app
/
entrypoints
/
flask_application.py
diff --git
a/o2app/entrypoints/flask_application.py
b/o2app/entrypoints/flask_application.py
index
c7e0ef9
..
d55b50a
100644
(file)
--- a/
o2app/entrypoints/flask_application.py
+++ b/
o2app/entrypoints/flask_application.py
@@
-25,8
+25,10
@@
from o2common.authmw import authprov
from o2common.config.config import get_review_url
from o2common.helper import o2logging
from o2common.config.config import get_review_url
from o2common.helper import o2logging
+AUTH_ENABLED = True
+FLASK_API_VERSION = '1.0.0'
+
# apibase = config.get_o2ims_api_base()
# apibase = config.get_o2ims_api_base()
-auth = True
app = Flask(__name__)
logger = o2logging.get_logger(__name__)
app = Flask(__name__)
logger = o2logging.get_logger(__name__)
@@
-39,9
+41,7
@@
def _get_k8s_url():
raise Exception('Get k8s token review url failed')
raise Exception('Get k8s token review url failed')
-FLASK_API_VERSION = '1.0.0'
-
-if auth:
+if AUTH_ENABLED:
# perform service account identity&privilege check.
_get_k8s_url()
ad = authprov.auth_definer('ad')
# perform service account identity&privilege check.
_get_k8s_url()
ad = authprov.auth_definer('ad')