From bb53f794e64d92bd24c4a7027315612cde6550a6 Mon Sep 17 00:00:00 2001 From: dhebeha Date: Thu, 30 Apr 2020 00:10:54 +0530 Subject: enable https mode when using serverurl in music Issue-ID: OPTFRA-747 Signed-off-by: dhebeha Change-Id: I8ca13756bea53d63aae1bea50705fc531a82088e --- conductor/conductor/common/music/api.py | 4 ++-- conductor/pom.xml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'conductor') diff --git a/conductor/conductor/common/music/api.py b/conductor/conductor/common/music/api.py index 77b6a5a..dba852a 100644 --- a/conductor/conductor/common/music/api.py +++ b/conductor/conductor/common/music/api.py @@ -118,6 +118,8 @@ class MusicAPI(object): LOG.info(_LI("Initializing Music API")) server_url = CONF.music_api.server_url.rstrip('/') + if server_url and server_url.startswith('https'): + CONF.music_api.enable_https_mode = True if not server_url: # host/port/path are deprecated and should not be used anymore. # Defaults removed from oslo_config to give more incentive. @@ -142,8 +144,6 @@ class MusicAPI(object): # Set one parameter for connection mode # Currently depend on music version if CONF.music_api.enable_https_mode: - self.rest.server_url = 'https://{}:{}/{}'.format( - host, port, version, path.rstrip('/').lstrip('/')) self.rest.session.verify = CONF.music_api.certificate_authority_bundle_file if CONF.music_api.music_new_version: diff --git a/conductor/pom.xml b/conductor/pom.xml index ad93782..d99f0ca 100644 --- a/conductor/pom.xml +++ b/conductor/pom.xml @@ -22,13 +22,13 @@ org.onap.optf.has - 2.0.2-SNAPSHOT + 2.0.3-SNAPSHOT optf-has org.onap.optf.has optf-has-conductor - 2.0.2-SNAPSHOT + 2.0.3-SNAPSHOT optf-has-conductor Homing Allocation Service/Conductor -- cgit 1.2.3-korg