From bc6b0f96a1c798b62bac221c3fcbd3e29912d789 Mon Sep 17 00:00:00 2001 From: Olivier Huber Date: Sat, 19 Jun 2010 17:37:52 +0200 Subject: [PATCH] [./gestion/hptools.py] Ne sert plus darcs-hash:20100619153752-8fbb1-c728ae16e98dc46c10e010944a01bac9f28498c5.gz --- gestion/hptools.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/gestion/hptools.py b/gestion/hptools.py index 17a4a22a..dd2c1697 100644 --- a/gestion/hptools.py +++ b/gestion/hptools.py @@ -143,17 +143,7 @@ class snmp : return baseMac def fetch_engineid(self): - self._engineid = '0000000b000%s0' % self.get_mac().replace(':', '') - - def __init_ldap(self): - try: - self._machine = cl.search("host=%(host)s" % {'host': self.host})["machineCrans"][0] - except IndexError: - raise ValueError(u"Cette machine n'est pas un switch du Cr@ns : %s" % host) - - # l'engineid du switch n'est que sa mac avec quelques fioritures autour... - mac = self._machine.mac().replace(':', '') - self._engineid = '0000000b0000%(mac)s0' % {'mac': mac[:-1]} + self._engineid = '0000000b0000%s' % self.getBaseMac() def __exec(self,cmd) : s, r = getstatusoutput(cmd)