Update PN under asset interface
In case of powerVS configuration, PN is updated for some of the FRUs.
The same needs to be reflected under Asset interface to keep the values
in sync.
The commit implements changes to explicitly update the Asset interface
under PIM once the data has been successfully updated in EEPROM.
Change-Id: I945520bf7669e44d98202f903bd59efdea880a75
Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com>
diff --git a/vpd-manager/src/manager.cpp b/vpd-manager/src/manager.cpp
index 7421ac6..fdc0463 100644
--- a/vpd-manager/src/manager.cpp
+++ b/vpd-manager/src/manager.cpp
@@ -427,6 +427,19 @@
continue;
}
+ // update the Asset interface PN explicitly
+ if (!dbusUtility::callPIM(types::ObjectMap{
+ {l_inventoryPath,
+ {{constants::viniInf,
+ {{"PartNumber",
+ std::string(l_binaryKwdValue.begin(),
+ l_binaryKwdValue.end())}}}}}}))
+ {
+ logging::logMessage(
+ "Updating PN under Asset interface failed for path [" +
+ l_inventoryPath + "]");
+ }
+
// Just needed for logging.
std::string l_initialPartNum((*l_ptrToPn).begin(),
(*l_ptrToPn).end());