History log of /openbmc/bmcweb/redfish-core/lib/ (Results 201 – 225 of 1569)
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
47f2934c19-Mar-2024 Ed Tanous <ed@tanous.net>

Fix redundant init issues

clang-tidy-18 must've fixed their checking for these in headers.
Resolve as the robot commands.

Tested: Noop changes made by tidy. Code compiles.

Change-Id: I1de7686c597

Fix redundant init issues

clang-tidy-18 must've fixed their checking for these in headers.
Resolve as the robot commands.

Tested: Noop changes made by tidy. Code compiles.

Change-Id: I1de7686c597deffb0df91c30dae1a29f9ba7900e
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...

78d4ec4f06-Mar-2024 Ed Tanous <ed@tanous.net>

Clean up event service to use readJson

Use multiple level direct read.

Tested: Visual only. Need help if anyone wants to test.

Change-Id: I8655e74d39edcbab43fcd2a8379b085e91ed00eb
Signed-off-by: E

Clean up event service to use readJson

Use multiple level direct read.

Tested: Visual only. Need help if anyone wants to test.

Change-Id: I8655e74d39edcbab43fcd2a8379b085e91ed00eb
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...

2932dcb606-Mar-2024 Ed Tanous <ed@tanous.net>

Clean up triggers to use readJson

Use multiple level direct read

Tested: Visual only. Need help if anyone wants to test.

Change-Id: I2595a7024f1d02e02874310d1911cd4855b867be
Signed-off-by: Ed Tano

Clean up triggers to use readJson

Use multiple level direct read

Tested: Visual only. Need help if anyone wants to test.

Change-Id: I2595a7024f1d02e02874310d1911cd4855b867be
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...

9e9b604906-Mar-2024 Ed Tanous <ed@tanous.net>

Clean up Manager to use readJson

Change-Id: If4237a21aa0c5f414e20cd9e7eee2f1188097e14
Signed-off-by: Ed Tanous <ed@tanous.net>

b14f357f06-Mar-2024 Ed Tanous <ed@tanous.net>

Clean up metric report definition to use readJsonObject

Change-Id: I29a9ecbdc9011b6513dc6bfccd28e7e7158fed9b
Signed-off-by: Ed Tanous <ed@tanous.net>

3c56921806-Mar-2024 Ed Tanous <ed@tanous.net>

Clean up processor to use readJson

Change-Id: I2e72f01821e931a8d6eeb812c314de9d1c52df78
Signed-off-by: Ed Tanous <ed@tanous.net>

0885057c06-Mar-2024 Ed Tanous <ed@tanous.net>

Clean up power/thermal to use readJsonObject

Change-Id: I69ed29472b209e8782be63c3f0f2e8ca63dc14a4
Signed-off-by: Ed Tanous <ed@tanous.net>

7a31e33606-Mar-2024 Ed Tanous <ed@tanous.net>

Clean up Certificate Service to use readJson

Use multiple level direct read to simplify code.

Tested: Visual only. Need help if anyone wants to test.

Change-Id: Ib7c34daefbe2bb835cbe420b40861f2744

Clean up Certificate Service to use readJson

Use multiple level direct read to simplify code.

Tested: Visual only. Need help if anyone wants to test.

Change-Id: Ib7c34daefbe2bb835cbe420b40861f27442d05b1
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...

7cb59f6505-May-2022 Ed Tanous <edtanous@google.com>

Use readJson to simplify update

Similar to other places where we've ported the depth-based readJson
support forward, this commit ports the UpdateService handler to simplify
the code.

Signed-off-by:

Use readJson to simplify update

Similar to other places where we've ported the depth-based readJson
support forward, this commit ports the UpdateService handler to simplify
the code.

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Ia9841a10b4414f81205d3f9b49ec8aab8f9d491d

show more ...

b289614931-Jan-2024 Ed Tanous <ed@tanous.net>

Rename FileBody to HttpBody

Now that our custom body type does things more than files, it makes
sense to rename it. This commit renames the header itself, then all
instances of the class.

Tested:

Rename FileBody to HttpBody

Now that our custom body type does things more than files, it makes
sense to rename it. This commit renames the header itself, then all
instances of the class.

Tested: Basic GET requests succeed.
Change-Id: If4361ac8992fc7c268f48a336707f96e68d3576c
Signed-off-by: Ed Tanous <ed@tanous.net>

