(CAT-376) Rework firewall module to use the resource_api #139
Annotations
5 errors
spec/unit/puppet/provider/firewallchain/firewallchain_spec.rb#L14
Puppet::Provider::Firewallchain::Firewallchain#get processes resources
Failure/Error: iptables_list = Puppet::Provider.execute($list_command[protocol])
Puppet::ExecutionFailure:
Execution of 'iptables-save' returned 1: Failed to list table names in /proc/net/ip_tables_names: Permission denied
|
spec/unit/puppet/provider/firewallchain/firewallchain_spec.rb#L30
Puppet::Provider::Firewallchain::Firewallchain create(context, name, should) creates the resource
Failure/Error: Puppet::Provider.execute([$base_command[should[:protocol]], should[:table], $chain_create_command, should[:base_name]].join(' '))
Puppet::ExecutionFailure:
Execution of ' -N ' returned 1:
|
spec/unit/puppet/provider/firewallchain/firewallchain_spec.rb#L38
Puppet::Provider::Firewallchain::Firewallchain update(context, name, should) updates the resource
Failure/Error:
def update(context, name, should, is)
# Skip the update if not a inbuilt chain or if policy has not been updated
return if !$built_in_regex.match(should[:base_name]) ||
($built_in_regex.match(should[:base_name]) && is[:policy] == should[:policy])
context.notice("Updating '#{name}' with #{should.inspect}")
Puppet::Provider.execute([$base_command[should[:protocol]], should[:table], $chain_policy_command, should[:base_name], should[:policy].upcase].join(' '))
PuppetX::Firewall::Utility.persist_iptables(context, name, should[:protocol])
end
ArgumentError:
wrong number of arguments (given 3, expected 4)
|
spec/unit/puppet/provider/firewallchain/firewallchain_spec.rb#L46
Puppet::Provider::Firewallchain::Firewallchain delete(context, name) deletes the resource
Failure/Error:
def delete(context, name, is)
# Before we can delete a chain we must first flush it of any active rules
context.notice("Flushing Chain '#{name}'")
Puppet::Provider.execute([$base_command[is[:protocol]], is[:table], $chain_flush_command, is[:base_name]].join(' '))
# For Inbuilt chains we cannot delete them and so instead simply ensure they are reverted to the default policy
if $built_in_regex.match(is[:base_name])
context.notice("Reverting Internal Chain '#{name}' to its default")
Puppet::Provider.execute([$base_command[is[:protocol]], is[:table], $chain_policy_command, is[:base_name], 'ACCEPT'].join(' '))
else
ArgumentError:
wrong number of arguments (given 2, expected 3)
|
|
The logs for this run have expired and are no longer available.
Loading