switchs2.py: ldap_admin pour modif prise
This commit is contained in:
parent
9df9523476
commit
176540e3db
1 changed files with 4 additions and 4 deletions
|
@ -28,7 +28,7 @@ import argparse
|
|||
if '/usr/scripts' not in sys.path:
|
||||
sys.path.append('/usr/scripts')
|
||||
import gestion.secrets_new as secrets
|
||||
from lc_ldap.shortcuts import lc_ldap_readonly as make_ldap_conn
|
||||
from lc_ldap.shortcuts import lc_ldap_admin as make_ldap_conn
|
||||
import gestion.annuaires_pg as annuaire
|
||||
import gestion.config as config
|
||||
import lc_ldap.objets as ldap_classes
|
||||
|
@ -111,7 +111,7 @@ class Port(object):
|
|||
labels.append('Wifi_' +
|
||||
','.join(b['host'][0].value.split('.', 1)[0]
|
||||
for b in self.bornes))
|
||||
return ",".join(labels) or "Inconnu"
|
||||
return ",".join(labels) or "Inconnu"
|
||||
|
||||
def __int__(self):
|
||||
return self.num
|
||||
|
@ -156,7 +156,7 @@ class Port(object):
|
|||
return V_NO
|
||||
elif self.bornes:
|
||||
if vlan in ['wifi', 'accueil', 'isolement', 'v6only', 'appts',
|
||||
'event']:
|
||||
'event']:
|
||||
return V_TAGGED
|
||||
# Cas d'une borne dans une chambre: l'adherent doit pouvoir
|
||||
# se connecter
|
||||
|
@ -410,7 +410,7 @@ def conf_switch(hostname):
|
|||
# réseaux où on fait du dhcp snooping (cf data.NETs)
|
||||
'dhcp_snooping_vlan_names': ['adherent', 'wifi', 'accueil',
|
||||
'isolement', 'v6only', 'appts'],
|
||||
}
|
||||
}
|
||||
|
||||
for com in switch['info']:
|
||||
if com.value.startswith(';'):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue