History log of /openbmc/bmcweb/redfish-core/include/redfish.hpp (Results 1 – 25 of 133)
Revision Date Author Comments
# 40e9b92e 10-Sep-2024 Ed Tanous <etanous@nvidia.com>

Use SPDX identifiers

SPDX identifiers are simpler, and reduce the amount of cruft we have in
code files. They are recommended by linux foundation, and therefore we
should do as they allow.

This pa

Use SPDX identifiers

SPDX identifiers are simpler, and reduce the amount of cruft we have in
code files. They are recommended by linux foundation, and therefore we
should do as they allow.

This patchset does not intend to modify any intent on any existing
copyrights or licenses, only to standardize their inclusion.

[1] https://www.linuxfoundation.org/blog/blog/copyright-notices-in-open-source-software-projects

Change-Id: I935c7c0156caa78fc368c929cebd0f068031e830
Signed-off-by: Ed Tanous <etanous@nvidia.com>

show more ...


# 3cd7072b 06-Apr-2024 Ed Tanous <ed@tanous.net>

Move run and redfish to compile units

Meson supports unity builds[1] natively. There's no reason to continue
with the pseudo unity build we've been using by putting implementations
in header files.

Move run and redfish to compile units

Meson supports unity builds[1] natively. There's no reason to continue
with the pseudo unity build we've been using by putting implementations
in header files.

This commit is the first in a long series of starting to break this up
into smaller compile units, in the hopes of dropping incremental compile
times for developers, and reduce the total per-core memory usage that
gcc requires.

This commit breaks out the run() function from main() and the
constructor of RedfishService from redfish.hpp into their own compile
units. According to tracing, even after broken out, these are still by
far the two longest to compile units in the build.

Tested: Code compiles. Debug build on a 24 core build server results in
a decrease in compile time for compiling just bmcweb from 1m38s to
1m22s.

[1] https://mesonbuild.com/Unity-builds.html

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

show more ...


# 5ae1f7f3 08-Mar-2021 zhanghch05 <zhanghch05@inspur.com>

Implements ThermalMetrics schema

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 i

Implements ThermalMetrics schema

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

show more ...


# 168d1b1a 27-Mar-2023 Carson Labrado <clabrado@google.com>

LogService: Retrieve dump generated by Manager

Adds support for retrieving the dump file that's generated by
phosphor-debug-collector as a result of using the LogServices/Dump
Action LogService.Coll

LogService: Retrieve dump generated by Manager

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

show more ...


# e4e54232 29-Sep-2022 George Liu <liuxiwei@inspur.com>

Implements Fan schema

This commit implements the Redfish Fan schema and fetches basic
information about each fan. The code first validates the chassis ID and
then validates the fan ID by obtaining a

Implements Fan schema

This commit implements the Redfish Fan schema and fetches basic
information about each fan. The code first validates the chassis ID and
then validates the fan ID by obtaining a list of fans through the
endpoints of the cooled_by association. Additionally, common properties
are added.

Tested: Validator passes

1. doGet method to get Fan

'''
curl -k https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan2
{
"@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan2",
"@odata.type": "#Fan.v1_3_0.Fan",
"Id": "fan2",
"Name": "Fan"
}

2. Input the wrong chassisId with the doGet method to get Fan
curl -k https://${bmc}/redfish/v1/Chassis2/chassis/ThermalSubsystem/Fans/fan3
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The requested resource of type named 'fan3' was not found.",
"MessageArgs": [
"",
"fan3"
],
"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 named 'fan3' was not found."
}
}

3. Input the wrong fanId with the doGet method to get fan
curl -k https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan78
{
"@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan78",
"@odata.type": "#Fan.v1_3_0.Fan",
"Id": "fan78",
"Name": "Fan",
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The requested resource of type Fan named 'fan78' was not found.",
"MessageArgs": [
"Fan",
"fan78"
],
"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 Fan named 'fan78' was not found."
}
}
'''

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I44994a998fd9c497d794e2568cc0148120bfbc15
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>

show more ...


# 9516f41f 29-Sep-2022 George Liu <liuxiwei@inspur.com>

Implements FanCollection schema

The FanCollection schema is a resource in Redifsh version 2022.2 [1]
that represents the management properties for the monitoring and
management of cooling fans imple

Implements FanCollection schema

The FanCollection schema is a resource in Redifsh version 2022.2 [1]
that represents the management properties for the monitoring and
management of cooling fans implemented by Redfish [2].

This commit retrieves the fan collection by obtaining the endpoints of
the `cooled_by` association. The `cooled_by` association represents the
relationship between a chassis and the fans responsible for providing
cooling to the chassis.

ref:
[1] https://www.dmtf.org/sites/default/files/standards/documents/DSP0268_2022.2.pdf
[2] http://redfish.dmtf.org/schemas/v1/Fan.v1_3_0.json

Redfish validator is currently failing. In order for the validator to
pass, it is necessary to merge this commit with
https://gerrit.openbmc.org/c/openbmc/bmcweb/+/57559

Tested:
1. doGet method to get FanCollection
```
curl -k -H "X-Auth-Token: $token" -X GET
https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans
{
"@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans",
"@odata.type": "#FanCollection.FanCollection",
"Description": "The collection of Fan resource instances chassis",
"Members": [
{
"@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan5"
},
{
"@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan4"
},
{
"@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan3"
},
{
"@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan2"
},
{
"@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan1"
},
{
"@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem/Fans/fan0"
}
],
"Members@odata.count": 6,
"Name": "Fan Collection"
}

2. Input the wrong chassisId with the doGet method
curl -k https://${bmc}/redfish/v1/Chassis/chassis11/ThermalSubsystem/Fans
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The requested resource of type Chassis
named 'chassis11' was not found.",
"MessageArgs": [
"Chassis",
"chassis11"
],
"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
'chassis11' was not found."
}
}
```

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: If5e9ff5655f444694c7ca1aea95d45e2c9222625
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>

show more ...


# 100afe56 07-Jun-2023 Ed Tanous <edtanous@google.com>

Move all ComputerSystem routes to bottom

Similar to what we've done elsewhere, consolidate all the BMCWEB_ROUTE
calls on the bottom of the file. This is a consolidation such that you
no longer have

Move all ComputerSystem routes to bottom

Similar to what we've done elsewhere, consolidate all the BMCWEB_ROUTE
calls on the bottom of the file. This is a consolidation such that you
no longer have to hunt for all the entry points into these handlers.

Tested: Code compiles

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

show more ...


# 61b1eb21 14-Mar-2023 Willy Tu <wltu@google.com>

storage: Support new StorageController

Move Storage to v1.13.0. The Storage schema moved StorageControllers to
its own resource + collection and deprecated the existing
StorageControllers property i

storage: Support new StorageController

Move Storage to v1.13.0. The Storage schema moved StorageControllers to
its own resource + collection and deprecated the existing
StorageControllers property in Storage. A link to the collection has
been added in Storage instead.

The StorageController and StorageControllerCollection are added based
on the old resource as specified in
https://redfish.dmtf.org/schemas/v1/Storage.v1_14_0.json

Added the new StorageController to remove the deprecated
`Storage/StorageControllers`. This will have the same functionility as
the existing StorageController with the exception that HealthPopulate
is not supported right now.

There will be no customer impact (other than Health resource). The
clients will now need to get the StorageController collection and then
Storagecontroller instead of directly from Storage.

