Using new getFRUArea() API to fix 'not found in lookup' error message

The ipmi-fru-parser calls the dbus method
SystemManager::getObjectFromId('FRU_STR', fru_area_name) for each fru areas
to get the dbus object path of fru area, even if the fru area does not exist.
Also ipmi_validate_fru_area() may be invoked multipul times before
full fru data is parsed. This will generate duplicated error
messages from SystemManager:, e.g:
"ERROR SystemManager: dbus.String(u'INTERNAL_13') not found in lookup".
In this case, "INTERNAL" area does not exists for FRU

In another pull request for skeleton, a new method:
getFRUArea(fru_id) is added specially for ipmi-fru-parser.
See PR: https://github.com/openbmc/skeleton/pull/62.

ipmi-fru-parser gets fru area names defined in Skeleton, and it calls
getObjectFromId() only for fru_aream_name already defined.
This way the 'not found in lookup' error message can be avoided.

Signed-off-by: Yi Li <adamliyi@msn.com>
1 file changed