File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ def subnet_counts_by_type
2929 # How many hosts in Foreman have an interface with no ipv4 address but an ipv6 address?
3030 # How many hosts in Foreman have an interface with both ipv4 and ipv6 addresses?
3131 def hosts_by_address_family
32- { 'ipv4-only ' : 'nics.ip IS NOT NULL AND nics.ip6 IS NULL' ,
33- 'ipv6-only ' : 'nics.ip IS NULL AND nics.ip6 IS NOT NULL' ,
32+ { 'ipv4only ' : 'nics.ip IS NOT NULL AND nics.ip6 IS NULL' ,
33+ 'ipv6only ' : 'nics.ip IS NULL AND nics.ip6 IS NOT NULL' ,
3434 'dualstack' : 'nics.ip IS NOT NULL AND nics.ip6 IS NOT NULL' } . each do |kind , condition |
3535 query = <<~SQL
3636 hosts
@@ -52,8 +52,8 @@ def interfaces_by_address_family
5252 dualstack , ipv4_only = with_ipv4 . partition { |_name , addrs | relevant_ipv6? ( addrs ) }
5353 ipv6_only = without_ipv4 . select { |_name , addrs | relevant_ipv6? ( addrs ) }
5454
55- data_field ( "foreman_interfaces_ipv4-only_count " ) { ipv4_only . count }
56- data_field ( "foreman_interfaces_ipv6-only_count " ) { ipv6_only . count }
55+ data_field ( "foreman_interfaces_ipv4only_count " ) { ipv4_only . count }
56+ data_field ( "foreman_interfaces_ipv6only_count " ) { ipv6_only . count }
5757 data_field ( "foreman_interfaces_dualstack_count" ) { dualstack . count }
5858 end
5959
You can’t perform that action at this time.
0 commit comments