Add handling for FRU prefixes
There are some FRU eeproms in the wild that use the custom field to
represent the MAC address, but prefix the mac itself with "MAC:"
Detect this case, and expose this as a new field MAC_<Previous
fieldname>. This allows Entity-Manager to properly parse the MAC
address to fill into EthernetInterface and set the MAC address.
Tested: Boot a platform with this type of fru (P3809)
Observe that the MAC address is set correctly. Introspecting DBUS shows
the mac field was added correctly
Change-Id: I03dbeebc41c8e589d7992b91d589f40e9e11f5c5
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/configurations/nvidia_bmc_p3809.json b/configurations/nvidia_bmc_p3809.json
index 1f9b91f..65686ea 100644
--- a/configurations/nvidia_bmc_p3809.json
+++ b/configurations/nvidia_bmc_p3809.json
@@ -9,5 +9,8 @@
],
"Name": "BMC",
"Probe": "xyz.openbmc_project.FruDevice({'PRODUCT_MANUFACTURER': 'NVIDIA', 'PRODUCT_PRODUCT_NAME': 'P3809-BMC'})",
- "Type": "Board"
+ "Type": "Board",
+ "xyz.openbmc_project.Inventory.Item.NetworkInterface": {
+ "MACAddress": "$MAC_BOARD_INFO_AM2"
+ }
}