From 32992e1351372794082f1211be6815b687548d29 Mon Sep 17 00:00:00 2001 From: bernat Date: Tue, 5 Oct 2004 18:18:30 +0200 Subject: [PATCH] Script tout con pour localiser une adresse MAC darcs-hash:20041005161830-d1718-731a0d36fa0c31fdac97ffc20e7e2aa8049726a5.gz --- gestion/locate-mac.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 gestion/locate-mac.py diff --git a/gestion/locate-mac.py b/gestion/locate-mac.py new file mode 100755 index 00000000..16476a5d --- /dev/null +++ b/gestion/locate-mac.py @@ -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)