Tested:
RedfishValidator passed for Storage
```
*** /redfish/v1/Systems/system/Storage
INFO - Attempt 1 of /redfish/v1/Systems/system/Storage
INFO - Response Time for GET to /redfish/v1/Systems/system/Storage: 0.04373445897363126 seconds.
INFO - Type (StorageCollection.StorageCollection), GET SUCCESS (time: 0:00:00.044128)
INFO - Attempt 1 of /redfish/v1/Systems/system/Storage/1
INFO - Response Time for GET to /redfish/v1/Systems/system/Storage/1: 0.3353928590659052 seconds.
INFO - PASS
INFO -
*** /redfish/v1/Systems/system/Storage/1
INFO - Type (Storage.v1_13_0.Storage), GET SUCCESS (time: 0:00:00.335720)
*** /redfish/v1/Systems/system/Storage/1/Controllers
INFO - Type (StorageControllerCollection.StorageControllerCollection), GET SUCCESS (time: 0:00:00.046414)
INFO - Attempt 1 of /redfish/v1/Systems/system/Storage/1/Controllers/cpld
INFO - Response Time for GET to /redfish/v1/Systems/system/Storage/1/Controllers/cpld: 0.05196243803948164 seconds.
INFO - Attempt 1 of /redfish/v1/Systems/system/Storage/1/Controllers/morristown
INFO - Response Time for GET to /redfish/v1/Systems/system/Storage/1/Controllers/morristown: 0.05082511808723211 seconds.
INFO - PASS
INFO -
...
*** /redfish/v1/Systems/system/Storage/1/Controllers/controller_0
INFO - Type (StorageController.v1_6_0.StorageController), GET SUCCESS (time: 0:00:00.052223)
INFO - PASS
INFO -
*** /redfish/v1/Systems/system/Storage/1/Controllers/controller_1
INFO - Type (StorageController.v1_6_0.StorageController), GET SUCCESS (time: 0:00:00.051165)
INFO - PASS
INFO -
```

```
wget -qO - http://localhost:80/redfish/v1/Systems/system/Storage/1/Controllers
{
"@odata.id": "/redfish/v1/Systems/system/Storage/1/Controllers",
"@odata.type": "#StorageControllerCollection.StorageControllerCollection",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/system/Storage/1/Controllers/controller_0"
},
{
"@odata.id": "/redfish/v1/Systems/system/Storage/1/Controllers/controller_1"
}
],
"Members@odata.count": 2,
"Name": "Storage Controller Collection"
}
```

```
wget -qO - http://localhost:80/redfish/v1/Systems/system/Storage/1/Controllers/controller_1
{
"@odata.id":
"/redfish/v1/Systems/system/Storage/1/Controllers/controller_1",
"@odata.type": "#StorageController.v1_6_0.StorageController",
"Id": "cpld",
"Name": "cpld",
"Status": {
"State": "Enabled"
}
}
```

Change-Id: I1c171514d5613f93d283d764ffb69b16dc3ba74d
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 5e44e3d8 16-Mar-2021 AppaRao Puli <apparao.puli@linux.intel.com>

Add SSE style subscription support to eventservice

This commit adds the SSE style eventservice subscription style event
Using this, end user can subscribe for Redfish event logs using GET
on SSE uri

Add SSE style subscription support to eventservice

This commit adds the SSE style eventservice subscription style event
Using this, end user can subscribe for Redfish event logs using GET
on SSE uris from browser.

Tested:
- From Browser did GET on above SSE URI and
generated some Redfish event logs(power cycle)
and saw redfish event logs streaming on browser.
- After SSE registration, Check Subscription collections
and GET on individual subscription and saw desired
response.
- Ran RedfishValidation and its passed.

Change-Id: I7f4b7a34974080739c4ba968ed570489af0474de
Signed-off-by: AppaRao Puli <apparao.puli@linux.intel.com>
Signed-off-by: P Dheeraj Srujan Kumar <p.dheeraj.srujan.kumar@intel.com>
Signed-off-by: Ed Tanous <edtanous@google.com>

show more ...


# 00ef5dc6 05-Oct-2022 George Liu <liuxiwei@inspur.com>

Implements PowerSupply schema

This commit implements the Redfish PowerSupply schema and populates
the PowerSupplyCollection members. The PowerSupply is a grandchild
of the PowerSubsystem. PowerSuppl

Implements PowerSupply schema

This commit implements the Redfish PowerSupply schema and populates
the PowerSupplyCollection members. The PowerSupply is a grandchild
of the PowerSubsystem. PowerSupply is part of the new
PowerSubsystme/ThermalSubsystem schemas, released in Redfish Version
2020.4.

This commit only displays the PowerSupplies in the chassis with
common fields like odata.id, odata.type, Id, and Name. Future commits
will add PowerSupply properties like FirmwareVersion,
LocationIndicatorActive, Status, and Asset information like
SerialNumber, PartNumber, Model.

This commit looks at the powered_by association from
Inventory.Item.Chassis to Inventory.Item.PowerSupply to find a
PowerSupply [1].

[1] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/58609

Tested: Validator passes
1. curl -k -H "X-Auth-Token: $token" -X GET
https://${bmc}/redfish/v1/Chassis/chassis/PowerSubsystem/
PowerSupplies/powersupply0
{
"@odata.id": "/redfish/v1/Chassis/chassis/PowerSubsystem/
PowerSupplies/powersupply0",
"@odata.type": "#PowerSupply.v1_5_0.PowerSupply",
"Id": "powersupply0",
"Name": "powersupply0"
}

2. Bad power supply name
curl -k -H "X-Auth-Token: $token" -X GET
https://${bmc}/redfish/v1/Chassis/chassis/PowerSubsystem/
PowerSupplies/ERROR
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The requested resource of type PowerSupply named 'ERROR'
was not found.",
"MessageArgs": [
"PowerSupply",
"ERROR"
],
"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 PowerSupply named 'ERROR'
was not found."
}
}

Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: I7b7c0e40c090a3f253f1a778edbe36be9b4317b0
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>

show more ...


# a7210020 05-Oct-2022 George Liu <liuxiwei@inspur.com>

Implements PowerSupplies schema

This commit implements the Redfish PowerSupplyCollection at
/redfish/v1/Chassis/<chassis Id>/PowerSubsystem/PowerSupplies.
It shall contain an array of links to resou

Implements PowerSupplies schema

This commit implements the Redfish PowerSupplyCollection at
/redfish/v1/Chassis/<chassis Id>/PowerSubsystem/PowerSupplies.
It shall contain an array of links to resources of type PowerSupply
that represent the power supplies that provide power to this chassis.
For the association between power supply and chassis, refer to[1].

Also, the members property is implemented in the next commit with the
PowerSupply implementation, this is so the validator will pass.

[1] https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/57428

Tested: Validator passes
1. curl -k -H "X-Auth-Token: $token" -X GET
https://${bmc}/redfish/v1/Chassis/chassis/PowerSubsystem/
PowerSupplies
{
"@odata.id": "/redfish/v1/Chassis/chassis/PowerSubsystem/
PowerSupplies"
"@odata.type": "#PowerSupplyCollection.PowerSupplyCollection",
"Description": "The collection of PowerSupply resource instances
chassis",
"Members": [
],
"Members@odata.count": 0,
"Name": "Power Supply Collection"
}

