Script tout con pour localiser une adresse MAC

darcs-hash:20041005161830-d1718-731a0d36fa0c31fdac97ffc20e7e2aa8049726a5.gz
This commit is contained in:
bernat 2004-10-05 18:18:30 +02:00
parent aedcd8c0e4
commit 32992e1351

11
gestion/locate-mac.py Executable file
View file

@ -0,0 +1,11 @@
#! /usr/bin/env python
# -*- coding: iso-8859-15 -*-
# Localise une adresse MAC sur les différents switchs
from annuaires import reverse, all_switchs
from hptools import hpswitch
from sys import argv
for switch in ['backbone'] + all_switchs():
prise = hpswitch(switch).where_is_mac(argv[1])
print "%-10s: %d" % (switch, prise)