From 20067274ac9a2682fb07cd45cd1fcc150f70f4cc Mon Sep 17 00:00:00 2001 From: "db1456@student.uni-lj.si" Date: Mon, 22 Dec 2014 14:06:48 +0000 Subject: popravki na gen_params in params_meta : 63120335 git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@118 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/tasks/nat_vlc/task.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/kpov_judge/tasks/nat_vlc/task.py b/kpov_judge/tasks/nat_vlc/task.py index 87c6af8..20d4a25 100644 --- a/kpov_judge/tasks/nat_vlc/task.py +++ b/kpov_judge/tasks/nat_vlc/task.py @@ -66,11 +66,13 @@ computers = { networks = { 'net1': {'public': False}, 'test-net': {'public': True} } +#ne potrebujemo dnsjev in ip za malibreznewtork manager? params_meta = { - 'IP_NM': {'descriptions': {'si': 'Naslov maliNetworkManager'}, 'w': False, 'public':True, 'type': 'IP', 'generated': True}, - 'DNS_NM': {'descriptions': {'si': 'DNS za maliNetworkManager'}, 'w': False, 'public':True, 'type': 'IP', 'generated': True}, - 'IP_static': {'descriptions': {'si': 'Naslov maliBrezNetworkManager'}, 'w': False, 'public': True, 'type': 'IP', 'generated': True}, - 'DNS_static': {'descriptions': {'si': 'DNS za maliBrezNetworkManager'}, 'w': False, 'public': True, 'type': 'IP', 'generated': True}, +# 'IP_NM': {'descriptions': {'si': 'Naslov maliNetworkManager'}, 'w': False, 'public':True, 'type': 'IP', 'generated': True}, +# 'DNS_NM': {'descriptions': {'si': 'DNS za maliNetworkManager'}, 'w': False, 'public':True, 'type': 'IP', 'generated': True}, + 'IP_simple': {'descriptions': {'si': 'Naslov SimpleArbiter'}, 'w': False, 'public': True, 'type': 'IP', 'generated': True}, + 'IP_NAT': {'descriptions': {'si': 'Naslov NAT'} 'w': False, 'public': True, 'type': 'IP', 'generated': True }, +# 'DNS_static': {'descriptions': {'si': 'DNS za maliBrezNetworkManager'}, 'w': False, 'public': True, 'type': 'IP', 'generated': True}, } def task(IP_NM, DNS_NM, IP_static, DNS_static): @@ -99,11 +101,13 @@ 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) + # 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_net_gen(r, 254, true, false) + # params['DNS_NM'] = r.choice(dns_servers) + params['IP_NAT'] = net + # params['IP_NM'] + params['IP_simple'] = kpov_random_helpers.IPv4_addr_gen(r, net, 1) + # params['DNS_static'] = r.choice(dns_servers) return params def task_check(results, params): -- cgit v1.2.1