summaryrefslogtreecommitdiff
path: root/redfish-core
AgeCommit message (Collapse)AuthorFilesLines
2024-03-19Call systemd SetTime directlyEd Tanous3-23/+47
Internally inside phosphor-time-manager, the elapsed(uint64) dbus call just forwards the request directly to systemd after static casting to int64_t (signed). bmcweb should just call systemd directly, for several reasons. phosphor-timesyncd might block on other calls, given it's a single threaded blocking design, due to bugs like #264. Calling systemd directly means that calls that don't require phosphor networkd won't be blocked. Calling systemd directly allows bmcweb to drop some code that parses a date as int64_t, then converts it to uint64_t to fulfill the phosphor datetime interface. We can now keep int64_t all the way through. Calling systemd directly allows bmcweb to give a more specific error code in the case there NTP is enabled, registering a PropertyValueConflict error, instead of a 500 InternalError. Tested: Patching DateTime property with NTP enabled returns 400, PropertyValueConflict ``` curl -vvvv -k --user "root:0penBmc" -H "Content-Type: application/json" -X PATCH -d '{"DateTime":"2020-12-15T15:40:52+00:00"}' https://192.168.7.2/redfish/v1/Managers/bmc ``` Disabling NTP using the following command: ``` curl -vvvv -k --user "root:0penBmc" -H "Content-Type: application/json" -X PATCH -d '{"NTP":{"ProtocolEnabled":false}}' https://192.168.7.2/redfish/v1/Managers/bmc/NetworkProtocol ``` Allows the prior command to succeed. [1] https://github.com/openbmc/phosphor-time-manager/blob/5ce9ac0e56440312997b25771507585905e8b360/bmc_epoch.cpp#L126 Change-Id: I6fbb6f63e17de8ab847ca5ed4eadc2bd313586d2 Signed-off-by: Ed Tanous <ed@tanous.net>
2024-03-18Clean up power schemaEd Tanous1-279/+291
Remove some inline lambdas. This should have no impact on function, code was just moved. 4 tiers of inline lambdas are now down to 2. Ideally should be 1. Tested: Thank you Gaurav! Appears to work as intended. Change-Id: I3acd0b77bc59ece4ed5ecde5fe4257dc903456fb Signed-off-by: Ed Tanous <ed@tanous.net>
2024-03-16Fix PID Zone interface namePavanKumarIntel1-1/+1
The interface name is being loaded incorrectly which causes the DBus call to fail resulting in Internal server error. This commit changes the interface to the correct name. This is a regression caused by ea2b670d306d85d6975b6174024985491af04a89 TESTED: - PATCH /redfish/v1/Managers/bmc with below body succeeded { "Oem": { "OpenBmc": { "Fan": { "FanZones": { "Left": { "MinThermalOutput": 30.0 } } } } } } Change-Id: I0bcf858cd541dc11e802431ad983954a57d8c790 Signed-off-by: PavanKumarIntel <pavanx.kumar.martha@intel.com>
2024-03-15Remove link from Chassis to PCIeDeviceSunny Srivastava1-3/+0
The commit removes current support that assumes 1:1 system:Chassis for Chassis/PCIeDevices. Current implementation populates the same collection of PCIeDevices with chassis and with system. Since the path is /redfish/v1/Systems/system/PCIeDevices and we already have a link from /redfish/v1/Systems/system/, removing the link here in Chassis. The link from Chassis to /redfish/v1/Systems/system/PCIeDevices is unexpected. For systems with multiple chassis the current assumption does not hold true. It breaks there, as it assumes all PCIeDevices are in all Chassis. This is just a link and since another link from system resource already exists. The case of walking the whole tree isn't broke. And so, this should not break clients. Validator has been executed with no new errors. Signed-off-by: Sunny Srivastava <sunnsr25@in.ibm.com> Change-Id: Id3af01ec99708c36b5fff2a63f04ffd722f6c3a2 Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>
2024-03-13Correct Actions/Manager.ResetToDefaults parameter nameKonstantin Aladyshev1-10/+21
According to the Redfish Data Model specification the correct parameter name for the '/Actions/Manager.ResetToDefaults' action is not 'ResetToDefaults' but 'ResetType'. The mistake was originally introduced in the commit "Redfish: Manager: ResetToDefault" (3e40fc742265c3ec1384e7e5994e62aed356331f). Change parameter name to match with the specification. Leave some support for the old parameter name to keep the compatibility with the old clients. Tested: The POST request /redfish/v1/Managers/bmc/Actions/Manager.ResetToDefaults with {"ResetType": "ResetAll"} body accepted successfully. Redfish validator passed. Change-Id: I6aab20314f85dbda16ad3758091de8822943b761 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
2024-03-11fix usage of std::ranges::replace_copyAlexander Hansen1-0/+2
As hinted at in the usage example [1], the destination range must have sufficient size to contain the elements. If the destination range has size 0, then it will be empty after the function call. Then the "Name" property in powersupply json will be "" and there will only be one powersupply because of the deduplication code. Tested: Powersupplies appear as usual References: [1] https://en.cppreference.com/w/cpp/algorithm/ranges/replace_copy Change-Id: I81dd21a2dd6eb9b29a67007d6d6229d3a752690f Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
2024-03-08Fix behavior when service is missingEd Tanous1-2/+3
Fix regression as part of 33e1f122b740c5de679dc0350b5f41e8d975499f AllowedHostTransitions: look for on dbus I have no idea why checking against .value() matters here, but on systems that doesn't have this daemon present, checking against ec == instead of ec.value() == causes this to return 500. Loaded on qemu, without an implementation of AllowedValues. ``` curl -vvvv -k --user "root:0penBmc" -H "Content-Type: application/json" https://192.168.7.2/redfish/v1/Systems/system/ResetActionInfo ``` Now succeeds. Change-Id: I05758c3f9fd9d0f1c90830ba005c74bc6f874bd6 Signed-off-by: Ed Tanous <ed@tanous.net>
2024-03-06Support PATCH on IPv6StaticDefaultGatewaysSunitha Harish1-14/+292
Currently there is no support to setting up the Static Default IPv6 gateway via redfish. This commit adds IPv6StaticDefaultGateways parameter to the ethernet interface, on which user can send PATCH request and setup the Static IPv6 gateway for the interface. Tested: GET https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/<id> ``` "IPv6StaticDefaultGateways": [ { "Address": "2002:903:15F:325:9:3:29:1", "PrefixLength": 24 }, { "Address": "2002:90:15F:325:9:3:29:1", "PrefixLength": 24 } ], ``` PATCH https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/<id> -d '{"IPv6StaticDefaultGateways": [{"Address": "2002:903:15F:325:9:3:29:1", "PrefixLength": 24}]}' PATCH https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/<id> -d '{"IPv6StaticDefaultGateways": [{"Address": "2002:903:15F:325:9:3:29:1"}]}' PATCH https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/<id> -d '{"IPv6StaticDefaultGateways": [{}, {"Address": "2002:903:15F:325:9:3:29:1","PrefixLength": 24}]}' PATCH https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/<id> -d '{"IPv6StaticDefaultGateways": [null, {}]}' PATCH https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/<id> -d '{"IPv6StaticDefaultGateways": [{"PrefixLength": 24}]}' --> this will return PropertyMissing error Redfish validator passed. Change-Id: If6aaa6981a9272a733594f0ee313873a09f67758 Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com> Signed-off-by: Ravi Teja <raviteja28031990@gmail.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2024-03-05redfish-schema: add ProtocolPatrick Williams1-0/+1
The Drive schema indirectly references Protocol, but it is missing from the schema list. Modify `update_schemas.py` to include it and run, checking in the results. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic3adad00924d450d3b7062c94ec04fc26e4cc9b9
2024-03-05Sessions: Drop end / from odata.idGunnar Mills1-2/+2
Fix warnings around odata.id not matching. Was looking at old defects, and closed https://github.com/openbmc/bmcweb/issues/166 (closed since no longer see these warnings) but saw we have these warnings for sessions: ``` *** /redfish/v1/SessionService Attempt 1 of /redfish/v1/SessionService Response Time for GET to /redfish/v1/SessionService: 0.046112860552966595 seconds. /redfish/v1/SessionService @odata.id: Expected @odata.id to match URI link /redfish/v1/SessionService/ Type (SessionService.v1_0_2.SessionService), GET SUCCESS (time: 0:00:00.046476) Attempt 1 of /redfish/v1/SessionService/Sessions Response Time for GET to /redfish/v1/SessionService/Sessions: 0.005822769366204739 seconds. PASS *** /redfish/v1/SessionService/Sessions /redfish/v1/SessionService/Sessions @odata.id: Expected @odata.id to match URI link /redfish/v1/SessionService/Sessions/ Type (SessionCollection.SessionCollection), GET SUCCESS (time: 0:00:00.006165) ``` It looks like all other odata.ids don't end in a / https://github.com/search?q=repo%3Aopenbmc%2Fbmcweb%20odata.id&type=code Tested: NONE. Visual inspection only. Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Change-Id: Ie1cde192a5774a86c96e6993c71e8b124c79739a
2024-03-05DHCP Conf: Fix UseDomainName configurationRavi Teja1-6/+26
This commit modifies to use DomainEnabled D-bus property Currently "UseDomainName" configuration is actually not controlling DomainName setting in the backend networkd and networkd. Networkd app does not have DomainName D-bus property implemented and wrong D-bus property is being used in the bmcweb. This fix make sure bmcweb uses DomainEnabled property and controls UseDomainName configuration. Here is backend networkd fix for DomainEnabled property https://gerrit.openbmc.org/c/openbmc/phosphor-networkd/+/69604 Tested by: Enabled DHCPv4 on one of the interface Enable/Disable UseDomainName Check if DHCP configured domain name configuration on BMC. Change-Id: I68b86d4107a17db921ec463f5660a58aaa1396e3 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
2024-03-04AllowedHostTransitions: look for on dbusAndrew Geissler1-19/+104
Commit [1] introduced a new optional dbus property that OpenBMC developers can populate to define which redfish/v1/Systems/system/ResetActionInfo AllowableValues are. Look for that new property on dbus. If not found, hard code the previous values otherwise utilize the property to fill in the return value. Tested: - Put new property on dbus and confirmed Redfish API returned expected values: ``` curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Systems/system/ResetActionInfo { "@odata.id": "/redfish/v1/Systems/system/ResetActionInfo", "@odata.type": "#ActionInfo.v1_1_2.ActionInfo", "Id": "ResetActionInfo", "Name": "Reset Action Info", "Parameters": [ { "AllowableValues": [ "ForceOff", "PowerCycle", "Nmi", "On", "ForceOn", "ForceRestart", "GracefulRestart", "GracefulShutdown" ], "DataType": "String", "Name": "ResetType", "Required": true } ] } ``` - Did not run redfish validator as response was same as previous [1]: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/68933 Change-Id: Iecece14e7ff55db98d96df71b106ecc9e3f0ac33 Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2024-02-24Systems: Add support to read AllowedPowerModesChris Cain1-48/+85
Instead of hardcodeing the AllowedPowerModes property, the data will be read from dbus if it exists. If data is empty/not found, the property will be set to the default value: [ "MaximumPerformance", "PowerSaving", "Static" ] Tested on Rainier hardware and Validator passed When dbus property is empty, it will show default modes: ''' xyz.openbmc_project.Control.Power.Mode interface - - - .AllowedPowerModes property as 0 const .PowerMode property s "xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance" emits-change writable "PowerMode": "MaximumPerformance", "PowerMode@Redfish.AllowableValues": [ "MaximumPerformance", "PowerSaving", "Static" ], "PowerRestorePolicy": "AlwaysOff", ''' When dbus property populated with 6 modes: ''' - xyz.openbmc_project.Control.Power.Mode interface - - - .AllowedPowerModes property as 6 "xyz.openbmc_project.Control.Power.Mode.PowerMode.BalancedPerformance" "xyz.openbmc_project.Control.Power.Mode.PowerMode.EfficiencyFavorPerformance" "xyz.openbmc_project.Control.Power.Mode.PowerMode.EfficiencyFavorPower" "xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance" "xyz.openbmc_project.Control.Power.Mode.PowerMode.PowerSaving" "xyz.openbmc_project.Control.Power.Mode.PowerMode.Static" const .PowerMode property s "xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance" emits-change writable "PowerMode": "MaximumPerformance", "PowerMode@Redfish.AllowableValues": [ "BalancedPerformance", "EfficiencyFavorPerformance", "EfficiencyFavorPower", "MaximumPerformance", "PowerSaving", "Static" ], "PowerRestorePolicy": "AlwaysOff", ''' When dbus property not defined it will show default modes: ''' xyz.openbmc_project.Control.Power.Mode interface - - - .PowerMode property s "xyz.openbmc_project.Control.Power.Mode.PowerMode.MaximumPerformance" emits-change writable "PowerMode": "MaximumPerformance", "PowerMode@Redfish.AllowableValues": [ "MaximumPerformance", "PowerSaving", "Static" ], "PowerRestorePolicy": "AlwaysOff", ''' Signed-off-by: Chris Cain <cjcain@us.ibm.com> Change-Id: Ic9882d2760a39dd1a0ea353624eb3c8575f4c6a0
2024-02-23manager_diagnostic_data: add metric getJagpal Singh Gill1-0/+163
Add support to fetch MemoryStatistics, FreeStorageSpaceKiB and ProcessorStatistics for Manager Diagnostic Data. https://redfish.dmtf.org/schemas/v1/ManagerDiagnosticData.v1_2_1.json This change is in relation to following design and D-Bus interface - https://gerrit.openbmc.org/c/openbmc/docs/+/64917 https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/64914 Test: Redfish query output - { "@odata.id": "/redfish/v1/Managers/bmc/ManagerDiagnosticData", "@odata.type": "#ManagerDiagnosticData.v1_2_0.ManagerDiagnosticData", "FreeStorageSpaceKiB": 3772, "Id": "ManagerDiagnosticData", "MemoryStatistics": { "AvailableBytes": 354224066, "BuffersAndCacheBytes": 78984633, "SharedBytes": 11876066, "TotalBytes": 425516000 }, "Name": "Manager Diagnostic Data", "ProcessorStatistics": { "KernelPercent": 13.0234, "UserPercent": 5.7374 }, "ServiceRootUptimeSeconds": 2255.117 } Redfish service validator passing - Elapsed time: 0:03:12 metadataNamespaces: 3726 pass: 5133 passAction: 9 passGet: 205 passRedfishUri: 197 skipNoSchema: 3 skipOptional: 3492 warnDeprecated: 4 warningPresent: 7 Validation has succeeded. Change-Id: I43758a993eb7f342cb9ac5f5574498b37261c2cc Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
2024-02-23Refactor to pass dbus error code to callerMyung Bae1-59/+102
The aux function `getValidFabricAdapterPath()` currently handles the error uniformly for all callers. This commit is to make the function to pass the error conddition to the caller so that it can be handled appropriately in the caller's context. Tested: - Check `resourceNotFound` is generated by caller. ``` $ curl -k -X GET https://${bmc}:18080/redfish/v1/Systems/system/FabricAdapters/badAdapter [WARNING fabric_adapters.hpp:270] Adapter not found ``` - Validator passes Change-Id: I37a61a3a79138aa898ab18332f58e3007496e302 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
2024-02-21Chassis: Add support for Version propertyCarson Labrado1-0/+19
Add support for the Version property of Chassis resources. That property was added in Chassis schema v1.21.0. This makes use of the "xyz.openbmc_project.Inventory.Decorator.Revision" interface that is already defined by phosphor-dbus-interfaces. Tested: Validator passed and Version property was correctly populated. No issues on other Chassis resources which do not have a Version property. I added this to an entity-manager json config: "xyz.openbmc_project.Inventory.Decorator.Revision": { "Version": "$PRODUCT_VERSION" } The PRODUCT_VERSION field from a given FRU eeprom was picked up by FruDevice and it was exposed under the associated Chassis resource: busctl get-property xyz.openbmc_project.FruDevice \ /xyz/openbmc_project/FruDevice/Test \ xyz.openbmc_project.FruDevice PRODUCT_VERSION s "V1.0" curl -s 'localhost/redfish/v1/Chassis/TestChassis' { "@odata.id": "/redfish/v1/Chassis/TestChassis", ... "Version": "V1.0" } Signed-off-by: Carson Labrado <clabrado@google.com> Change-Id: Ie1391d46e81fd8c503fe4b1e6d683dd4553a5419
2024-02-16Simplify bodyEd Tanous1-1/+0
Now that we have a custom boost http body class, we can use it in more cases. There's some significant overhead and code when switching to a file body, namely removing all the headers. Making the body class support strings would allow us to completely avoid that inefficiency. At the same time, it would mean that we can now use that class for all cases, including HttpClient, and http::Request. This leads to some code reduction overall, and means we're reliant on fewer beast structures. As an added benefit, we no longer have to take a dependency on boost::variant2. Tested: Redfish service validator passes, with the exception of badNamespaceInclude, which is showing warnings prior to this commit. Change-Id: I061883a73230d6085d951c15891465c2c8445969 Signed-off-by: Ed Tanous <ed@tanous.net>
2024-02-16Configure DHCP4 and DHCP6 parameters independentlyJishnu CM1-75/+117
At present, DHCP parameters like DNSEnabled, NTPEnabled and HostNameEnabled are at the system level at the network backend. It is common across both IPv4 and IPv6 network types. Thus when a redfish command is sent to enable the DNSEnabled property for IPv4 on eth0 interface, it internally sets the DNSEnabled to true for both IPv4 and IPv6 on eth0 and eth1. Here the change in parameter value for a non-requested network type in the non-requested interface might be an unexpected behaviour for the user. Also, with the current implementation in bmcweb and networkd, the user has no option to configure DHCP parameters differently for different interfaces and network types though it is supported by the redfish. With this change, the Redfish query for updating DHCP parameters will only modify the requested parameter for the specified network type and interface. User must make separate requests to modify the DHCP parameters as per the DMTF schema Current behavior: Request: curl -k -H "X-Auth-Token: $bmc_token" -X PATCH -d '{"DHCPv4":{"UseDNSServers":false}}' https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 Result: UseDNSServers value is set to false for DHCPv4 and DHCPv6 for all interfaces. After this commit: Request: curl -k -H "X-Auth-Token: $bmc_token" -X PATCH -d '{"DHCPv4":{"UseDNSServers":false}}' https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 Result: UseDNSServers value is set to false only for DHCPv4 only in eth0 as mentioned in the redfish request. The DHCP configuration was in the network manager level earlier, it has been moved to interface level with https://gerrit.openbmc.org/c/openbmc/phosphor-networkd/+/63124. This bmcweb change is to separate out the values for IPv4 and IPv6 and to move the dbus object to the interface level. Tested by: Patching the DHCP parameters with redfish request: curl -k -H "X-Auth-Token: $bmc_token" -X PATCH -d '{"<network_type>":{"<DHCP_param>":<value>}}' https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/<interface_id> Verify the value is updated in the network configuration. Retrieve the DHCP parametrer value with the Get Request: curl -k -H "X-Auth-Token: $bmc_token" -X GET https://${bmc}/redfish/v1/Managers/bmc/EthernetInterfaces/<interface_id> Change-Id: I5db29b6dfc8966ff5af51041da11e5b79da7d1dd Signed-off-by: Jishnu CM <jishnunambiarcm@duck.com>
2024-02-08Systems: Add support for new eco power modesChris Cain1-11/+49
Add support for the following new power modes: - Efficiency Favor Performance - Efficiency Favor Power - Balanced Performance New modes were added in ComputerSystem schema to v1.22 Tested on Rainier and passed Validator ''' GET /redfish/v1/Systems/system: "@odata.type": "#ComputerSystem.v1_22_0.ComputerSystem", ... "PowerMode": "EfficiencyFavorPerformance", "PowerMode@Redfish.AllowableValues": [ "Static", "MaximumPerformance", "PowerSaving" ], PATCH -d '{ "PowerMode":"BalancedPerformance"}' https://$bmc/redfish/v1/Systems/system "PowerMode": "BalancedPerformance", PATCH -d '{ "PowerMode":"EfficiencyFavorPerformance"}' https://$bmc/redfish/v1/Systems/system "PowerMode": "EfficiencyFavorPerformance", PATCH -d '{ "PowerMode":"EfficiencyFavorPower"}' https://$bmc/redfish/v1/Systems/system "PowerMode": "EfficiencyFavorPower", PATCH -d '{ "PowerMode":"MaximumPerformance"}' https://$bmc/redfish/v1/Systems/system "PowerMode": "MaximumPerformance", PATCH -d '{ "PowerMode":"NotARealMode"}' https://$bmc/redfish/v1/Systems/system { "PowerMode@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The value '\"NotARealMode\"' for the property PowerMode is not in the list of acceptable values.", "MessageArgs": [ "\"NotARealMode\"", "PowerMode" ], "MessageId": "Base.1.13.0.PropertyValueNotInList", "MessageSeverity": "Warning", "Resolution": "Choose a value from the enumeration list that the implementation can support and resubmit the request if the operation failed." } ] ''' Validator Results: ''' Type (ComputerSystem.v1_22_0.ComputerSystem), GET SUCCESS (time: 0:00:00.107269) ... PASS ... Elapsed time: 0:15:07 invalidPropertyValue: 62 metadataNamespaces: 4324 pass: 14323 passAction: 20 passGet: 1051 passRedfishUri: 1002 skipNoSchema: 3 skipOptional: 25582 unverifiedAdditional.complex: 21 warnDeprecated: 8 warningPresent: 83 warnings: 67 Validation has succeeded. ''' Change-Id: I56296a524b01d64adccad2d3da1757056900b6db Signed-off-by: Chris Cain <cjcain@us.ibm.com>
2024-02-07Add StandbyOffline to Redfish sensor getStateMatt Simmering1-5/+28
Currently in Redfish a sensor's state will only be "Absent" or "Enabled". In the case where a sensor is marked as not available on D-Bus it would be more accurate and informative to have the state as "StandbyOffline". A sensor's availability will be published on its xyz.openbmc_project.State.Decorator.Availability interface. Tested on Intel system. Put sensors into an unavailable state by putting CPU into S5 power state, and verified that Redfish state is "StandbyOffline". Then when sensors are back in an available state their Redfish state is back to "Enabled". Change-Id: I4b846b678a0f90f60d182ac38f1becd21265cdd2 Signed-off-by: Matt Simmering <matthew.simmering@intel.com>
2024-02-01Bump Redfish schemas to 2023.3Gunnar Mills16-48/+177
Redfish released 2023.3 1/25/2024. https://www.dmtf.org/content/redfish-release-20233-now-available It is several new schemas and added properties to a pile of schemas. One use case is: ComputerSystem v1.22.0 Added EfficiencyFavorPower and EfficiencyFavorPerformance to PowerMode https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/69122 This is a one line change to scripts/update_schemas.py and then ran the script. Tested: See the new schema versions (e.g. System 1.22.0). No new Validator errors on p10bmc. Change-Id: I5c10d78e891da71fd14187f63aa6ac682cf15598 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2024-01-23Implements ThermalMetrics schemazhanghch053-0/+98
The ThermalMetrics schema is a resource in Redfish version 2022.2[1]. It contains an array of temperature readings. It is a child of ThermalSubsystem schema[2] and it represents the thermal metrics of a chassis. Reading the current value of each temperature sensor and the corresponding link enumeration will be implemented in the next patch. This commit implements the Get and Head methods of the Redfish ThermalMetrics schema and implemented the basic information of Get. [1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0268_2022.2.pdf [2] https://redfish.dmtf.org/schemas/v1/ThermalMetrics.v1_0_1.json Test: 1. Validator passed. 2. doGet method: """ curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/ThermalMetrics { "@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/ThermalMetrics", "@odata.type": "#ThermalMetrics.v1_0_1.ThermalMetrics", "Id": "ThermalMetrics", "Name": "Thermal Metrics", } """ 3. A bad chassis ID: """ curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassisBAD/ThermalSubsystem/ThermalMetrics { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type Chassis named 'chassisBAD' was not found.", "MessageArgs": [ "Chassis", "chassisBAD" ], "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 'chassisBAD' was not found." } } """ Signed-off-by: zhanghaicheng <zhanghch05@inspur.com> Change-Id: Ib4182e7dc6e204371636a33a391e8e2a58dad113
2024-01-22Make use of filebody for dump offloadAbhilash Raju1-41/+40
Logservice has been rewritten to use file_body to offload dump files from BMC. There are two kind of dump files, BMC dump and System dump.While BMC dump just requires default support from beast::file_body, System dump requires base64 encoding support from beast. But beast::file_body do not have ready-made support for base64 encoding. So a custom file_body has been written for the base64 encoding. The openFile apis in crow::Response do not have support for unix file descriptor. Since dump files are accesses via descriptors, added new openFile api that accepts descriptors. Tested: Functionality test have been executed to verify the bmc dump offload. Did sanity test by invoking bmcweb pages via browser. Change-Id: I24192657c03d8b2f0394d31e7424c6796ba3227a Signed-off-by: Abhilash Raju <abhilash.kollam@gmail.com>
2024-01-19Remove some boost includesEd Tanous10-66/+59
The less we rely on boost, and more on std algorithms, the less people have to look up, and the more likely that our code will deduplicate. Replace all uses of boost::algorithms with std alternatives. Tested: Redfish Service Validator passes. Change-Id: I8a26f39b5709adc444b4178e92f5f3c7b988b05b Signed-off-by: Ed Tanous <edtanous@google.com>
2024-01-19Clean up tftp update to use URLEd Tanous1-51/+69
Similar to transforms we've done elsewhere, we shouldn't be parsing urls using std::string::find, regex, or anything else, as they don't handle URL % encoding properly. Change-Id: I48bb30c0c737c4df2ae73f40fc49c63bac5b658f Signed-off-by: Ed Tanous <edtanous@google.com>
2024-01-17Pass correct Argument Types to propertyValueIncorrect Error MessageGinu George3-11/+11
Changed the code to pass the parameters according to their types. Tested: Code Compiles properly and tested. Change-Id: Ie0e13d39cd892afda36dfabec871f0fe8d8498e4 Signed-off-by: Ginu George <ginugeorge@ami.com>
2024-01-15redfish: Fix the property name to get EncryptionStatusKonda Reddy Kachana1-2/+2
Update the property name to get the EncryptionStatus correctly Tested: curl localhost/redfish/v1/.../emmc { "@odata.type": "#Drive.v1_7_0.Drive", "EncryptionStatus": "Unlocked", } Change-Id: Ie7b84caba1d2566c372805330353e708ec1b3c3d Signed-off-by: Konda Reddy Kachana <kkachana@google.com>
2024-01-09Fix spelling mistakesEd Tanous13-23/+23
These were found with: codespell -w $(git ls-files | grep "\.[hc]\(pp\)\?$") At some point in the future, we might want to get this enabled in CI. Change-Id: Iccb57b2adfd06a2e177e99db2923fe4e8e329118 Signed-off-by: Ed Tanous <ed@tanous.net>
2023-12-21Fix typo in collection.hppMyung Bae1-1/+1
Commit https://gerrit.openbmc.org/c/openbmc/bmcweb/+/64087 has a typo in redfish-core/include/utils/collection.hpp ``` L33: jsonCountKeyName /= back + "@data.count"; --> jsonCountKeyName /= back + "@odata.count"; ``` Tested: - Validator passes Change-Id: Ied52944bd43ec5080c4eef141813674bab1cc0b4 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
2023-12-18Refactor PCIeDeviceList to use getCollectionMembersLakshmi Yadlapati4-48/+41
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>
2023-12-12Use MonotonicTimeStamp for bmc log idMyung Bae1-17/+61
/redfish/v1/Managers/bmc/LogServices/Journal/Entries gives the system journal entries whose ID is based on the realtime timestmap. However, the system realtime may go backward if the system time is changed either manually or via NTP. If that happens, those entries may not found via redfish GET as `sd_journal_seek_realtime_usec()`[1] may not always work on the entries which are not sorted in time-order. This may cause the inconsistency between the content of `/redfish/v1/Managers/bmc/LogServices/Journal/Entries/` and /redfish/v1/Managers/bmc/LogServices/Journal/Entries/<bmc_journal_id>`. For example, ``` sudo journalctl --vacuum-time=1s <wait for a while to clear up journal> date -s "<backward-time>" date -s "<forward-time>" ``` Run redfish journal entries and get each entry id from the output ``` curl -k -X GET https://${bmc}/redfish/v1/Managers/bmc/LogServices/Journal/Entries > rj.out ``` Take some logEntry Id that its time going backward like ``` grep "@odata.id" rj.out ``` Run redfish query for each id, and some of them can't be successful. ``` % curl -k -X GET https://${bmc}/redfish/v1/Managers/bmc/LogServices/Journal/Entries/1701604800002075 { "error": { "@Message.ExtendedInfo": [ { "@odata.type": "#Message.v1_1_1.Message", "Message": "The requested resource of type LogEntry named '1701604800002075' was not found.", "MessageArgs": [ "LogEntry", "1701604800002075" ], "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 LogEntry named '1701604800002075' was not found." } }% ``` This can also be verified by checking the failure of Redfish Validator run ``` python3 RedfishServiceValidator.py --auth Session -i https://${bmc} -u admin -p 0penBmc0 --payload Tree /redfish/v1/Managers/bmc/LogServices/Journal/Entries ``` For example, ``` ERROR - Members: GET of resource at URI /redfish/v1/Managers/bmc/LogServices/Journal/Entries/1701604800002075 returned HTTP error. Check URI. ERROR - Members: GET of resource at URI /redfish/v1/Managers/bmc/LogServices/Journal/Entries/1701604800065949 returned HTTP error. Check URI. ERROR - Members: GET of resource at URI /redfish/v1/Managers/bmc/LogServices/Journal/Entries/1701607680003048 returned HTTP error. Check URI. ``` ``` --Time goes backwrd { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/Journal/Entries/1701604800002075", "@odata.type": "#LogEntry.v1_9_0.LogEntry", "Created": "2023-12-03T12:00:00+00:00", "EntryType": "Oem", "Id": "1701604800002075", "Message": "systemd-resolved: Clock change detected. Flushing caches.", "Name": "BMC Journal Entry", "OemRecordFormat": "BMC Journal Entry", "Severity": "OK" }, ... { "@odata.id": "/redfish/v1/Managers/bmc/LogServices/Journal/Entries/1701607680003048", "@odata.type": "#LogEntry.v1_9_0.LogEntry", "Created": "2023-12-03T12:48:00+00:00", "EntryType": "Oem", "Id": "1701607680003048", "Message": "systemd-resolved: Clock change detected. Flushing caches.", "Name": "BMC Journal Entry", "OemRecordFormat": "BMC Journal Entry", "Severity": "OK" }, -- Time comes back to the previous moment ``` The solution is proposed to use <bootid> + <monototic timestamp> as the redfish journal entry id instead of realtime timestamp. Unlike realtime timestamp which may go backward, <monotonic timestamp> is monotonically increasing. Tested: - Redfish Validator passes - GET Journal Entry ID will be found even if its time goes backward. [1] https://github.com/openbmc/bmcweb/blob/7164bc62dd26ec92b01985aaae97ecc48276dea5/redfish-core/lib/log_services.hpp#L2690 Change-Id: I83bfb1ed88c9cf036f594757aa4a00d2709dd196 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
2023-11-29chassis: Tidy up lambda funcs in get chassisChau Ly1-294/+289
This commit tries to avoid the cumbersomeness of lambda functions used directly or indirectly by handleChassisGet method. Lengthy lambda functions are replaced by or involve normal functions. There's no functional change in this commit. Change-Id: I67e028cdab3ea4407dafde0a510b37a160497f48 Signed-off-by: Chau Ly <chaul@amperecomputing.com>
2023-11-20managers: use async_method_call() set PID propertiesPotin Lai1-5/+5
In sdbusplus::asio::setProperty(), the property value will be wrapped by std:variant automaticly, it will fail and show `Invalid argument [generic:22]` error if we pass the property value that has been wrapped by std::variant into sdbusplus::asio::setProperty(). Because the type of property.second is DbusVariantType, we cannot use sdbusplus::asio::setProperty() for property setting, so change it back to use async_method_call(). Tested on Bletchley: Success PATCH the properties of StepwiseControllers. ``` { "Oem": { "OpenBmc": { "Fan": { "StepwiseControllers": { "Test1": { "NegativeHysteresis": 7.0, "PositiveHysteresis": 8.0 } } } } } } ``` Signed-off-by: Potin Lai <potin.lai@quantatw.com> Change-Id: I92d9e0d6ffe97fa6ce2905e17497d4d0fffa1d58
2023-11-15ethernet: change MTU type to size_tAnthony1-2/+2
Modify the type to get this working on 64-bit system. In phosphor-dbus-interfaces, the type is `size`: https://github.com/openbmc/phosphor-dbus-interfaces/blob/8a2674b/yaml/xyz/openbmc_project/Network/EthernetInterface.interface.yaml#L26 phoshor-networkd has this correct and no other places use. https://github.com/openbmc/phosphor-networkd/blob/6f256bc591bec72dd1448522d941874b21145a81/src/ethernet_interface.hpp#L146 Tested: ``` Before: curl localhost/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 -s | grep MTU "MTUSize": 0, After: curl localhost/redfish/v1/Managers/bmc/EthernetInterfaces/eth0 -s | grep MTU "MTUSize": 1500, ``` Change-Id: If3506c6274d2083b61c5c27cc6d8e178495ccea0 Signed-off-by: Anthony <anthonyhkf@google.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2023-11-14Fix Dump and EventLog URIRavi Teja1-2/+2
This commit fixes the Dump and EventLog URI while registering BMCWEB_ROUTE Commit 168d1b1ac forgot to include the "/" at the end. Add that. Tested By: GET /redfish/v1/Managers/bmc/LogServices/Dump/Entries/id/attachment/ Change-Id: Ie8a4d8a1d5fa2b508499cc578efe531d06185c1a Signed-off-by: Ravi Teja <raviteja28031990@gmail.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2023-11-06Fix SNMP invalid Destination errorRavi Teja1-13/+25
This commit handles invalid SNMP destination error Tested by: Configure SNMP with invalid destination IP address '{"Destination": "snmp://10.6.6.256:162", "SubscriptionType": "SNMPTrap", "Protocol": "SNMPv2c"}' Change-Id: I88f81a79a6665a7adc654e138b4f07ce321898a4 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
2023-11-06Make callback a template to avoid memory leakEd Tanous1-2/+4
Tested: Gunnar built this and below for a p10bmc, webui-vue looks reasonable and the Validator had no new errors. Did a few operations: delete a log, set an ntp server, etc. Change-Id: I587ccd04515164fce1ea0bf5baf9f820347c63e6 Signed-off-by: Ed Tanous <edtanous@google.com> Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2023-11-06Remove use after free in error handling pathEd Tanous1-1/+2
Change-Id: I04476b016584f1d19af035ae51e0c04076b4de0b Signed-off-by: Ed Tanous <edtanous@google.com>
2023-11-06Break out retrieveUriToDbusMapEd Tanous1-14/+19
Change-Id: I7c01c9e455b077348ceb67e524158f997fb0c6cf Signed-off-by: Ed Tanous <edtanous@google.com>
2023-11-06Move date_h to pragma onceEd Tanous1-5/+1
Change-Id: I04864e8c47c8bb1763016b6ba1e5826450afdc72 Signed-off-by: Ed Tanous <edtanous@google.com>
2023-11-02Rename getLocationIndicatorActive/setLocationIndicatorActiveGeorge Liu3-9/+9
This commit renames getLocationIndicatorActive/setLocationIndicatorActive No functional changes. Tested: built bmcweb successfully and Validator passes Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I0c5d538c1dd9f0d8dd1e6ae4d8ba4f606b804373 Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
2023-10-31Move to file_body in boostEd Tanous2-24/+23
As is, it reads the whole file into memory before sending it. While fairly fast for the user, this wastes ram, and makes bmcweb less useful on less capable systems. This patch enables using the boost::beast::http::file_body type, which has more efficient serialization semantics than using a std::string. To do this, it adds a openFile() handler to http::Response, which can be used to properly open a file. Once the file is opened, the existing string body is ignored, and the file payload is sent instead. openFile() also returns success or failure, to allow users to properly handle 404s and other errors. To prove that it works, I moved over every instance of direct use of the body() method over to using this, including the webasset handler. The webasset handler specifically should help with system load when doing an initial page load of the webui. Tested: Redfish service validator passes. Change-Id: Ic7ea9ffefdbc81eb985de7edc0fac114822994ad Signed-off-by: Ed Tanous <ed@tanous.net>
2023-10-26Refactor getComputerSystemLakshmi Yadlapati1-215/+225
This commit refactors the getComputerSystem function into smaller functions. There is no functional change in this commit. Tested: Validator passed ''' 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" } }, "Bios": { "@odata.id": "/redfish/v1/Systems/system/Bios" }, "Boot": { "AutomaticRetryAttempts": 3, "AutomaticRetryConfig": "RetryAttempts", "AutomaticRetryConfig@Redfish.AllowableValues": [ "Disabled", "RetryAttempts" ], "BootSourceOverrideEnabled": "Disabled", "BootSourceOverrideMode": "UEFI", "BootSourceOverrideMode@Redfish.AllowableValues": [ "Legacy", "UEFI" ], "BootSourceOverrideTarget": "None", "BootSourceOverrideTarget@Redfish.AllowableValues": [ "None", "Pxe", "Hdd", "Cd", "Diags", "BiosSetup", "Usb" ], "RemainingAutomaticRetryAttempts": 3, "StopBootOnFault": "Never", "TrustedModuleRequiredToBoot": "Required" }, "BootProgress": { "LastState": "None", "LastStateTime": "1970-01-01T00:00:00.000000+00:00" }, "Description": "Computer System", "FabricAdapters": { "@odata.id": "/redfish/v1/Systems/system/FabricAdapters" }, "GraphicalConsole": { "ConnectTypesSupported": [ "KVMIP" ], "MaxConcurrentSessions": 4, "ServiceEnabled": true }, "Id": "system", "IndicatorLED": "Off", "LastResetTime": "2023-09-29T13:27:47+00:00", "Links": { "Chassis": [ { "@odata.id": "/redfish/v1/Chassis/chassis" } ], "ManagedBy": [ { "@odata.id": "/redfish/v1/Managers/bmc" } ] }, "LocationIndicatorActive": false, "LogServices": { "@odata.id": "/redfish/v1/Systems/system/LogServices" }, "Memory": { "@odata.id": "/redfish/v1/Systems/system/Memory" }, "MemorySummary": { "TotalSystemMemoryGiB": 0.0 }, "Name": "system", "PCIeDevices": [], "PCIeDevices@odata.count": 0, "PowerRestorePolicy": "LastState", "PowerState": "Off", "ProcessorSummary": { "Count": 0 }, "Processors": { "@odata.id": "/redfish/v1/Systems/system/Processors" }, "SerialConsole": { "IPMI": { "ServiceEnabled": true }, "MaxConcurrentSessions": 15, "SSH": { "HotKeySequenceDisplay": "Press ~. to exit console", "Port": 2200, "ServiceEnabled": true } }, "Status": { "Health": "OK", "HealthRollup": "OK", "State": "Disabled" }, "Storage": { "@odata.id": "/redfish/v1/Systems/system/Storage" }, "SystemType": "Physical" } ''' Change-Id: I16a0c054dfff4ace0b43e156a64fd07b3244fbc1 Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
2023-10-24utils: date: fix clang warningPatrick Williams1-4/+4
``` ../redfish-core/include/utils/extern/date.h:983:34: error: identifier '_d' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator] 983 | CONSTCD11 date::day operator "" _d(unsigned long long d) NOEXCEPT; | ~~~~~~~~~~~~^~ | operator""_d ../redfish-core/include/utils/extern/date.h:984:34: error: identifier '_y' preceded by whitespace in a literal operator declaration is deprecated [-Werror,-Wdeprecated-literal-operator] 984 | CONSTCD11 date::year operator "" _y(unsigned long long y) NOEXCEPT; | ~~~~~~~~~~~~^~ | operator""_y ``` Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I2304818ddc498441f9ed2ede54c92b7f7c48b7c1
2023-10-24clang-format: copy latest and re-formatPatrick Williams42-618/+614
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>
2023-10-23Update schemas to 2023.2Ed Tanous16-1/+284
To quote from The Redfish release [1] 2022.3 Redfish Schema Bundle – This .zip file contains the current versions of all Redfish schemas. The bundle includes 40 schema updates and developer resources. Added Compute Express Link (CXL) support (NEW) Extensions to Fabric, PCIeDevice, Processor, Memory, ComputerSystem, and Chassis schemas Defined by DMTF alliance partner Compute Express Link (CXL) Consortium Extensions to Fabric, PCIeDevice, Processor, Memory, ComputerSystem, and Chassis schemas New CXLLogicalDevice schema Added MultiFactorAuth to AccountService to configure a service for multi-factor authentication HTTP Basic authentication is not available for accounts configured for multi-factor authentication For client certificate authentication, the client provides their identity certificate during TLS handshaking For RSA SecurID, Google Authenticator, and Microsoft Authenticator, clients provide a new Token property in the session creation request Added Heater and HeaterMetrics resources [1] https://www.dmtf.org/content/redfish-release-20223-now-available Change-Id: Iefe80866bfb83e65ab98b2cf4ee2eacce5238c5b Signed-off-by: Ed Tanous <ed@tanous.net>
2023-10-20LogService: Retrieve dump generated by ManagerCarson Labrado2-108/+207
Adds support for retrieving the dump file that's generated by phosphor-debug-collector as a result of using the LogServices/Dump Action LogService.CollectDiagnosticData from the bmc Manager resource. Refactors the handling for /redfish/v1/Systems/<str>/LogServices/EventLog/Entries/<str>/attachment to use one of the new functions and remove the large lambda. Tested: I began the dump generation process by sending a POST request to /redfish/v1/Managers/bmc/LogServices/Dump/Actions/LogService.CollectDiagnosticData. That spawned a Task to track the dump being generated by phosphor-debug-collector. The dump was retrieved by querying the /redfish/v1/Managers/bmc/LogServices/Dump/Entries/<str>/attachment URI which is associated with the Task. Verified that an event log returned by querying /redfish/v1/Systems/<str>/LogServices/EventLog/Entries/<str>/attachment is the same as it was before this change. Signed-off-by: Carson Labrado <clabrado@google.com> Change-Id: I352b2628a9990bbde40f22e6134f02c89189c925
2023-10-11Fix update_schemas.py to add Oem JsonSchemasMyung Bae1-0/+4
GET on redfish/v1/JsonSchema does not show OEM schemas but shows only DMTF redfish schemas. It is because Oem schemas are not included into `schemas.hpp`. In addition, the explicit OEM JsonSchema gives the content of the file rather than the valid Json output. Tested: - Query JsonSchemas ``` curl -k -H "X-Auth-Token: $token" -X GET "https://$bmc/redfish/v1/JsonSchemas" curl -k -H "X-Auth-Token: $token" -X GET "https://$bmc/redfish/v1/JsonSchemas/<OemSchema>" e.g. curl -k -H "X-Auth-Token: $token" -X GET "https://$bmc/redfish/v1/JsonSchemas/OemManager" ``` - Redfish Service Validator passed Change-Id: I0fc9c3d4a48fb9c6ddec9591af12fd2c849331e3 Signed-off-by: Myung Bae <myungbae@us.ibm.com>
2023-10-05Update to boost 1.83.0Ed Tanous8-10/+10
In boost 1.83.0, the boost::url maintainers deprecated the header only usage of the library without warning. A discussion with the maintainers[1] made it clear that they removed the abiliy on purpose, and they're not going to add it back or add a deprecation strategy (they did say they would update the documentation to actually match the intent), and that from here on in we should be using the cmake boost project to pull in the non-header-only boost libraries we use (which at this point is ONLY boost url). This commit updates to remove the usage of boost::urls::result typedef, which was deprecated in this release (which causes a compile error) and moves it to boost::system::result. In addition, it updates our meson files to pull in the boost project as a cmake dependency. [1] https://cpplang.slack.com/archives/C01JR6C9C4U/p1696441238739129 Tested: Not yet. Change-Id: Ia7adfc0348588915440687c3ab83a1de3e6b845a Signed-off-by: Ed Tanous <edtanous@google.com>
2023-10-03Add trace when unknown user errorGunnar Mills1-0/+1
Have seen this internalError a few times. A trace would help debug why User Manager is returning an error. In line with https://github.com/openbmc/bmcweb/blob/master/DEVELOPING.md#logging-levels. IBM has bmcweb-logging=error enabled. Tested: None. Visual only. Change-Id: I16f56c3170fb92dcfb52e57c9a420cefabc4c763 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>