mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
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:
parent
d235b1245b
commit
882c6c9c86
2 changed files with 2 additions and 5 deletions
|
@ -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']:
|
||||
|
|
|
@ -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=''),
|
||||
|
|
Loading…
Add table
Reference in a new issue