diff --git a/gestion/locate-mac.py b/gestion/locate-mac.py index 32dc6ad8..ac50c0ae 100755 --- a/gestion/locate-mac.py +++ b/gestion/locate-mac.py @@ -6,9 +6,11 @@ from annuaires import reverse, all_switchs from hptools import hpswitch from sys import argv +mac = ":".join([i.zfill(2) for i in argv[1].split(":")]).lower() + for switch in ['backbone'] + all_switchs(): sw = hpswitch(switch) - prise = sw.where_is_mac(argv[1]) + prise = sw.where_is_mac(mac) if prise != None: print "%-10s: %d (%s)" % (switch, prise, sw.nom(None, prise)) else: