lib/specinfra/host_inventory/filesystem.rb in specinfra-2.23.0 vs lib/specinfra/host_inventory/filesystem.rb in specinfra-2.24.0
- old
+ new
@@ -1,11 +1,11 @@
module Specinfra
class HostInventory
- class Filesystem
- def self.get
- cmd = Specinfra.command.get(:get_inventory_filesystem)
+ class Filesystem < Base
+ def get
+ cmd = backend.command.get(:get_inventory_filesystem)
filesystem = {}
- Specinfra.backend.run_command(cmd).stdout.lines do |line|
+ backend.run_command(cmd).stdout.lines do |line|
next if line =~ /^Filesystem\s+/
if line =~ /^(.+?)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+\%)\s+(.+)$/
device = $1
filesystem[device] = {}
filesystem[device]['kb_size'] = $2