- May 12, 2023
-
-
Lakshmi Yadlapati authored
When the Generation field of a PCIeSlot object in D-Bus is set to "xyz.openbmc_project.Inventory.Item.PCIeSlot.Generations.Unknown", pcie_slots was returning an invalid PCIeType of "false". This caused the Redfish validator to fail. To resolve this, the code has been updated to not return the PCIeType if the Generation field is empty or unknown. Tested: Validator passed ''' busctl get-property -j xyz.openbmc_project.Inventory.Manager \ /xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/nvme0 \ xyz.openbmc_project.Inventory.Item.PCIeSlot Generation { "type" : "s", "data" : "xyz.openbmc_project.Inventory.Item.PCIeSlot.Generations.Unknown" } curl -k https://$bmc/redfish/v1/Chassis/chassis/PCIeSlots { "@odata.id": "/redfish/v1/Chassis/chassis/PCIeSlots", "@odata.type": "#PCIeSlots.v1_4_1.PCIeSlots", "Id": "1", "Name": "PCIe Slot Information", "Slots": [ { "HotPluggable": false, "Lanes": 0, "SlotType": "U2" }, ..... } busctl set-property xyz.openbmc_project.Inventory.Manager \ /xyz/openbmc_project/inventory/system/chassis/motherboard/disk_backplane0/nvme0 \ xyz.openbmc_project.Inventory.Item.PCIeSlot Generation s \ xyz.openbmc_project.Inventory.Item.PCIeSlot.Generations.Gen1 curl -k https://$bmc/redfish/v1/Chassis/chassis/PCIeSlots { "@odata.id": "/redfish/v1/Chassis/chassis/PCIeSlots", "@odata.type": "#PCIeSlots.v1_4_1.PCIeSlots", "Id": "1", "Name": "PCIe Slot Information", "Slots": [ { "HotPluggable": false, "Lanes": 0, "PCIeType": "Gen1", "SlotType": "U2" }, .... } ''' Change-Id: I143ce7e90cf24447a667a09d946e42f00c091a64 Signed-off-by:
Lakshmi Yadlapati <lakshmiy@us.ibm.com>
-
Lakshmi Yadlapati authored
This commit is to add state information according to the Redfish PCIeDevice schema. Default state is "Enabled". ref: https://redfish.dmtf.org/schemas/v1/PCIeDevice.v1_9_0.json Tested: Validator passed ''' curl -k https://$bmc/redfish/v1/Systems/system/PCIeDevices/pcie_card8 { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card8", "@odata.type": "#PCIeDevice.v1_9_0.PCIeDevice", "Id": "pcie_card8", "Manufacturer": "", "Model": "6B87", "Name": "PCIe Device", "PCIeFunctions": { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card8/PCIeFunctions" }, "PCIeInterface": { "LanesInUse": -1 }, "PartNumber": "03FL194", "SerialNumber": "Y131UF09S00J", "Slot": { "Location": { "PartLocation": { "ServiceLabel": "U78DB.ND0.WZS0018-P0-C8" } } }, "SparePartNumber": "03FL195", "Status": { "Health": "OK", "State": "Enabled" } } ''' Change-Id: Ibee01345c81c2e824fc2387c4f27e421b3f4c507 Signed-off-by:
Lakshmi Yadlapati <lakshmiy@us.ibm.com>
-
Lakshmi Yadlapati authored
Remove Manufacturer from the PCIeDevice's PCIeInterface and fix the following Redfish validator error: ERROR - Manufacturer not defined in Complex PCIeInterface PCIeDevice.v1_3_0.PCIeInterface (check version, spelling and casing) This error is because there is no ["PCIeInterface"]["Manufacturer"] at https://redfish.dmtf.org/schemas/v1/PCIeDevice.v1_11_0.json. "Manufacturer" is already part of the root PCIeDevice and is implemented on line 219. On the backend "Manufacturer" is already part of Asset interface so remove it from PCIeDevice interface in peci-pcie and phosphor-dbus-interface. phosphor-dbus-interfaces commit: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/61738 peci-pcie commit: https://gerrit.openbmc.org/c/openbmc/peci-pcie/+/62256 Tested: ``` curl -k https://$bmc/redfish/v1/Systems/system/PCIeDevices/pcie_card10 { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card10", "@odata.type": "#PCIeDevice.v1_9_0.PCIeDevice", "Id": "pcie_card10", "Manufacturer": "", "Model": "6B87", "Name": "PCIe Device", "PCIeFunctions": { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card10/PCIeFunctions" }, "PCIeInterface": { "LanesInUse": 16, "PCIeType": "Gen4" }, "PartNumber": "03FL204", "SerialNumber": "YA31UF07200Z", "Slot": { "Location": { "PartLocation": { "ServiceLabel": "U78DA.ND0.WZS003T-P0-C10" } } }, "SparePartNumber": "03FL205" } ``` Change-Id: I860bf60f6fa3cc5d6b57f945d781e7dcafc17d7f Signed-off-by:
Lakshmi Yadlapati <lakshmiy@us.ibm.com>
-
This reverts commit 02e01b51. This commit is being reverted because it causes login failures on Firefox browsers. This commit originally was added with the idea that it did not fix anything on upstream, but made some peoples forks better. It appears to have broken some upstream things, so the right thing to do is to revert it until those breakages can be understood. Signed-off-by:
Ed Tanous <edtanous@google.com> Change-Id: I04de84fca1a8de657f6941653f2a3e595ee725d5
-
Ed Tanous authored
The latest version of the specification is 1.17.0, and arguably, we should be updating this every time we pull in any new feature, but that hasn't happened. So far as I'm aware, there are no tools that actually look at this parameter to make branching decisions in the client about supported features, so the likelihood this has impact is basically nil. Tested: GET /redfish/v1 returns RedfishVersion of 1.17.0 Redfish service validator passes. Signed-off-by:
Ed Tanous <edtanous@google.com> Change-Id: I055b6010329599b7b39c587fa85faf51a38c9b57
-
Patrick Williams authored
It seems like clang-tidy doesn't catch every place that an emplace could be used instead of a push. Use a few grep/sed pairs to find and fix up some common patterns. Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: I93eaec26b8e3be240599e92b66cf54947073dc4c
-
Patrick Williams authored
clang-tidy warns as follows: ``` /data0/jenkins/workspace/ci-repository/openbmc/bmcweb/redfish-core/lib/systems.hpp:292:13: error: loop will run at most once (loop increment never executed) [clang-diagnostic-unreachable-code-loop-increment,-warnings-as-errors] for (const auto& connection : connectionNames) ``` It seems as though the break is stray so remove it. Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: Iafafb6634819a7f37a1cdd9c4a93e1c426d5dfc5
-
Patrick Williams authored
There is code in ibm/locks that has had clang-tidy warnings disabled for a while due to multiple safety and endianness issues. The code has not been fixed in a while and with clang-16 it is unable to be exempted further. Disable it until someone who cares can fix this in the proper way. ``` ../include/ibm/locks.hpp:522:14: error: 'p' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage] uint8_t* p = reinterpret_cast<uint8_t*>(&resourceId1); ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../include/ibm/locks.hpp:527:25: note: used in buffer access here uint8_t pPosition = p[position]; ^ ../include/ibm/locks.hpp:524:14: error: 'q' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage] uint8_t* q = reinterpret_cast<uint8_t*>(&resourceId2); ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../include/ibm/locks.hpp:529:25: note: used in buffer access here uint8_t qPosition = q[position]; ``` Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: I8a7fcbed1099419ad1715c86ffcbfef20820251e
-
Patrick Williams authored
The clang-tidy warning 'modernize-use-emplace' correctly flags a few places where emplace should be used over push. Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: I6ca79285a87d6927e718345dc8dce0387e6b1eda
-
Patrick Williams authored
``` /data0/jenkins/workspace/ci-repository/openbmc/bmcweb/http/verb.hpp:51:12: error: 'return' will never be executed [clang-diagnostic-unreachable-code-return,-warnings-as-errors] /data0/jenkins/workspace/ci-repository/openbmc/bmcweb/http/utility.hpp:99:12: error: 'return' will never be executed [clang-diagnostic-unreachable-code-return,-warnings-as-errors] /data0/jenkins/workspace/ci-repository/openbmc/bmcweb/redfish-core/include/utils/query_param.hpp:272:13: error: 'break' will never be executed [clang-diagnostic-unreachable-code-break,-warnings-as-errors] ``` Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia74f4fb4f34875097d1ef04b26e40908cc175088
-
Patrick Williams authored
``` /data0/jenkins/workspace/ci-repository/openbmc/bmcweb/redfish-core/lib/chassis.hpp:130:13: error: loop will run at most once (loop increment never executed) [clang-diagnostic-unreachable-code-loop-increment,-warnings-as-errors] for (const auto& service : object.second) ``` Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: I3d7743115ec31d6f704a857f3e878fa1b7728a60
-
Patrick Williams authored
``` /data0/jenkins/workspace/ci-repository/openbmc/bmcweb/http/app.hpp:27:9: error: macro is not used [clang-diagnostic-unused-macros,-warnings-as-errors] #define BMCWEB_ROUTE(app, url) ``` Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: I49b6239d7d5f31c52af6f6e5b0bc57be22a299b5
-
Patrick Williams authored
``` /data0/jenkins/workspace/ci-repository/openbmc/bmcweb/http/logging.hpp:132:9: error: macro is not used [clang-diagnostic-unused-macros,-warnings-as-errors] #define BMCWEB_LOG_CRITICAL ``` Add NOLINTBEGIN/NOLINTEND guards around the whole of the macro definitions because there are now multiple clang-tidy warning types that call out this behavior, but we want it in this case. Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: Iac2ee839999f36424ca6dfed212d0bad0a2f3ae5
-
Patrick Williams authored
``` ../redfish-core/lib/certificate_service.hpp:154:32: error: 'i' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage] std::string_view::iterator i = value.begin(); ``` Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: I6b6fb17d58bb7a3bd861aaf020540586490693da
-
Ed Tanous authored
Json has a bunch of implicit overloaded operators for comparing vectors/arrays/maps with their json counterparts. Unfortunately, when used in unit tests, these cause warnings in clang, so update the code to use the ElementsAre check from gmock. Signed-off-by:
Ed Tanous <edtanous@google.com> Change-Id: I658557cb59d568fd50cf6f3bef73d6f90b5c56cf
-
Patrick Williams authored
A number of similar warnings about unsafe pointer arithmetic. ``` ../redfish-core/lib/log_services.hpp:269:39: error: unsafe pointer arithmetic [-Werror,-Wunsafe-buffer-usage] indexStr.data(), indexStr.data() + indexStr.size(), index); ``` Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: Icc4a0d2f418c76d6987ef2318b0098d30d116389
-
- May 11, 2023
-
-
Patrick Williams authored
``` ../redfish-core/include/utils/query_param.hpp:287:51: error: unsafe pointer arithmetic [-Werror,-Wunsafe-buffer-usage] auto it = std::from_chars(value.data(), value.data() + value.size(), ~~~~~~^~~~~~ ../redfish-core/include/utils/query_param.hpp:307:45: error: unsafe pointer arithmetic [-Werror,-Wunsafe-buffer-usage] std::from_chars(value.data(), value.data() + value.size(), param); ``` Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic93d3e98e0539f5c7068b93ff7e4505fdd5bbfe1
-
Patrick Williams authored
``` ../include/json_html_serializer.hpp:426:42: error: 'end' declared with a const-qualified typedef; results in the type being 'char *const' instead of 'const char *' [misc-misplaced-const,-warnings-as-errors] const std::array<char, 64>::iterator end = ^ /usr/lib/gcc/x86_64-pc-linux-gnu/12/include/g++-v12/array:106:44: note: typedef declared here typedef value_type* iterator; ../include/json_html_serializer.hpp:165:60: error: unsafe pointer arithmetic [-Werror,-Wunsafe-buffer-usage] std::snprintf(stringBuffer.data() + bytes, 7, ../include/json_html_serializer.hpp:327:11: error: 'bufferPtr' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage] auto* bufferPtr = begin(numberbuffer); ../include/json_html_serializer.hpp:393:11: error: 'begin' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage] char* begin = numberbuffer.data(); ../include/json_html_serializer.hpp:425:56: error: unsafe pointer arithmetic [-Werror,-Wunsafe-buffer-usage] std::remove(numberbuffer.begin(), numberbuffer.begin() + len, ','); ``` Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: If6aaf038c939ad76da73e68e746a56b0905b2804
-
Patrick Williams authored
``` ../http/mutual_tls.hpp:77:35: error: unsafe buffer access [-Werror,-Wunsafe-buffer-usage] unsigned char usageChar = usage->data[i]; ``` Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: Icc6905f31fdd54b683fe7807eb72e9b78437b2d1
-
Patrick Williams authored
``` ../include/pam_authenticate.hpp:11:75: error: 'msg' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage] inline int pamFunctionConversation(int numMsg, const struct pam_message** msg, ``` Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic0e6d63b01eea78cac54407246363177cb208f8b
-
Patrick Williams authored
``` ../include/multipart_parser.hpp:77:21: error: 'buffer' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage] const char* buffer = req.body().data(); ../include/multipart_parser.hpp:246:38: error: 'buffer' is an unsafe pointer used for buffer access [-Werror,-Wunsafe-buffer-usage] void skipNonBoundary(const char* buffer, size_t len, size_t boundaryEnd, ``` Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: Iad3b4b241ec75a152e240755a307a970798079fb
-
Patrick Williams authored
The code already does size checking to ensure that buffer overruns are not done, so switch to using operator[] rather than pointer arithmetic. ``` ../redfish-core/include/utils/time_utils.hpp:71:19: error: unsafe pointer arithmetic [-Werror,-Wunsafe-buffer-usage] end = fmt.data() + pos; ``` Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: Iaabe82d7c1621dc27ad10288732609dfd0516d17
-
- May 10, 2023
-
-
Patrick Williams authored
Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: I8122bfffaac469ee551c72632b671e8644a4da44
-
Patrick Williams authored
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository. Change-Id: I75f89d2959b0f1338c20d72ad669fbdc1d720835 Signed-off-by:
Patrick Williams <patrick@stwcx.xyz>
-
Notice a bug of patching existed object if the object name contains space or underscore. Normally dbus replace space with underscore for object path. Replacing all spaces in input name with underscore to find the correct dbus object path. Tested results: - Add new object Input JSON ``` { "Oem": { "OpenBmc": { "Fan": { "StepwiseControllers": { "Test_1": { "Direction": "Floor", "Inputs": [ "MB_U402_THERM_LOCAL" ], "NegativeHysteresis": 0.0, "PositiveHysteresis": 0.0, "Steps": [ { "Output": 0.0, "Target": 48.0 }, { "Output": 40.0, "Target": 52.0 } ], "Zones": [ { "@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanZones/Zone0" } ] } } } } } } ``` Check result from /redfish/v1/Managers/bmc ``` "Test_1": { "@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/StepwiseControllers/Test_1", "@odata.type": "#OemManager.StepwiseController", "Direction": "Floor", "Inputs": [ "MB U402 THERM LOCAL" ], "NegativeHysteresis": 0.0, "PositiveHysteresis": 0.0, "Steps": [ { "Output": 0.0, "Target": 48.0 }, { "Output": 40.0, "Target": 52.0 } ], "Zones": [ { "@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanZones/Zone0" } ] } ``` - Patching existed object successful Input JSON ``` { "Oem": { "OpenBmc": { "Fan": { "StepwiseControllers": { "Test_1": { "NegativeHysteresis": 0.0, "PositiveHysteresis": 5.0, } } } } } } ``` Check result from /redfish/v1/Managers/bmc ``` "Test_1": { "@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/StepwiseControllers/Test_1", "@odata.type": "#OemManager.StepwiseController", "Direction": "Floor", "Inputs": [ "MB U402 THERM LOCAL" ], "NegativeHysteresis": 0.0, "PositiveHysteresis": 5.0, "Steps": [ { "Output": 0.0, "Target": 48.0 }, { "Output": 40.0, "Target": 52.0 } ], "Zones": [ { "@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanZones/Zone0" } ] } ``` Signed-off-by:
Potin Lai <potin.lai@quantatw.com> Change-Id: I12c78e52801bd0814ba2d928cf020e0a04214c39
-
- May 05, 2023
-
-
In order to be able to more easily debug bmcweb related issue, a new meson option is added to set a specific logging level Which generates the targeted logging traces rather than all of debug traces. The current option -Dbmcweb-logging which can be either disabled or enabled is changed to allow to set the log level for the specific level traces (e.g. error or critical traces) to be written to the journal. -Dbmcweb-logging=<log-level> where <log-level> can be disabled, enabled, debug, info, warning, error, or critical. - `disabled`: Turns off all bmcweb log traces. - `enabled` : treated as `debug` - Other option can be described in [Logging Levels](DEVELOPING.md). For an example, to enable only 'error', 'critical' log entries, bmcweb can be built with -Dbmcweb-logging=error Testing: - Verified that only the specific logs (e.g. error and critical logs) were displayed by compiling bmcweb with the specific bmcweb-logging level. Change-Id: I522ca26700ea420fee1a5cf688d3e8c6661f2f55 Signed-off-by:
Myung Bae <myungbae@us.ibm.com>
-
- May 04, 2023
-
-
Fix lookup for existing powersupplies when building json. (dbus: '_' , json: ' ') Tested: manually with 2 Supermicro Power Supplies. Change-Id: Iecd14c0b9860a12c64b004c99cb6a7fb1dd0328a Signed-off-by:
Alexander Hansen <alexander.hansen@9elements.com>
-
Lakshmi Yadlapati authored
The current call to getSubTreePaths is using a depth of 1, which limits the search to only the direct children of the inventoryPath. However, the interface may be found at any depth in the subtree, so the depth parameter should be set to 0 to search the entire subtree, in order to ensure that all relevant objects are included in the search results. getValidPCIeDevicePath and getPCIeDeviceList should call getSubTreePaths with the same depth parameter value to ensure that the same level of the PCIe device tree is being searched for devices. Tested: Validator passed Change-Id: Ic990581ef186f4bf1511a221c4e305ff6c2afdf2 Signed-off-by:
Lakshmi Yadlapati <lakshmiy@us.ibm.com>
-
- May 02, 2023
-
-
Jayaprakash Mutyala authored
bmcweb crashes when user not providing userName or password while posting ISO form Redfish. This fix provides to avoid bmcweb crash when user try to post ISO images from Redfish without providing username or password. Tested: Redfish validator passed with this change. Verified by Posting ISO from Redfish. Signed-off-by:
Arun Kapale <arunx.kapale@intel.com> Signed-off-by:
Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com> Change-Id: Ib9c7ed668f13943bdacdd9afda0e65d6bcc438d0
-
Adds a function to process responses from URIs that are uptree from a top level collection. A follow-up patch will hook this into the aggregation code to allow adding links to top level collections which are only supported by satellite BMCs. Adds test cases to validate this function is working correctly. Tested: New test cases pass Signed-off-by:
Carson Labrado <clabrado@google.com> Change-Id: I7f0fd6c3955398e2fde136c1d3b37a6bf4bf06b9
-
- May 01, 2023
-
-
Lakshmi Yadlapati authored
Specify correct interface for getSubTreePaths in getPCIeDeviceList. This commit addresses a Redfish validator failure that occurred after a previous commit. ''' https://github.com/openbmc/bmcweb/commit/94c3a10b94c3ce063d6c1aed3a597f0d524594d5 ''' Both the inventory path and interface were incorrect, and the inventory path was fixed in the previous commit. This commit fixes the interface in the getSubTreePaths function to ensure that it returns the correct PCIeDevice list. Without the correct interface, the function was returning incorrect devices, which was causing the Redfish validator failure. Tested: Validator passed for PCIeDevice Change-Id: Iab6a26ee0dd933be6cf371bdd13e5d10d6d10efa Signed-off-by:
Lakshmi Yadlapati <lakshmiy@us.ibm.com>
-
- Apr 28, 2023
-
-
Lakshmi Yadlapati authored
Remove unused variable pcieService, fix pciePath and use global variables pciePath and pcieDeviceInterface. Tested: tested PCIeDeviceCollection and PCIeDevice, and tested the changes with the peci-pcie commit https://gerrit.openbmc.org/c/openbmc/peci-pcie/+/62100 Change-Id: Iff8aee3f8bc43740b1885a2da584b0e6cf579dcc Signed-off-by:
Lakshmi Yadlapati <lakshmiy@us.ibm.com>
-
SunnySrivastava1984 authored
This commit publishes inventory properties like SparePartNumber, Model, PartNumber, SerialNumber, Manufacturer for PCIe devices. Tested: Validator passed ``` "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card10", "@odata.type": "#PCIeDevice.v1_9_0.PCIeDevice", "Id": "pcie_card10", "Manufacturer": "", "Model": "6B87", "Name": "PCIe Device", "PCIeFunctions": { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card10/PCIeFunctions" }, "PCIeInterface": { "LanesInUse": 16, "PCIeType": "Gen4" }, "PartNumber": "03FL204", "SerialNumber": "YA31UF07200Z", "SparePartNumber": "03FL205" ``` Signed-off-by:
Sunny Srivastava <sunnsr25@in.ibm.com> Change-Id: I850fe5eb2b3b3b9d47f4256ce0c4408bb1dd2bd1 Signed-off-by:
Lakshmi Yadlapati <lakshmiy@us.ibm.com>
-
Lakshmi Yadlapati authored
Move SystemPCIeFunction to a separate method, and refactor the code. Validate the PCIe device path and add link header. Tested: Validator passed ``` { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card7/PCIeFunctions/0", "@odata.type": "#PCIeFunction.v1_2_3.PCIeFunction", "ClassCode": "0x020000", "DeviceId": "0x1657", "FunctionId": 0, "Id": "0", "Links": { "PCIeDevice": { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card7" } }, "Name": "PCIe Function", "RevisionId": "0x01", "SubsystemId": "0x0420", "SubsystemVendorId": "0x1014", "VendorId": "0x14e4" } ``` Change-Id: I99add03210983a255a615512b6137d04982f83a5 Signed-off-by:
Lakshmi Yadlapati <lakshmiy@us.ibm.com>
-
Lakshmi Yadlapati authored
Move SystemPCIeFunctionCollection to a separate method, and refactor the code. Validate the PCIe device path and add link header. Tested: Validator passed ``` { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card7/PCIeFunctions", "@odata.type": "#PCIeFunctionCollection.PCIeFunctionCollection", "Description": "Collection of PCIe Functions for PCIe Device pcie_card7", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card7/PCIeFunctions/0" } ], "Name": "PCIe Function Collection", "PCIeFunctions@odata.count": 1 } ``` Change-Id: I5aa10ce0b4d2f20104612f840cf4098698a83470 Signed-off-by:
Lakshmi Yadlapati <lakshmiy@us.ibm.com>
-
Lakshmi Yadlapati authored
Move SystemPCIeDevice to a separate method, and refactor the code. Validate the PCIe device path. Tested: Validator passed ```# curl -k https://$bmc/redfish/v1/Systems/system/PCIeDevices/pcie_card7 { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card7", "@odata.type": "#PCIeDevice.v1_9_0.PCIeDevice", "Id": "pcie_card7", "Name": "PCIe Device", "PCIeInterface": { "LanesInUse": 4, "PCIeType": "Gen1" } } ``` Change-Id: Ib9bd3ff37293b64adbf9987c3d932882befd21d4 Signed-off-by:
Lakshmi Yadlapati <lakshmiy@us.ibm.com>
-
Lakshmi Yadlapati authored
Move PCIe device interface to "xyz.openbmc_project.Inventory.Item.PCIeDevice". peci-pcie commit: https://gerrit.openbmc.org/c/openbmc/peci-pcie/+/62100 Tested: Validator passed Change-Id: Ica6f4ca37bf9adca18bedc69422ff05f0c7d73f2 Signed-off-by:
Lakshmi Yadlapati <lakshmiy@us.ibm.com>
-
Reason: I will be leaving OpenBmc project soon. Change-Id: I726eaafe38a15636fd855b591bb73b5c62108a5a Signed-off-by:
Krzysztof Grobelny <krzysztof.grobelny@intel.com>
-
- Apr 27, 2023
-
-
It isn't used anywhere in the code, so it can be removed, and the router simplified. These common data structures have caused problems, in that they're not copied to child handlers, and cause bugs like #249. Tested: Redfish service validator passes. Basic sanity tests of both static file routes such as $metadata (which use DynamicRule) as well as method routes, such as /redfish/v1, return valid data. Signed-off-by:
Ed Tanous <edtanous@google.com> Change-Id: I93ad74581912e18ee5db9aaa9ecdaf08ed765418
-
The router historically came from crow. Crow supported wildcards of <int>, <float>, and <double>. bmcweb doesn't use them, nor should it in basically any case, as we now have explicit 404 handling. This commit removes them. This amounts to about -450 lines of code, but it's some of the scarier code we have, some of it existing in the namespace "black_magic". Reducing the brain debt for people working in this subsystem seems worthwhile. There is no case in the future where we would use integer based url parameters. Tested: Redfish service validator passes. Should be good enough coverage for a code removal. Signed-off-by:
Ed Tanous <edtanous@google.com> Change-Id: I34add8df7d3486952474ca7ec3dc6be990c50ed0
-