Fixing mongodb_uri in NBI/LCM for storage
[osm/devops.git] / installers / charm / nbi / src / charm.py
index 550c88b..bbbf5ec 100755 (executable)
@@ -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,