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)