"OSMNBI_MESSAGE_DRIVER": "kafka",
"OSMNBI_MESSAGE_PORT": 9092,
"OSMNBI_DATABASE_DRIVER": "mongo",
- "OSMNBI_DATABASE_URI": "mongo://mongo:27017",
+ "OSMNBI_DATABASE_URI": "mongodb://mongo:27017",
"OSMNBI_DATABASE_COMMONKEY": "osm",
"OSMNBI_STORAGE_DRIVER": "mongo",
"OSMNBI_STORAGE_PATH": "/app/storage",
"OSMNBI_STORAGE_COLLECTION": "files",
- "OSMNBI_STORAGE_URI": "mongo://mongo:27017",
+ "OSMNBI_STORAGE_URI": "mongodb://mongo:27017",
"OSMNBI_PROMETHEUS_HOST": "prometheus",
"OSMNBI_PROMETHEUS_PORT": 9090,
"OSMNBI_LOG_LEVEL": "INFO",
self.harness.update_relation_data(
mongodb_relation_id,
"mongodb/0",
- {"connection_string": "mongo://mongo:27017"},
+ {"connection_string": "mongodb://mongo:27017"},
)
# Initializing the prometheus relation
self.assertEqual(self.harness.charm.state.message_port, 9092)
# Checking if mongodb data is stored
- self.assertEqual(self.harness.charm.state.database_uri, "mongo://mongo:27017")
+ self.assertEqual(self.harness.charm.state.database_uri, "mongodb://mongo:27017")
# Checking if prometheus data is stored
self.assertEqual(self.harness.charm.state.prometheus_host, "prometheus")
"OSMNBI_MESSAGE_DRIVER": "kafka",
"OSMNBI_MESSAGE_PORT": 9092,
"OSMNBI_DATABASE_DRIVER": "mongo",
- "OSMNBI_DATABASE_URI": "mongo://mongo:27017",
+ "OSMNBI_DATABASE_URI": "mongodb://mongo:27017",
"OSMNBI_DATABASE_COMMONKEY": "osm",
"OSMNBI_STORAGE_DRIVER": "mongo",
"OSMNBI_STORAGE_PATH": "/app/storage",
"OSMNBI_STORAGE_COLLECTION": "files",
- "OSMNBI_STORAGE_URI": "mongo://mongo:27017",
+ "OSMNBI_STORAGE_URI": "mongodb://mongo:27017",
"OSMNBI_PROMETHEUS_HOST": "prometheus",
"OSMNBI_PROMETHEUS_PORT": 9090,
"OSMNBI_LOG_LEVEL": "INFO",
self.harness.update_relation_data(
mongodb_relation_id,
"mongodb/0",
- {"connection_string": "mongo://mongo:27017"},
+ {"connection_string": "mongodb://mongo:27017"},
)
# Initializing the prometheus relation
self.assertEqual(self.harness.charm.state.message_port, 9092)
# Checking if mongodb data is stored
- self.assertEqual(self.harness.charm.state.database_uri, "mongo://mongo:27017")
+ self.assertEqual(self.harness.charm.state.database_uri, "mongodb://mongo:27017")
# Checking if prometheus data is stored
self.assertEqual(self.harness.charm.state.prometheus_host, "prometheus")
"OSMNBI_MESSAGE_DRIVER": "kafka",
"OSMNBI_MESSAGE_PORT": 9092,
"OSMNBI_DATABASE_DRIVER": "mongo",
- "OSMNBI_DATABASE_URI": "mongo://mongo:27017",
+ "OSMNBI_DATABASE_URI": "mongodb://mongo:27017",
"OSMNBI_DATABASE_COMMONKEY": "osm",
"OSMNBI_STORAGE_DRIVER": "mongo",
"OSMNBI_STORAGE_PATH": "/app/storage",
"OSMNBI_STORAGE_COLLECTION": "files",
- "OSMNBI_STORAGE_URI": "mongo://mongo:27017",
+ "OSMNBI_STORAGE_URI": "mongodb://mongo:27017",
"OSMNBI_PROMETHEUS_HOST": "prometheus",
"OSMNBI_PROMETHEUS_PORT": 9090,
"OSMNBI_LOG_LEVEL": "INFO",
self.harness.update_relation_data(
mongodb_relation_id,
"mongodb/0",
- {"connection_string": "mongo://mongo:27017"},
+ {"connection_string": "mongodb://mongo:27017"},
)
# Initializing the prometheus relation
"OSMNBI_MESSAGE_DRIVER": "kafka",
"OSMNBI_MESSAGE_PORT": 9092,
"OSMNBI_DATABASE_DRIVER": "mongo",
- "OSMNBI_DATABASE_URI": "mongo://mongo:27017",
+ "OSMNBI_DATABASE_URI": "mongodb://mongo:27017",
"OSMNBI_DATABASE_COMMONKEY": "osm",
"OSMNBI_STORAGE_DRIVER": "mongo",
"OSMNBI_STORAGE_PATH": "/app/storage",
"OSMNBI_STORAGE_COLLECTION": "files",
- "OSMNBI_STORAGE_URI": "mongo://mongo:27017",
+ "OSMNBI_STORAGE_URI": "mongodb://mongo:27017",
"OSMNBI_PROMETHEUS_HOST": "prometheus",
"OSMNBI_PROMETHEUS_PORT": 9090,
"OSMNBI_LOG_LEVEL": "INFO",
"annotations": {
"nginx.ingress.kubernetes.io/proxy-body-size": "0",
"nginx.ingress.kubernetes.io/ssl-redirect": "false",
+ "nginx.ingress.kubernetes.io/backend-protocol": "HTTPS",
},
"spec": {
"rules": [
self.harness.update_relation_data(
mongodb_relation_id,
"mongodb/0",
- {"connection_string": "mongo://mongo:27017"},
+ {"connection_string": "mongodb://mongo:27017"},
)
# Initializing the prometheus relation
"OSMNBI_MESSAGE_DRIVER": "kafka",
"OSMNBI_MESSAGE_PORT": 9092,
"OSMNBI_DATABASE_DRIVER": "mongo",
- "OSMNBI_DATABASE_URI": "mongo://mongo:27017",
+ "OSMNBI_DATABASE_URI": "mongodb://mongo:27017",
"OSMNBI_DATABASE_COMMONKEY": "osm",
"OSMNBI_STORAGE_DRIVER": "mongo",
"OSMNBI_STORAGE_PATH": "/app/storage",
"OSMNBI_STORAGE_COLLECTION": "files",
- "OSMNBI_STORAGE_URI": "mongo://mongo:27017",
+ "OSMNBI_STORAGE_URI": "mongodb://mongo:27017",
"OSMNBI_PROMETHEUS_HOST": "prometheus",
"OSMNBI_PROMETHEUS_PORT": 9090,
"OSMNBI_LOG_LEVEL": "INFO",
"name": "nbi-ingress",
"annotations": {
"nginx.ingress.kubernetes.io/proxy-body-size": "0",
+ "nginx.ingress.kubernetes.io/backend-protocol": "HTTPS",
},
"spec": {
"rules": [
self.harness.update_relation_data(
mongodb_relation_id,
"mongodb/0",
- {"connection_string": "mongo://mongo:27017"},
+ {"connection_string": "mongodb://mongo:27017"},
)
# Initializing the prometheus relation
"OSMNBI_MESSAGE_DRIVER": "kafka",
"OSMNBI_MESSAGE_PORT": 9092,
"OSMNBI_DATABASE_DRIVER": "mongo",
- "OSMNBI_DATABASE_URI": "mongo://mongo:27017",
+ "OSMNBI_DATABASE_URI": "mongodb://mongo:27017",
"OSMNBI_DATABASE_COMMONKEY": "osm",
"OSMNBI_STORAGE_DRIVER": "mongo",
"OSMNBI_STORAGE_PATH": "/app/storage",
"OSMNBI_STORAGE_COLLECTION": "files",
- "OSMNBI_STORAGE_URI": "mongo://mongo:27017",
+ "OSMNBI_STORAGE_URI": "mongodb://mongo:27017",
"OSMNBI_PROMETHEUS_HOST": "prometheus",
"OSMNBI_PROMETHEUS_PORT": 9090,
"OSMNBI_LOG_LEVEL": "INFO",
"name": "nbi-ingress",
"annotations": {
"nginx.ingress.kubernetes.io/proxy-body-size": "0",
+ "nginx.ingress.kubernetes.io/backend-protocol": "HTTPS",
"nginx.ingress.kubernetes.io/whitelist-source-range": "0.0.0.0/0",
},
"spec": {
self.harness.update_relation_data(
mongodb_relation_id,
"mongodb/0",
- {"connection_string": "mongo://mongo:27017"},
+ {"connection_string": "mongodb://mongo:27017"},
)
# Initializing the prometheus relation
self.assertDictEqual(expected_result, pod_spec)
- def test_on_kafka_relation_changed(self) -> NoReturn:
+ def test_on_kafka_unit_relation_changed(self) -> NoReturn:
"""Test to see if kafka relation is updated."""
self.harness.charm.on.start.emit()
self.assertNotIn("keystone", self.harness.charm.unit.status.message)
self.assertTrue(self.harness.charm.unit.status.message.endswith(" relations"))
- def test_on_mongodb_relation_changed(self) -> NoReturn:
+ def test_on_mongodb_unit_relation_changed(self) -> NoReturn:
"""Test to see if mongodb relation is updated."""
self.harness.charm.on.start.emit()
relation_id = self.harness.add_relation("mongodb", "mongodb")
self.harness.add_relation_unit(relation_id, "mongodb/0")
self.harness.update_relation_data(
- relation_id, "mongodb/0", {"connection_string": "mongo://mongo:27017"}
+ relation_id, "mongodb/0", {"connection_string": "mongodb://mongo:27017"}
)
- self.assertEqual(self.harness.charm.state.database_uri, "mongo://mongo:27017")
+ self.assertEqual(self.harness.charm.state.database_uri, "mongodb://mongo:27017")
# Verifying status
self.assertIsInstance(self.harness.charm.unit.status, BlockedStatus)
self.assertNotIn("keystone", self.harness.charm.unit.status.message)
self.assertTrue(self.harness.charm.unit.status.message.endswith(" relations"))
- def test_on_prometheus_relation_changed(self) -> NoReturn:
+ def test_on_prometheus_unit_relation_changed(self) -> NoReturn:
"""Test to see if prometheus relation is updated."""
self.harness.charm.on.start.emit()
self.assertNotIn("keystone", self.harness.charm.unit.status.message)
self.assertTrue(self.harness.charm.unit.status.message.endswith(" relations"))
- def test_on_keystone_relation_changed(self) -> NoReturn:
+ def test_on_keystone_unit_relation_changed(self) -> NoReturn:
"""Test to see if keystone relation is updated."""
self.harness.update_config({"auth_backend": "keystone"})
relation_id = self.harness.add_relation("nbi", "ng-ui")
self.harness.add_relation_unit(relation_id, "ng-ui/0")
- relation_data = self.harness.get_relation_data(relation_id, "nbi")
+ relation_data = self.harness.get_relation_data(relation_id, "nbi/0")
self.assertDictEqual(expected_result, relation_data)