#
f7e62c14
|
| 07-Sep-2025 |
Myung Bae <myungbae@us.ibm.com> |
Use getAssetInfo util function
This commit is to use getAssetInfo utility function for GET AssetInfo in various places like
- Chassis - FabricAdapter This will also include `Manufacturer` propert
Use getAssetInfo util function
This commit is to use getAssetInfo utility function for GET AssetInfo in various places like
- Chassis - FabricAdapter This will also include `Manufacturer` property if available on dbus. - Fan - PCIeDevice - PowerSupply - Storage - System
Tested: - GET the above schemas - Redfish Service Validator passes
Change-Id: I9d01d583212fe4916d5fdd144d2b8e52ad865d16 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
#
42f54ec8
|
| 19-Aug-2025 |
Ed Tanous <etanous@nvidia.com> |
Remove unused methods
Converting hpp -> cpp determined that these functions were unused. Fix them.
Tested: Code compiles.
Change-Id: Ifb712cb12085c187847666194b59caa959f37f83 Signed-off-by: Ed Ta
Remove unused methods
Converting hpp -> cpp determined that these functions were unused. Fix them.
Tested: Code compiles.
Change-Id: Ifb712cb12085c187847666194b59caa959f37f83 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
67f0b9c0
|
| 23-Jun-2025 |
Myung Bae <myungbae@us.ibm.com> |
Enhance log traces related to PCIe association errors
When Redfish PCIeDevice GET fails due to the association error, sometimes it may be difficult to debug the root cause as bmcweb log entries do n
Enhance log traces related to PCIe association errors
When Redfish PCIeDevice GET fails due to the association error, sometimes it may be difficult to debug the root cause as bmcweb log entries do not show the related dbus object paths.
This commit is to enhance ffdc log traces to show dbus object paths if the association is in error.
The areas of the changes are: - the association error between pcie device to pcieSlot
Tested: - Redfish Service Validator runs and passes
Change-Id: I507260c38d7b7ba735832b470122b86967c22343 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
#
d7857201
|
| 28-Jan-2025 |
Ed Tanous <etanous@nvidia.com> |
Fix includes
Clang-tidy misc-include-cleaner appears to now be enforcing significantly more headers than previously. That is overall a good thing, but forces us to fix some issues. This commit is
Fix includes
Clang-tidy misc-include-cleaner appears to now be enforcing significantly more headers than previously. That is overall a good thing, but forces us to fix some issues. This commit is largely just taking the clang-recommended fixes and checking them in. Subsequent patches will fix the more unique issues.
Note, that a number of new ignores are added into the .clang-tidy file. These can be cleaned up over time as they're understood. The majority are places where boost includes a impl/x.hpp and x.hpp, but expects you to use the later. include-cleaner opts for the impl, but it isn't clear why.
Change-Id: Id3fdd7ee6df6c33b2fd35626898523048dd51bfb Signed-off-by: Ed Tanous <etanous@nvidia.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
40e9b92e
|
| 10-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Use SPDX identifiers
SPDX identifiers are simpler, and reduce the amount of cruft we have in code files. They are recommended by linux foundation, and therefore we should do as they allow.
This pa
Use SPDX identifiers
SPDX identifiers are simpler, and reduce the amount of cruft we have in code files. They are recommended by linux foundation, and therefore we should do as they allow.
This patchset does not intend to modify any intent on any existing copyrights or licenses, only to standardize their inclusion.
[1] https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects
Change-Id: I935c7c0156caa78fc368c929cebd0f068031e830 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
a6bd55b0
|
| 13-Jan-2025 |
Gunnar Mills <gmills@us.ibm.com> |
Add path of problem device to trace
Needed this to debug a problem. Makes this trace a lot more useful.
Tested: This now printed the devices causing the problems.
Change-Id: I0cb1529cfa9fec4334730
Add path of problem device to trace
Needed this to debug a problem. Makes this trace a lot more useful.
Tested: This now printed the devices causing the problems.
Change-Id: I0cb1529cfa9fec4334730cab1cf2010a00218b6e Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
show more ...
|
#
deae6a78
|
| 11-Nov-2024 |
Ed Tanous <etanous@nvidia.com> |
Move getProperty calls to utility
Having all dbus calls run through the same utility reduces the amount of generated code, and more importantly, gives us a place where we can log the requests and re
Move getProperty calls to utility
Having all dbus calls run through the same utility reduces the amount of generated code, and more importantly, gives us a place where we can log the requests and responses to help with debugging.
Tested: Redfish service validator passes.
Change-Id: Ic1bf45130b5069cd57f7af26e12c8d3159c87c67 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
6be832e2
|
| 10-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
Remove duplicated block comments
Static analysis flags that these two comments are redundant[1], which seem to be duplicated a lot in copyright headers. Although there is a larger discussion that c
Remove duplicated block comments
Static analysis flags that these two comments are redundant[1], which seem to be duplicated a lot in copyright headers. Although there is a larger discussion that can likely be had.
[1] https://sonarcloud.io/project/issues?issueStatuses=OPEN%2CCONFIRMED&id=edtanous_bmcweb&open=AY9_HYjgKXKyw1ZFwgVP
Tested: Comment change only. Code compiles.
Change-Id: Ia960317761f558a87842347ca0b5f3da63f8e730 Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
4ff0f1f4
|
| 04-Sep-2024 |
Ed Tanous <etanous@nvidia.com> |
static -> inline
Declaring a function static in a header makes no sense, because a header isn't a compile unit. Find all the issues and replace them with inline.
Change-Id: Icfc2b72d94b41a3a880da1
static -> inline
Declaring a function static in a header makes no sense, because a header isn't a compile unit. Find all the issues and replace them with inline.
Change-Id: Icfc2b72d94b41a3a880da1ae6975beaa30a6792b Signed-off-by: Ed Tanous <etanous@nvidia.com>
show more ...
|
#
3a58c5a8
|
| 05-Aug-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
Require Inventory.Item.PCIeDevice for PCIe objects
Currently when bmcweb tries to get PCIe device service it checks only path and doesn't limit search by any required interface. This can lead to wro
Require Inventory.Item.PCIeDevice for PCIe objects
Currently when bmcweb tries to get PCIe device service it checks only path and doesn't limit search by any required interface. This can lead to wrong result if the 'xyz.openbmc_project.ObjectMapper' for example have object with the same path. To fix the issue require xyz.openbmc_project.Inventory.Item.PCIeDevice interface to be present in the object.
Tested: Patchest was tested on the system with a DBUS service that has objects with the "xyz.openbmc_project.Inventory.Item.PCIeDevice" interface.
Before the change request to the PCIe device endpoint like /redfish/v1/Systems/system/PCIeDevices/Bus_00_Device_00 outputs internal error message.
After the change request to the PCIe device endpoint like /redfish/v1/Systems/system/PCIeDevices/Bus_00_Device_00 outputs detailed PCIe device info including all the relevant links to its PCIe functions.
Change-Id: I25d60533fa8f7bdda26c81bde1fa0a88c25365f6 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
#
bd79bce8
|
| 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: Iceec1dc95b6c908ec6c21fb40093de9dd18bf11a Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
22a1b15a
|
| 05-Aug-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
Remove "Function wasn't a string?" messages for PCIe
Currently for every PCIe function bmcweb checks every property of the "xyz.openbmc_project.Inventory.Item.PCIeDevice" interface if it is a string
Remove "Function wasn't a string?" messages for PCIe
Currently for every PCIe function bmcweb checks every property of the "xyz.openbmc_project.Inventory.Item.PCIeDevice" interface if it is a string. And if it is not the message "Function wasn't a string?" is produced. This is wrong since the properties "MaxLanes" and "LanesInUse" are not strings but integers. Drop the error print statement to remove the false error messages.
Change-Id: I1cc082e5aaf392b0cc4c051ab0bc6d8418aed0f9 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
#
539d8c6b
|
| 19-Jun-2024 |
Ed Tanous <ed@tanous.net> |
Consistently use generated enumerations
This commit causes all of Redfish to use generated enum values for enum types. Using generated code prevents problems, and makes it more clear what types are
Consistently use generated enumerations
This commit causes all of Redfish to use generated enum values for enum types. Using generated code prevents problems, and makes it more clear what types are allowed.
Doing this found two places where we had structs that didn't fulfill the schema. They have been commented, but will be fixed with a breaking change at some point in the future.
Tested: WIP
Change-Id: I5fdd2f2dfb6ec05606a522e1f4e331f982c8e476 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
8c1d0549
|
| 12-Mar-2024 |
Myung Bae <myungbae@us.ibm.com> |
Fix handling of lanesInUse default value
phophor-dbus-interfaces changes the default of lanesInUse to MAXINT by https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/53650
Thus bmcweb als
Fix handling of lanesInUse default value
phophor-dbus-interfaces changes the default of lanesInUse to MAXINT by https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/53650
Thus bmcweb also changes the logic to show the field as null if it is MAXINT.
Change-Id: Ib229112374eb5a65e0a8ac97669c09c498ac26c7 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
#
253f11b8
|
| 16-May-2024 |
Ed Tanous <ed@tanous.net> |
Allow configuring "bmc" and "system"
In the early days of bmcweb, we made two pretty critical assumptions; First, is that a given platform would only have a single BMC instance (represented as "bmc"
Allow configuring "bmc" and "system"
In the early days of bmcweb, we made two pretty critical assumptions; First, is that a given platform would only have a single BMC instance (represented as "bmc") and a single host instance (represented as "system"). Second we assumed that, given that Redfish suggests against hardcoding URIs in client implementation and leaves them freeform, clients would code to the standard.
Our own webui-vue hardcodes Redfish URIs [1], and the documentation is littered with examples of hardcoded curl examples of hardcoding these URIs. That bug was filed in 2020, and the issue has only gotten worse over time.
This patchset is an attempt to give a target that we can start solving these issues, without trying to boil the ocean and fix all clients in parallel.
This commit adds the meson options redfish-manager-uri-name and redfish-system-uri-name
These are used to control the "name" that bmcweb places in the fixed locations in the ManagerCollection and ComputerSystemCollection schemas.
Note, managers is added, but is not currently testable. It will be iterated on over time.
Tested: Changed the URL options to "edsbmc" and "edssystem" in meson options.
Redfish service validator passes. URLs appear changed when walking the tree.
[1] https://github.com/openbmc/webui-vue/issues/43
Change-Id: I4b44685067051512bd065da8c2e3db68ae5ce23a Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
25b54dba
|
| 17-Apr-2024 |
Ed Tanous <ed@tanous.net> |
Bring consistency to config options
The configuration options that exist in bmcweb are an amalgimation of CROW options, CMAKE options using #define, pre-bmcweb ifdef mechanisms and meson options usi
Bring consistency to config options
The configuration options that exist in bmcweb are an amalgimation of CROW options, CMAKE options using #define, pre-bmcweb ifdef mechanisms and meson options using a config file. This history has led to a lot of different ways to configure code in the codebase itself, which has led to problems, and issues in consistency.
ifdef options do no compile time checking of code not within the branch. This is good when you have optional dependencies, but not great when you're trying to ensure both options compile.
This commit moves all internal configuration options to: 1. A namespace called bmcweb 2. A naming scheme matching the meson option. hyphens are replaced with underscores, and the option is uppercased. This consistent transform allows matching up option keys with their code counterparts, without naming changes. 3. All options are bool true = enabled, and any options with _ENABLED or _DISABLED postfixes have those postfixes removed. (note, there are still some options with disable in the name, those are left as-is) 4. All options are now constexpr booleans, without an explicit compare.
To accomplish this, unfortunately an option list in config/meson.build is required, given that meson doesn't provide a way to dump all options, as is a manual entry in bmcweb_config.h.in, in addition to the meson_options. This obsoletes the map in the main meson.build, which helps some of the complexity.
Now that we've done this, we have some rules that will be documented. 1. Runtime behavior changes should be added as a constexpr bool to bmcweb_config.h 2. Options that require optionally pulling in a dependency shall use an ifdef, defined in the primary meson.build. (note, there are no options that currently meet this class, but it's included for completeness.)
Note, that this consolidation means that at configure time, all options are printed. This is a good thing and allows direct comparison of configs in log files.
Tested: Code compiles Server boots, and shows options configured in the default build. (HTTPS, log level, etc)
Change-Id: I94e79a56bcdc01755036e4e7278c7e69e25809ce Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
dc8cfa66
|
| 07-Apr-2024 |
Ed Tanous <ed@tanous.net> |
Add nullptr check
Change-Id: If511f1210cca7bd1da3a8c5152688487d3036e2f Signed-off-by: Ed Tanous <ed@tanous.net>
|
#
8cb2c024
|
| 27-Mar-2024 |
Ed Tanous <ed@tanous.net> |
Fix moves/forward
Clang has new checks for std::move/std::forward correctness, which catches quite a few "wrong" things where we were making copies of callback handlers.
Unfortunately, the lambda s
Fix moves/forward
Clang has new checks for std::move/std::forward correctness, which catches quite a few "wrong" things where we were making copies of callback handlers.
Unfortunately, the lambda syntax of
callback{std::forward<Callback>(callback)}
in a capture confuses it, so change usages to callback = std::forward<Callback>(callback)
to be consistent.
Tested: Redfish service validator passes.
Change-Id: I7a111ec00cf78ecb7d5f5b102c786c1c14d74384 Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
70c4d545
|
| 08-Jun-2023 |
Lakshmi Yadlapati <lakshmiy@us.ibm.com> |
Refactor PCIeDeviceList to use getCollectionMembers
This commit refactors the code in the PCIeDeviceList function to use the getCollectionMembers function for retrieving collection members. Addition
Refactor PCIeDeviceList to use getCollectionMembers
This commit refactors the code in the PCIeDeviceList function to use the getCollectionMembers function for retrieving collection members. Additionally, a new function getCollectionToKey() is added to handle the retrieval of collection members with custom key name.
Tested: Validator passed
''' Test1: Redfish query of PCI devices on a system that does not have any PCIe devices
curl -k https://$bmc/redfish/v1/Systems/system/PCIeDevices { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices", "@odata.type": "#PCIeDeviceCollection.PCIeDeviceCollection", "Description": "Collection of PCIe Devices", "Members": [], "Members@odata.count": 0, "Name": "PCIe Device Collection" }
Test2: Redfish query of PCIe devices on a system that has PCIe devices
curl -k https://$bmc/redfish/v1/Systems/system/PCIeDevices { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices", "@odata.type": "#PCIeDeviceCollection.PCIeDeviceCollection", "Description": "Collection of PCIe Devices", "Members": [ { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/drive0" }, ....... { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card1" }, { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card2" }, ....... { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card12" } ], "Members@odata.count": 22, "Name": "PCIe Device Collection" }
Test3: Redfish query of system with PCIe devices curl -k https://$bmc/redfish/v1/Systems/system { "@odata.id": "/redfish/v1/Systems/system", "@odata.type": "#ComputerSystem.v1_16_0.ComputerSystem", "Actions": { "#ComputerSystem.Reset": { "@Redfish.ActionInfo": "/redfish/v1/Systems/system/ResetActionInfo", "target": "/redfish/v1/Systems/system/Actions/ComputerSystem.Reset" } }, ...... "PCIeDevices": [ { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/drive0" }, ....... { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/pcie_card1" }, .... ], "PCIeDevices@odata.count": 22, "PartNumber": "", .... "SubModel": "S0", "SystemType": "Physical" } '''
Change-Id: Icb38945a2c7bc5219ff3917fbbc8a9986c9c6155 Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
show more ...
|
#
5a39f77a
|
| 20-Oct-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-17 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-17 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: I2f9540cf0d545a2da4d6289fc87b754f684bc9a7 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
62598e31
|
| 17-Jul-2023 |
Ed Tanous <ed@tanous.net> |
Replace logging with std::format
std::format is a much more modern logging solution, and gives us a lot more flexibility, and better compile times when doing logging.
Unfortunately, given its level
Replace logging with std::format
std::format is a much more modern logging solution, and gives us a lot more flexibility, and better compile times when doing logging.
Unfortunately, given its level of compile time checks, it needs to be a method, instead of the stream style logging we had before. This requires a pretty substantial change. Fortunately, this change can be largely automated, via the script included in this commit under scripts/replace_logs.py. This is to aid people in moving their patchsets over to the new form in the short period where old patches will be based on the old logging. The intention is that this script eventually goes away.
The old style logging (stream based) looked like.
BMCWEB_LOG_DEBUG << "Foo " << foo;
The new equivalent of the above would be: BMCWEB_LOG_DEBUG("Foo {}", foo);
In the course of doing this, this also cleans up several ignored linter errors, including macro usage, and array to pointer deconstruction.
Note, This patchset does remove the timestamp from the log message. In practice, this was duplicated between journald and bmcweb, and there's no need for both to exist.
One design decision of note is the addition of logPtr. Because the compiler can't disambiguate between const char* and const MyThing*, it's necessary to add an explicit cast to void*. This is identical to how fmt handled it.
Tested: compiled with logging meson_option enabled, and launched bmcweb
Saw the usual logging, similar to what was present before: ``` [Error include/webassets.hpp:60] Unable to find or open /usr/share/www/ static file hosting disabled [Debug include/persistent_data.hpp:133] Restored Session Timeout: 1800 [Debug redfish-core/include/event_service_manager.hpp:671] Old eventService config not exist [Info src/webserver_main.cpp:59] Starting webserver on port 18080 [Error redfish-core/include/event_service_manager.hpp:1301] inotify_add_watch failed for redfish log file. [Info src/webserver_main.cpp:137] Start Hostname Monitor Service... ``` Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I86a46aa2454be7fe80df608cb7e5573ca4029ec8
show more ...
|
#
609ba4c9
|
| 11-Jul-2023 |
Ed Tanous <edtanous@google.com> |
Remove PCIeInterface DeviceType
This code was added in 543f9a75a0819ca9e3541b2c48fe8b4d5cf6c4f7, which in the description claimed to only be a refactor, but moved the DeviceType record.
Because Dev
Remove PCIeInterface DeviceType
This code was added in 543f9a75a0819ca9e3541b2c48fe8b4d5cf6c4f7, which in the description claimed to only be a refactor, but moved the DeviceType record.
Because DeviceType is an enum in Redfish, and a string in PDI, some amount of conversion is required, so this code can't be corrected easily.
Remove the property for the moment.
Tested: Redfish Validator passes.
Change-Id: I60a68e45a69370112f454b1c520fde5b70ca8591 Signed-off-by: Ed Tanous <edtanous@google.com>
show more ...
|
#
814bf20a
|
| 04-Jul-2023 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
Add MaxLanes and MaxPCIeType properties to the PCIeInterface
According to the Redfish Data Model specification PCIeInterface (v1.3+) of the PCIeDevice model contains the following properties:
MaxLa
Add MaxLanes and MaxPCIeType properties to the PCIeInterface
According to the Redfish Data Model specification PCIeInterface (v1.3+) of the PCIeDevice model contains the following properties:
MaxLanes (v1.3+) The number of PCIe lanes supported by this device. - This property shall contain the maximum number of PCIe lanes supported by this device.
MaxPCIeType (v1.3+) The highest version of the PCIe specification supported by this device. - This property shall contain the maximum PCIe specification that this device supports.
Since PCIeDevice interface from the phosphor-dbus-interfaces has these values in the 'MaxLanes' and 'GenerationSupported' properties, populate the fields to Redfish.
Tested: Redfish validator passed
Before: redfish/v1/Systems/system/PCIeDevices/Bus_c3_Device_00 { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/Bus_c3_Device_00", "@odata.type": "#PCIeDevice.v1_9_0.PCIeDevice", ... "PCIeInterface": { "LanesInUse": 4, "PCIeType": "Gen3" }, ... }
After: redfish/v1/Systems/system/PCIeDevices/Bus_c3_Device_00 { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/Bus_c3_Device_00", "@odata.type": "#PCIeDevice.v1_9_0.PCIeDevice", ... "PCIeInterface": { "LanesInUse": 4, "MaxLanes": 4, "MaxPCIeType": "Gen3", "PCIeType": "Gen3" }, ... }
Change-Id: Iec786e376cea8fd2aa516b5b2a3da4286e59627a Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
#
82f80326
|
| 10-Jul-2023 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
Omit Slot "Lanes" property if it is equal to 0
In the context of a PCIeSlot the 0 value for the 'Lanes' property means undefined. According to the bmcweb guidelines, DBus properties with "unknown"/"
Omit Slot "Lanes" property if it is equal to 0
In the context of a PCIeSlot the 0 value for the 'Lanes' property means undefined. According to the bmcweb guidelines, DBus properties with "unknown"/"unspecified" values should be omitted from the Redfish tree. Therefore don't populate 'Lanes' property if it is equal to 0.
Tested: validator passed
Change-Id: Ic3d142dd8b10da2367d73c370d5480208ba1510a Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
#
9bb0a7fe
|
| 04-Jul-2023 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
Correct type for the lanesInUse property
According to the phosphor-dbus-interfaces 'LanesInUse' property in the PCIeDevice interface has a 'size_t' type. But the current bmcweb code uses 'int64_t' f
Correct type for the lanesInUse property
According to the phosphor-dbus-interfaces 'LanesInUse' property in the PCIeDevice interface has a 'size_t' type. But the current bmcweb code uses 'int64_t' for that variable in the 'unpackPropertiesNoThrow' call. This causes function to fail. Correct variable type to fix the issue.
Tested: validator passed
Before: redfish/v1/Systems/system/PCIeDevices/Bus_c3_Device_00 { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/Bus_c3_Device_00", "@odata.type": "#PCIeDevice.v1_9_0.PCIeDevice", "Id": "Bus_c3_Device_00", "Manufacturer": "Intel Corporation", "Model": "", "Name": "PCIe Device", "PartNumber": "", "SerialNumber": "", "Status": { "Health": "OK", "State": "Enabled" }, "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The request failed due to an internal service error. The service is still operational.", "MessageArgs": [], "MessageId": "Base.1.16.0.InternalError", "MessageSeverity": "Critical", "Resolution": "Resubmit the request. If the problem persists, consider resetting the service." } ], "code": "Base.1.16.0.InternalError", "message": "The request failed due to an internal service error. The service is still operational." } }
After: redfish/v1/Systems/system/PCIeDevices/Bus_c3_Device_00 { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/ Bus_c3_Device_00", "@odata.type": "#PCIeDevice.v1_9_0.PCIeDevice", "Id": "Bus_c3_Device_00", "Manufacturer": "Intel Corporation", "Model": "", "Name": "PCIe Device", "PCIeFunctions": { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/ Bus_c3_Device_00/PCIeFunctions" }, "PCIeInterface": { "DeviceType": "MultiFunction", "LanesInUse": 4, "PCIeType": "Gen3" }, "PartNumber": "", "SerialNumber": "", "Status": { "Health": "OK", "State": "Enabled" } }
Change-Id: I3c7cda6027814ded5e85cfe3d37dbac1bbbc2044 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|