summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks
diff options
context:
space:
mode:
authorkb2386@student.uni-lj.si <kb2386@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2014-12-12 17:42:06 +0000
committerkb2386@student.uni-lj.si <kb2386@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2014-12-12 17:42:06 +0000
commitf6457b0627e54e3291568a612993c4c0c765f430 (patch)
tree2c3cd14182c6a97cf60f448b97c3e11c60682ac5 /kpov_judge/tasks
parent7cac0934830f3889877f281afca90ae9b3862e0a (diff)
V nalogi smb_nfs sem izbrisal v gen_params(user_id, params_meta) in sem dodal ukaz, ki zgenerira parametre v kpov_random_helpers z uporabo params_meta
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@54 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge/tasks')
-rw-r--r--kpov_judge/tasks/smb_nfs/task.py10
1 files changed, 1 insertions, 9 deletions
diff --git a/kpov_judge/tasks/smb_nfs/task.py b/kpov_judge/tasks/smb_nfs/task.py
index a245c54..d266d94 100644
--- a/kpov_judge/tasks/smb_nfs/task.py
+++ b/kpov_judge/tasks/smb_nfs/task.py
@@ -85,15 +85,7 @@ def task(SMB_NAME, NFS_MOUNT, SHARED_FILENAME, SHARED_FILENAME_CONTENT):
return results
def gen_params(user_id, params_meta):
- params = dict()
- r = random.Random(user_id)
- # IP_NM, DNS_NM, IP_static, DNS_static)
- dns_servers = ['193.2.1.66', '193.2.1.72', '8.8.8.8', '8.8.4.4', '208.67.222.222', '208.67.220.220']
- net = kpov_random_helpers.IPv4_subnet_gen(r, '172.23.128.0/18', 24)
- params['DNS_NM'] = r.choice(dns_servers)
- params['IP_NM'], params['IP_static'] = kpov_random_helpers.IPv4_addr_gen(r, net, 2)
- params['DNS_static'] = r.choice(dns_servers)
- return params
+ return kpov_random_helpers.default_gen(user_id, params_meta)
def task_check(results, params):