]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commit
(#9082) Sort iptables --state option values internally to keep it consistent across...
authorChris Boulton <chris.boulton@interspire.com>
Mon, 24 Oct 2011 06:27:31 +0000 (17:27 +1100)
committerKen Barber <ken@bob.sh>
Sun, 30 Oct 2011 11:23:47 +0000 (11:23 +0000)
commitfc3ecdc9d80b1bf990abf47b02cbe2ff9bfc4aff
treedce9b88bbb34cf4e18fc21fed628a36c2bceaf39
parent2300fed9cb036b9bce83e0a8a8a60ff7202569b3
(#9082) Sort iptables --state option values internally to keep it consistent across runs

Previously we were getting multiple re-runs due to the fact that iptables
returns a different order with iptables-save then what was used when creating
the rule.

This patch fixes that by sorting states with should=.

Added unit tests to ensure states are correctly sorted. Also added comments in
code to ensure people understand why
lib/puppet/provider/firewall/iptables.rb
lib/puppet/type/firewall.rb
spec/fixtures/iptables/conversion_hash.rb
spec/unit/puppet/type/firewall_spec.rb