summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2016-10-11 19:12:48 +0000
committergasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2016-10-11 19:12:48 +0000
commit310dee092cced5787b55a2e9619b75b799bbea2c (patch)
tree32abc981049f73b03ef50fb01071a336a69a566d
parent082c367e7e672b23f99c1ba4a91a4626ead675d8 (diff)
Fixed typos in isc_live_boot and the 20_files_rename... tasks
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@366 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
-rw-r--r--kpov_judge/tasks/copy_rename_20_files_tail_env/task.py22
-rw-r--r--kpov_judge/tasks/isc_dhcp_live_boot/task.py2
2 files changed, 12 insertions, 12 deletions
diff --git a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
index 37886c6..1388e45 100644
--- a/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
+++ b/kpov_judge/tasks/copy_rename_20_files_tail_env/task.py
@@ -26,7 +26,7 @@ V domači mapi najdeš imenik {file_rename_dirname} z 20 datotekami.
- Namesti paket "cowsay" in ga preizkusi :)
- S pomočjo programa cURL preštej število pojavitev niza "images" v html kodi,
ki jo dobiš na naslovu http://localhost/{curl_fname} na malishell in število zapiši
- v spremenljivko $images na simpleArbiter v lupini, kjer poganjaš
+ v spremenljivko $images na simpleArbiterDhcpGW v lupini, kjer poganjaš
task_check.py
- V imeniku {wc_dirname} najdeš datoteko count.txt. Preštej število vrstic v njej
in rezultat zapiši v novo datoteko lines.txt v istem imeniku.
@@ -49,17 +49,17 @@ In your home folder you will find a directory called {file_rename_dirname}
the string "mama" and are located in the working directory (pwd)
into the file ~/mama.txt while writing errors such as files in current
directory being folders or symbolic links in the file called
- "napake.txt". Write this command
+ "napake.txt". Write this command to mama_ukaz.
- Write a program (which may be a shell script) that will track the contents
of /var/log/syslog for 5s. Every time an entry containing the string "zmeda"
- appears in the syslog, in syslog, the script should output "imam ga".
+ appears in the syslog, the script should output "imam ga".
In addition, the script should count down from 5 to 1 with a 1 second
interval. Store the script in /home/student/syslog_ukaz.sh .
- Install the packet "cowsay" and test it :)
- With the help of cURL count the number of occurences of the string
"images" on the web page accessible from malishell at
http://localhost/{curl_fname}.
- On simpleArbiter within the shell where you are running test_task.py, set
+ On simpleArbiterDhcpGW within the shell where you are running test_task.py, set
the environment variable $images to this number.
- In the directory {wc_dirname} there is a file called count.txt. Write the
number of lines in this file into the file lines.txt in the same
@@ -77,14 +77,14 @@ computers = {
# 'parts': [],# no parts, no mounting.
#}
],
- 'network_interfaces': [{'network': 'test-net'}],
+ 'network_interfaces': [{'network': 'net1'}],
'flavor': 'm1.tiny',
'config_drive': False
},
- 'SimpleArbiter': {
+ 'SimpleArbiterDhcpGW': {
'disks': [
- { 'name': 'simpleArbiter',
+ { 'name': 'simpleArbiterDhcpGW',
# attempt automount
},
#{ 'name': 'CDROM',
@@ -92,13 +92,13 @@ computers = {
# 'parts': [{'dev': 'b1', 'path': '/cdrom'}],
#},
],
- 'network_interfaces': [{'network': 'test-net'}],
+ 'network_interfaces': [{'network': 'test-net'}, {'network': 'net1'}],
'flavor': 'm1.tiny',
'config_drive': False
}
}
-networks = {'test-net': {'public': True} }
+networks = {'net1': {'public': False}, 'test-net': {'public': True} }
params_meta = {
'IP_malishell': {'descriptions': {'si': 'Naslov malishell'}, 'w': True, 'public':True, 'type': 'IP', 'generated': False},
@@ -323,7 +323,7 @@ def task_check(results, params):
#
task5_ok = True
try:
- assert int(results['curl_env'].strip()) != int(params['curl_n_images'])
+ assert int(results['curl_env'].strip()) == int(params['curl_n_images'])
except:
task5_ok = False
if task5_ok:
@@ -408,4 +408,4 @@ def prepare_disks(templates, task_params, global_params):
d.mkdir(task_params['wc_dirname'])
d.chown(1000, 1000, task_params['wc_dirname'])
d.write("{}".format(os.path.join(task_params['wc_dirname'], 'count.txt')), "".join(lx))
- write_default_config(templates['simpleArbiter'], global_params)
+ write_default_config(templates['simpleArbiterDhcpGW'], global_params)
diff --git a/kpov_judge/tasks/isc_dhcp_live_boot/task.py b/kpov_judge/tasks/isc_dhcp_live_boot/task.py
index 303f2e1..c4775f1 100644
--- a/kpov_judge/tasks/isc_dhcp_live_boot/task.py
+++ b/kpov_judge/tasks/isc_dhcp_live_boot/task.py
@@ -155,7 +155,7 @@ def gen_params(user_id, params_meta):
r = random.Random(user_id)
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['BOOTA_FNAME'] = kpov_random_helpers.fname_gen(r)
+ params['BOOT_FNAME'] = kpov_random_helpers.fname_gen(r)
params['TFTP_STRING'] = kpov_random_helpers.alnum_gen(r, 45)
# IP_NM, DNS_NM, IP_static, DNS_static)
return params