From 442646901a7a7e4da45b46cb52b34f2128509840 Mon Sep 17 00:00:00 2001 From: "gasperfele@fri1.uni-lj.si" Date: Sat, 1 Oct 2016 22:09:56 +0000 Subject: Fixed the write_default_config script. git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@353 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/add_task.py | 2 +- kpov_judge/create_opstack.py | 2 +- kpov_judge/finalize_opstack.py | 2 +- kpov_judge/rm_task.py | 2 +- kpov_judge/util.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'kpov_judge') diff --git a/kpov_judge/add_task.py b/kpov_judge/add_task.py index dc7a608..9ba49f3 100755 --- a/kpov_judge/add_task.py +++ b/kpov_judge/add_task.py @@ -38,7 +38,7 @@ if __name__ == '__main__': task_id = sys.argv[2] except: task_id = os.path.basename(os.path.normpath(dirname)) - db = pymongo.Connection(settings.DB_HOST).kpov + db = pymongo.MongoClient(settings.DB_HOST).kpov try: db.authenticate(settings.USERNAME, settings.PASSWORD) except Exception, e: diff --git a/kpov_judge/create_opstack.py b/kpov_judge/create_opstack.py index dfa5311..4b3742a 100644 --- a/kpov_judge/create_opstack.py +++ b/kpov_judge/create_opstack.py @@ -32,7 +32,7 @@ def main(): admin_role = kc.roles.find(name='admin') member_role = kc.roles.find(name='Member') - db = pymongo.Connection(settings.DB_HOST).kpov + db = pymongo.MongoClient(settings.DB_HOST).kpov try: db.authenticate(settings.USERNAME, settings.PASSWORD) except Exception, e: diff --git a/kpov_judge/finalize_opstack.py b/kpov_judge/finalize_opstack.py index f09ac5e..7938bda 100644 --- a/kpov_judge/finalize_opstack.py +++ b/kpov_judge/finalize_opstack.py @@ -38,7 +38,7 @@ def get_quantum_client(tenant_name): kc = ksclient.Client(endpoint=settings.OS_ADMIN_AUTH_URL, token=settings.OS_ADMIN_TOKEN) member_role = kc.roles.find(name='Member') -db = pymongo.Connection(settings.DB_HOST).kpov +db = pymongo.MongoClient(settings.DB_HOST).kpov try: db.authenticate(settings.USERNAME, settings.PASSWORD) except Exception, e: diff --git a/kpov_judge/rm_task.py b/kpov_judge/rm_task.py index e724d68..ebdadc6 100755 --- a/kpov_judge/rm_task.py +++ b/kpov_judge/rm_task.py @@ -17,7 +17,7 @@ if __name__ == '__main__': print u"Usage: {0} [task_name]".format(sys.argv[0]) exit(1) task_id = sys.argv[1] - db = pymongo.Connection(settings.DB_HOST).kpov + db = pymongo.MongoClient(settings.DB_HOST).kpov try: db.authenticate(settings.USERNAME, settings.PASSWORD) except Exception, e: diff --git a/kpov_judge/util.py b/kpov_judge/util.py index bdcc690..66e2707 100644 --- a/kpov_judge/util.py +++ b/kpov_judge/util.py @@ -7,4 +7,4 @@ def write_default_config(disk, params): 'task_url']: if k in params: default_params[k] = params[k] - disk.write(yaml.dump(default_params)) + disk.write('/home/tester/.kpov_params.yaml', yaml.dump(default_params)) -- cgit v1.2.1