diff options
31 files changed, 11 insertions, 176 deletions
diff --git a/kpov_judge/tasks/basic_network_gcc/task.py b/kpov_judge/tasks/basic_network_gcc/task.py index 1ae06ac..c4c4393 100644 --- a/kpov_judge/tasks/basic_network_gcc/task.py +++ b/kpov_judge/tasks/basic_network_gcc/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # TODO: # - check if everything is filled in (computers, params, preparation) # - improve scoring diff --git a/kpov_judge/tasks/copy_rename_100_files/task.py b/kpov_judge/tasks/copy_rename_100_files/task.py index 92c8570..051f9f7 100644 --- a/kpov_judge/tasks/copy_rename_100_files/task.py +++ b/kpov_judge/tasks/copy_rename_100_files/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # TODO: # - check if everything is filled in (computers, params, preparation) # - improve scoring 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 6e0df54..aa57d3e 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 @@ -1,4 +1,3 @@ -#!/usr/bin/env python # kpov_util should be imported by add_assignment.py # TODO (polz): diff --git a/kpov_judge/tasks/custom_rdate/task.py b/kpov_judge/tasks/custom_rdate/task.py index 9d08076..4959266 100644 --- a/kpov_judge/tasks/custom_rdate/task.py +++ b/kpov_judge/tasks/custom_rdate/task.py @@ -1,6 +1,5 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py + # TODO: finish this! instructions = { 'si':""" diff --git a/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py b/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py index a4f8464..fb0de84 100644 --- a/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py +++ b/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py instructions = { diff --git a/kpov_judge/tasks/edit_find_grep_compile_convert/task.py b/kpov_judge/tasks/edit_find_grep_compile_convert/task.py index 257fbed..7a96a0b 100644 --- a/kpov_judge/tasks/edit_find_grep_compile_convert/task.py +++ b/kpov_judge/tasks/edit_find_grep_compile_convert/task.py @@ -1,12 +1,9 @@ -#!/usr/bin/env python -# # TODO: # - check if everything is filled in (computers, params, preparation) # - improve scoring # - test # - switch to a real SSH/SFTP client to properly handle filenames - instructions = { 'si':""" Ustvari dva navidezna računalnika s slikama diskov diff --git a/kpov_judge/tasks/isc_dhcp_live_boot/task.py b/kpov_judge/tasks/isc_dhcp_live_boot/task.py index 71f41a9..38bbcd8 100644 --- a/kpov_judge/tasks/isc_dhcp_live_boot/task.py +++ b/kpov_judge/tasks/isc_dhcp_live_boot/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # TODO: dokoncaj! # kpov_util should be imported by add_assignment.py diff --git a/kpov_judge/tasks/ldap_import/task.py b/kpov_judge/tasks/ldap_import/task.py index 9018433..b46b432 100644 --- a/kpov_judge/tasks/ldap_import/task.py +++ b/kpov_judge/tasks/ldap_import/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py instructions = { diff --git a/kpov_judge/tasks/ldap_search/task.py b/kpov_judge/tasks/ldap_search/task.py index da9f913..92a7223 100644 --- a/kpov_judge/tasks/ldap_search/task.py +++ b/kpov_judge/tasks/ldap_search/task.py @@ -1,9 +1,8 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py + # Poveži se na strežnik LDAP prek spletnega vmesnika. Ustvari uporabnika z danim imenom in geslom. # Napiši skripto, ki izpiše podatke o tem uporabniku z ldapsearch. -# + # TODO: finish this! instructions = { 'si':""" diff --git a/kpov_judge/tasks/mock_entrance_exam/task.py b/kpov_judge/tasks/mock_entrance_exam/task.py index 976fc52..906df97 100644 --- a/kpov_judge/tasks/mock_entrance_exam/task.py +++ b/kpov_judge/tasks/mock_entrance_exam/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python -# # TODO: # - check if everything is filled in (computers, params, preparation) # - improve scoring diff --git a/kpov_judge/tasks/nat_port_forward/task.py b/kpov_judge/tasks/nat_port_forward/task.py index 9e53b8d..8fe28d7 100644 --- a/kpov_judge/tasks/nat_port_forward/task.py +++ b/kpov_judge/tasks/nat_port_forward/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py instructions = { diff --git a/kpov_judge/tasks/nat_vlc/task.py b/kpov_judge/tasks/nat_vlc/task.py index 8536fd5..ffcb6c1 100644 --- a/kpov_judge/tasks/nat_vlc/task.py +++ b/kpov_judge/tasks/nat_vlc/task.py @@ -1,6 +1,5 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py + # Poglej nek film na nekem določenem URL. # (?md5 vsota filma?) diff --git a/kpov_judge/tasks/network_boot_custom_program/task.py b/kpov_judge/tasks/network_boot_custom_program/task.py index d79b425..e81939f 100644 --- a/kpov_judge/tasks/network_boot_custom_program/task.py +++ b/kpov_judge/tasks/network_boot_custom_program/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py instructions = { diff --git a/kpov_judge/tasks/openvpn_multiple_hops/task.py b/kpov_judge/tasks/openvpn_multiple_hops/task.py index 207c48a..230393d 100644 --- a/kpov_judge/tasks/openvpn_multiple_hops/task.py +++ b/kpov_judge/tasks/openvpn_multiple_hops/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py instructions = { diff --git a/kpov_judge/tasks/openvpn_simple_smb/task.py b/kpov_judge/tasks/openvpn_simple_smb/task.py index 2e66efb..d4bb510 100644 --- a/kpov_judge/tasks/openvpn_simple_smb/task.py +++ b/kpov_judge/tasks/openvpn_simple_smb/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py instructions = { @@ -44,12 +42,7 @@ computers = { 'disks': [ { 'name': 'simpleArbiterDhcpGWVPN', - # attempt automount }, - #{ 'name': 'CDROM', - # 'options': {'readonly': True}, - # 'parts': [{'dev': 'b1', 'path': '/cdrom'}], - #}, ], 'network_interfaces': [ { @@ -66,10 +59,6 @@ computers = { 'disks': [ { 'name': 'student-VPNClient1', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [ { @@ -90,6 +79,7 @@ networks = { 'public': False } } + #Tukaj sem generiral tri parametre, prosil bi če se upoštevajo pri Tasku. params_meta = { 'IP_SimpleArbiterVPN': {'descriptions':{'si':'IP za SimpleArbiter na VPN'}, 'w': False, 'public': True, 'type': 'IP', 'generated': True}, @@ -99,7 +89,6 @@ params_meta = { 'secret_random_seed': {'descriptions':{'si':'Seme za skrivnost'}, 'w': False, 'public': False, 'type': None, 'generated': True}, } - def task(IP_SimpleArbiterVPN, IP_VPNClient1, IP_LANClient1, DIRNAME): import collections from pexpect import pxssh # Used to set up an SSH connection to a remote machine diff --git a/kpov_judge/tasks/openwrt/task.py b/kpov_judge/tasks/openwrt/task.py index ee770fe..ed2783a 100644 --- a/kpov_judge/tasks/openwrt/task.py +++ b/kpov_judge/tasks/openwrt/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py instructions = { diff --git a/kpov_judge/tasks/public_ip_ssh/task.py b/kpov_judge/tasks/public_ip_ssh/task.py index a33564c..561a1fa 100644 --- a/kpov_judge/tasks/public_ip_ssh/task.py +++ b/kpov_judge/tasks/public_ip_ssh/task.py @@ -1,8 +1,4 @@ -#!/usr/bin/env python - -# bson.son.SON an # kpov_util should be imported by add_assignment.py -OrderedDict = SON instructions = { 'si':""" diff --git a/kpov_judge/tasks/public_ssh_motd_http/task.py b/kpov_judge/tasks/public_ssh_motd_http/task.py index 15ec26d..227425a 100644 --- a/kpov_judge/tasks/public_ssh_motd_http/task.py +++ b/kpov_judge/tasks/public_ssh_motd_http/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py instructions = { @@ -17,10 +15,6 @@ computers = { 'disks': [ { 'name': 'maliNetworkManager', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [{'network': 'net1'}], 'flavor': 'm1.tiny', @@ -31,10 +25,6 @@ computers = { 'disks': [ { 'name': 'maliBrezNetworkManager', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [{'network': 'net1'}], 'flavor': 'm1.tiny', @@ -44,12 +34,7 @@ computers = { 'SimpleArbiter': { 'disks': [ { 'name': 'simpleArbiterDhcp', - # attempt automount }, - #{ 'name': 'CDROM', - # 'options': {'readonly': True}, - # 'parts': [{'dev': 'b1', 'path': '/cdrom'}], - #}, ], 'network_interfaces': [{'network': 'net1'}, {'network': 'test-net'}], 'flavor': 'm1.tiny', diff --git a/kpov_judge/tasks/radius_multiple_realms/task.py b/kpov_judge/tasks/radius_multiple_realms/task.py index 2768045..773a3f2 100644 --- a/kpov_judge/tasks/radius_multiple_realms/task.py +++ b/kpov_judge/tasks/radius_multiple_realms/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py instructions = { @@ -23,10 +21,6 @@ computers = { 'disks': [ { 'name': 'maliNetworkManager', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [{'network': 'net1'}], 'flavor': 'm1.tiny', @@ -37,10 +31,6 @@ computers = { 'disks': [ { 'name': 'maliBrezNetworkManager', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [{'network': 'net1'}], 'flavor': 'm1.tiny', @@ -50,12 +40,7 @@ computers = { 'SimpleArbiter': { 'disks': [ { 'name': 'simpleArbiterDhcp', - # attempt automount }, - #{ 'name': 'CDROM', - # 'options': {'readonly': True}, - # 'parts': [{'dev': 'b1', 'path': '/cdrom'}], - #}, ], 'network_interfaces': [{'network': 'net1'}, {'network': 'test-net'}], 'flavor': 'm1.tiny', diff --git a/kpov_judge/tasks/radius_mysql_pam/task.py b/kpov_judge/tasks/radius_mysql_pam/task.py index 0662546..72b5a74 100644 --- a/kpov_judge/tasks/radius_mysql_pam/task.py +++ b/kpov_judge/tasks/radius_mysql_pam/task.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # kpov_util should be imported by add_assignment.py instructions = { diff --git a/kpov_judge/tasks/rdate_64bit/task.py b/kpov_judge/tasks/rdate_64bit/task.py index a69904a..b08cddc 100644 --- a/kpov_judge/tasks/rdate_64bit/task.py +++ b/kpov_judge/tasks/rdate_64bit/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py instructions = { @@ -18,10 +16,6 @@ computers = { 'disks': [ { 'name': 'maliNetworkManager', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [{'network': 'net1'}], 'flavor': 'm1.tiny', @@ -32,10 +26,6 @@ computers = { 'disks': [ { 'name': 'maliBrezNetworkManager', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [{'network': 'net1'}], 'flavor': 'm1.tiny', @@ -45,12 +35,7 @@ computers = { 'SimpleArbiter': { 'disks': [ { 'name': 'simpleArbiterDhcp', - # attempt automount }, - #{ 'name': 'CDROM', - # 'options': {'readonly': True}, - # 'parts': [{'dev': 'b1', 'path': '/cdrom'}], - #}, ], 'network_interfaces': [{'network': 'net1'}, {'network': 'test-net'}], 'flavor': 'm1.tiny', diff --git a/kpov_judge/tasks/rename_grep_network/task.py b/kpov_judge/tasks/rename_grep_network/task.py index aa61e8a..4f8f1ad 100644 --- a/kpov_judge/tasks/rename_grep_network/task.py +++ b/kpov_judge/tasks/rename_grep_network/task.py @@ -1,12 +1,9 @@ -#!/usr/bin/env python -# # TODO: # - check if everything is filled in (computers, params, preparation) # - improve scoring # - test # - switch to a real SSH/SFTP client to properly handle filenames - instructions = { 'si': """ Ustvari dva navidezna računalnika s slikama diskov diff --git a/kpov_judge/tasks/set_ip_dhcp_hostname/task.py b/kpov_judge/tasks/set_ip_dhcp_hostname/task.py index fd971d8..77648e6 100644 --- a/kpov_judge/tasks/set_ip_dhcp_hostname/task.py +++ b/kpov_judge/tasks/set_ip_dhcp_hostname/task.py @@ -1,6 +1,3 @@ -#!/usr/bin/env python - -# TODO: finish thi # kpov_util should be imported by add_assignment.py instructions = { diff --git a/kpov_judge/tasks/set_ip_static_dhcp/task.py b/kpov_judge/tasks/set_ip_static_dhcp/task.py index 16895c3..aac93f7 100644 --- a/kpov_judge/tasks/set_ip_static_dhcp/task.py +++ b/kpov_judge/tasks/set_ip_static_dhcp/task.py @@ -1,6 +1,5 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py + instructions = { 'si':""" Ustvari tri navidezne racunalnike. Za prvega @@ -33,10 +32,6 @@ computers = { 'disks': [ { 'name': 'maliNetworkManager', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [{'network': 'net1'}], 'flavor': 'm1.tiny', @@ -47,10 +42,6 @@ computers = { 'disks': [ { 'name': 'maliBrezNetworkManager', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [{'network': 'net1'}], 'flavor': 'm1.tiny', @@ -60,12 +51,7 @@ computers = { 'SimpleArbiter': { 'disks': [ { 'name': 'simpleArbiterDhcpGW', - # attempt automount }, - #{ 'name': 'CDROM', - # 'options': {'readonly': True}, - # 'parts': [{'dev': 'b1', 'path': '/cdrom'}], - #}, ], 'network_interfaces': [{'network': 'net1'}, {'network': 'test-net'}], 'flavor': 'm1.tiny', diff --git a/kpov_judge/tasks/set_motd/task.py b/kpov_judge/tasks/set_motd/task.py index e50716b..f2b65fb 100644 --- a/kpov_judge/tasks/set_motd/task.py +++ b/kpov_judge/tasks/set_motd/task.py @@ -1,8 +1,4 @@ -#!/usr/bin/env python - -# bson.son.SON an # kpov_util should be imported by add_assignment.py -# OrderedDict = SON instructions = { "si":""" diff --git a/kpov_judge/tasks/smb_nfs/task.py b/kpov_judge/tasks/smb_nfs/task.py index d2d47b0..a94d677 100644 --- a/kpov_judge/tasks/smb_nfs/task.py +++ b/kpov_judge/tasks/smb_nfs/task.py @@ -1,6 +1,5 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py + # TODO: dokoncaj! instructions = { 'si':""" @@ -28,10 +27,6 @@ computers = { 'disks': [ { 'name': 'student-fileserver', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [{'network': 'net1'}], 'flavor': 'm1.tiny', @@ -41,12 +36,7 @@ computers = { 'SimpleArbiter': { 'disks': [ { 'name': 'simpleArbiterDhcpGW', - # attempt automount }, - #{ 'name': 'CDROM', - # 'options': {'readonly': True}, - # 'parts': [{'dev': 'b1', 'path': '/cdrom'}], - #}, ], 'network_interfaces': [{'network': 'net1'}, {'network': 'test-net'}], 'flavor': 'm1.tiny', diff --git a/kpov_judge/tasks/snmp_agent_uptime/task.py b/kpov_judge/tasks/snmp_agent_uptime/task.py index d4ffb9a..7b3143c 100644 --- a/kpov_judge/tasks/snmp_agent_uptime/task.py +++ b/kpov_judge/tasks/snmp_agent_uptime/task.py @@ -1,6 +1,5 @@ - #!/usr/bin/env python - # kpov_util should be imported by add_assignment.py + # TODO: finish this. instructions = { 'si':""" @@ -41,20 +40,14 @@ Set it up on SNMPClient in the home directory of the user test. Make all the data available over SNMP readable by the "studentje" community. """ - } - computers = { 'SNMPClient': { 'disks': [ { 'name': 'student-SNMPClient', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [{'network': 'net1'}], 'flavor': 'm1.tiny', @@ -64,10 +57,6 @@ computers = { 'disks': [ { 'name': 'student-SNMPServer', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [{'network': 'net1'}], 'flavor': 'm1.tiny', @@ -78,12 +67,7 @@ computers = { 'SimpleArbiter': { 'disks': [ { 'name': 'simpleArbiterDhcpGWSNMP', - # attempt automount }, - #{ 'name': 'CDROM', - # 'options': {'readonly': True}, - # 'parts': [{'dev': 'b1', 'path': '/cdrom'}], - #}, ], 'network_interfaces': [{'network': 'net1'}, {'network': 'test-net'}], 'flavor': 'm1.tiny', diff --git a/kpov_judge/tasks/snmp_alarms_interfaces/task.py b/kpov_judge/tasks/snmp_alarms_interfaces/task.py index 686739c..f1e8d62 100644 --- a/kpov_judge/tasks/snmp_alarms_interfaces/task.py +++ b/kpov_judge/tasks/snmp_alarms_interfaces/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py instructions = { @@ -21,10 +19,6 @@ computers = { 'disks': [ { 'name': 'maliNetworkManager', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [{'network': 'net1'}], 'flavor': 'm1.tiny', @@ -35,10 +29,6 @@ computers = { 'disks': [ { 'name': 'maliBrezNetworkManager', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [{'network': 'net1'}], 'flavor': 'm1.tiny', @@ -48,12 +38,7 @@ computers = { 'SimpleArbiter': { 'disks': [ { 'name': 'simpleArbiterDhcp', - # attempt automount }, - #{ 'name': 'CDROM', - # 'options': {'readonly': True}, - # 'parts': [{'dev': 'b1', 'path': '/cdrom'}], - #}, ], 'network_interfaces': [{'network': 'net1'}, {'network': 'test-net'}], 'flavor': 'm1.tiny', @@ -120,4 +105,3 @@ def task_check(results, params): def prepare_disks(templates, task_params, global_params): write_default_config(templates['simpleArbiterDhcp'], global_params) - diff --git a/kpov_judge/tasks/vlc_stream_rtp/task.py b/kpov_judge/tasks/vlc_stream_rtp/task.py index f2a4e8f..bfdfb4f 100644 --- a/kpov_judge/tasks/vlc_stream_rtp/task.py +++ b/kpov_judge/tasks/vlc_stream_rtp/task.py @@ -1,6 +1,5 @@ -#!/usr/bin/env python - # kpov_util should be imported by add_assignment.py + # Postavi nek film na Internet tako, da ga bodo lahko ostali videli. # TODO: finish this @@ -36,12 +35,7 @@ computers = { 'SimpleArbiter': { 'disks': [ { 'name': 'simpleArbiter', - # attempt automount }, - #{ 'name': 'CDROM', - # 'options': {'readonly': True}, - # 'parts': [{'dev': 'b1', 'path': '/cdrom'}], - #}, ], 'network_interfaces': [{'network': 'test-net'}], 'flavor': 'm1.tiny', @@ -50,12 +44,7 @@ computers = { 'StudentVLC': { 'disks': [ { 'name': 'student-VLC', - # attempt automount }, - #{ 'name': 'CDROM', - # 'options': {'readonly': True}, - # 'parts': [{'dev': 'b1', 'path': '/cdrom'}], - #}, ], 'network_interfaces': [{'network': 'test-net'}], 'flavor': 'm1.tiny', diff --git a/kpov_judge/test_prepare_disks.py b/kpov_judge/test_prepare_disks.py index 2d0a729..33f2479 100755 --- a/kpov_judge/test_prepare_disks.py +++ b/kpov_judge/test_prepare_disks.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys import inspect diff --git a/kpov_judge/test_task.py b/kpov_judge/test_task.py index 7a87ce8..63df973 100755 --- a/kpov_judge/test_task.py +++ b/kpov_judge/test_task.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import collections import getpass |