2. Bad chassisId
curl -k -H "X-Auth-Token: $token" -X GET
https://${bmc}/redfish/v1/Chassis/chassisError/PowerSubsystem/
PowerSupplies
{
"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: George Liu <liuxiwei@inspur.com>
Change-Id: I48e087d6fb52013e3a96b44391cc4d86049ac176

show more ...


# 8b2521a5 17-Feb-2023 Carson Labrado <clabrado@google.com>

Implement AggregationSource

Adds an AggregationSource resource for each satellite config present on
dbus.

Adds the AggregationSource schema which we had previously ignored.

Tested:
Querying an Agg

Implement AggregationSource

Adds an AggregationSource resource for each satellite config present on
dbus.

Adds the AggregationSource schema which we had previously ignored.

Tested:
Querying an AggregationSource returned the expected information.

curl localhost/redfish/v1/AggregationService/AggregationSources/5B247A
{
"@odata.id": "/redfish/v1/AggregationService/AggregationSources/5B247A",
"@odata.type": "#AggregationSource.v1_3_1.AggregationSource",
"HostName": "http://122.111.11.1:80",
"Id": "5B247A",
"Name": "Aggregation source",
"Password": null,
}

Service Validator passed. The Service Validator also passed after
removing the satellite config from the system such that
/redfish/v1/AggregationService/AggregationSources returns an empty
Members array.

Signed-off-by: Carson Labrado <clabrado@google.com>
Change-Id: I88b5fbc15f27cddd330ec22a25427fd8b18cf766

show more ...


# 5315c1b1 17-Feb-2023 Carson Labrado <clabrado@google.com>

Implement AggregationSourceCollection

This is an intermediate step in setting up aggregation sources. A
future patch will add aggregation sources based on the existence of
satellite configs. For no

Implement AggregationSourceCollection

This is an intermediate step in setting up aggregation sources. A
future patch will add aggregation sources based on the existence of
satellite configs. For now the collection will always return as 0
members.

Adds the AggregationSourceCollection schema which we previously
ignored.

Tested:
Service Validator passes

Signed-off-by: Carson Labrado <clabrado@google.com>
Change-Id: I65c9231289bf0a9b6392696d55bc3feb0023c694

show more ...


# 88a8a174 28-Feb-2023 Ed Tanous <edtanous@google.com>

Remove the redfish hypervisor namespace

This namespace was created due to some conflicts between these two
namespaces. This commit renames the function that's overloaded and
removes the namespace,

Remove the redfish hypervisor namespace

This namespace was created due to some conflicts between these two
namespaces. This commit renames the function that's overloaded and
removes the namespace, along with the TODO.

Tested: No access to hypervisor to test. Inspection only.

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

show more ...


# 6c068982 07-Feb-2023 Ed Tanous <edtanous@google.com>

Implement AggregationService

AggregationService is used to inform a client that some of the results
might be aggregated, and to allow setting up aggregation sources.
Today, this resource only contai

Implement AggregationService

AggregationService is used to inform a client that some of the results
might be aggregated, and to allow setting up aggregation sources.
Today, this resource only contains the basic fields, as well as
"Enabled", which informs the client of the fact that the service is
aggregation enabled.

AggregationService was one of the schemas we ignored, so this adds it to
the supported list.

Tested: Redfish service validator passes.

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

show more ...


# 4ce2c1b5 10-Feb-2023 Ed Tanous <edtanous@google.com>

Make pcie_slots compile

This code doesn't compile; Including it in redfish.hpp, even if it's
not used, ensures that we keep code compiling.

Tested: Code compiles. No functional impact.

Signed-of

Make pcie_slots compile

This code doesn't compile; Including it in redfish.hpp, even if it's
not used, ensures that we keep code compiling.

Tested: Code compiles. No functional impact.

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

show more ...


# 3179105b 12-Mar-2021 Sunny Srivastava <sunnsr25@in.ibm.com>

Implementation of FabricAdapter schema in bmcweb

This commit implements FabricAdapter and FabricAdapter collection
schema. This code assumes all FabricAdapters are under
/redfish/v1/Systems/system l

Implementation of FabricAdapter schema in bmcweb

This commit implements FabricAdapter and FabricAdapter collection
schema. This code assumes all FabricAdapters are under
/redfish/v1/Systems/system like we do for Memory and Processors.

The schema can be used to publish inventory properties for FRUs
which can be modelled as Fabric adapters.

As a current use case, this schema is required to link ports on
fabric adapters back to the system.

A FabricAdapter represents the physical fabric adapter capable of
connecting to an interconnect fabric.
Examples include but are not limited to Ethernet, NVMe over Fabrics,
Gen-Z, and SAS fabric adapters.

Tested: Manually tested on the system, Run Redfish validator. Found no
error.

{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters",
"@odata.type": "#FabricAdapterCollection.FabricAdapterCollection",
"Members": [
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/disk_backplane0"
},
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/disk_backplane1"
},
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/pcie_card0"
},
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/pcie_card3"
},
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/pcie_card4"
},
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/pcie_card8"
},
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/pcie_card10"
},
{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/pcie_card11"
}
],
"Members@odata.count": 8,
"Name": "Fabric Adapter Collection"
}

