#
720c9898 |
| 11-May-2024 |
Ed Tanous <ed@tanous.net> |
Move existing schemas into folders
Reorganize the existing schemas into folders under redfish core.
The existing schema system has some problems: 1. It's hard to add new schemas 2. We have to rerun
Move existing schemas into folders
Reorganize the existing schemas into folders under redfish core.
The existing schema system has some problems: 1. It's hard to add new schemas 2. We have to rerun the script any time we want to change what schemas we use. 3. Adding schemas optionally takes effort
In an effort to combat this, this patchset moves all the existing schemas into folders that represent their namespace names
dmtf/csdl represents the CSDL that dmtf publishes oem/openbmc represents the CSDL that OpenBMC publishes
In theory, this means that in the future we can relax OEM_SCHEMAS.md, and allow folks to possibly implement their own schemas in a way that doesn't have to effect all other systems.
This also has the advantage of not requiring changes to update_schemas.py when we want to add, remove, or modify what version of a schema we use. "current" schemas are just symlinks, so they can be updated using git, and not necessarily have merge conflicts with one another.
Tested: Redfish service validator passes.
Change-Id: I6d4a130bba4cb874ef00a06ed579cc67f53dc7ae Signed-off-by: Ed Tanous <ed@tanous.net>
show more ...
|
#
3e737424 |
| 17-Apr-2024 |
Myung Bae <myungbae@us.ibm.com> |
Initialize schemas array with explicit size
Currently `update_schemas.py` generates a schema list definition like
redfish-core/include/schemas.hpp: ``` constexpr std::array schemas { "A
Initialize schemas array with explicit size
Currently `update_schemas.py` generates a schema list definition like
redfish-core/include/schemas.hpp: ``` constexpr std::array schemas { "AccountService", "ActionInfo", ... "OpenBMCAccountService", }; ```
However, if the number of schemas is more than the clang's default max size, CI may fail. The default is `-fbracket-depth=256`.
``` In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/functional:65: [1m/usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/array:288:52: [0m [0;1;31mfatal error: instantiating fold expression with 276 arguments exceeded expression nesting limit of 256 288 | -> array<enable_if_t<(is_same_v<_Tp, _Up> && ...), _Tp>, [0m | [0;1;32m ~~~~~~~~~~~~~~~~~~~~~~~~^~~~ [0m [1m../redfish-core/include/schemas.hpp:17:26: [0m [0;1;30mnote: while substituting deduced template arguments into function template '<deduction guide for array>' [with _Tp = const char *, _Up = <const char *, const char *, const char *, const char *, const char *, ... const char *>] [0m 17 | constexpr std::array schemas { [0m | [0;1;32m ^ [0m1 error generated.
```
To avoid the failure, we can set the size explicitly like ``` constexpr std::array<std::string_view,277> schemas { "AccountService", ... ```
Tested: 1) Remove `include_list` so that all possible schemas are to be used 2) Run with the fixed `scripts/update_schemas.py` 3) Compiles successfully
Change-Id: Ib68db9fd3be1b6dbe0c4b5cc0e9a4324966d759e Signed-off-by: Myung Bae <myungbae@us.ibm.com>
show more ...
|
#
1c79f93e |
| 26-Feb-2024 |
Patrick Williams <patrick@stwcx.xyz> |
redfish-schema: add Protocol
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.
Sig
redfish-schema: add Protocol
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
show more ...
|
#
480662d4 |
| 04-Oct-2023 |
Myung Bae <myungbae@us.ibm.com> |
Fix update_schemas.py to add Oem JsonSchemas
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
Fix update_schemas.py to add Oem JsonSchemas
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>
show more ...
|
#
9cfcad2d |
| 22-Feb-2023 |
Jiaqing Zhao <jiaqing.zhao@intel.com> |
Remove usage of deprecated VLanNetworkInterface
In Redfish Schema (DSP2046) 2022.3 introduces EthernetInterface 1.9.0 that allows creating VLAN interface by POST EthernetInterface [1] instead of usi
Remove usage of deprecated VLanNetworkInterface
In Redfish Schema (DSP2046) 2022.3 introduces EthernetInterface 1.9.0 that allows creating VLAN interface by POST EthernetInterface [1] instead of using the deprecated VLanNetworkInterface. This patch removes all current usage of VLanNetworkInterface.
This patchest (topic:redfish-ethernet-1.9) introduces breaking API changes to current VLAN management features. All deprecated VLAN APIs are removed, VLAN interfaces will be managed in the same way as the EthernetInterface Resource, except they can be created or deleted. Since webui-vue has not implemented anything related to VLAN yet, it is not impacted.
Solves the issue mentioned in 188cb6294105 ("ethernet: Bump EthernetInterface schema 1.4.1 -> 1.6.0")
[1] https://redfishforum.com/thread/619
Tested: Redfish validator passed on a board with VLAN interface. No VLAN interface is exposed in Redfish.
Change-Id: I9b243a5bb0f07642aa60bc13a622e862f62ee871 Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
show more ...
|
#
23203b4b |
| 16-Mar-2023 |
Ed Tanous <edtanous@google.com> |
Add component integrity schemas
Update the schema pack to include ComponentIntegrity resources. ComponentIntegrity is used for representing roots of trust, and conveying attestation parameters forwa
Add component integrity schemas
Update the schema pack to include ComponentIntegrity resources. ComponentIntegrity is used for representing roots of trust, and conveying attestation parameters forward.
Tested: Automated change
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I1c62ddeeb9151bfe2852199a9ebb12a6636e6262
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 ...
|
#
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 ...
|
#
7da1c588 |
| 21-Feb-2023 |
George Liu <liuxiwei@inspur.com> |
Add Ports schema
Based on DSP8010_2022.3 and adds the Ports schema. The port is a child of the FabricAdapters schema, and the PortCollection schema will collect all Ports information, each Port cont
Add Ports schema
Based on DSP8010_2022.3 and adds the Ports schema. The port is a child of the FabricAdapters schema, and the PortCollection schema will collect all Ports information, each Port contains Location, LocationIndicatorActive, etc., and these functions will be implemented in the next patch.
Tested: built bmcweb successfully and validator passes.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I9adfa852c3b9c5deaace0c958e477a67d49f4939
show more ...
|
#
71abefe4 |
| 10-Jan-2023 |
Lakshmi Yadlapati <lakshmiy@us.ibm.com> |
Add FabricAdapter schema
Will be used in commit https://gerrit.openbmc.org/c/openbmc/bmcweb/+/41216
From the Redfish schema "A FabricAdapter represents the physical fabric adapter capable of connec
Add FabricAdapter schema
Will be used in commit https://gerrit.openbmc.org/c/openbmc/bmcweb/+/41216
From the Redfish schema "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: built bmcweb successfully and validator passes
Change-Id: I9f8fb3bfc5b68a86b078b1261445437bdd5c550a Signed-off-by: Lakshmi Yadlapati <lakshmiy@us.ibm.com>
show more ...
|
#
204c376d |
| 12-Dec-2022 |
Ed Tanous <edtanous@google.com> |
Fix python packaging problem
Python packaging seems to have changed to be much more stringent about what version strings is accepts. It's not clear why this was done, but we need a fix to unbreak C
Fix python packaging problem
Python packaging seems to have changed to be much more stringent about what version strings is accepts. It's not clear why this was done, but we need a fix to unbreak CI.
This commit adds more parsing code into the script to parse out version numbers from the form of LogEntry.v1_2_3 to split them up into a custom class, and sort manually. Despite dropping the dependency, this ends up dropping a net 7 lines of code compared to using the library, so it seems worth it, especially given the breaking API change.
One seemingly unrelated change was that we were adding schema folders to the sort lists, which don't sort well because they have no version numbers or extensions. This fixes to only add individual files to the list of things to sort.
Tested: Code no longer crashes. Running update_schemas.py generates the same result (with one minor same-prefix sort order change).
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I1a792ffb4ad7bc71637ab1aa0648a245949aeeee
show more ...
|
#
f1240b47 |
| 28-Oct-2022 |
George Liu <liuxiwei@inspur.com> |
Add ThermalMetrics schema
Based on DSP8010_2022.2 and adds the ThermalMetrics schema. ThermalMetrics is child of the ThermalSubsystem schema. It is part of the new Power/Thermal Schemas. ThermalMetr
Add ThermalMetrics schema
Based on DSP8010_2022.2 and adds the ThermalMetrics schema. ThermalMetrics is child of the ThermalSubsystem schema. It is part of the new Power/Thermal Schemas. ThermalMetrics contains temperature readings and the corresponding link to that sensor in the sensor collection. Temperatures such as Ambient, Exhaust, Intake, and Internal can be found in the schema.
Tested: built bmcweb successfully and validator passes.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I16ad2f922acc963a0434f3d9ab5583d2242b0013
show more ...
|
#
bf7e67e7 |
| 05-Oct-2022 |
George Liu <liuxiwei@inspur.com> |
Add EnvironmentMetrics schema
Based on DSP8010_2022.2 and adds the EnvironmentMetrics schema.
Tested: built bmcweb successfully and validator passes
Signed-off-by: George Liu <liuxiwei@inspur.com>
Add EnvironmentMetrics schema
Based on DSP8010_2022.2 and adds the EnvironmentMetrics schema.
Tested: built bmcweb successfully and validator passes
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I994b48c544edc22a6bf99187b536f3e51e10b052
show more ...
|
#
fe9bd2dd |
| 30-Sep-2022 |
Chicago Duan <duanzhijia01@inspur.com> |
Add PowerSubsystem PowerSupply and PowerSupplyCollection schema
Add schemas for PowerSubsystem PowerSupply and PowerSupplyCollection.
Tested: built bmcweb successfully and validator passes.
Signed
Add PowerSubsystem PowerSupply and PowerSupplyCollection schema
Add schemas for PowerSubsystem PowerSupply and PowerSupplyCollection.
Tested: built bmcweb successfully and validator passes.
Signed-off-by: Chicago Duan <duanzhijia01@inspur.com> Change-Id: I913d690108e30c841d5dec5fa37c7b9cee43f7c1
show more ...
|
#
3d69feda |
| 26-Sep-2022 |
Ed Tanous <edtanous@google.com> |
Make the schemas.hpp generated file #include array
The script missed a #include. Add it.
Tested: Code compiles. Header change only.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ib38
Make the schemas.hpp generated file #include array
The script missed a #include. Add it.
Tested: Code compiles. Header change only.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ib38a46d8e97e4aadb596b4ff68795cea06e62fde
show more ...
|
#
1a7b3776 |
| 28-Sep-2022 |
George Liu <liuxiwei@inspur.com> |
Add Fan and FanCollection schema
Based on DSP8010_2022.2 and adds the schema of Fan and FanCollection.
Tested: built bmcweb successfully and validator passes
Signed-off-by: George Liu <liuxiwei@in
Add Fan and FanCollection schema
Based on DSP8010_2022.2 and adds the schema of Fan and FanCollection.
Tested: built bmcweb successfully and validator passes
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: Id1867a6f19d47d0fb1d686d650f7d936c33b5284
show more ...
|
#
852432ac |
| 07-Jul-2022 |
Ed Tanous <edtanous@google.com> |
Include Collections for JsonSchema resources
Redfish collection Json schema files are not versioned, and only have a single version file. In the script, we assumed that all files were versioned, an
Include Collections for JsonSchema resources
Redfish collection Json schema files are not versioned, and only have a single version file. In the script, we assumed that all files were versioned, and the script ignored files that didn't parse as versioned.
This commit fixes the script, and checks in the relevant Collection resources.
Tested: Redfish service validator passes on JsonSchemas resources and collection.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I579dac3fdfecf485f7d414842effa9ae0ee517e8
show more ...
|
#
1ec18997 |
| 28-Jun-2022 |
Xiaochao Ma <maxiaochao@inspur.com> |
Add TermalSubsystem schema
Adds the ThermalSubsystem schema to the list of the supported schemas.
Tested: Code compiles. Script generated change.
Signed-off-by: Xiaochao Ma <maxiaochao@inspur.com
Add TermalSubsystem schema
Adds the ThermalSubsystem schema to the list of the supported schemas.
Tested: Code compiles. Script generated change.
Signed-off-by: Xiaochao Ma <maxiaochao@inspur.com> Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I4540fcaa57455ec95d4c8fff71429309c2eebce3
show more ...
|
#
81d523a7 |
| 25-May-2022 |
Ed Tanous <edtanous@google.com> |
Move the JsonSchemas to be generated at runtime
Generating all of these index files at compile time is kind of wasteful, considering that it's really not that much code to generate them. This commi
Move the JsonSchemas to be generated at runtime
Generating all of these index files at compile time is kind of wasteful, considering that it's really not that much code to generate them. This commit modifies the update_schemas script to generate a C++ version of the schemas that can then be used to generate a route. This allows deleting a LOT of fixed files, for a very small incremental binary size increase.
This change will cause two impacts that a user could possibly notice.
Expand will now work properly on JsonSchemas tree. Keys on the JsonSchema schemas will now be sorted alphabetically, as we do elsewhere.
All other things should remain the same.
Tested: Redfish service validator passes.
curl --insecure --user root:0penBmc https://192.168.7.2/redfish/v1/JsonSchemas/Triggers Returns the same object as before with changes above.
This adds 2512 bytes to the bmcweb binary size, and interestingly, adds 3764 bytes to the overall rootfs size, despite the level of file deletion seen in the patch. While this is debatably "worse" than what we had before in this regard, making JsonSchemas work similar to how the rest of the Redfish tree operates, is worth the minor increase in code size.
Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ic0d568112a3784821aa6867f7bcf50705dc586db
show more ...
|