summaryrefslogtreecommitdiffstats
path: root/components/pm-subscription-handler/pmsh_service/mod/__init__.py
diff options
context:
space:
mode:
authorefiacor <fiachra.corcoran@est.tech>2020-06-22 18:51:43 +0100
committerefiacor <fiachra.corcoran@est.tech>2020-07-06 09:07:37 +0100
commit0464347539f931847ab578ff935994aef0102352 (patch)
tree601971765ec6b363b6755984e437c02bea3c83ec /components/pm-subscription-handler/pmsh_service/mod/__init__.py
parentb80449b81a2deb3b6e2510a655de02f9375ef636 (diff)
[PMSH] Add enable_tls boolean flag to config1.1.0
Signed-off-by: efiacor <fiachra.corcoran@est.tech> Change-Id: I19f71b690f743980eaa149c9b2c76fecb98a0120 Issue-ID: DCAEGEN2-2146
Diffstat (limited to 'components/pm-subscription-handler/pmsh_service/mod/__init__.py')
-rw-r--r--components/pm-subscription-handler/pmsh_service/mod/__init__.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/components/pm-subscription-handler/pmsh_service/mod/__init__.py b/components/pm-subscription-handler/pmsh_service/mod/__init__.py
index efc61aae..4c86ccda 100644
--- a/components/pm-subscription-handler/pmsh_service/mod/__init__.py
+++ b/components/pm-subscription-handler/pmsh_service/mod/__init__.py
@@ -42,8 +42,11 @@ def _get_app():
def launch_api_server(app_config):
connex_app = _get_app()
connex_app.add_api('api/pmsh_swagger.yml')
- connex_app.run(port=os.environ.get('PMSH_API_PORT', '8443'),
- ssl_context=(app_config.cert_path, app_config.key_path))
+ if app_config.enable_tls:
+ connex_app.run(port=os.environ.get('PMSH_API_PORT', '8443'),
+ ssl_context=app_config.cert_params)
+ else:
+ connex_app.run(port=os.environ.get('PMSH_API_PORT', '8443'))
def create_app():