summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordb1456@student.uni-lj.si <db1456@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2014-12-22 14:06:48 +0000
committerdb1456@student.uni-lj.si <db1456@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2014-12-22 14:06:48 +0000
commit20067274ac9a2682fb07cd45cd1fcc150f70f4cc (patch)
tree16bf4769df32b0a0a3d2219b6e4459d48ee55a69
parent2cd23535f7ae1ed8ade70edb4c291545157fa1dc (diff)
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
-rw-r--r--kpov_judge/tasks/nat_vlc/task.py22
1 files 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):