Donne aussi le nom de la prise

darcs-hash:20041017001547-d1718-889d51ce142fbb3c07cac2c8135718fd62545528.gz
This commit is contained in:
bernat 2004-10-17 02:15:47 +02:00
parent 6b0be7b838
commit b2de2e117c

View file

@ -7,8 +7,9 @@ from hptools import hpswitch
from sys import argv
for switch in ['backbone'] + all_switchs():
prise = hpswitch(switch).where_is_mac(argv[1])
sw = hpswitch(switch)
prise = sw.where_is_mac(argv[1])
if prise != None:
print "%-10s: %d" % (switch, prise)
print "%-10s: %d (%s)" % (switch, prise, sw.nom(None, prise))
else:
print "%-10s: non trouvé" % switch