libraries/patch_mgmt.rb
def check_nim_info(hash)
      master = hash.fetch('nim', {}).fetch('master').fetch('oslevel')
      log_debug("master oslevel is #{master}")

      all_machines = hash.fetch('nim', {}).fetch('clients').keys
      log_debug("client machine's list is #{all_machines}")

      all_lpp_sources = hash.fetch('nim', {}).fetch('lpp_sources').keys
      log_debug("lpp source's list is #{all_lpp_sources}")
    rescue KeyError
      raise NimInfoNotFound, 'Error: cannot find nim info'
    end
# -----------------------------------------------------------------
# Check nim hash info is well configured
#
#    raise NimInfoNotFound in case of error
# -----------------------------------------------------------------
Check nim hash info is well configured
raise NimInfoNotFound in case of error
Check nim hash info is well configured raise NimInfoNotFound in case of error
def check_nim_info(hash)
      master = hash.fetch('nim', {}).fetch('master').fetch('oslevel')
      log_debug("master oslevel is #{master}")
      all_machines = hash.fetch('nim', {}).fetch('clients').keys
      log_debug("client machine's list is #{all_machines}")
      all_lpp_sources = hash.fetch('nim', {}).fetch('lpp_sources').keys
      log_debug("lpp source's list is #{all_lpp_sources}")
    rescue KeyError
      raise NimInfoNotFound, 'Error: cannot find nim info'
    end
def check_nim_info ( hash ) master = hash . fetch ( 'nim' , { } ) . fetch ( 'master' ) . fetch ( 'oslevel' ) log_debug ( "master oslevel is #{master}" ) all_machines = hash . fetch ( 'nim' , { } ) . fetch ( 'clients' ) . keys log_debug ( "client machine's list is #{all_machines}" ) all_lpp_sources = hash . fetch ( 'nim' , { } ) . fetch ( 'lpp_sources' ) . keys log_debug ( "lpp source's list is #{all_lpp_sources}" ) rescue KeyError raise NimInfoNotFound , 'Error: cannot find nim info' end
Check nim hash info is well configured
raise NimInfoNotFound in case of error
Check nim hash info is well configured raise NimInfoNotFound in case of error
hash