18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/facter/facts/solaris/zones.rb', line 18
def call_the_resolver
resolved_facts = []
zones = {}
results = Facter::Resolvers::Solaris::Zone.resolve(:zone)
return Facter::ResolvedFact.new(FACT_NAME, nil) unless results
results&.each do |result|
zones.merge!(parse_result(result))
resolved_facts << create_legacy_zone_facts(result)
end
resolved_facts << Facter::ResolvedFact.new('solaris_zones.zones', zones)
resolved_facts << Facter::ResolvedFact.new('zones', results.count, :legacy)
resolved_facts.flatten
end
|