Dplacement de la mthode ipsec.
Il ne faut plus utiliser m.ipsec() pour dterminer si m est une machine wifi. darcs-hash:20060313161212-68412-c18bb0100a5d2bc06988d8a19302616405364aca.gz
This commit is contained in:
parent
9cc6478e4e
commit
858702f0b2
4 changed files with 62 additions and 59 deletions
|
@ -48,7 +48,8 @@ except:
|
|||
|
||||
base = None
|
||||
|
||||
from ldap_crans import is_actif, crans_ldap, ann_scol, crans, hostname, BorneWifi
|
||||
from ldap_crans import is_actif, crans_ldap, ann_scol, crans, hostname
|
||||
from ldap_crans import MachineWifi, BorneWifi
|
||||
from affich_tools import *
|
||||
import user_tests
|
||||
import popen2, commands
|
||||
|
@ -132,7 +133,7 @@ def adhers_brief(adhers) :
|
|||
for machine in a.machines() :
|
||||
nom = machine.nom().split('.')[0]
|
||||
if machine.blacklist_actif() : k = 'rouge'
|
||||
elif machine.ipsec() : k = 'cyan'
|
||||
elif isinstance(machine, MachineWifi): k = 'cyan'
|
||||
else : k= ''
|
||||
if machines : machines += ', ' + coul(nom,k)
|
||||
else : machines = coul(nom,k)
|
||||
|
@ -454,7 +455,7 @@ def machine_details(machine) :
|
|||
f+= coul(u'mid=%s ' % machine.id(),'bleu')
|
||||
|
||||
# Type de machine
|
||||
if machine.ipsec(): a = 'Machine wifi'
|
||||
if isinstance(machine, MachineWifi): a = 'Machine wifi'
|
||||
elif isinstance(machine, BorneWifi): a = 'Borne wifi'
|
||||
else: a = 'Machine fixe'
|
||||
f += coul(a + ' : ', 'gras')
|
||||
|
@ -546,7 +547,7 @@ def machine_details(machine) :
|
|||
f += '\n'
|
||||
|
||||
|
||||
if aff_ipsec and machine.ipsec() :
|
||||
if aff_ipsec and isinstance(machine, MachineWifi):
|
||||
f += coul(u'Clef IPsec : ','gras') + machine.ipsec()
|
||||
f += '\n'
|
||||
|
||||
|
@ -688,8 +689,8 @@ def _hist(clas) :
|
|||
def __bases_machines(m) :
|
||||
""" Retourne [ type de la machines, blacklist ] """
|
||||
#Type
|
||||
if m.ipsec() : t='wifi'
|
||||
elif isinstance(m, BorneWifi): t='born'
|
||||
if isinstance(m, MachineWifi): t = 'wifi'
|
||||
elif isinstance(m, BorneWifi): t = 'born'
|
||||
else : t='fixe'
|
||||
|
||||
# Déconnectée ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue