From 69b70c858d0dc42177b0a1e2c6b412b6ff9b4596 Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Sun, 25 Nov 2012 23:50:55 +0100 Subject: [PATCH] =?UTF-8?q?[switchs.py]=20vlan=20par=20d=C3=A9faut=20m?= =?UTF-8?q?=C3=AAme=20si=20plus=20d'une=20bore=20wifi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ignore-this: f4f494b827c6dc04c314caba0d784fb0 darcs-hash:20121125225055-28565-e01687bed783671454b8ea27e22739cbd05bd57c.gz --- gestion/gen_confs/switchs.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/gestion/gen_confs/switchs.py b/gestion/gen_confs/switchs.py index f0228ac2..24286b18 100644 --- a/gestion/gen_confs/switchs.py +++ b/gestion/gen_confs/switchs.py @@ -428,21 +428,21 @@ exit elif m.Nom().find('.adm.crans.org')!=-1 : adm+=1 else : autres+=1 if autres==0 and adm==0 : - # Vlan wifi uniquement - if wifi == 1 : - prise_params['nom'] = "Wifi_%s" % m.nom().split(".")[0] - vlans['default'].append(prise) - # Certaines bornes sont dans des chambres, est-ce le cas ? - if prise_chbres.has_key(annu_prise): - chbres = prise_chbres[annu_prise] - prise_params['nom'] += '+Chambre' - if len(chbres) > 1 : prise_params['nom'] += 's' - for chbre in chbres : - prise_params['nom'] += '_%s%s' % (bat.upper(), chbre) - else : - prise_params['nom'] = "Wifi" + # Vlan wifi required vlans['hotspot_tagged'].append(prise) vlans['wifi_tagged'].append(prise) + if wifi == 1 : + prise_params['nom'] = "Wifi_%s" % m.nom().split(".")[0] + else : + prise_params['nom'] = "Wifi" + # Certaines bornes sont dans des chambres, est-ce le cas ? + if prise_chbres.has_key(annu_prise): + vlans['default'].append(prise) + chbres = prise_chbres[annu_prise] + prise_params['nom'] += '+Chambre' + if len(chbres) > 1 : prise_params['nom'] += 's' + for chbre in chbres : + prise_params['nom'] += '_%s%s' % (bat.upper(), chbre) elif wifi==0 and autres==0 : # Vlan adm uniquement if adm == 1 :