Ken Barber [Tue, 11 Oct 2011 19:21:54 +0000 (20:21 +0100)]
(#10026) Re-arrange provider and type spec files to align with Puppet.
If moved the spec files now under 'puppet' to align with how Puppet does it. This
also makes more sense as this lines up with the module/class names now.
The iptables_type_spec.rb is now just firewall_type.rb to designate it is for
the generic firewall type.
iptables_prov_spec.rb is now iptables_spec.rb. The provider part is implicit
in the path.
Jonathan Boyett [Wed, 28 Sep 2011 20:55:02 +0000 (13:55 -0700)]
(#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.
Ken Barber [Sun, 18 Sep 2011 21:28:11 +0000 (22:28 +0100)]
(#9583) Fix provider detection for gentoo and unsupported linuxes for the iptables provider.
Previously we had fairly specific confine settings for named distributions
of linux for the iptables provider. This was silly, since the commands
defined in the provider should be enough to confine the provider to Linux
only systems.
I've removed the confine, and replaced the defaultfor to be:
:kernel => :linux
Which should avoid the need to keep adding extra Linux distributions.
I've also added some spec tests for provider detection which should help
catch any failures around the command based detection in the future.
Ken Barber [Sat, 17 Sep 2011 22:46:35 +0000 (23:46 +0100)]
(#9576) Stub iptables type so it will execute on platforms other then linux.
This change will help us target other platforms for this type. I've also
removed old helpers to align with Puppet core spec_helper. While this might
seem more invconvenient it provides more consistency with core Puppet type
testing.
Ken Barber [Sat, 17 Sep 2011 22:40:53 +0000 (23:40 +0100)]
(#9576) Align spec framework with Puppet core.
The point of this change is to align the spec testing behaviour with Puppet core
so we can get similar behaviour and less problems if we ever want to move this
type into core.
Ken Barber [Sat, 16 Jul 2011 19:19:49 +0000 (21:19 +0200)]
Removed iptables stuff, introduced features and cleaned up docs & validation.
I've removed a lot of iptables specific stuff from the type, also
allowed any chain to be defined in :chain or :jump so we can support
user chains.
A lot of the documentation for the type has been cleaned up a little
and validation has been simplified where applicable.
This commit brings in the usage of features so we can start to introduce
more backend providers. The work is just a start for now and will
probably radically change once we have other working providers in
place.
Ken Barber [Wed, 15 Jun 2011 15:14:10 +0000 (17:14 +0200)]
Firewall wasn't acknowledging new properties, only ones that were created at
resource creation time. This patch fixes that by analyzing the resource_map
hash.
The proto property needs to be defaulted to 'all' when it doesn't exist as well
to stop the provider from trying to change it each time.