[firewall4] Méthode ducktape pour retirer un couple mac,ip.
* Pareil que le commit précédent.
This commit is contained in:
parent
e7ad7ae63f
commit
31df6dc770
1 changed files with 4 additions and 0 deletions
|
@ -129,6 +129,10 @@ class firewall(utils.firewall_tools) :
|
|||
machine = {'macAddress':[mac], 'ipHostNumber': [ip]}
|
||||
self.test_mac_ip_dispatch(lambda set, data: self.ipset['mac_ip'][set].add(data), machine)
|
||||
|
||||
def mac_ip_remove(self, mac, ip):
|
||||
machine = {'macAddress':[mac], 'ipHostNumber': [ip]}
|
||||
self.test_mac_ip_dispatch(lambda set, data: set.ipset['mac_ip'][set].delete(data), machine)
|
||||
|
||||
def test_mac_ip_dispatch(self, func, machine):
|
||||
"""Détermine à quel set de mac-ip appliquer la fonction ``func`` (add, delete, append, ...)"""
|
||||
ips = machine['ipHostNumber']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue