diff options
author | sv1004@student.uni-lj.si <sv1004@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2015-01-22 20:54:29 +0000 |
---|---|---|
committer | sv1004@student.uni-lj.si <sv1004@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2015-01-22 20:54:29 +0000 |
commit | 50879431538b665177871ae5d44609997e017d17 (patch) | |
tree | 30ee326b600f4a59a9515f68a2dbbba0e5d4c4ae /kpov_judge | |
parent | 8d6c0e8b3f25724c4dbb5507120344446dd10add (diff) |
Nekaj malega v rename 20
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@224 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge')
-rw-r--r-- | kpov_judge/tasks/copy_rename_20_files_tail_env/task.py | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py index 508185d..c2f4c87 100644 --- a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py +++ b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py @@ -76,27 +76,18 @@ params_meta = { 'IP_NM': {'descriptions': {'si': 'Naslov maliNetworkManager'}, 'w': False, 'public':True, 'type': 'IP', 'generated': True}, } -def task(IP_NM, DNS_NM, IP_static, DNS_static): +def task(): # TODO: (polz) this has to be changed! Get a move on! - import pxssh - import pexpect - results = dict() - peer_user = 'student' - peer_passwd = 'vaje' - sA = pxssh.pxssh() - sB = pxssh.pxssh() - sA.login(IP_NM, peer_user, peer_passwd) - sB.login(IP_static, peer_user, peer_passwd) - # sA - # make sure NM is not handling eth0 - results['NM_nmcli'] = sA.run('nmcli d') - results['NM_nslookup'] = sA.run('nslookup www.arnes.si') - # sB - # check whether NM is handling eth0 - results['static_nmcli'] = sB.run('nmcli d') - results['static_nslookup'] = sB.run('nslookup www.arnes.si') - sA.logout() - sB.logout() + # Z primozem lavricem sva skusala narediti, ne znava pa vsega (ostali pa se itak ne oglasajo) + # Ker gen params ni narejen, sklepam da je "Mapa" na namizju, + # imena datotek pa so: 1,1-,2,2-,3,3-,4,5,6,7,8,9,.mama1,mama2,mama3,mama4,mama5,mojimenik,novi,oce1 + # v mojimenik se nahaja mojimenikfile + + import subprocess + results = dict() + p=subprocess.check_output(["ls","-a", "/root/Desktop/Mapa"]) + results['preimenuj'] = p + return results def gen_params(user_id, params_meta): |