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 <eduardo.sousa@canonical.com>
"OSMLCM_STORAGE_DRIVER": "mongo",
"OSMLCM_STORAGE_PATH": "/app/storage",
"OSMLCM_STORAGE_COLLECTION": "files",
"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,
"OSMNBI_STORAGE_DRIVER": "mongo",
"OSMNBI_STORAGE_PATH": "/app/storage",
"OSMNBI_STORAGE_COLLECTION": "files",
"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,
# Prometheus configuration
"OSMNBI_PROMETHEUS_HOST": self.prometheus_client.hostname,
"OSMNBI_PROMETHEUS_PORT": self.prometheus_client.port,