{
"@odata.id": "/redfish/v1/Systems/system/FabricAdapters/pcie_card11",
"@odata.type": "#FabricAdapter.v1_0_0.FabricAdapter",
"Id": "pcie_card11",
"Name": "Fabric Adapter"
}

Signed-off-by: sunny srivastava <sunnsr25@in.ibm.com>
Change-Id: I4d3bc31a6f0036c262c0e30481d0da4aaf59b5ab
Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>

show more ...


# 4ca3ec3c 13-Jun-2021 Albert Zhang <zhanghaodi@inspur.com>

Add Redfish EnvironmentMetrics schema in bmcweb

This commit implements Chassis' EnvironmentMetrics schema, a resource
in Redfish version 2022.2 that represents the environment metrics
implemented by

Add Redfish EnvironmentMetrics schema in bmcweb

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>

show more ...


# 4e7efda1 25-Oct-2022 Nan Zhou <nanzhoumails@gmail.com>

redfish.hpp: fix header path

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 necessa

redfish.hpp: fix header path

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

show more ...


# 77b36437 05-Feb-2021 Chicago Duan <duanzhijia01@inspur.com>

Implements PowerSubsystem schema

This commit implements the Redfish PowerSubsystem schema and collects
default property values.
PowerSupplies will be implemented in the next commit.

ref:
https://ww

Implements PowerSubsystem schema

This commit implements the Redfish PowerSubsystem schema and collects
default property values.
PowerSupplies will be implemented in the next commit.

ref:
https://www.dmtf.org/sites/default/files/standards/documents/
DSP0268_2022.2.pdf (6.86 PowerSubsystem 1.1.0)
https://redfish.dmtf.org/schemas/v1/PowerSupply.v1_1_0.json

Tested: Validator and UT passes
1. curl -k -H "X-Auth-Token: $token" -X GET
https://${bmc}/redfish/v1/Chassis/chassis/PowerSubsystem
{
"@odata.id": "/redfish/v1/Chassis/chassis/PowerSubsystem",
"@odata.type": "#PowerSubsystem.v1_1_0.PowerSubsystem",
"Id": "PowerSubsystem",
"Name": "Power Subsystem",
"Status": {
"Health": "OK",
"State": "Enabled"
}
}

2. bad chassisID
curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}
/redfish/v1/Chassis/badchassisID/PowerSubsystem/
PowerSupplies/powersupply0
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The requested resource of type Chassis named
badchassisID was not found.",
"MessageArgs": [
"Chassis",
"badchassisID"
],
"MessageId": "Base.1.13.1.ResourceNotFound",
"MessageSeverity": "Critical",
"Resolution": "Provide a valid resource identifier
and resubmit the request."
}
],
"code": "Base.1.13.1.ResourceNotFound",
"message": "The requested resource of type Chassis named
badchassisID was not found."
}
}

Signed-off-by: Chicago Duan <duanzhijia01@inspur.com>
Change-Id: I6885b1777082538eceaf7ea85a8f69966459ee43

show more ...


# 828252d5 30-Sep-2022 Jiaqing Zhao <jiaqing.zhao@intel.com>

certificate: Replace lambda with inline function

For API endpoints, it is suggested to break out the entire handlers
into a function, and not rely on a lambda at all. This brings more
readability as

certificate: Replace lambda with inline function

For API endpoints, it is suggested to break out the entire handlers
into a function, and not rely on a lambda at all. This brings more
readability as it reduces indents.

Tested:
Code compiles, and Redfish Service Validator passed.

Change-Id: I5132149c00b6f553931dae562b83bc7aee678105
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>

show more ...


# 2973963e 02-Mar-2021 Xiaochao Ma <maxiaochao@inspur.com>

Add Redfish ThermalSubsystem schema in bmcweb

The ThermalSubsystem is a new resource in Redfish version 2020.4.
It is a root for fans and temperatures. Fans are a new schema.
Temperature sensors wil

Add Redfish ThermalSubsystem schema in bmcweb

