ibm-openbmc / dev

Product Development Project Mgmt and Tracking
16 stars 2 forks source link

refactor assembly code to retrieve list ChassisAssembly #3570

Closed patelabhishek9893 closed 1 year ago

patelabhishek9893 commented 2 years ago

Chassis Assembly and cable and PCIe_slots have command code where they try to retrieve the Chassis Assembly list. and based on in shorted order and then from that list based on index number it set link number. EX: check https://rain118bmc.aus.stglabs.ibm.com/redfish/v1/Chassis/chassis/Assembly Assemblies -> "@odata.id": ["/redfish/v1/Chassis/chassis/Assembly#/Assemblies/0"]

currently, cable.hpp and PCIe_slots.hpp use command code to retrieve indiex number. but in assembly, there is more than just retrieving index happening. Assembly has two methods, GET and PATCH; we need to be shorted index (Assembly list) in both cases.

setLocationIndicatorActiveFlag bool variable determine it is patch call or get call.

we like to refactor this code so that all these three can use command code.

one way to do this. is to create call back method for GET and one For PATCH. and when we retrieve the list, then after call this different method based on requirement.

rfrandse commented 1 year ago

tracking in jira