Class: Inspec::Resources::BffPkg

Inherits:
PkgManagement show all
Defined in:
lib/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



323
324
325
326
327
328
329
330
331
332
333
334
# File 'lib/resources/package.rb', line 323

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