Change PCIeFunctions count to Members@odata.count
This fix changes the incorrect "PCIeFunctions@odata.count" to the
correct "Members@odata.count" for the PCIeFunctionCollection[1].
addPCIeFunctionList() is only called from one place,
handlePCIeFunctionCollectionGet(). PCIeDevice[2] has a
"PCIeFunctions@odata.count" which is probably where this wrong property
came from.
As [1] shows "Members@odata.count" is required. The validator would flag
this for missing a required property and for an incorrect property.
```
"required": [
"Members",
"Members@odata.count",
"@odata.id",
"@odata.type",
"Name"
],
```
A refactor commit 2.5 years ago appears to have broke this, no idea why
at that time it got changed.[3]
[1]: https://redfish.dmtf.org/schemas/v1/PCIeFunctionCollection.json
[2]: https://redfish.dmtf.org/schemas/v1/PCIeDevice.v1_19_0.json
[3]: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/61627
Tested : Tested on ast2600 platform
Change-Id: I7058900cbfafa744e9855a70eade4b4a46d6ffa7
Signed-off-by: Sandeep Patil <sandeepap@ami.com>
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/redfish-core/lib/pcie.hpp b/redfish-core/lib/pcie.hpp
index 917da89..36dc920 100644
--- a/redfish-core/lib/pcie.hpp
+++ b/redfish-core/lib/pcie.hpp
@@ -651,7 +651,7 @@
std::to_string(functionNum));
pcieFunctionList.emplace_back(std::move(pcieFunction));
}
- res.jsonValue["PCIeFunctions@odata.count"] = pcieFunctionList.size();
+ res.jsonValue["Members@odata.count"] = pcieFunctionList.size();
}
inline void handlePCIeFunctionCollectionGet(