desc "The value for the iptables --source-port parameter.
If an array is specified, values will be passed to multiport module."
- validate do |value|
- if value.is_a?(Array) && value.length > 15
- self.fail "multiport module only accepts <= 15 ports"
- end
- end
-
munge do |value|
@resource.string_to_port(value)
end
desc "The value for the iptables --destination-port parameter.
If an array is specified, values will be passed to multiport module."
- validate do |value|
- if value.is_a?(Array) && value.length > 15
- self.fail "multiport module only accepts <= 15 ports"
- end
- end
-
munge do |value|
@resource.string_to_port(value)
end
@resource[port] = ['22','23']
@resource[port].should == [22,23]
end
-
- it "should fail if more that 15 #{port}s are specified" do
- lambda { @resource[port] = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17'] }.should raise_error(Puppet::Error)
- end
end
end