Skip to content

Commit 9755200

Browse files
Update MEX PSU associations (ibm-openbmc#398)
Updating new associations for PSU, Fan, LEDs. PDI has modified associations names for PSUs Fans and LEDs PSU - (powering, powered_by) Fan - (cooling, cooled_by) LEDs - (identifying, identified_by) So making the changes in PLDM so that redfish client shall be able to access it. Tested: Fetched PSUs and Fans under Mex using redfish GET query. Received the expected response. Signed-off-by: Archana Kakani <[email protected]>
1 parent 79e1708 commit 9755200

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

configurations/host/host_fru_associations.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
{
3434
"from_entity_type": 45,
3535
"to_entity_type": 93,
36-
"forward_association": "all_sensors",
37-
"reverse_association": "chassis"
36+
"forward_association": "cooled_by",
37+
"reverse_association": "cooling"
3838
},
3939
{
4040
"from_entity_type": 45,
@@ -57,8 +57,8 @@
5757
{
5858
"from_entity_type": 120,
5959
"to_entity_type": 45,
60-
"forward_association": "chassis",
61-
"reverse_association": "inventory"
60+
"forward_association": "powering",
61+
"reverse_association": "powered_by"
6262
},
6363
{
6464
"from_entity_type": 186,

host-bmc/host_pdr_handler.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ using Json = nlohmann::json;
3535
namespace fs = std::filesystem;
3636
using namespace pldm::dbus;
3737
constexpr auto fruJson = "host_frus.json";
38+
constexpr auto ledFwdAssociation = "identifying";
39+
constexpr auto ledReverseAssociation = "identified_by";
3840
const Json emptyJson{};
3941
const std::vector<Json> emptyJsonList{};
4042

@@ -1557,8 +1559,8 @@ void HostPDRHandler::getPresentStateBySensorReadigs(
15571559
state == PLDM_STATE_SET_IDENTIFY_STATE_ASSERTED,
15581560
hostEffecterParser, mctpEid);
15591561
std::vector<std::tuple<std::string, std::string, std::string>>
1560-
associations{{"identify_led_group",
1561-
"identify_inventory_object", ledGroupPath}};
1562+
associations{{ledFwdAssociation, ledReverseAssociation,
1563+
ledGroupPath}};
15621564
CustomDBus::getCustomDBus().setAssociations(path, associations);
15631565
}
15641566
}

0 commit comments

Comments
 (0)