mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #34306 from ghedo/iptables_flush_table
Fix iptables.flush state: Do not force 'filter' table when flushing
This commit is contained in:
commit
046bdaa9f2
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