code: def upgrade_available(name, **kwargs):
      '''
      Check if there is an upgrade available for a certain package
      Accepts full or partial FMRI. Returns all matches found.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' pkg.upgrade_available apache-22
      '''
      version = None
      cmd = ['pkg', 'list', '-Huv', name]
      lines = __salt__['cmd.run_stdout'](cmd).splitlines()
      if not lines:
          return {}
      ret = {}
      for line in lines:
          ret[_ips_get_pkgname(line)] = _ips_get_pkgversion(line)
      return ref upgrade_available(name, **kwargs):
      '''
      Check if there is an upgrade available for a certain package
      Accepts full or partial FMRI. Returns all matches found.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' pkg.upgrade_available apache-22
      '''
      version = None
      cmd = ['pkg', 'list', '-Huv', name]
      lines = __salt__['cmd.run_stdout'](cmd).splitlines()
      if not lines:
          return {}
      ret = {}
      for line in lines:
          ret[_ips_get_pkgname(line)] = _ips_get_pkgversion(line)
      return ret
docs: Check if there is an upgrade available for a certain package
      Accepts full or partial FMRI. Returns all matches found.
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' pkg.upgrade_available apache-22