scripts/gestion/locate-mac.py
bernat 32992e1351 Script tout con pour localiser une adresse MAC
darcs-hash:20041005161830-d1718-731a0d36fa0c31fdac97ffc20e7e2aa8049726a5.gz
2004-10-05 18:18:30 +02:00

11 lines
337 B
Python
Executable file

#! /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)