lib/facter/facts/linux/az_metadata.rb in facter-4.1.1 vs lib/facter/facts/linux/az_metadata.rb in facter-4.2.0

- old
+ new

@@ -3,14 +3,10 @@ module Facts module Linux class AzMetadata FACT_NAME = 'az_metadata' - def initialize - @virtual = Facter::Util::Facts::VirtualDetector.new - end - def call_the_resolver return Facter::ResolvedFact.new(FACT_NAME, nil) unless azure_hypervisor? fact_value = Facter::Resolvers::Az.resolve(:metadata) @@ -18,10 +14,10 @@ end private def azure_hypervisor? - @virtual.platform == 'hyperv' + Facter::Util::Facts::Posix::VirtualDetector.platform == 'hyperv' end end end end