The ThermalSubsystem is a new resource in Redfish version 2020.4.
It is a root for fans and temperatures. Fans are a new schema.
Temperature sensors will be part of the new ThermalMetrics schema.

ThermalSubsystem can co-exist with the current Thermal resource.
You can also control compilation through flags.

ThermalSubsystem is an improvement on the existing Thermal schema
because
1. It includes the latest properties like LocationIndicatorActive
2. Fans and Temperatures were arrays in the old Thermal schema and
this was cumbersome and could hit limits of JSON arrays
3. Large amount of static data mixed with sensor readings, which
hurt performance
4. Inconsistent definitions of properties vs like Processor and
Memory schemas

In a future commits Fans and ThermalMetrics will be added soon.

Reference:
https://www.dmtf.org/sites/default/files/standards/documents/DSP0268_2020.4.pdf
https://redfish.dmtf.org/schemas/v1/ThermalSubsystem.v1_0_0.json

Test:
1. Validator passed.
2. doGet method:
~$ curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassis/ThermalSubsystem
{
"@odata.id": "/redfish/v1/Chassis/chassis/ThermalSubsystem",
"@odata.type": "#ThermalSubsystem.v1_0_0.ThermalSubsystem",
"Id": "chassis",
"Name": "Thermal Subsystem for Chassis",
"Status": {
"Health": "OK",
"State": "Enabled"
}
}
3. A bad chassis ID:
~$ curl -k -H "X-Auth-Token: $token" -X GET https://${bmc}/redfish/v1/Chassis/chassisSSBAD/ThermalSubsystem
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The requested resource of type Chassis named chassisSSBAD was not found.",
"MessageArgs": [
"Chassis",
"chassisSSBAD"
],
"MessageId": "Base.1.8.1.ResourceNotFound",
"MessageSeverity": "Critical",
"Resolution": "Provide a valid resource identifier and resubmit the request."
}
],
"code": "Base.1.8.1.ResourceNotFound",
"message": "The requested resource of type Chassis named chassisSSBAD was not found."
}
}

Signed-off-by: Xiaochao Ma <maxiaochao@inspur.com>
Change-Id: Ib19879f584304e5303f1a83d88bdd18c78a61633
Signed-off-by: Zhenwei Chen <zhenweichen0207@gmail.com>

show more ...


# a51fc2d2 14-Jul-2022 Sui Chen <suichen@google.com>

Manager: add ManagerDiagnosticData handler

This change adds a link in the Manager for all BMCs to an empty
ManagerDiagnosticData resource and a minimum ManagerDiagnosticData
handler.

This service i

Manager: add ManagerDiagnosticData handler

This change adds a link in the Manager for all BMCs to an empty
ManagerDiagnosticData resource and a minimum ManagerDiagnosticData
handler.

This service is backed by phosphor-health-monitor (PHM), which is
enabled by default through the "obmc-apps" package group. If PHM is
disabled, the resource will be empty.

$ curl http://${bmc}:10080/redfish/v1/Managers/bmc/ManagerDiagnosticData
{
"@odata.id": "/redfish/v1/Managers/bmc/ManagerDiagnosticData",
"@odata.type": "#ManagerDiagnosticData.v1_0_0.ManagerDiagnosticData",
"Id": "ManagerDiagnosticData",
"Name": "Manager Diagnostic Data"
}

Also ran the Redfish Service Validator to make sure no new errors are
introduced with the introduction of ManagerDiagnosticData.

Signed-off-by: Sui Chen <suichen@google.com>
Change-Id: Iba242bc3b6ebec851dbd26e149d5c92c19a7992e

show more ...


# 4e23a444 06-Jun-2022 Ed Tanous <edtanous@google.com>

Require explicit decorator on one arg constructors

We essentially follow this rule already, not relying on implicit
operators, although there are a number of cases where in theory we
could've implic

Require explicit decorator on one arg constructors

We essentially follow this rule already, not relying on implicit
operators, although there are a number of cases where in theory we
could've implicitly constructed an object.

