Fix bugs and pin osm bundles

Keystone charm (bug 1378): Improve the way we handle the relation data from the database
relation
Ro charm (bug 1379): Fix the status of the non-leader units
Ng-ui (bug 1380): Fix the nbi-relation-changed hook for the non-leader
units
Installer: Pin the version of the OSM bundles

Change-Id: Ied07c964b1c85b1c534916eb4b30fd6bc87287a6
Signed-off-by: David Garcia <david.garcia@canonical.com>
diff --git a/installers/charm/ng-ui/src/charm.py b/installers/charm/ng-ui/src/charm.py
index 7510a6c..21102e4 100755
--- a/installers/charm/ng-ui/src/charm.py
+++ b/installers/charm/ng-ui/src/charm.py
@@ -93,10 +93,11 @@
         Args:
             event (EventBase): NBI relation event.
         """
-        data_loc = event.unit if event.unit else event.app
-        logger.error(dict(event.relation.data))
-        nbi_host = event.relation.data[data_loc].get("host")
-        nbi_port = event.relation.data[data_loc].get("port")
+        if not event.unit in event.relation.data:
+            return
+        relation_data = event.relation.data[event.unit]
+        nbi_host = relation_data.get("host")
+        nbi_port = relation_data.get("port")
 
         if (
             nbi_host