Hi,
Here's a small patch for FtpChecker. It gets the ServerIdent string
from the banner and uses it as the version string.
--- FtpChecker_orig.py Thu Nov 2 12:32:11 2006
+++ FtpChecker.py Thu Nov 2 13:08:38 2006
@@ -63,12 +63,20 @@
s = FTP(self.getTimeout())
ip, port = self.getAddress()
output = s.connect(ip,port or 21)
+
+ # Get server version from the banner.
+ version = ''
+ for line in s.welcome.split('\n'):
+ if line.startswith('220 '):
+ version = line[4:].strip()
+ self.setVersion(version)
+
args = self.getArgs()
username = args.get('username','')
password = args.get('password','')
path = args.get('path','')
output = s.login(username,password,path)
- print output
+
if output[:3] == '230':
return Event.UP,'code 230'
else:
--
Ole Martin Bjoerndalen
olemb(a)cc.uit.no
>From olemb at cc.uit.no Thu Nov 2 15:02:39 2006
From: olemb at cc.uit.no (Ole Martin Bjorndalen)
Date: Thu Nov 2 15:02:58 2006
Subject: [Nav-dev] [PATCH] Small typo in abstractChecker.py
Message-ID: <20061102140239.GA31233(a)cc.uit.no>
--- abstractChecker_orig.py 2006-11-02 14:58:31.000000000 +0100
+++ abstractChecker.py 2006-11-02 14:59:25.000000000 +0100
@@ -226,7 +226,7 @@
if self._sysname:
return self._sysname
else:
- return self.geIp()
+ return self.getIp()
def setResponsetime(self,usage):
"""Sets the responsetime of this service. Is updated by self.run() """
self._usage = usage
--
Ole Martin Bjoerndalen
olemb(a)cc.uit.no
>From morten.brekkevold at uninett.no Wed Nov 8 15:10:49 2006
From: morten.brekkevold at uninett.no (Morten Brekkevold)
Date: Wed Nov 8 15:10:59 2006
Subject: [Nav-dev] [Patch] setVersion() for FtpChecker.py
In-Reply-To: <20061102124220.GA30191(a)cc.uit.no>
References: <20061102124220.GA30191(a)cc.uit.no>
Message-ID: <4551E569.5080401(a)uninett.no>
Ole Martin Bjorndalen wrote, On 02-11-2006 13:42:
> Here's a small patch for FtpChecker. It gets the ServerIdent string
> from the banner and uses it as the version string.
Thanks for this, Ole Martin, and also the other one :) As soon as
they're tested, I'll commit them.
--
mvh
Morten Brekkevold
UNINETT
>From andreas.knudsen at hiof.no Thu Nov 9 11:11:54 2006
From: andreas.knudsen at hiof.no (Andreas Knudsen)
Date: Thu Nov 9 11:12:33 2006
Subject: [Nav-dev] Patch for dump.py
Message-ID: <734A5B19-A57C-49AA-849B-8907A6F488CC(a)hiof.no>
Hi! I've written a small patch for dump.py that provides support for
dumping the patch and cabling tables. This is my first attempt at
writing a patch for NAV, and hopefully it works as intended.
-------------- neste del --------------
Et vedlegg som ikke var tekst, ble skilt ut...
Navn : dump.py_patch
Type : application/octet-stream
Størrelse : 1486 bytes
Beskrivelse: ikke tilgjengelig
URL : http://mailman.itea.ntnu.no/mailman/private/nav-dev/attachments/20061109/ac…
-------------- neste del --------------
--
Andreas Knudsen
?stfold University College
>From olemb at cc.uit.no Mon Nov 20 13:07:23 2006
From: olemb at cc.uit.no (Ole Martin Bjorndalen)
Date: Mon Nov 20 13:07:44 2006
Subject: [Nav-dev] [PATCH] Server version not escaped in servicemon
Message-ID: <20061120120723.GA32345(a)cc.uit.no>
The server version was not escaped before it was inserted into
the database. This caused a syntax error when the server version for
DNS contained a single quote.
(BTW, nav.db.escape() should probably be called nav.db.quote() since
it also quotes the string.)
--
Ole Martin Bjoerndalen
olemb(a)cc.uit.no