From 310dee092cced5787b55a2e9619b75b799bbea2c Mon Sep 17 00:00:00 2001 From: "gasperfele@fri1.uni-lj.si" Date: Tue, 11 Oct 2016 19:12:48 +0000 Subject: 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 --- .../tasks/copy_rename_20_files_tail_env/task.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'kpov_judge/tasks/copy_rename_20_files_tail_env') 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) -- cgit v1.2.1