]> review.fuel-infra Code Review - puppet-modules/puppetlabs-firewall.git/commit
(#9439) fix parsing and deleting existing rules
authorJonathan Boyett <jonathan@failingservers.com>
Wed, 28 Sep 2011 20:55:02 +0000 (13:55 -0700)
committerKen Barber <ken@bob.sh>
Tue, 11 Oct 2011 18:51:02 +0000 (19:51 +0100)
commit960f4300479c835100a84ac53c5265075816032a
tree5534f9b113a12aec68dafe63d68c9687ddc4dd67
parent762f9bdffd3b63d1cf92f9a5540e87d4ab6456c3
(#9439) fix parsing and deleting existing rules

Previously we hadn't been able to parse existing rules that were missing
a comment field. This patch fixes that by using an MD5 hash of the iptables
raw line as the name of the property.

We have also cleaned up the way we delete arguments by adding a new
delete_args function to return valid delete_args. Instead of having to work
out the rule order we now just delete the rule based on the specification.
lib/puppet/provider/firewall/iptables.rb
lib/puppet/type/firewall.rb
spec/spec_helper.rb
spec/unit/provider/iptables_prov_spec.rb