Added support for mongodb High availability, changed cfg from host, port to url

Change-Id: I8a5d2174927120e2706eaba5bdee38f60d4a4a9d
Signed-off-by: Juan <jquiroga@whitestack.com>
diff --git a/osm_common/dbmongo.py b/osm_common/dbmongo.py
index 0f89c96..6159e6a 100644
--- a/osm_common/dbmongo.py
+++ b/osm_common/dbmongo.py
@@ -80,7 +80,10 @@
             master_key = config.get("commonkey") or config.get("masterpassword")
             if master_key:
                 self.set_secret_key(master_key)
-            self.client = MongoClient(config["host"], config["port"])
+            if config.get("url"):
+                self.client = MongoClient(config["url"])
+            else:
+                self.client = MongoClient(config["host"], config["port"])
             # TODO add as parameters also username=config.get("user"), password=config.get("password"))
             # when all modules are ready
             self.db = self.client[config["name"]]