From: sousaedu Date: Mon, 17 May 2021 19:17:37 +0000 (+0200) Subject: Fixing mongodb_uri in NBI/LCM for storage X-Git-Tag: release-v10.0-start~2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=f5e7f42787e29091128a03339d80838ce4ed8496;p=osm%2Fdevops.git Fixing mongodb_uri in NBI/LCM for storage NBI and LCM require the mongodb_uri to share the files between them. This wasn't being setup when the charm was provided with a string for an external MongoDB instance. This commit fix that. Change-Id: Ie70f7033bd32f9c590a54efc216913098bc3356c Signed-off-by: sousaedu --- diff --git a/installers/charm/lcm/src/charm.py b/installers/charm/lcm/src/charm.py index 10257ba2..4e0b4bed 100755 --- a/installers/charm/lcm/src/charm.py +++ b/installers/charm/lcm/src/charm.py @@ -189,7 +189,8 @@ class LcmCharm(CharmedOsmBase): "OSMLCM_STORAGE_DRIVER": "mongo", "OSMLCM_STORAGE_PATH": "/app/storage", "OSMLCM_STORAGE_COLLECTION": "files", - "OSMLCM_STORAGE_URI": self.mongodb_client.connection_string, + "OSMLCM_STORAGE_URI": config.mongodb_uri + or self.mongodb_client.connection_string, } ) if config.vca_host: diff --git a/installers/charm/nbi/src/charm.py b/installers/charm/nbi/src/charm.py index 550c88b0..bbbf5ece 100755 --- a/installers/charm/nbi/src/charm.py +++ b/installers/charm/nbi/src/charm.py @@ -210,7 +210,8 @@ class NbiCharm(CharmedOsmBase): "OSMNBI_STORAGE_DRIVER": "mongo", "OSMNBI_STORAGE_PATH": "/app/storage", "OSMNBI_STORAGE_COLLECTION": "files", - "OSMNBI_STORAGE_URI": self.mongodb_client.connection_string, + "OSMNBI_STORAGE_URI": config.mongodb_uri + or self.mongodb_client.connection_string, # Prometheus configuration "OSMNBI_PROMETHEUS_HOST": self.prometheus_client.hostname, "OSMNBI_PROMETHEUS_PORT": self.prometheus_client.port,