From e35fe771f7c962b17598e8f99ddc8cdcca05f760 Mon Sep 17 00:00:00 2001 From: "gasperfele@fri1.uni-lj.si" Date: Mon, 19 Dec 2016 09:29:03 +0000 Subject: Fix template name in snmp_agent_uptime git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@373 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/tasks/snmp_agent_uptime/task.py | 48 +++++++++++++++++++----------- 1 file changed, 30 insertions(+), 18 deletions(-) (limited to 'kpov_judge/tasks') diff --git a/kpov_judge/tasks/snmp_agent_uptime/task.py b/kpov_judge/tasks/snmp_agent_uptime/task.py index f007eec..0c24235 100644 --- a/kpov_judge/tasks/snmp_agent_uptime/task.py +++ b/kpov_judge/tasks/snmp_agent_uptime/task.py @@ -18,8 +18,9 @@ Poskrbi, da bo SNMP strežnik prek SNMP pod OID {SNMP_UPTIME_OID} sporočal, koliko casa je vklopljen v sekundah. -Napiši skripto, poimenovano beri.sh, ki prek SNMP prebere vrednost s strežnika - SNMPServer na OID {SNMP_CLIENT_OID} +Napiši skripto, poimenovano beri.sh, ki prek SNMP prebere vrednost s +simpleArbiterDhcpGWSNMP na OID {SNMP_CLIENT_OID} kot član skupnosti +"testers". Postavi jo na SNMP klienta, v domaci imenik uporabnika test z geslom test. @@ -34,8 +35,10 @@ of the user test with the password test. Make sure that the SNMP server reports it's uptime in seconds over SNMP under OID {SNMP_UPTIME_OID}. -Write a script called beri.sh that reads the value from the OID {SNMP_CLIENT_OID} -on SNMPServer. Set it up on SNMPClient in the home directory of the user test. +Write a script called beri.sh that reads the value from the OID +{SNMP_CLIENT_OID} on simpleArbiterDhcpGWSNMP as a member of the +community "testers". +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. """ @@ -75,7 +78,7 @@ computers = { 'SimpleArbiter': { 'disks': [ - { 'name': 'simpleArbiterDhcpGW', + { 'name': 'simpleArbiterDhcpGWSNMP', # attempt automount }, #{ 'name': 'CDROM', @@ -112,7 +115,7 @@ def task(SERVER_IP, CLIENT_IP, SNMP_UPTIME_OID, SNMP_CLIENT_OID): client.load_system_host_keys() client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - client.connect(SERVER_IP, username='root', password='kaboom') + client.connect(SERVER_IP, username='student', password='vaje') stdin, stdout, stderr = client.exec_command('uptime=$(