From: Andjelko Horvat Date: Thu, 8 Dec 2016 22:47:17 +0000 (+0100) Subject: Manually remove table definition from the rule X-Git-Tag: 1.10.0~5^2~2 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=d0e529a1f349a365e40068ac402e5f1abb8751a6;p=puppet-modules%2Fpuppetlabs-firewall.git Manually remove table definition from the rule --- diff --git a/lib/puppet/provider/firewall/iptables.rb b/lib/puppet/provider/firewall/iptables.rb index b43a905..e88d1b2 100644 --- a/lib/puppet/provider/firewall/iptables.rb +++ b/lib/puppet/provider/firewall/iptables.rb @@ -440,6 +440,12 @@ Puppet::Type.type(:firewall).provide :iptables, :parent => Puppet::Provider::Fir keys << :chain end + # Manually remove table (used in some tests) + if values =~ /^-t\s/ + values = values.sub(/^-t\s/, '') + keys << :table + end + valrev = values.scan(/("([^"\\]|\\.)*"|\S+)/).transpose[0].reverse if keys.length != valrev.length then