Class: Inspec::Resources::BffPkg

Inherits:
PkgManagement show all
Defined in:
lib/inspec/resources/package.rb

Overview

AIX

Instance Attribute Summary

Attributes inherited from PkgManagement

#inspec

Instance Method Summary collapse

Methods inherited from PkgManagement

#initialize, #missing_requirements

Constructor Details

This class inherits a constructor from Inspec::Resources::PkgManagement

Instance Method Details

#info(package_name) ⇒ Object



425
426
427
428
429
430
431
432
433
434
435
436
# File 'lib/inspec/resources/package.rb', line 425

def info(package_name)
  cmd = inspec.command("lslpp -cL #{package_name}")
  return {} if cmd.exit_status.to_i != 0

  bff_pkg = cmd.stdout.split("\n").last.split(":")
  {
    name: bff_pkg[1],
    installed: true,
    version: bff_pkg[2],
    type: "bff",
  }
end