lib/facter/resolvers/aix/partitions.rb in facter-4.0.46 vs lib/facter/resolvers/aix/partitions.rb in facter-4.0.47
- old
+ new
@@ -12,11 +12,11 @@
def post_resolve(fact_name)
@fact_list.fetch(fact_name) { query_cudv(fact_name) }
end
def query_cudv(fact_name)
- odmquery = Facter::ODMQuery.new
+ odmquery = Facter::Util::Aix::ODMQuery.new
odmquery.equals('PdDvLn', 'logical_volume/lvsubclass/lvtype')
result = odmquery.execute
return unless result
@@ -38,17 +38,17 @@
def populate_from_lslv(name)
stdout = Facter::Core::Execution.execute("lslv -L #{name}", logger: log)
return if stdout.empty?
- info_hash = InfoExtractor.extract(stdout, /PPs:|PP SIZE|TYPE:|LABEL:|MOUNT/)
+ info_hash = Facter::Util::Aix::InfoExtractor.extract(stdout, /PPs:|PP SIZE|TYPE:|LABEL:|MOUNT/)
size_bytes = compute_size(info_hash)
part_info = {
filesystem: info_hash['TYPE'],
size_bytes: size_bytes,
- size: Facter::FactsUtils::UnitConverter.bytes_to_human_readable(size_bytes)
+ size: Facter::Util::Facts::UnitConverter.bytes_to_human_readable(size_bytes)
}
mount = info_hash['MOUNT POINT']
label = info_hash['LABEL']
part_info[:mount] = mount unless %r{N/A} =~ mount
part_info[:label] = label.strip unless /None/ =~ label
@@ -57,12 +57,12 @@
def compute_size(info_hash)
physical_partitions = info_hash['PPs'].to_i
size_physical_partition = info_hash['PP SIZE']
exp = if size_physical_partition[/mega/]
- InfoExtractor::MEGABYTES_EXPONENT
+ Facter::Util::Aix::InfoExtractor::MEGABYTES_EXPONENT
else
- InfoExtractor::GIGABYTES_EXPONENT
+ Facter::Util::Aix::InfoExtractor::GIGABYTES_EXPONENT
end
size_physical_partition.to_i * physical_partitions * exp
end
end
end