[./gestion/hptools.py] Ne sert plus
darcs-hash:20100619153752-8fbb1-c728ae16e98dc46c10e010944a01bac9f28498c5.gz
This commit is contained in:
parent
1faacdb594
commit
bc6b0f96a1
1 changed files with 1 additions and 11 deletions
|
@ -143,17 +143,7 @@ class snmp :
|
||||||
return baseMac
|
return baseMac
|
||||||
|
|
||||||
def fetch_engineid(self):
|
def fetch_engineid(self):
|
||||||
self._engineid = '0000000b000%s0' % self.get_mac().replace(':', '')
|
self._engineid = '0000000b0000%s' % self.getBaseMac()
|
||||||
|
|
||||||
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]}
|
|
||||||
|
|
||||||
def __exec(self,cmd) :
|
def __exec(self,cmd) :
|
||||||
s, r = getstatusoutput(cmd)
|
s, r = getstatusoutput(cmd)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue