Bug pour les swicths publiques lors de la génération du schéma de brassage
This commit is contained in:
parent
fbf76bec6b
commit
9507536d3e
1 changed files with 5 additions and 1 deletions
|
@ -441,7 +441,11 @@ def format_prises_group(data, first, last):
|
||||||
def pretty_print(hostname):
|
def pretty_print(hostname):
|
||||||
"""Affiche joliement le plan de connexion d'un switch"""
|
"""Affiche joliement le plan de connexion d'un switch"""
|
||||||
bat, sw_num = get_bat_num(hostname)
|
bat, sw_num = get_bat_num(hostname)
|
||||||
|
|
||||||
|
try:
|
||||||
switch = ldap.search(u'host=bat%s-%d.adm.crans.org' % (bat, sw_num))[0]
|
switch = ldap.search(u'host=bat%s-%d.adm.crans.org' % (bat, sw_num))[0]
|
||||||
|
except IndexError:
|
||||||
|
switch = ldap.search(u'host=bat%s-%d.crans.org' % (bat, sw_num))[0]
|
||||||
|
|
||||||
port_dict = get_port_dict(switch)
|
port_dict = get_port_dict(switch)
|
||||||
total = max(port_dict.keys())
|
total = max(port_dict.keys())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue