Sync common interface property if keyword updated
This commit implements changes for updating common interface property(if
any) for a given FRU. When a keyword value is updated either
from vpd-tool or from vpd-manager WriteKeyword API, the corresponding
common interface property should also be updated on PIM for the FRU as
well as for all inherited FRUs.
Test:
```
Tested on rainier 2s2u simics setup
1. Ensure BMC is in Ready state
2. Read VINI PN of /system/chassis/motherboard using vpd-tool
3. Read Decorator.Asset PartNumber property of /system/chassis/
motherboard using busctl
4. Change VINI PN of /system/chassis/motherboard using vpd-tool
5. Read VINI PN of /system/chassis/motherboard using vpd-tool and
observe that the PN value is updated. Also check the same for
inherited FRUs /system/chassis and
/system/chassis/motherboard/tod_battery
6. Read Decorator.Asset PartNumber property of
/system/chassis/motherboard and its inherited FRUs using busctl and
observe the property got updated with the expected value.
7. Read Decorator.Asset PartNumber property of some non-inherited FRUs
like /system and observe their PartNumber did not get updated.
```
Change-Id: I51955b842640f66a129453bda6cb28ffd478eea4
Signed-off-by: Souvik Roy <souvikroyofficial10@gmail.com>
diff --git a/vpd-manager/src/manager.cpp b/vpd-manager/src/manager.cpp
index fadd965..8341a9e 100644
--- a/vpd-manager/src/manager.cpp
+++ b/vpd-manager/src/manager.cpp
@@ -205,6 +205,13 @@
l_fruPath, i_paramsToWriteData, l_sysCfgJsonObj);
}
+ // update common interface(s) properties
+ if (l_rc != constants::FAILURE)
+ {
+ vpdSpecificUtility::updateCiPropertyOfInheritedFrus(
+ l_fruPath, i_paramsToWriteData, l_sysCfgJsonObj);
+ }
+
return l_rc;
}
catch (const std::exception& l_exception)