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:
Mike Place 2016-06-28 12:03:14 -07:00 committed by GitHub
commit 046bdaa9f2
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=''),