From 3e00181edf3c7fb9b35aef59b9caabadd651121a Mon Sep 17 00:00:00 2001 From: Arjen Zonneveld Date: Mon, 1 Jul 2024 14:54:16 +0200 Subject: [PATCH] Update firewall.rb it's => its where applicable --- lib/puppet/provider/firewall/firewall.rb | 10 +++++----- lib/puppet/type/firewall.rb | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/puppet/provider/firewall/firewall.rb b/lib/puppet/provider/firewall/firewall.rb index dc41b3eb7..0c15a8260 100644 --- a/lib/puppet/provider/firewall/firewall.rb +++ b/lib/puppet/provider/firewall/firewall.rb @@ -200,7 +200,7 @@ class Puppet::Provider::Firewall::Firewall # => multiport: (For some reason, the multiport arguments can't be) # specified within the same "-m multiport", but works in seperate # ones. - # => addrtype: Each instance of src_type/dst_type requires it's own preface + # => addrtype: Each instance of src_type/dst_type requires its own preface # @module_to_argument_mapping = { physdev: [:physdev_in, :physdev_out, :physdev_is_bridged, :physdev_is_in, :physdev_is_out], @@ -339,7 +339,7 @@ def insync?(context, _name, property_name, is_hash, should_hash) is == should when :source, :destination - # Ensure source/destination has it's valid mask before you compare it + # Ensure source/destination has its valid mask before you compare it is_hash[property_name] == PuppetX::Firewall::Utility.host_to_mask(should_hash[property_name], should_hash[:protocol]) when :tcp_option, :ctproto, :hop_limit # Ensure that the values are compared as strings @@ -716,7 +716,7 @@ def self.process_get(_context, rule_hash, rule, counter) # Certain OS can return the proto as it;s equivalent number and we make sure to convert it in that case rule_hash[:proto] = PuppetX::Firewall::Utility.proto_number_to_name(rule_hash[:proto]) - # If a dscp numer is found, also return it as it's valid class name + # If a dscp numer is found, also return it as its valid class name rule_hash[:set_dscp_class] = PuppetX::Firewall::Utility.dscp_number_to_class(rule_hash[:set_dscp]) if rule_hash[:set_dscp] rule_hash @@ -966,7 +966,7 @@ def self.hash_to_rule(_context, _name, rule) arguments += " #{[$resource_map[key][1], rule[key]].join(' ')}" end when :src_type, :dst_type, :ipset, :match_mark, :mss, :connmark - # Code for if value requires it's own flag each time it is applied + # Code for if value requires its own flag each time it is applied split_command = $resource_map[key].split(%r{ }) negated_command = [split_command[0], split_command[1], '!', split_command[2]].join(' ') @@ -1048,7 +1048,7 @@ def self.insert_order(context, name, chain, table, protocol) # If the rule already exists, use it as the offset offset_rule = name else - # If it doesn't add it to the list and find it's ordered location + # If it doesn't add it to the list and find its ordered location rules << name new_rule_location = rules.sort.uniq.index(name) offset_rule = if new_rule_location.zero? diff --git a/lib/puppet/type/firewall.rb b/lib/puppet/type/firewall.rb index 066db2f05..e10b6ae93 100644 --- a/lib/puppet/type/firewall.rb +++ b/lib/puppet/type/firewall.rb @@ -157,7 +157,7 @@ type: "Enum['iptables', 'ip6tables', 'IPv4', 'IPv6']", default: 'IPv4', desc: <<-DESC - The protocol used to set the rule, it's allowed values have been expanded to bring it closer to its `firewallchain` counterpart. + The protocol used to set the rule, its allowed values have been expanded to bring it closer to its `firewallchain` counterpart. Defaults to `IPv4` Noted: this was previously defined as `provider`, however the resource_api does not allow this to be used as an attribute title. @@ -301,7 +301,7 @@ ishasmorefrags: { type: 'Optional[Boolean]', desc: <<-DESC - Matches if the packet has it's 'more fragments' bit set. + Matches if the packet has its 'more fragments' bit set. Specific to IPv6. DESC },