diff options
author | ma0178@student.uni-lj.si <ma0178@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2015-01-05 10:51:07 +0000 |
---|---|---|
committer | ma0178@student.uni-lj.si <ma0178@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2015-01-05 10:51:07 +0000 |
commit | 7adc4612b351622d1e4dfea4e3e0ccd9c1bf7355 (patch) | |
tree | 60d8207708514fdf0faf64e604afdb31827a8af8 /kpov_judge/tasks | |
parent | 9027451e32c0524ee9d88c570161817aa6359b10 (diff) |
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@146 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge/tasks')
-rw-r--r-- | kpov_judge/tasks/radius_mysql_pam/task.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/kpov_judge/tasks/radius_mysql_pam/task.py b/kpov_judge/tasks/radius_mysql_pam/task.py index 0db56f3..58463cb 100644 --- a/kpov_judge/tasks/radius_mysql_pam/task.py +++ b/kpov_judge/tasks/radius_mysql_pam/task.py @@ -54,6 +54,7 @@ computers = { networks = { 'net1': {'public': False}, 'test-net': {'public': True} } params_meta = { + 'IP_RS': {'descriptions': {'si': 'Naslov RadiusServer'}, 'w': False, 'public':True, 'type': 'IP', 'generated': True}, 'RADIUS_SECRET':{'descriptions': {'si': 'Skrivnost RADIUS'}, 'w': False, 'public':True, 'type': 'passwd', 'generated': True}, 'RADIUS_USERNAME': {'descriptions': {'si': 'Username v RADIUS'}, 'w': True, 'public':True, 'type': 'username', 'generated': False}, 'RADIUS_PASSWORD': {'descriptions': {'si': 'Geslo v RADIUS'}, 'w': False, 'public':True, 'type': '', 'generated': True}, @@ -63,8 +64,15 @@ params_meta = { 'MYSQL_PAM_PASSWORD': {'descriptions': {'si': 'Geslo za uporabnika v MySQL'}, 'w': True, 'public': True, 'type': 'passwd', 'generated': False}, } -def task(RADIUS_SECRET, RADIUS_USERNAME, RADIUS_PASSWORD, MYSQL_ADMIN_USER, MYSQL_ADMIN_PASSWORD, MYSQL_PAM_USERNAME, MYSQL_PAM_PASSWORD): - results = dict() +def task(IP_RS, RADIUS_SECRET, RADIUS_USERNAME, RADIUS_PASSWORD, MYSQL_ADMIN_USER, MYSQL_ADMIN_PASSWORD, MYSQL_PAM_USERNAME, MYSQL_PAM_PASSWORD): + import pxssh + results = dict() + peer_user = 'student' + peer_passwd = 'vaje' + sR = pxssh.pxssh() + sR.login(IP_RS, peer_user, peer_passwd) + + return results def gen_params(user_id, params_meta): |