summaryrefslogtreecommitdiff
path: root/kpov_judge
diff options
context:
space:
mode:
authorgasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2015-02-06 16:01:38 +0000
committergasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2015-02-06 16:01:38 +0000
commit1e524e052dab0e258ffa6f543bd792ea5d9ec5b8 (patch)
tree6947f72ab454bb84b0b24be83b3efb8f0753783d /kpov_judge
parentb06b92b9e7696af8e7ab49c46efa980d2558b7f1 (diff)
Started work on isc_dhcp_live_boot.
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@270 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge')
-rw-r--r--kpov_judge/tasks/isc_dhcp_live_boot/task.py18
1 files changed, 10 insertions, 8 deletions
diff --git a/kpov_judge/tasks/isc_dhcp_live_boot/task.py b/kpov_judge/tasks/isc_dhcp_live_boot/task.py
index 6ff299a..23bd294 100644
--- a/kpov_judge/tasks/isc_dhcp_live_boot/task.py
+++ b/kpov_judge/tasks/isc_dhcp_live_boot/task.py
@@ -8,20 +8,21 @@ instructions = {
'si':u"""
Postavi štiri navidezne računalnike - simpleArbiter, DHCP_server,
BootableClientA ter BootableClientB. Na simpleArbiter preberi naslove IP_GW, IP_DHCP,
-IP_B ter najdi datoteko A.
+IP_B ter ime datoteke BOOT_FNAME.
Na DHCP_server postavi DHCP strežnik s pomočjo ISC dhcp 3 na naslovu IP_DHCP.
SimpleArbiter naj dobi IP_GW. DHCP_server naj ga uporabi kot gateway.
-Če se zaganja BootableClientB, naj se sistem zažene z live ISO in dobi svoj IP.
-Če se zaganja katerikoli drug, naj se sistem zažene v datoteko z imenom A.
+Če se zaganja BootableClientB, naj se sistem zažene z live ISO in dobi svoj IP. ISO je priklopljen na DHCP_server.
+
+Če se zaganja katerikoli drug, naj se sistem zažene v datoteko z imenom BOOT_FNAME.
Tako BootableClientA kot BootableClientB naj bosta brez diskov.
""", 'en': """Set up 4 virtual computers - simpleArbiter, DHCP_server, BootableClientA and
BootableClientB. The simpleArbiter reads the address IP_GW, IP_DHCP and finds
-the file A.
+the file BOOT_FNAME.
On the DHCP_server set up a DHCP server with the help of ISC dhcp 3 on the address IP_DHCP.
Get SimpleArbiter to find IP_GW. Make the DHCP_server use it as a gateway.
If there is BootableClientB loading, make the system start-up with a live ISO and make it get hit own IP.
-If there is anyone else loading, make the system load the file with the name A.
+If there is anyone else loading, make the system load the file with the name BOOT_FNAME.
Make BootableClientA and BootableClientB be without discs. """
}
computers = {
@@ -31,7 +32,8 @@ computers = {
},
{ 'name': 'bootable_iso',
'options':{'readonly': True},
- 'parts': [],
+ # for testing purposes only
+ 'parts': [ {} ],
},
#{ 'name': 'CDROM',
# 'options':{'readonly': True},
@@ -135,9 +137,9 @@ def task(IP_DHCP, IP_GW, MAC_BOOT, BOOT_FNAME):
def gen_params(user_id, params_meta):
params = dict()
r = random.Random(user_id)
- net = kpov_random_helpers.IPv4_subnet_gen(r, '10.75.0.0/10', 24)
+ net = kpov_random_helpers.IPv4_subnet_gen(r, '10.64.0.0/10', 24)
params['IP_DHCP'], params['IP_GW'] = kpov_random_helpers.IPv4_addr_gen(r, net, 2)
- params['BOOT_FNAME'] = kpov_random_helpers.filename_gen(r)
+ params['BOOT_FNAME'] = kpov_random_helpers.fname_gen(r)
# IP_NM, DNS_NM, IP_static, DNS_static)
return params