[mac_prises] Hmmm.

This commit is contained in:
Pierre-Elliott Bécue 2013-05-15 23:05:17 +02:00
parent 68811b58d4
commit dc01a371dc
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@ def liste_chambres_macs(switch, annuaire):
split = switch.replace('.adm.crans.org', '').split('-') split = switch.replace('.adm.crans.org', '').split('-')
bat, num_switch = split[0][-1], int(split[1][0]) bat, num_switch = split[0][-1], int(split[1][0])
if bat not in liste_bats: if bat not in liste_bats:
print 'Le bâtiment '+bat+' ne figure pas dans la liste des bâtiments.' return {}
data = walk(switch, 'STATISTICS-MIB::hpSwitchPortFdbAddress') data = walk(switch, 'STATISTICS-MIB::hpSwitchPortFdbAddress')
liste_chbres = [] liste_chbres = []

View file

@ -64,7 +64,7 @@ if __name__ == '__main__':
On envoie sur n threads les n arguments, puis on récupère les sorties On envoie sur n threads les n arguments, puis on récupère les sorties
et on les enregistre dans une base postgresql et on les enregistre dans une base postgresql
""" """
switches = annuaires_pg.all_switches() switches = annuaires_pg.all_switchs()
date = time.strftime('%F %T') date = time.strftime('%F %T')
threads = {} threads = {}
output = {} output = {}