Cosmetics :)

darcs-hash:20050521223851-f163d-14a5e22f9c8ac863b75d1e834be2dd6c303b9381.gz
This commit is contained in:
segaud 2005-05-22 00:38:51 +02:00
parent ade62f9376
commit 4267abe904

View file

@ -225,12 +225,16 @@ class firewall_komaz(firewall_crans) :
def admin_vlan(self) :
""" Reconstruit la chaine ADMIN_VLAN """
iptables("-F ADMIN_VLAN")
self.anim = anim(' Chaîne ADMIN_VLAN')
nounou_machines = []
for adherent in crans_ldap().search('droits=Nounou')['adherent'] :
for machine in adherent.machines() :
self.anim.cycle()
iptables("-A ADMIN_VLAN -p tcp -s %s --dport ssh -j ACCEPT" % machine.ip() )
nounou_machines.append(machine.ip())
iptables("-A ADMIN_VLAN -j REJECT")
self.anim = anim(' Chaîne ADMIN_VLAN', len(nounou_machines))
for machine in nounou_machines :
self.anim.cycle()
iptables("-I ADMIN_VLAN -p tcp -s %s --dport ssh -j ACCEPT" % machine)
self.anim.reinit()
print OK