This commit enables the clang-tidy check.

Tested: Code compiles, passes clang-tidy.

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

show more ...


# fdd26906 01-Mar-2022 Claire Weinan <cweinan@google.com>

LogService: Add support for Fault Log

The corresponding log service is at
/redfish/v1/Managers/bmc/LogServices/FaultLog

Fault Log is a new type of dump for aggregating fault data. For details
pleas

LogService: Add support for Fault Log

The corresponding log service is at
/redfish/v1/Managers/bmc/LogServices/FaultLog

Fault Log is a new type of dump for aggregating fault data. For details
please see
https://github.com/openbmc/docs/blob/master/designs/hw-fault-monitor.md

We're currently assuming we'll have a single Fault Log instance per
BMC, which can support multiple host processors.

Tested:
First enabled redfish-dump-log option

Fault Log showed up in the expected LogService collection:
./curl_bin -k -H "X-Auth-Token: $token" -X GET http://${bmc}/redfish/v1/Managers/bmc/LogServices/
{
"@odata.id": "/redfish/v1/Managers/bmc/LogServices",
"@odata.type": "#LogServiceCollection.LogServiceCollection",
"Description": "Collection of LogServices for this Manager",
"Members": [
{
"@odata.id": "/redfish/v1/Managers/bmc/LogServices/Journal"
},
{
"@odata.id": "/redfish/v1/Managers/bmc/LogServices/Dump"
},
{
"@odata.id": "/redfish/v1/Managers/bmc/LogServices/FaultLog"
}
],
"Members@odata.count": 3,
"Name": "Open BMC Log Services Collection"
}

FaultLog dump entries are created when a fault is detected by a BMC
daemon -- we don't support FaultLog dump entry creation requested by
a Redfish client via the CollectDiagnosticData LogService action.
Fault Log CollectDiagnosticData returned Not Found (HTTP error
404) as expected:
$curl -k -H "X-Auth-Token: $token" -X POST http://${bmc}/redfish/v1/Managers/bmc/LogServices/FaultLog/Actions/LogService.CollectDiagnosticData -d '{"DiagnosticDataType":"Manager", "OEMDiagnosticDataType":"FaultLog"}'
Not Found

Generated Fault Log dump entries via BMC console:
busctl call xyz.openbmc_project.Dump.Manager /xyz/openbmc_project/dump/faultlog xyz.openbmc_project.Dump.Create CreateDump a{sv} 0

Retrieved Fault Log dump entries (including with query parameters top and skip):
curl -k -H "X-Auth-Token: $token" -X GET
http://${bmc}/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries/1
curl -k -H "X-Auth-Token: $token" -X GET
http://${bmc}/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries
curl -k -H "X-Auth-Token: $token" -X GET
http://${bmc}/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries?\$skip=2
curl -k -H "X-Auth-Token: $token" -X GET http://${bmc}/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries?\$top=3

Deleted Fault Log dump entry:
curl -k -H "X-Auth-Token: $token" -X DELETE http://${bmc}/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries/1

Note: The following command to clear the Fault Log will not work until
Fault Log entries have the required D-Bus interface implemented
(xyz.openbmc_project.Dump.Entry.FaultLog):
curl -k -H "X-Auth-Token: $token" -X POST http://${bmc}/redfish/v1/Managers/bmc/LogServices/FaultLog/Actions/LogService.ClearLog

Redfish Service Validator succeeded on the following URIs:
/redfish/v1/Managers/bmc/LogServices
/redfish/v1/Managers/bmc/LogServices/FaultLog
/redfish/v1/Managers/bmc/LogServices/FaultLog/Entries

Also did cursory testing of BMC Dump (/redfish/v1/Managers/bmc/LogServices/Dump/)
and System Dump (/redfish/v1/Systems/system/LogServices/Dump/) for code
paths that were refactored.

Signed-off-by: Claire Weinan <cweinan@google.com>
Change-Id: I80b5444e61263f79e89b10abd556d59af6f17c8c

show more ...


123456