diff --git a/gestion/hptools.py b/gestion/hptools.py index 7cc1f538..4c84859e 100644 --- a/gestion/hptools.py +++ b/gestion/hptools.py @@ -399,8 +399,10 @@ class hpswitch : prise = str(prise) if prise=='all' : nb = 0 - for prise,etat in self.walk(oid).items() : - if etat == 'up' : + for oid,etat in self.walk(oid).items() : + if etat == 'up' and int(oid.split('.')[1])<51 : + print oid.split('.')[1] + # Le <51 est ici pour éviter de compter les ports fictifs nb += 1 return nb prise = prise.replace('-','')