From c6f4a0cec8c5688ee09a4fb5c2fa710ce8df88d5 Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Sun, 22 Sep 2013 14:55:58 +0200 Subject: [PATCH] switchs2: vlan adm untagged pour les serveurs --- gestion/gen_confs/switchs2.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gestion/gen_confs/switchs2.py b/gestion/gen_confs/switchs2.py index db644f75..3060bf17 100755 --- a/gestion/gen_confs/switchs2.py +++ b/gestion/gen_confs/switchs2.py @@ -120,7 +120,12 @@ class Port(object): def vlan_member(self, vlan): """Renvoie V_TAGGED, V_UNTAGGED ou V_NO suivant le ``vlan`` (str) demandé""" - if self.uplink or self.servers: + if self.servers: + if vlan == 'adm': + return V_UNTAGGED + else: + return V_NO + if self.uplink: # TODO retirer ce hack dégueux: tous les switchs devraient tout # tagguer, même le vlan adhérent if vlan == 'adherent':