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



292
293
294
295
296
297
298
299
300
301
302
303
# File 'lib/resources/package.rb', line 292

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