Do not force 'filter' table when flushing

The "table" argument is already part of the function signature, this means
that flush() will always force the "filter" table even when the user sets
a different one.
This commit is contained in:
Alessandro Ghedini 2016-06-27 16:47:22 +01:00
parent d235b1245b
commit 882c6c9c86
2 changed files with 2 additions and 5 deletions

View file

@ -774,9 +774,6 @@ def flush(name, table='filter', family='ipv4', **kwargs):
if ignore in kwargs:
del kwargs[ignore]
if 'table' not in kwargs:
table = 'filter'
if 'chain' not in kwargs:
kwargs['chain'] = ''
if __opts__['test']:

View file

@ -353,8 +353,8 @@ class IptablesTestCase(TestCase):
with patch.dict(iptables.__salt__,
{'iptables.flush': mock}):
ret.update({'changes': {'locale': 'salt'},
'comment': 'Flush iptables rules in '
'filter table chain ipv4 family',
'comment': 'Flush iptables rules in '
'table chain ipv4 family',
'result': True})
self.assertDictEqual(iptables.flush('salt',
table='', chain=''),