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

Constructor Details

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

Instance Method Details

#info(package_name) ⇒ Object



233
234
235
236
237
238
239
240
241
242
243
244
# File 'lib/resources/package.rb', line 233

def info(package_name)
  cmd = inspec.command("lslpp -cL #{package_name}")
  return nil 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