summaryrefslogtreecommitdiff
path: root/kpov_judge
diff options
context:
space:
mode:
authorgasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2016-10-01 22:09:56 +0000
committergasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2016-10-01 22:09:56 +0000
commit442646901a7a7e4da45b46cb52b34f2128509840 (patch)
tree0a42553f91cfc323e392811333c025a1db14fafa /kpov_judge
parent5f5fe80b0c5b0f23c21e08bc37570fb3e52acdaf (diff)
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
Diffstat (limited to 'kpov_judge')
-rwxr-xr-xkpov_judge/add_task.py2
-rw-r--r--kpov_judge/create_opstack.py2
-rw-r--r--kpov_judge/finalize_opstack.py2
-rwxr-xr-xkpov_judge/rm_task.py2
-rw-r--r--kpov_judge/util.py2
5 files changed, 5 insertions, 5 deletions
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))