Pas de caractres bizarres dans les macs lors de l'interrogation des
switchs. darcs-hash:20051002132527-41617-34797465776fce26ecc16ef555f9ac2546dc06d8.gz
This commit is contained in:
parent
49801efe98
commit
5fc7573c7b
1 changed files with 2 additions and 1 deletions
|
@ -16,6 +16,7 @@ from commands import getstatusoutput
|
|||
from annuaires import chbre_prises, all_switchs
|
||||
from os.path import exists
|
||||
from os import system
|
||||
from sre import findall
|
||||
|
||||
try:
|
||||
from secrets import config_snmp_secrete
|
||||
|
@ -190,7 +191,7 @@ class hpswitch :
|
|||
if self.__debug : self.__logDest.write("HP DEBUG : show_prise_mac(prise=%s)\n" % prise)
|
||||
try:
|
||||
data = self.walk('STATISTICS-MIB::hpSwitchPortFdbAddress.%d' % int(prise))
|
||||
return map(lambda x:":".join(x[1:-2].lower().split(" ")),data.values())
|
||||
return map(lambda x:findall('".*"',":".join(x.lower().split(' ')))[0][1:-1],data.values())
|
||||
except ValueError:
|
||||
# Pas de MAC trouvée
|
||||
return []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue