Classe BorneWifi.
darcs-hash:20060302161125-68412-22a95570d131e655f5570a08a92a3135604ba32e.gz
This commit is contained in:
parent
be3d9b49b0
commit
962e284d11
4 changed files with 8 additions and 9 deletions
|
@ -10,7 +10,7 @@ Utilis
|
|||
|
||||
import sys, os, commands
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
from ldap_crans import crans
|
||||
from ldap_crans import crans, BorneWifi
|
||||
from gen_confs import gen_config
|
||||
|
||||
# définition de la classe
|
||||
|
@ -162,7 +162,7 @@ class autostatus(gen_config) :
|
|||
continue
|
||||
|
||||
# les bornes
|
||||
if m.canal() :
|
||||
if isinstance(m, BorneWifi):
|
||||
# C'est une borne
|
||||
info = filter(lambda x: not x.startswith("<"), m.info())
|
||||
if info:
|
||||
|
|
|
@ -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, machine, crans, invite, hostname
|
||||
from ldap_crans import crans_ldap, ann_scol, Machine, crans, invite, hostname
|
||||
from affich_tools import *
|
||||
from commands import getstatusoutput
|
||||
from iptools import AddrInNet
|
||||
|
@ -675,8 +675,7 @@ class firewall_komaz(firewall_crans) :
|
|||
self.anim.cycle()
|
||||
sanctions = entite.blacklist_actif()
|
||||
if 'upload' in sanctions or 'warez' in sanctions or 'p2p' in sanctions or 'autodisc' in sanctions :
|
||||
from ldap_crans import machine
|
||||
if entite.__class__ == machine:
|
||||
if isinstance(entite, Machine):
|
||||
blacklist+=[entite]
|
||||
else:
|
||||
blacklist+=entite.machines()
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
import sys, smtplib, commands
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
from ldap_crans import smtpserv, crans, crans_ldap, machine, adherent, club
|
||||
from ldap_crans import smtpserv, crans, crans_ldap, Machine, adherent, club
|
||||
from whos import machine_details, adher_details, club_details
|
||||
from gen_confs import gen_config
|
||||
from affich_tools import cprint, OK, anim
|
||||
|
@ -45,7 +45,7 @@ Subject: %(Subject)s
|
|||
for res in results :
|
||||
if res.dn in vus : continue
|
||||
vus.append(res.dn)
|
||||
if res.__class__ == machine :
|
||||
if isinstance(res, Machine):
|
||||
details.append(machine_details(res))
|
||||
elif res.__class__ == adherent :
|
||||
details.append(adher_details(res))
|
||||
|
|
|
@ -18,7 +18,7 @@ import string, sys, os, commands, smtplib
|
|||
|
||||
sys.path.append('/usr/scripts/gestion')
|
||||
from hptools import hpswitch, sw_chbre
|
||||
from ldap_crans import crans_ldap
|
||||
from ldap_crans import crans_ldap, BorneWifi
|
||||
from annuaires import chbre_prises, uplink_prises, reverse, bat_manuels, all_switchs
|
||||
from random import shuffle
|
||||
from gen_confs import *
|
||||
|
@ -307,7 +307,7 @@ exit
|
|||
adm=0
|
||||
autres=0
|
||||
for m in crans_prises["%s%s" % (bat.upper(), annu_prise)] :
|
||||
if m.canal() : wifi+=1
|
||||
if isinstance(m, BorneWifi): wifi += 1
|
||||
elif m.Nom().find('.adm.crans.org')!=-1 : adm+=1
|
||||
else : autres+=1
|
||||
if autres==0 and adm==0 :
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue