[switchs.py] vlan par défaut même si plus d'une bore wifi

Ignore-this: f4f494b827c6dc04c314caba0d784fb0

darcs-hash:20121125225055-28565-e01687bed783671454b8ea27e22739cbd05bd57c.gz
This commit is contained in:
Daniel STAN 2012-11-25 23:50:55 +01:00
parent d771498ce1
commit 69b70c858d

View file

@ -428,21 +428,21 @@ exit
elif m.Nom().find('.adm.crans.org')!=-1 : adm+=1 elif m.Nom().find('.adm.crans.org')!=-1 : adm+=1
else : autres+=1 else : autres+=1
if autres==0 and adm==0 : if autres==0 and adm==0 :
# Vlan wifi uniquement # Vlan wifi required
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"
vlans['hotspot_tagged'].append(prise) vlans['hotspot_tagged'].append(prise)
vlans['wifi_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 : elif wifi==0 and autres==0 :
# Vlan adm uniquement # Vlan adm uniquement
if adm == 1 : if adm == 1 :