3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 21:22:37 +01:00

hwsim: add Rule.remove_all()

There are really no cases where a test wants to remove a single
rule. Most loop through and remove rules individually so this
is being added as a convenience.
This commit is contained in:
James Prestwood 2021-08-18 14:50:26 -07:00 committed by Denis Kenzior
parent 1e0553250b
commit 8e5a68f407

View File

@ -202,6 +202,10 @@ class RuleSet(collections.Mapping):
self._dict[path] = obj self._dict[path] = obj
return obj return obj
def remove_all(self):
for rule in self._dict.values():
rule.remove()
class Radio(HwsimDBusAbstract): class Radio(HwsimDBusAbstract):
_iface_name = HWSIM_RADIO_INTERFACE _iface_name = HWSIM_RADIO_INTERFACE