Skip to content
This repository was archived by the owner on Jun 19, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/facts/debian/memory/swap/available.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Available

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:swap_free)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/debian/memory/swap/available_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:swap_free)

[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/debian/memory/swap/total.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Total

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:swap_total)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/debian/memory/swap/total_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TotalBytes
def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:swap_total)
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/debian/memory/swap/used.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Used

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:swap_used_bytes)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
Facter::ResolvedFact.new(FACT_NAME, fact_value)
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/debian/memory/system/available.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Available

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:memfree)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)

[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/debian/memory/system/available_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:memfree)

[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/debian/memory/system/total.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Total

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:total)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/debian/memory/system/total_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TotalBytes
def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:total)
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/debian/memory/system/used.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Used

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:used_bytes)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
Facter::ResolvedFact.new(FACT_NAME, fact_value)
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/el/memory/swap/available.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Available

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:swap_free)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/el/memory/swap/available_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AvailableBytes
def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:swap_free)
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/el/memory/swap/total.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Total

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:swap_total)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/el/memory/swap/total_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TotalBytes
def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:swap_total)
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/el/memory/swap/used.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Used

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:swap_used_bytes)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
Facter::ResolvedFact.new(FACT_NAME, fact_value)
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/el/memory/system/available.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Available

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:memfree)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/el/memory/system/available_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AvailableBytes
def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:memfree)
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/el/memory/system/total.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Total

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:total)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/el/memory/system/total_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TotalBytes
def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:total)
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/el/memory/system/used.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Used

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:used_bytes)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
Facter::ResolvedFact.new(FACT_NAME, fact_value)
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/macosx/memory/swap/available.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Available

def call_the_resolver
fact_value = Facter::Resolvers::Macosx::SwapMemory.resolve(:available_bytes)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)

[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/macosx/memory/swap/available_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AvailableBytes
def call_the_resolver
fact_value = Facter::Resolvers::Macosx::SwapMemory.resolve(:available_bytes)
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/macosx/memory/swap/total.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Total

def call_the_resolver
fact_value = Facter::Resolvers::Macosx::SwapMemory.resolve(:total_bytes)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)

[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/macosx/memory/swap/total_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TotalBytes
def call_the_resolver
fact_value = Facter::Resolvers::Macosx::SwapMemory.resolve(:total_bytes)
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/macosx/memory/swap/used.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Used

def call_the_resolver
fact_value = Facter::Resolvers::Macosx::SwapMemory.resolve(:used_bytes)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)

Facter::ResolvedFact.new(FACT_NAME, fact_value)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/macosx/memory/system/available.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Available

def call_the_resolver
fact_value = Facter::Resolvers::Macosx::SystemMemory.resolve(:available_bytes)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)

[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/macosx/memory/system/available_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AvailableBytes
def call_the_resolver
fact_value = Facter::Resolvers::Macosx::SystemMemory.resolve(:available_bytes)
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/macosx/memory/system/total.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Total

def call_the_resolver
fact_value = Facter::Resolvers::Macosx::SystemMemory.resolve(:total_bytes)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)

[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/macosx/memory/system/total_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TotalBytes
def call_the_resolver
fact_value = Facter::Resolvers::Macosx::SystemMemory.resolve(:total_bytes)
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/macosx/memory/system/used.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Used

def call_the_resolver
fact_value = Facter::Resolvers::Macosx::SystemMemory.resolve(:used_bytes)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)

Facter::ResolvedFact.new(FACT_NAME, fact_value)
end
Expand Down
3 changes: 2 additions & 1 deletion lib/facts/macosx/processors/speed.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ class Speed

def call_the_resolver
fact_value = Facter::Resolvers::Macosx::Processors.resolve(:speed)
Facter::ResolvedFact.new(FACT_NAME, fact_value)
speed = Facter::FactsUtils::UnitConverter.hertz_to_human_readable(fact_value)
Facter::ResolvedFact.new(FACT_NAME, speed)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/sles/memory/swap/available.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Available

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:swap_free)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/sles/memory/swap/available_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AvailableBytes
def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:swap_free)
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/sles/memory/swap/total.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Total

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:swap_total)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/sles/memory/swap/total_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TotalBytes
def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:swap_total)
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/sles/memory/swap/used.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Used

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:swap_used_bytes)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
Facter::ResolvedFact.new(FACT_NAME, fact_value)
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/sles/memory/system/available.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Available

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:memfree)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/sles/memory/system/available_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class AvailableBytes
def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:memfree)
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/sles/memory/system/total.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Total

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:total)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/sles/memory/system/total_bytes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TotalBytes
def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:total)
[Facter::ResolvedFact.new(FACT_NAME, fact_value),
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::BytesConverter.to_mb(fact_value), :legacy)]
Facter::ResolvedFact.new(ALIASES, Facter::FactsUtils::UnitConverter.bytes_to_mb(fact_value), :legacy)]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/facts/sles/memory/system/used.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Used

def call_the_resolver
fact_value = Facter::Resolvers::Linux::Memory.resolve(:used_bytes)
fact_value = Facter::BytesToHumanReadable.convert(fact_value)
fact_value = Facter::FactsUtils::UnitConverter.bytes_to_human_readable(fact_value)
Facter::ResolvedFact.new(FACT_NAME, fact_value)
end
end
Expand Down
17 changes: 17 additions & 0 deletions lib/facts/solaris/processors/count.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true

module Facts
module Solaris
module Processors
class Count
FACT_NAME = 'processors.count'
ALIASES = 'processorcount'

def call_the_resolver
fact_value = Facter::Resolvers::Solaris::Processors.resolve(:logical_count)
[Facter::ResolvedFact.new(FACT_NAME, fact_value), Facter::ResolvedFact.new(ALIASES, fact_value, :legacy)]
end
end
end
end
end
Loading