diff options
Diffstat (limited to 'kpov_judge/tasks/remote_ssh/evaluation')
-rw-r--r-- | kpov_judge/tasks/remote_ssh/evaluation/task.py | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/kpov_judge/tasks/remote_ssh/evaluation/task.py b/kpov_judge/tasks/remote_ssh/evaluation/task.py deleted file mode 100644 index 0468b7d..0000000 --- a/kpov_judge/tasks/remote_ssh/evaluation/task.py +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- - -# bson.son.SON an -# kpovRandomHelpers should be imported by add_assignment.py -OrderedDict = SON - -instructions = { - 'si':u""" -Ustvari dva navidezna računalnika. Za disk enega (imenujmo ga SimpleArbiter) uporabite -sliko diska Test. Na drugega (imenujmo ga A) namesti poljubno Linux distribucijo. Na SimpleArbiter -preberi uporabniško ime in geslo uporabnika, ki ga moraš ustvariti na A. Poskrbi, da se bo novoustvarjeni -uporabnik s svojim geslom lahko na A prijavil z Interneta. -""" -} - -computers = { - 'SimpleArbiter': { - 'disks':[ - { 'name': 'Test' }] - } -} - -params_meta = { - 'peer_ip': {'opis': 'Naslov ssh strežnika', 'w': True, 'public':True, 'type': 'IP', 'generated': False}, - 'peer_user': {'opis': 'ime uporabnika', 'w': False, 'public': True, 'type': 'username', 'generated': True}, - 'peer_passwd': {'opis': 'geslo uporabnika', 'w': False, 'public': True, 'type': 'password', 'generated': True}, -} - -def task(peer_ip, peer_user, peer_passwd): - return dict() - -def gen_params(user_id, params_meta): - return kpovRandomHelpers.default_gen(user_id, params_meta) - -def task_check(results, params): - import pxssh - import pexpect - results = dict() - s = pxssh.pxssh() - peer_ip, peer_user, peer_passwd = params['peer_ip'], params['peer_user'], params['peer_passwd'] - try: - s.login(peer_ip, peer_user, peer_passwd) - s.logout() - except: - return 0 - return 10 - -def prepare_disks(templates, params): - pass - # print d1.ls('/') |