invite -> Invite.
darcs-hash:20060323120339-68412-1af24e89624decc04527eb7274af186b8cc7dcf1.gz
This commit is contained in:
parent
3d0f609ee6
commit
bfed30d32a
4 changed files with 11 additions and 11 deletions
|
@ -28,7 +28,7 @@ sys.path.append('/usr/scripts/gestion')
|
|||
import syslog
|
||||
import pwd
|
||||
from lock import *
|
||||
from ldap_crans import crans_ldap, ann_scol, crans, invite, hostname
|
||||
from ldap_crans import crans_ldap, ann_scol, crans, Invite, hostname
|
||||
from ldap_crans import Machine, MachineWifi
|
||||
from affich_tools import *
|
||||
from commands import getstatusoutput
|
||||
|
@ -290,7 +290,7 @@ class firewall_crans :
|
|||
# Il faut avoir payé ou ętre une machine du crans ou un invite
|
||||
if db.search('paiement=ok&ip=%s'% ip)['machine'] or \
|
||||
machine[0].proprietaire().__class__ == crans or \
|
||||
machine[0].proprietaire().__class__ == invite :
|
||||
machine[0].proprietaire().__class__ == Invite :
|
||||
mac_ip_maj[ip] = machine[0]
|
||||
else :
|
||||
mac_ip_maj[ip] = None
|
||||
|
|
|
@ -17,7 +17,7 @@ import sys, signal, os, getopt
|
|||
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
|
||||
from ldap_crans import crans_ldap, crans, hostname, invite
|
||||
from ldap_crans import crans_ldap, crans, hostname
|
||||
from lock import *
|
||||
from affich_tools import anim, cprint, OK
|
||||
from time import localtime, strftime, time, sleep, timezone
|
||||
|
|
|
@ -6,7 +6,7 @@ from gen_confs import gen_config, ERREUR, OK, anim
|
|||
|
||||
import sys, os, shutil
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
from ldap_crans import crans_ldap, invite, BorneWifi
|
||||
from ldap_crans import crans_ldap, Invite, BorneWifi
|
||||
|
||||
class conf_wifi_ng(gen_config) :
|
||||
""" Génération de la configuration de isakmpd dans ISAKMPD_CONF
|
||||
|
@ -47,7 +47,7 @@ class conf_wifi_ng(gen_config) :
|
|||
def _gen(self):
|
||||
self.anim=anim('\r\tRecherche base LDAP')
|
||||
clients = self.db.search('host=*.wifi.crans.org&paiement=ok')['machineWifi'] + \
|
||||
invite().machines()
|
||||
Invite().machines()
|
||||
bornes = self.db.search('host=*.wifi.crans.org&canal=*')['borneWifi']
|
||||
|
||||
print OK
|
||||
|
|
|
@ -805,7 +805,7 @@ class crans_ldap:
|
|||
# Machines de l'assoce
|
||||
self.__machines = crans(self.conn).machines()
|
||||
# Machines des invités
|
||||
self.__machines += invite(self.conn).machines()
|
||||
self.__machines += Invite(self.conn).machines()
|
||||
# Machines des adhérents et clubs de l'année en cours
|
||||
base = self.search('paiement=ok')
|
||||
base = base['adherent'] + base['club']
|
||||
|
@ -2198,7 +2198,7 @@ class Machine(base_classes_crans):
|
|||
# Propriéraire inconnu mais ce n'est pas grave
|
||||
self.__proprietaire = None
|
||||
|
||||
elif t in [ adherent, club, crans, invite ] and typ in [ 'fixe' , 'wifi' , 'borne' ]:
|
||||
elif t in [ adherent, club, crans, Invite ] and typ in [ 'fixe' , 'wifi' , 'borne' ]:
|
||||
# Machine vide
|
||||
self.__proprietaire = parent_or_tuple
|
||||
self.dn = parent_or_tuple.dn
|
||||
|
@ -2407,7 +2407,7 @@ class Machine(base_classes_crans):
|
|||
|
||||
# Dans quel réseau la machine doit-elle être placée ?
|
||||
if self.__typ == 'wifi':
|
||||
if self.proprietaire().__class__ == invite:
|
||||
if self.proprietaire().__class__ == Invite:
|
||||
net = config.NETs['wifi-invite']
|
||||
elif self.proprietaire().etudes(0) == "ENS" and self.proprietaire().etudes(1) == "Pers":
|
||||
# Personnel ENS
|
||||
|
@ -2516,7 +2516,7 @@ class Machine(base_classes_crans):
|
|||
|
||||
def proprietaire(self):
|
||||
"""
|
||||
retroune le propriétaire de la machine (classe adherent, club ou crans ou invite)
|
||||
retroune le propriétaire de la machine (classe adherent, club ou crans ou Invite)
|
||||
"""
|
||||
if not self.__proprietaire:
|
||||
res = self.conn.search_s(','.join(self.dn.split(',')[1:]), 0)
|
||||
|
@ -2525,7 +2525,7 @@ class Machine(base_classes_crans):
|
|||
elif 'club' in res[0][1]['objectClass']:
|
||||
self.__proprietaire = club(res[0], self._modifiable, self.conn)
|
||||
elif 'invite' in res[0][0]:
|
||||
self.__proprietaire = invite(self.conn)
|
||||
self.__proprietaire = Invite(self.conn)
|
||||
else:
|
||||
self.__proprietaire = crans(self.conn)
|
||||
|
||||
|
@ -2923,7 +2923,7 @@ class crans(_FakeProprio):
|
|||
def chbre(self):
|
||||
return u"CRA"
|
||||
|
||||
class invite(_FakeProprio):
|
||||
class Invite(_FakeProprio):
|
||||
""" Propriétaire des machines invitées """
|
||||
def __init__(self, conn=None):
|
||||
_FakeProprio.__init__(self, conn)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue