- Dec 07, 2022
-
-
Currently getting single PostCode entry returns a LogEntryCollection with the specified LogEntry in its Members. Since Redfish Service Validator does not follow the links in LogServiceCollection[1], such unexpected behavior passes the validator. This commit makes it return the LogEntry itself (or 404 Not Found) when requesting it. Fixes Github issue #236 (https://github.com/openbmc/bmcweb/issues/236) [1] https://github.com/DMTF/Redfish-Service-Validator/issues/519 Tested: * Confirmed getting a valid PostCode entry now returns a LogEntry, and getting invalid entries like B0-1, B1-0, B1-999 or 123 (Not properly- formatted ID) responds with 404 Not Found. * Get PostCode log entries collection still returns LogEntryCollection containing first 1000 PostCode entries by default. * Redfish Service Validator passed. Change-Id: Ice6b8742caea96ad3d436d57898202fe7362b150 Signed-off-by:
Jiaqing Zhao <jiaqing.zhao@intel.com>
-
- Dec 06, 2022
-
-
If-Match is a header in the HTTP specification[1] designed for handling atomic operations within a given HTTP tree. It allows a mechanism for an implementation to explicitly declare "only take this action if the resource has not been changed". While most things within the Redfish tree don't require this level of interlocking, it continues to round out our redfish support for the specific use cases that might require it. Redfish specification 6.5 states: If a service supports the return of the ETag header on a resource, the service may respond with HTTP 428 status code if the If-Match or If-None-Match header is missing from the PUT or PATCH request for the same resource, as specified in RFC6585 This commit implements that behavior for all handlers to follow the following flow. If If-Match is present Repeat the same request as a GET Compare the ETag produced by the GET, to the one provided by If-Match If they don't match, return 428 if they do match, re-run the query. [1] https://www.rfc-editor.org/rfc/rfc2616#section-14.24 As a consequence, this requires declaring copy and move constructors onto the Request object, so the request object can have its lifetime extended through a request, which is very uncommon. Tested: Tests run on /redfish/v1/AccountService/Accounts/root PATCH with correct If-Match returns 200 success PATCH with an incorrect If-Match returns 419 precondition required GET returns the resource as expected Redfish service validator passes Redfish protocol validator passes! ! ! ! ! Signed-off-by:
Ed Tanous <edtanous@google.com> Change-Id: I530ab255259c32fe4402eb8e5104bd091925c77b
-
- Dec 05, 2022
-
-
While implementing https://gerrit.openbmc.org/c/openbmc/bmcweb/+/57932 , there has been an issue where there is a circular dependency between routing.hpp and privileges.hpp. This code move predates this change to resolve it before implementing the heart of redfish authz. Circular dependency will occur when we try to use the http verb index variables in privilege.hpp. If this occurs routing.hpp and privilege.hpp will co-depend on each other and this code move prevents this from occuring. Tested: bitbake bmcweb Code compiles (code move only) Redfish Validator passed on next commit Signed-off-by:
Edward Lee <edwarddl@google.com> Change-Id: I46551d9fe222e702d239ed3ea6d3d7e505d488c8
-
As is, the router designates routes for every possible boost verb, of which there are 31. In bmcweb, we only make use of 6 of those verbs, so that ends up being quite a bit of wasted space and cache non-locality. This commit invents a new enum class for declaring a subset of boost verbs that we support, and a mapping between bmcweb verbs and boost verbs. Then it walks through and updates the router to support converting one to another. Tested: Unit Tested Redfish Service Validator performed on future commit Signed-off-by:
Ed Tanous <edtanous@google.com> Signed-off-by:
Edward Lee <edwarddl@google.com> Change-Id: I3c89e896c632a5d4134dbd08a30b313c12a60de6
-
Signed-off-by:
Patrick Williams <patrick@stwcx.xyz> Change-Id: I6bcc6c72e1855c7de7c8b1e88cbab01e92b4070d
-
The NIC LinkStatus was being assigned a LinkUp or NoLink value depending on whether the NIC is enabled. Subsequent code unconditionally overwrites the LinkStatus. The LinkStatus needs to take into account the NIC enabled state as well as the link up/down state. Tested: Confirmed NIC enabled/link active resulted in LinkUp. Confrimed NIC enabled/no-carrier resulted in LinkDown. Connfimred NIC disable resulted in NoLink. Change-Id: Iece3686cac9714e427b0e100f486a4ced334f7af Signed-off-by:
Johnathan Mantey <johnathanx.mantey@intel.com>
-
- Dec 01, 2022
-
-
Ed Tanous authored
Recent changes to phosphor-network have changed the NTPServers property to be actually StaticNTPServers. This makes PATCH incorrect. Tested: Redfish-protocol-validator passes the NTPServers property again. ``` curl -vvvv --insecure --user root:0penBmc https://192.168.7.2/redfish/v1/Managers/bmc/NetworkProtocol -X PATCH -d '{"NTP": {"NTPServers": ["time-a-b.nist.gov", "time-b-b.nist.gov"]}}' ``` Now succeeds. Signed-off-by:
Ed Tanous <edtanous@google.com> Change-Id: Ie4bcfa6190797dd250421d1a512677841a4319e4
-
- Nov 29, 2022
-
-
George Liu authored
There are currently many files that use the GetSubTree and GetSubTreePaths methods. Since they are a general method, they are defined in the dbus_utility.hpp file and will be further refactored in subsequent patches. Also, Updated the doPath method of NetworkProtocol synchronously. Tested: Built bmcweb successfully and Validator passes 1. doGet NetworkProtocol curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Managers/bmc/NetworkProtocol { "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol", "IPMI": { "Port": 623, "ProtocolEnabled": true }, ... } 2. change the ProtocolEnabled property to false curl -k -H "X-Auth-Token: $token" -H "Content-Type: application/json" -X PATCH -d '{"IPMI": {"ProtocolEnabled" :false}}' https://${bmc}/redfish/v1/Managers/bmc/NetworkProtocol 3. doGet NetworkProtocol again curl -k -H "X-Auth-Token: $token" https://${bmc}/redfish/v1/Managers/bmc/NetworkProtocol { "@odata.id": "/redfish/v1/Managers/bmc/NetworkProtocol", "IPMI": { "Port": null, "ProtocolEnabled": false }, ... } Signed-off-by:
George Liu <liuxiwei@inspur.com> Change-Id: I9ed3de74417d2662a7f433ea4a589f68f514a369
-
- Nov 28, 2022
-
-
Only set createNewObject to true when corresponding interface not found in the object. Tested on Bletchley: - Add new StepwiseController called SWTest Body in JSON format ``` { "Oem": { "OpenBmc": { "Fan": { "StepwiseControllers": { "SWTest": { "Direction": "Floor", "Inputs": [ "MB_U402_THERM_LOCAL" ], "NegativeHysteresis": 1.0, "PositiveHysteresis": 2.0, "Steps": [ { "Output": 0.0, "Target": 48.0 }, { "Output": 15.0, "Target": 49.0 } ], "Zones": [ { "@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc/Fan/FanZones/Zone0" } ] } } } } } } ``` Checking object from dbus ``` root@bletchley:~# busctl introspect xyz.openbmc_project.EntityManager \ > /xyz/openbmc_project/inventory/system/chassis/Bletchley_Chassis/SWTest \ > xyz.openbmc_project.Configuration.Stepwise NAME TYPE SIGNATURE RESULT/VALUE FLAGS .Delete method - - - .Class property s "Floor" emits-change writable .Inputs property as 1 "MB U402 THERM LOCAL" emits-change writable .Name property s "SWTest" emits-change writable .NegativeHysteresis property d 1 emits-change writable .Output property ad 2 0 15 emits-change writable .PositiveHysteresis property d 2 emits-change writable .Reading property ad 2 48 49 emits-change writable .Type property s "Stepwise" emits-change writable .Zones property as 1 "Zone0" emits-change writable ``` - Patch SWTest properties Body in JSON format ``` { "Oem": { "OpenBmc": { "Fan": { "StepwiseControllers": { "SWTest": { "NegativeHysteresis": 3.0, "PositiveHysteresis": 4.0 } } } } } } ``` Checking object from dbus ``` root@bletchley:~# busctl introspect xyz.openbmc_project.EntityManager \ > /xyz/openbmc_project/inventory/system/chassis/Bletchley_Chassis/SWTest \ > xyz.openbmc_project.Configuration.Stepwise NAME TYPE SIGNATURE RESULT/VALUE FLAGS .Delete method - - - .Class property s "Floor" emits-change writable .Inputs property as 1 "MB U402 THERM LOCAL" emits-change writable .Name property s "SWTest" emits-change writable .NegativeHysteresis property d 3 emits-change writable .Output property ad 2 0 15 emits-change writable .PositiveHysteresis property d 4 emits-change writable .Reading property ad 2 48 49 emits-change writable .Type property s "Stepwise" emits-change writable .Zones property as 1 "Zone0" emits-change writable ``` - Delete SWTest object Body in JSON format ``` { "Oem": { "OpenBmc": { "Fan": { "StepwiseControllers": { "SWTest": null } } } } } ``` Object deleted from dbus ``` root@bletchley:~# busctl introspect xyz.openbmc_project.EntityManager \ > /xyz/openbmc_project/inventory/system/chassis/Bletchley_Chassis/SWTest \ > xyz.openbmc_project.Configuration.Stepwise Failed to introspect object /xyz/openbmc_project/inventory/system/chassis/Bletchley_Chassis/SWTest of service xyz.openbmc_project.EntityManager: Unknown object '/xyz/openbmc_project/inventory/system/chassis/Bletchley_Chassis/SWTest'. ``` Signed-off-by:
Potin Lai <potin.lai@quantatw.com> Change-Id: I482e942ee3c76dca17af522765d8b3aa9dc8678b
-
Cable Length property value is NaN by default. The current implementation ignores processing other remaining Cable properties if the length is NaN. Per Ed's comment here we need to ignore if length is NaN and continue to process remaining properties: https://gerrit.openbmc.org/c/openbmc/bmcweb/+/50265/4..7/redfish-core\ /lib/cable.hpp#b51 Testing: 1. Validator test not done, assumed it is OK since it is a minor change in the code logic. 2. curl testing: $ curl -k https://user:password@host:18080/redfish/v1/Cables/dp0_cable1 { "@odata.id": "/redfish/v1/Cables/dp0_cable1", "@odata.type": "#Cable.v1_0_0.Cable", "CableType": "", "Id": "dp0_cable1", "Name": "Cable" } Signed-off-by:
Shantappa Teekappanavar <shantappa.teekappanavar@ibm.com> Change-Id: If73828484d91bbf2eee45a31973c825bab008ba4
-
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t Change-Id: I4af62f309f4cd3bb51759fa18de2448235e557fe Signed-off-by:
Patrick Williams <patrick@stwcx.xyz>
-
GET /redfish/v1/Systems/system/PCIeDevices/<str>/PCIeFunctions/<str> return resourceNotFound messages. Test: GET /redfish/v1/Systems/system/PCIeDevices/<str>/PCIeFunctions/<str> return the expected information of PCIeDevices. Signed-off-by:
Tony Lee <tony.lee@quantatw.com> Change-Id: I1587a74e77225939dec8030bba7fb04865e8051e
-
- Nov 23, 2022
-
-
George Liu authored
Along with adding Link header, this commit updates ThermalSubsystem to respond to HEAD requests. The link header is something required by the Redfish spec. Also, Removed redundant code[1] [1] https://gerrit.openbmc.org/c/openbmc/bmcweb/+/58731/2/redfish-core/lib/thermal_subsystem.hpp#b48 Tested: HEAD /redfish/v1/Chassis/<str>/ThermalSubsystem returns a correct looking Link header. Following that Link header resolves the schema file. Get /redfish/v1/Chassis/BadChassis/ThermalSubsystem returns 404. Signed-off-by:
George Liu <liuxiwei@inspur.com> Change-Id: Ib93573808e4370ac45c2051517cd3f1c28e0f8bb
-
- Nov 18, 2022
-
-
Gunnar Mills authored
The current DeliveryRetryIntervalSeconds range is 30 - 180 seconds. As far as I can tell, this is arbitrary. Lower the minimum to 5 seconds so the client (the IBM management console) can set it to this low. The current default will still be 30 seconds. The client wanted it this low because the data might not be correct by the time the event is retried. 5 seconds is arbitrary, decided on this only based on the client's request. A lower minimum of like 1 or even 0 is reasonable to me but going with 5 seconds because that is the request and what has been tested. Tested: Before: ``` curl -k -H "Content-Type: application/json" -X PATCH https://$bmc/redfish/v1/EventService/ -d '{"DeliveryRetryIntervalSeconds": 5}' { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The value 5 for the query parameter DeliveryRetryIntervalSeconds is out of range [30-180].", "MessageArgs": [ "5", "DeliveryRetryIntervalSeconds", "[30-180]" ], "MessageId": "Base.1.8.1.QueryParameterOutOfRange", ... ``` After: ``` curl -v -k -H "Content-Type: application/json" -X PATCH https://$bmc/redfish/v1/EventService/ -d '{"DeliveryRetryIntervalSeconds": 5}' ... < HTTP/1.1 200 OK ``` We have this patch downstream and have seen retring at 5 secs. Change-Id: I462569969565bdc97c15cb190ed65201d50abdf0 Signed-off-by:
Gunnar Mills <gmills@us.ibm.com>
-
- Nov 17, 2022
-
-
It's |log_services| not |log_service|. Signed-off-by:
Nan Zhou <nanzhoumails@gmail.com> Change-Id: Ic504a3fcc5b69ce4a05de943ebf0d6c95fbdcda4
-
Asmitha Karunanithi authored
A user created with no-access privilege is allowed to login but can not logout. Any no-access user can create many and many login sessions and exhaust the bmc without logging out. No-access role was basically added to support the IPMI usecase, where a user can be created first and then is assigned a privilege. This is being reworked at IPMI interface and the dependency on the no-access privilege is being removed completely. Following two commits were added to support the priv-noaccess in user-manager and bmcweb: [1] https://github.com/openbmc/bmcweb/commit/e9e6d240ab85e515f8d264e39b47a75043b73374 [2] https://github.com/openbmc/phosphor-user-manager/commit/7c6e7cffaf061aabfe5489ef52442e2f7cbd0fb7 This commit removes the no-access role support at bmcweb by reverting the commit: [1] https://github.com/openbmc/bmcweb/commit/e9e6d240ab85e515f8d264e39b47a75043b73374 The user-manager change w.r.t this change is at: [1] https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-user-manager/+/52363 Tested By: 1. Create an LDAP user with priv-noaccess. Verify the login attempt fails with accessDenied error 2. Verified the other role users can login Signed-off-by:
Asmitha Karunanithi <asmitk01@in.ibm.com> Change-Id: I5ac8a58d9146379c9ce3be804d476ea85835bb2f
-
- Nov 16, 2022
-
-
George Liu authored
This commit is to update PowerSubsystem to respond to HEAD requests in the way the redfish spec requires. Tested: HEAD /redfish/v1/Chassis/<str>/PowerSubsystem returns a correct looking Link header. Following that Link header resolves the schema file. Get /redfish/v1/Chassis/BadChassis/PowerSubsystem returns 404. Signed-off-by:
George Liu <liuxiwei@inspur.com> Change-Id: I2f2a0e80b74471ddc037e899cfaf3ba307741475
-
- Nov 15, 2022
-
-
Albert Zhang authored
This commit implements Chassis' EnvironmentMetrics schema, a resource in Redfish version 2022.2 that represents the environment metrics implemented by Redfish. This resource includes Energy consumption, Fan speeds (percent), Power consumption (Watts), etc. And these data are mainly obtained from under sensors. Only the basic information of EnvironmentMetrics is implemented in the current commit. ref: https://www.dmtf.org/sites/default/files/standards/documents/ DSP0268_2022.2.pdf (6.31 EnvironmentMetrics 1.3.0) http://redfish.dmtf.org/schemas/v1/EnvironmentMetrics.v1_3_0.json Tested: Validator passes 1. doGet method to get EnvironmentMetrics curl -k -H "X-Auth-Token: $token" https://$bmc/redfish/v1/Chassis/ chassis/EnvironmentMetrics { "@odata.id": "/redfish/v1/Chassis/chassis/EnvironmentMetrics", "@odata.type": "#EnvironmentMetrics.v1_3_0.EnvironmentMetrics", "Id": "EnvironmentMetrics", "Name": "Chassis Environment Metrics" } 2. Input the wrong chassisId with the doGet method curl -k -H "X-Auth-Token: $token" https://$bmc/redfish/v1/Chassis/ chassisError/EnvironmentMetrics { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type Chassis named 'chassisError' was not found.", "MessageArgs": [ "Chassis", "chassisError" ], "MessageId": "Base.1.13.0.ResourceNotFound", "MessageSeverity": "Critical", "Resolution": "Provide a valid resource identifier and resubmit the request." } ], "code": "Base.1.13.0.ResourceNotFound", "message": "The requested resource of type Chassis named 'chassisError' was not found." } } Signed-off-by:
Albert Zhang <zhanghaodi@inspur.com> Change-Id: I6a75dfbc94f39d90a1368770076b874608394691 Signed-off-by:
George Liu <liuxiwei@inspur.com>
-
- Nov 14, 2022
-
-
Adds Links and Head handler for Processor and ProcessorCollection Tested: All of the below return a link header HEAD /redfish/v1/Systems/system/Processors HEAD /redfish/v1/Systems/system/Processors/cpu0 GET /redfish/v1/Systems/system/Processors GET /redfish/v1/Systems/system/Processors/cpu0 Change-Id: Iad19d577afb7cd9d5e652bed2d5884b6ea8260da Signed-off-by:
Nikhil Namjoshi <nikhilnamjoshi@google.com>
-
- Nov 11, 2022
-
-
Tested: unit tests; just added a few used headers Signed-off-by:
Nan Zhou <nanzhoumails@gmail.com> Change-Id: I3299f0445aedadd1411f4d3a407e9543197e22e1
-
We attempt to sanitize the response body of the asyncResp object as the first step of copying over the satellite response into the object. This is clobbering the "OData-Version" from the response header. We can completely remove this step since the body will already be empty. Tested: OData-Version is still present in the header when querying a satellite resource curl -s -D- localhost/redfish/v1/Chassis/5B247A_test | grep OData OData-Version: 4.0 Signed-off-by:
Carson Labrado <clabrado@google.com> Change-Id: I82f54ae9b990504a3236b7a1273c794b1ee6f090
-
- Nov 09, 2022
-
-
Nan Zhou authored
Testd: unit test only change Signed-off-by:
Nan Zhou <nanzhoumails@gmail.com> Change-Id: I0a8d1e97d8f0be8a79b9c40a75eeb0659bba638b
-
Nan Zhou authored
The existing config is missing owners in exact match. Also, onwers have to be array of strings. Reference: [1] https://gerrit.googlesource.com/plugins/owners/+/refs/heads/master/config.md Signed-off-by:
Nan Zhou <nanzhoumails@gmail.com> Change-Id: Ic9639f5e6c83d4dee947c3fddc48de43f0d6aa61
-
- Nov 08, 2022
-
-
Nan Zhou authored
Added the logging header. Tested: code compiles. Signed-off-by:
Nan Zhou <nanzhoumails@gmail.com> Change-Id: Ie707780e195766b37a3d307818615c6be36d424e
-
Nan Zhou authored
This is a dummy commit to test owner plugin. It can be merged in as well given that it adds a little bit readability. Signed-off-by:
Nan Zhou <nanzhoumails@gmail.com> Change-Id: Ia4cc1866ebeb19e6d0f1d1ceece0ecc73fb4b468
-
George Liu authored
Based on DSP8010_2022.2 and adds the ThermalMetrics schema. ThermalMetrics is child of the ThermalSubsystem schema. It is part of the new Power/Thermal Schemas. ThermalMetrics contains temperature readings and the corresponding link to that sensor in the sensor collection. Temperatures such as Ambient, Exhaust, Intake, and Internal can be found in the schema. Tested: built bmcweb successfully and validator passes. Signed-off-by:
George Liu <liuxiwei@inspur.com> Change-Id: I16ad2f922acc963a0434f3d9ab5583d2242b0013
-
- Nov 07, 2022
-
-
Along the lines of changes we've made elsewhere, add Links, and a HEAD handler for bmc NetworkProcotol instances. Tested: ``` curl -vvvv --insecure --user root:0penBmc https://192.168.7.2/redfish/v1/JsonSchemas/NetworkProtocol/NetworkProtocol.json ``` Returns a links header as part of the response. Adding -X HEAD to the curl request results in the same header being included. Redfish service validator passes. Redfish PROTOCOL VALIDATOR PASSES ! ! ! ! ! with zero failures. Summary - PASS: 392, WARN: 0, FAIL: 0, NOT_TESTED: 32 Signed-off-by:
Ed Tanous <edtanous@google.com> Change-Id: Ib96f7c8d5d8d960000a1bb77065fc06d2829e4b8
-
- Nov 02, 2022
-
-
Ed Tanous authored
This commit fixes a minor regression induced when we moved to using submodule projects in meson. When including boost and boost-url headers, some compilers take issue with them, so they need to be included as -isystem, instead of -I. This also helps with running clang-tidy within meson. Tested: meson buildlocal ninja -C buildlocal Compiles on a fresh clone. Signed-off-by:
Ed Tanous <edtanous@google.com> Change-Id: Ic92ed1a1cc2c661b715c63a974e0db35c793f5f4
-
This commit implements support for the If-None-Match header on http requests. This can be combined with the 89f18008 commit for producing ETag to allow a client to have a highly efficient cache, while still pulling data from the BMC. This behavior is documented several places, in W3C produced docs[1], as well as section 7.1 of the Redfish specification: ''' A service only returns the resource if the current ETag of that resource does not match the ETag sent in this header. If the ETag in this header matches the resource's current ETag, the GET operation returns the HTTP 304 status code. ''' Inside bmcweb, this behavior is accomplished in a relatively naive way, by creating the complete request, then doing a direct ETag comparison between the generated data and the request header. In the event the two match, 304 not-modified is returned, in-line with both the Redfish specification and the HTTP RFC. [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-None-Match Tested (on previous rebase): First, request ServiceRoot curl --insecure -vvvv --user root:0penBmc https://192.168.7.2/redfish/v1 This returns a header similar to: < ETag: "ECE52663" Taking that ETag, and putting it into an If-None-Match header: ``` curl --insecure -vvvv -H "If-None-Match: \"ECE52663\"" \ --user root:0penBmc https://192.168.7.2/redfish/v1 ``` Returns: < HTTP/1.1 304 Not Modified ... < Content-Length: 0 Showing that the payload was not repeated, and the response size was much.... much smaller on the wire. Performance was not measured as part of this testing, but even if it has no performance impact (which is unlikely), this change is still worthwhile to implement more of the Redfish specification. Redfish-service-validator passes. Redfish-protocol-validator passes 1 more atom in comparison to previous. Signed-off-by:
Ed Tanous <edtanous@google.com> Change-Id: I1e7d41738884593bf333e4b9b53d318838808008
-
Refactor getCollectionMembers to make sure all Url created with dbus paths are generated via UrlFromPieces helper function. This allow us to manage all URL generated from dbus in one place and allow us to make future changes to affect all resources. We can make changes to all resources easier if they are all managed by one function. Tested: Redfish Validator Passed. All Collections working as expected and match previous implmentation. Change-Id: I5d3b2b32f047ce4f20a2287a36a3e099efd6eace Signed-off-by:
Willy Tu <wltu@google.com>
-
- Nov 01, 2022
-
-
''' WARNING: Project targets '>=0.57.0' but uses feature introduced in 0.59.0': fs.stem_file. meson.build:386: ''' Warning is present on master, because we use features from 0.59, and 0.60. Update to a minimu meson version of 0.63, to match both yocto and openbmc CI. Tested: meson build no longer throws the above warning. Signed-off-by:
Ed Tanous <edtanous@google.com> Change-Id: Ifac119aa8c8e45859e7374e1c468ea0c91664c2d
-
This is to match yocto. subproject is already pointed at 1.80, but for a while CI still had 1.79. But OpenBMC CI has long since been moved [1] to 1.80, so upgrade the dependency requirements in turn. [1] https://github.com/openbmc/openbmc-build-scripts/blob/05fb2a0ab2ff772679272047b0bf0608adaf41fa/scripts/build-unit-test-docker#L80 Tested: Code compiles. No functional changes. Signed-off-by:
Ed Tanous <edtanous@google.com> Change-Id: Ife6d163660b734893f0793da0e642cd61730acec
-
As written, when we pull in the boost and boost-url subprojects, we hit problems in the meson files. ``` ../meson.build:291: WARNING: include_directories sandbox violation! ``` This commit resolves this issue, by adding explicit meson.build files for both boost and boost-url. Tested: meson buildlocal No longer returns the above error, and shows Subprojects boost : YES boost-url : YES Whereas previously those two dependencies showed up as NO. Code compiles. Signed-off-by:
Ed Tanous <edtanous@google.com> Change-Id: Ib25340723c8cb7d6139e3e51db023e9d90e30aab
-
- Oct 31, 2022
-
-
GET /redfish/v1/Systems/system/PCIeDevices/<str> nothing will be returned if their 'generationInUse' is Unknown. The original intention is that if it is Unknown, there is no need to display '"PCIeType"'. But the others still have to show. After fix: PCIeType is not Unknown: GET http://${bmc}/redfish/v1/Systems/system/PCIeDevices/<str> { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/<str>.", "@odata.type": "#PCIeDevice.v1_4_0.PCIeDevice", "DeviceType": "SingleFunction", "Id": "<str>", "Manufacturer": "Intel Corporation", "Name": "PCIe Device", "PCIeFunctions": { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/<str>/PCIeFunctions" }, "PCIeInterface": { "PCIeType": "Gen1" } } PCIeType is Unknown: GET http://${bmc}/redfish/v1/Systems/system/PCIeDevices/<str> { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/<str>", "@odata.type": "#PCIeDevice.v1_4_0.PCIeDevice", "DeviceType": "SingleFunction", "Id": "<str>", "Manufacturer": "Intel Corporation", "Name": "PCIe Device", "PCIeFunctions": { "@odata.id": "/redfish/v1/Systems/system/PCIeDevices/<str>/PCIeFunctions" } } Signed-off-by:
Tony Lee <tony.lee@quantatw.com> Change-Id: I85a97e0370a5789e4526964272381a557ce942a0
-
This is a follow-on to "LogService: Increase Fault Log timestamp precision" [1]. Since microsecond precision timestamp support for other dump types (in addition to FaultLog) have recently been added in phosphor-debug-collector (see "Populate timestamps with microsecond precision" [2]), we now update bmcweb to expose these timestamps with microsecond precision. Dump entry "Created" timestamps are based on the "Elapsed" property of the D-Bus interface xyz.openbmc_project.Time.EpochTime [3], which is defined as time elapsed since the epoch in microseconds. Client impact: Dump entry "Created" timestamps are shown with microsecond precision instead of second precision, for entries of all dump types (not just FaultLog). Tested: Forced creation of a system dump entry from BMC console: ``` busctl call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/system xyz.openbmc_project.Dump.NewDump Notify ut 1 2 ``` Retrieved the entry individually and as part of its collection: ``` curl -k -H "X-Auth-Token: $token" -X GET http://${bmc}/redfish/v1/Systems/system/LogServices/Dump/Entries/1 curl -k -H "X-Auth-Token: $token" -X GET http://${bmc}/redfish/v1/Systems/system/LogServices/Dump/Entries ``` Before change: `"Created": "2022-10-25T22:56:13+00:00",` After change: `"Created": "2022-10-25T22:56:13.271157+00:00",` Redfish Service Validator passed on the following URI trees: /redfish/v1/Managers/bmc/LogServices/Dump/Entries /redfish/v1/Managers/bmc/LogServices/FaultLog/Entries /redfish/v1/Systems/system/LogServices/Dump/Entries [1] https://github.com/openbmc/bmcweb/commit/c6fecdabd58b4c380caf1b83801ad4eb54922fff [2] https://github.com/openbmc/phosphor-debug-collector/commit/c0ab9d43d5e19123cca1a1592ee07fc064b84199 [3] https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Time/EpochTime.interface.yaml Signed-off-by:
Claire Weinan <cweinan@google.com> Change-Id: Ia1682d09cf196c63da7d236df31695be5a5ad34b
-
- Oct 28, 2022
-
-
Regardless of what privileges are allowed on a resource, we should almost always be pulling from the PrivilegeRegistry for the information. This corrects the handlers in redfish_v1.hpp. Namely that JsonSchemaCollection now pulls from the generated privilege registry files, and the 404 handler now requires a valid login to hit the route. This allows 401 to be returned on routes that would 404. Arguably users should not be able to see what routes bmcweb implements if they are not authenticated. Marking the 404 route as login is largely ceremonial and for documentation, because there is a separate check for a user being authenticated. Tested: Redfish service validator passes. Signed-off-by:
Ed Tanous <edtanous@google.com> Change-Id: I4c03b0ae05d9fb7712d6ec3b6f2feaf034ca0750
-
- Oct 25, 2022
-
-
This must be historical reason that we use relative path in these includes. Given that redfish-core/lib is already in include path, these relative paths are not necessary. Tested: code compiles. Signed-off-by:
Nan Zhou <nanzhoumails@gmail.com> Change-Id: Ia6b6be8a7aded98c96cdca150467bc7d825230af
-
Add helper function to append pieces to existing url to allow more flexible control over the url. This allows us to avoid have each resource append the pieces outside of the utility functions and help maintain all url modifications in a central place for easy management. Tested: Does not affect Redfish Tree. Unit Test passed. Change-Id: I751f3c120cbadb465915b12aa253edd53ef32123 Signed-off-by:
Willy Tu <wltu@google.com>
-
Now that we are using timer.async_wait() with the async http operations we need to account for the scenario where the timer fails before the operation fails. When that occurs we need to abort the operation once its callback gets called. Currently we proceed as if the timer doesn't exist. This causes a fault if one of the operations times out. This patch adds a check to the start of each async operation so that we do not continue with the normal message sending flow when an operation times out. Tested: In order to create a connection timeout I created a dummy interface and set the IP of my satellite BMC to route to the interface: ip link add dummy0 type dummy ip link set dev dummy0 up ip route add 120.60.30.15 dev dummy0 All packets sent to 120.60.30.15 will get dropped and thus connection attempts will timeout. This does not cause bmcweb to crash. To make the satellite reachable again I used this command to delete the routing: ip route del 120.60.31.15 dev dummy0 After doing so messages were once again able to be forwarded correctly to the satellite. Signed-off-by:
Carson Labrado <clabrado@google.com> Change-Id: Ie8d022c2195838e383eefcd0e12ae8cfab76e3e1
-
Users should be able to delete LDAP client certificate, and phosphor- certificate-manager already supports this. This patch adds the Redfish API endpoint for it. Tested: DELETE /redfish/v1/AccountService/LDAP/Certificates/1 removes the LDAP client certificate installed on system. Change-Id: If1c082c78c404b5877e74ba50de3a970cd823a90 Signed-off-by:
Jiaqing Zhao <jiaqing.zhao@intel.com>
-