This is an automated email from the ASF dual-hosted git repository.

omartushevskyi pushed a commit to branch DLAB-515
in repository https://gitbox.apache.org/repos/asf/incubator-dlab.git


The following commit(s) were added to refs/heads/DLAB-515 by this push:
     new 560c223  [DLAB-515]: fixed issue with Ubuntu version change
560c223 is described below

commit 560c2239cd11b3773ac61ad1a531a9bfa904dbe5
Author: Oleh Martushevskyi <oleh_martushevs...@epam.com>
AuthorDate: Wed Mar 25 14:03:25 2020 +0200

    [DLAB-515]: fixed issue with Ubuntu version change
---
 .../src/ssn/scripts/configure_mongo.py                  | 17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

diff --git a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py 
b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
index f77d509..e04242b 100644
--- a/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
+++ b/infrastructure-provisioning/src/ssn/scripts/configure_mongo.py
@@ -59,24 +59,13 @@ def add_2_yml_config(path, section, param, value):
         return False
 
 
-def read_yml_conf(path, section, param):
-    try:
-        with open(path, 'r') as config_yml:
-            config = yaml.load(config_yml)
-        result = config[section][param]
-        return result
-    except:
-        print("File does not exist")
-        return ''
-
-
 if __name__ == "__main__":
     mongo_passwd = "PASSWORD"
-    mongo_ip = read_yml_conf(path,'net','bindIp')
-    mongo_port = read_yml_conf(path,'net','port')
+    mongo_ip = '127.0.0.1'
+    mongo_port = '27017'
     #mongo_parameters = json.loads(args.mongo_parameters)
     # Setting up admin's password and enabling security
-    client = MongoClient(mongo_ip + ':' + str(mongo_port))
+    client = MongoClient(mongo_ip + ':' + mongo_port)
     pass_upd = True
     try:
         command = ['service', 'mongod', 'start']


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@dlab.apache.org
For additional commands, e-mail: commits-h...@dlab.apache.org

Reply via email to