show more ...

c51afd5407-Mar-2024 Ed Tanous <ed@tanous.net>

Call systemd SetTime directly

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 s

Call systemd SetTime directly

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>

show more ...

53b00f5d08-Mar-2024 Ed Tanous <ed@tanous.net>

Clean up power schema

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

Clean up power schema

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>

show more ...

da39350a15-Mar-2024 PavanKumarIntel <pavanx.kumar.martha@intel.com>

Fix PID Zone interface name

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 nam

Fix PID Zone interface name

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>

show more ...

ad62267607-Sep-2022 Sunny Srivastava <sunnsr25@in.ibm.com>

Remove link from Chassis to PCIeDevice

The commit removes current support that assumes 1:1 system:Chassis for
Chassis/PCIeDevices.
Current implementation populates the same collection of PCIeDevices

Remove link from Chassis to PCIeDevice

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>

show more ...

9970e93f20-Feb-2024 Konstantin Aladyshev <aladyshev22@gmail.com>

Correct Actions/Manager.ResetToDefaults parameter name

According to the Redfish Data Model specification the correct parameter
name for the '/Actions/Manager.ResetToDefaults' action is not
'ResetToD

Correct Actions/Manager.ResetToDefaults parameter name

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>

show more ...

6f4bd29008-Mar-2024 Alexander Hansen <alexander.hansen@9elements.com>

fix usage of std::ranges::replace_copy

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 w

fix usage of std::ranges::replace_copy

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>

show more ...

e715d14b07-Mar-2024 Ed Tanous <ed@tanous.net>

Fix behavior when service is missing

Fix regression as part of 33e1f122b740c5de679dc0350b5f41e8d975499f
AllowedHostTransitions: look for on dbus

I have no idea why checking against .value() matters

Fix behavior when service is missing

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>

show more ...

ce73d5c807-Apr-2023 Sunitha Harish <sunithaharish04@gmail.com>

Support PATCH on IPv6StaticDefaultGateways

Currently there is no support to setting up the Static Default IPv6
gateway via redfish.

This commit adds IPv6StaticDefaultGateways parameter to the ether

Support PATCH on IPv6StaticDefaultGateways

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>

show more ...

7a859ffe05-Mar-2024 Gunnar Mills <gmills@us.ibm.com>

Sessions: Drop end / from odata.id

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 wa

Sessions: Drop end / from odata.id

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

show more ...

91c441ec23-Feb-2024 Ravi Teja <raviteja28031990@gmail.com>

DHCP Conf: Fix UseDomainName configuration

This commit modifies to use DomainEnabled D-bus property

Currently "UseDomainName" configuration is actually not controlling
DomainName setting in the bac

DHCP Conf: Fix UseDomainName configuration

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>

show more ...

33e1f12226-Feb-2024 Andrew Geissler <geissonator@yahoo.com>

AllowedHostTransitions: look for on dbus

Commit [1] introduced a new optional dbus property that OpenBMC
developers can populate to define which
redfish/v1/Systems/system/ResetActionInfo AllowableVa

AllowedHostTransitions: look for on dbus

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>

show more ...

6b9ac4f215-Feb-2024 Chris Cain <cjcain@us.ibm.com>

Systems: Add support to read AllowedPowerModes

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 s

Systems: Add support to read AllowedPowerModes

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

show more ...

e610b31620-Dec-2023 Jagpal Singh Gill <paligill@gmail.com>

manager_diagnostic_data: add metric get

Add support to fetch MemoryStatistics, FreeStorageSpaceKiB and
ProcessorStatistics for Manager Diagnostic Data.
https://redfish.dmtf.org/schemas/v1/ManagerDia

manager_diagnostic_data: add metric get

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>

show more ...

78c9020319-Feb-2024 Myung Bae <myungbae@us.ibm.com>

Refactor to pass dbus error code to caller

The aux function `getValidFabricAdapterPath()` currently handles
the error uniformly for all callers.

This commit is to make the function to pass the er

Refactor to pass dbus error code to caller

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>

show more ...

b4d593f116-Feb-2024 Carson Labrado <clabrado@google.com>

Chassis: Add support for Version property

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.I

Chassis: Add support for Version property

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

show more ...

12345678910>>...63