summaryrefslogtreecommitdiff
path: root/static
AgeCommit message (Collapse)AuthorFilesLines
5 daysGenerate metadata at runtimeEd Tanous1-3959/+0
In the initial implementation of metadata indexing the bmc knew at compile time what schemas it could potentially publish. bmcweb took the approach of adding all schemas of all versions to the $metadata resource. Since that was made, two major changes have happened. First, Redfish has added significantly more versions of each schema, as well as significantly more schemas to the point where the metadata index is now 213KB. While this file compresses fairly well, the size is obvious from the large amount of time that redfish service validator takes to parse the schemas, compared to actually acquiring BMC redfish resources. Second, aggregation was added, where an aggregated Redfish service might implement any number of schemas, including OEM ones. In an effort to fix this, this patch takes the compile-time algorithm in update_schemas.py, and moves it into bmcweb itself, parsing the files on disk as needed on demand. This has some immediate benefits; First, is that now schemas can be potentially installed from anywhere, not only from within the bmcweb build, and they will be resolved at runtime. Second, patches that want to add support for a given schema need to only symlink the schema into the correct folder, without needing to rerun update_schemas.py. This saves time in review. Finally, this opens to door to reducing the schema versions present in the metadata to the unique set of only what this bmcweb instance, and its aggregated BMCs expose. Tested: Redfish service validator passes. Need A/B checking to verify the file is byte for byte the same. GET /redfish/v1/$metadata returns what looks like sane results, with a correct content-type. Unit tests require the use of TemporaryFileHandle, so that class is moved into a more general folder, outside of test/http. Change-Id: I326159099c6b6c4056023b2e173c5f074ed88ce1 Signed-off-by: Ed Tanous <ed@tanous.net>
5 daysAdd symlinks to folderEd Tanous224-0/+224
Now that we have the schemas moved, add symlinks back to the schemas that we use, so that they will be installed correctly. The meson option of follow_symlinks: true is added to suppress a warning about potential change in behavior in meson in the future. Change-Id: Ie24536ca04038d8137818c201d9411b95361b14f Signed-off-by: Ed Tanous <ed@tanous.net>
5 daysMove existing schemas into foldersEd Tanous230-109580/+15
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>
2024-03-05redfish-schema: add ProtocolPatrick Williams3-0/+533
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-02-01Bump Redfish schemas to 2023.3Gunnar Mills122-1804/+6296
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>
2023-10-23Update schemas to 2023.2Ed Tanous74-316/+3402
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-11Fix update_schemas.py to add Oem JsonSchemasMyung Bae5-5/+5
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-06-08Remove usage of deprecated VLanNetworkInterfaceJiaqing Zhao5-767/+0
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>
2023-05-22Update schema packs to 2023.1Ed Tanous192-642/+4320
Redfish just released 2023.1, pull it in and update the packs. This commit was generated automatically using update_schemas.py Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I8faad8392af88aa7fc3a4fd73c8e0ec3bede56e5
2023-03-21Add component integrity schemasEd Tanous5-0/+2095
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
2023-03-18Implement AggregationSourceCarson Labrado3-0/+1127
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
2023-03-14Implement AggregationSourceCollectionCarson Labrado3-0/+171
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
2023-02-28Implement AggregationServiceEd Tanous3-0/+447
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
2023-02-24Add Ports schemaGeorge Liu5-0/+4046
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
2023-02-14Fix bad namespacesEd Tanous1-2/+2
This was missed by me; At the same time as we were resolving the redfish-service-validator failure[1], I was trying to fix this. So in the result I saw: ERROR - Validation has failed: 2 problems found Which I thought was the existing false-positive, but turns out was hiding the namespace issue. Mea Culpa. [1]: https://github.com/DMTF/Redfish-Service-Validator/issues/533 Tested: Redfish service validator actually passes. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I51de9d508539756394ead1bca437ca37b61f5e40
2023-02-13Fix casing on OpenBMCEd Tanous1-1/+1
f041387d5912db27e0317805e5c341c9c472887a didn't quite fix the issue due to testing problems, which luckily CI caught. This actually fixes it. Tested: redfish service validator passes. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ieac721477b3e78165559f857c0683d0520b7fcc2
2023-02-13Fix schema validator failure regressionEd Tanous1-1/+1
Fixes regression introduced at 5b5574ace856c7f787528ab8f5e5352a90f2a6cb Because of the order in which a few patches were merged, the static $metadata file never got updated. There are other patchsets still in review to completely remove the file, which is why the validator passed on previous commits. Tested: Metadata now resolves Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I402eb0bb83220f13293e9e7c86f34a257c2f981e
2023-02-08Retab OEMManager to two space tabsEd Tanous1-294/+294
We use two space tabs elsewhere. This was done automatically in vim using the instructions here [1]: [1] https://stackoverflow.com/questions/16888658/change-2-space-indent-to-4-space-in-vim Tested: Whitespace only. No functional changes. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I95e1de853b0834aa5e14378b19e632830e73941b
2023-02-08Fix OemAccountService schemaEd Tanous1-14/+20
This schema as-written broke a bunch of Redfish specification rules for schemas, naming and other things. This commit starts to fix them. It can be used as a starting point for fixing the existing schemas. This working through testing. Tested: OpenBMCAccountService_v1.xml now passes the redfish odata schema validator. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Id991794344b8b7d36af3c44bba7214bf025deec8
2023-02-02Update schema pack to 2022.3Ed Tanous85-523/+4576
Update scripts/update_schemas.py to point at 2022.3 and run. Schema pack 2022.3 is the latest Redfish release, released 01/23/2023. It contains several new schemas and support for Multi-factor Authentication and CXL support along other things. Update done by automation. Tested: Redfish service validator passes. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I55a64d7cda26572e7b75135acc324cb44d316fe6
2023-01-23Retab OemVirtualMedia schemaEd Tanous1-6/+6
The tabs in this file were wrong. Fix them. Tested: Whitespace only. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I796852e09fb927998bdab15d31ae93bc14c7337c
2023-01-19Remove OemSession from metadataEd Tanous1-4/+0
In d678d4fc59f131cf9820c1783f86a4a6ede32995 I forgot to remove OemSession from the metadata, and it now returns invalid. This was missed in testsing, because this was originally stacked with patches that remove the $metadata hardcoding entirely, so with that patch, this error wasn't present. Tested: CI can catch this just fine. Regression fix. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I56ad68846174d42004565dd3bc75f3008720d58a
2023-01-19Remove proprietary OEMSession supportEd Tanous2-79/+0
Per https://gerrit.openbmc.org/c/openbmc/bmcweb/+/56088, this feature would be supported to the end of 2022, at which point people will have moved over to the standard Context parameter in the DMTF-published Session schema. Tested: Code removal. Code compiles. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I0ae832bde740b025150242085bf1d2909ed1ec21
2023-01-12Add FabricAdapter schemaLakshmi Yadlapati5-0/+922
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>
2022-11-08Add ThermalMetrics schemaGeorge Liu3-0/+404
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
2022-10-18Add EnvironmentMetrics schemaGeorge Liu3-0/+611
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
2022-10-05Add PowerSubsystem PowerSupply and PowerSupplyCollection schemaChicago Duan7-0/+1673
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
2022-09-30Add Fan and FanCollection schemaGeorge Liu5-0/+710
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
2022-09-28Move to 2022.2Asmitha Karunanithi55-255/+1534
Run the script update_schemas.py by pointing it to 2022.2 An overview of 2022.2 release can be found at: [1] https://www.dmtf.org/sites/default/files/Redfish_Release_2022.2_Overview.pdf Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com> Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ic729af6848badd1c81121e61a22a7115e553358a
2022-09-28Update Redfish schema pack to 2022.1Ed Tanous150-429/+2359
Update to an intermediate schema pack. This is not the newest, but is an incremental commit to allow us to differentiate different versions of the schema packs evolution. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I4e5905a3ed40ca41b095c39b4d29c074b6eaeb67
2022-08-01Include Collections for JsonSchema resourcesEd Tanous34-0/+3606
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
2022-07-07Add TermalSubsystem schemaXiaochao Ma3-0/+276
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
2022-06-17Move the JsonSchemas to be generated at runtimeEd Tanous63-1498/+0
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
2022-06-13Add PCIeSlots schemas to the BMCEd Tanous5-1/+655
We plan on using these schemas, add them to the allow list. Tested: Code generated. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I4d2cc4d580115bbaf2445469577940984e3045f0
2022-05-20Add RootOfTrustCollection and RootOfTrust under Google service root.Vidya Satyamsetti5-1/+134
These are Google only resources powered by Hoth DBus interface. The ComponentsProtected links is hardcoded for now. But it will be queried from DBus and interpreted accordingly in the future. TEST: $curl -u root:0penBmc -X GET http://[::1]:$PORT/google/v1/RootOfTrustCollection { "@odata.id": "/google/v1/RootOfTrustCollection", "@odata.type": "#RootOfTrustCollection.RootOfTrustCollection", "Members": [ { "@odata.id": "/google/v1/RootOfTrustCollection/Hoth" } ], "Members@odata.count": 1 } $ curl -u root:0penBmc -X GET http://[::1]:$PORT/google/v1/RootOfTrustCollection/Hoth { "@odata.id": "/google/v1/RootOfTrustCollection/Hoth", "@odata.type": "#RootOfTrust.v1_0_0.RootOfTrust", "Actions": { "#RootOfTrust.SendCommand": { "target": "/google/v1/RootOfTrustCollection/Hoth/Actions/RootOfTrust.SendCommand" } }, "Id": "Hoth", "Location": { "PartLocation": { "ServiceLabel": "Hoth", "Locationtype": "Embedded" } }, "Name": "RootOfTrust-Hoth", "Status": { "State": "Enabled" } $ curl -u root:0penBmc -X POST -d @req.json -H "Content-Type: application/json" http://[::1]:$PORT/google/v1/RootOfTrustCollection/Hoth/Actions/RootOfTrust.SendCommand { "CommandResponse": "033B0000" } Signed-off-by: Vidya Satyamsetti <satyamsetti@google.com> Change-Id: If64612468bb89e6d9251d848697608b7daf37339
2022-03-02Add ManagerDiagnosticData schemaSui Chen5-1/+873
This change adds the ManagerDiagnosticData schema files. Tested: ran Redfish Service Validator: + Manager Diagnostic 2021.4 Data metadataNamespaces: 2388 2390 pass: 3249 3274 passAction: 8 8 passGet: 121 123 passRedfishUri: 115 117 skipNoSchema: 3 3 skipOptional: 2184 2198 warnDeprecated: 315 315 warningPresent: 11 11 Validation has: succeeded succeeded curl -k https://$bmc/redfish/v1/JsonSchema/ManagerDiagnosticData/\ ManagerDiagnosticData.json ... "title": "#ManagerDiagnosticData.v1_0_0.ManagerDiagnosticData" } Signed-off-by: Sui Chen <suichen@google.com> Change-Id: I0d86b45350475771acdd492a98018156f8c819dd
2022-02-10Update schema pack to 2021.4Sui Chen41-203/+1433
Update the script to point to 2021.4. Tested: built for evb-ast2500, ran Redfish Service Validator: BASE 2021.4 metadataNamespaces: 2330 2388 pass: 3239 3249 passAction: 8 8 passGet: 120 121 passRedfishUri: 114 115 skipNoSchema: 3 3 skipOptional: 2180 2184 unverifiedAdditional.complex: 2 0 warnDeprecated: 315 315 warningPresent: 12 11 Validation has: succeeded succeeded Saw new schemas: curl -k https://$bmc/redfish/v1/JsonSchemas/Manager/Manager.json ... "title": "#Manager.v1_14_0.Manager" } Signed-off-by: Sui Chen <suichen@google.com> Change-Id: I6560ec010362df28e264d80452059b534b3f89ba
2022-02-09Run update-schemas.pyEd Tanous4-7/+60
Apparently these are being edited by hand in some cases, which we should avoid where possible. Based on the contents, it seems pretty likely that 71b861b64bde714410c4fe94f1628a70cb6b17aa is the offending commit that missed checking in these new index files, and was likely editing things by hand. Tested: Redfish service validator passing. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I86f6c46e61139a85ece900a665bce6ac7795800f
2022-01-26Implement Cable schemaShantappa Teekappanavar6-1/+967
This commit implements Cable and Cable collection schema on bmcweb. Testing: Validator: @odata.id /redfish/v1/Cables odata Exists PASS @odata.type #CableCollection.CableCollection odata Exists PASS Members@odata.count 2 odata Exists PASS Members Array (size: 2) links: Cable Yes ... Members[0] Link: /redfish/v1/Cables/dp0_cable0 link: Cable Yes PASS Members[1] Link: /redfish/v1/Cables/dp0_cable1 link: Cable Yes PASS Description Collection of Cable Entries none Yes PASS Name Cable Collection none Yes PASS Oem - Resource.Oem No Optional Property Name Value Type Exists Result @odata.id /redfish/v1/Cables/dp0_cable0 odata Exists PASS @odata.type #Cable.v1_0_0.Cable odata Exists PASS CableType string Yes PASS LengthMeters - number No Optional Id dp0_cable0 none Yes PASS Name Cable none Yes PASS Property Name Value Type Exists Result @odata.id /redfish/v1/Cables/dp0_cable1 odata Exists PASS @odata.type #Cable.v1_0_0.Cable odata Exists PASS CableType string Yes PASS LengthMeters - number No Optional Id dp0_cable1 none Yes PASS Name Cable none Yes PASS Note: Removed some of the fields that are optional to reduce commit msg Tesing with Curl commands: $ curl -k -X GET https://{$bmc}/redfish/v1/Cables { "@odata.id": "/redfish/v1/Cables", "@odata.type": "#CableCollection.CableCollection", "Description": "Collection of Cable Entries", "Members": [ { "@odata.id": "/redfish/v1/Cables/dp0_cable0" }, { "@odata.id": "/redfish/v1/Cables/dp0_cable1" } ], "Members@odata.count": 2, "Name": "Cable Collection" } $ curl -k -X GET https://{$bmc}/redfish/v1/Cables/dp0_cable0 { "@odata.id": "/redfish/v1/Cables/dp0_cable0", "@odata.type": "#Cable.v1_0_0.Cable", "CableType": "", "Id": "dp0_cable0", "Name": "Cable" } $ curl -k -X GET https://{$bmc}/redfish/v1/Cables/dp0_cable1 { "@odata.id": "/redfish/v1/Cables/dp0_cable1", "@odata.type": "#Cable.v1_0_0.Cable", "CableType": "", "Id": "dp0_cable1", "Name": "Cable" } Set Length property to 1.5 meters using busctl, and check the properties busctl set-property xyz.openbmc_project.Inventory.Manager \ /xyz/openbmc_project/inventory/cables/dp0_cable0 \ xyz.openbmc_project.Inventory.Item.Cable Length d 1.5 $ curl -k -X GET https://{$bmc}/redfish/v1/Cables/dp0_cable0 { "@odata.id": "/redfish/v1/Cables/dp0_cable0", "@odata.type": "#Cable.v1_0_0.Cable", "CableType": "", "Id": "dp0_cable0", "LengthMeters": 1.5, "Name": "Cable" } Signed-off-by: Shantappa Teekappanavar <sbteeks@yahoo.com> Change-Id: I832ff1c1053f4d8100d04a42cc8046a61e8c1613
2022-01-26[Fix]: Property PhysicalContext is invalid "none"sunitakx4-0/+444
Issue: Redfish validator is throwing error "PhysicalContext: This type is invalid none" for multiple temperature sensors Endpoint : /redfish/v1/Chassis/<Baseboard>/Thermal#/Temperatures/ Root Cause : PhysicalContext Schema was missing from redfish schema metadata Tested: Redfish validator script passed. *** /redfish/v1/Chassis/<baseboard>/Thermal#/Temperatures/0 Type (#Thermal.v1_3_0.Temperature), GET SUCCESS (time: 0) PASS Signed-off-by: sunitakx <sunitax.kumari@intel.com> Change-Id: Ifbfe7d96e99030c0c5ba67a1aba5080cd049e57b
2021-12-17Add GET method for TriggersLukasz Kazmierczak5-1/+991
Added GET method for retrieving details of individual Trigger searched by given Trigger name, details are extracted from Telemetry service Tested: - Added single Trigger and requested result from bmcweb via /redfish/v1/TelemetryService/Triggers/<triggername> - Added multiple Triggers numeric and discrete with various parameters (empty, non-empty), and requested results from bmcweb via /redfish/v1/TelemetryService/Triggers/<triggername> - Verified uris /redfish/v1/TelemetryService/Triggers/<triggername> by using Redfish-Service-Validator (all passed) Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com> Change-Id: I1c966b2f792324cc6f6a8784ad18a683e5ce7bd9
2021-12-17Add GET method for TriggerCollectionLukasz Kazmierczak2-0/+73
Added GET method for retrieving list of Triggers from Telemetry service Tested: - Added single Trigger and requested result from bmcweb via /redfish/v1/TelemetryService/Triggers - Added multiple Triggers numeric and discrete, and requested results from bmcweb via /redfish/v1/TelemetryService/Triggers - Verified uri /redfish/v1/TelemetryService/Triggers by using Redfish-Service-Validator with no Triggers/empty Collection (passed) Signed-off-by: Lukasz Kazmierczak <lukasz.kazmierczak@intel.com> Change-Id: Ide00eb44901ea1b97b80fc5c5ddfd97e393d4a04
2021-12-01Move to 2021.3Gunnar Mills23-56/+760
Update the script to point at 2021.3, change the path of the files since they moved again, and run the script. Since we have an exclude list, this only brings in new versions of schemas bmcweb already uses. Overview of 2021.3: https://www.dmtf.org/sites/default/files/Redfish_Release_2021.3_Overview.pdf Overall, the release wasn't huge. IBM plans to use: PCIeSlot to Processor FabricAdapter to PCIeDevice Tested: See new schemas. No new validator errors. curl -k https://$bmc/redfish/v1/JsonSchemas/Certificate/Certificate.json { "$id": "http://redfish.dmtf.org/schemas/v1/Certificate.v1_5_0.json", Change-Id: Idf28cb164d220b059dace91e352fee732bf0c842 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2021-10-04Move to 2021.2Gunnar Mills56-302/+2716
Update the script to point at 2021.2, change the path of the files since they moved yet again, and run the script. The directory structure moved back to the way they had it pre-2020.1: https://github.com/openbmc/bmcweb/commit/a778c0261282b95e14ea3f4406959638b5edb040 Since we have an exclude list, this only brings in new versions of schemas bmcweb already uses. Overview of 2021.2: https://www.dmtf.org/sites/default/files/Redfish_Release_2021.2_Overview.pdf IBM plans to use Control (for PowerCapping) and IdlePowerSaver immediately. Tested: Validator passed after DMTF/Redfish-Service-Validator/pull/423 merged. CI uses the latest Redfish-Service-Validator so not a problem for CI. For manual users only a small window where an older validator would fail. After the schemapack changes but before PR423. See the new schemas. Change-Id: I2fe539087167cf6d962c14bf31fa23861302646f Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2021-08-10Add google service rootFeras Aldahlawi3-0/+78
This commit introduces the following => Service root for Google => compiler option for the Google Root of Trust specific functionalities Tested: curl -vvvv --insecure --user $user_pass https://${bmc}/google/v1 Desing Doc can be found here https://github.com/openbmc/docs/blob/master/designs/oem/google/root_of_trust.md Change-Id: I941b5cab55179279d0eff18aa29df62c3f226e47 Signed-off-by: Feras Aldahlawi <faldahlawi@gmail.com>
2021-06-25Add Privileges schema to allow listGunnar Mills5-1/+150
The allow list should contain all schemas implemented by bmcweb. The allow list was missing the Privileges schema. The Privileges schema is referenced in the Role schema here: "AssignedPrivileges": { "description": "The Redfish privileges for this role.", "items": { "$ref": "http://redfish.dmtf.org/schemas/v1/Privileges.json#/definitions/PrivilegeType" https://redfish.dmtf.org/schemas/v1/Role.v1_3_1.json In OpenBMC CI Redfish Validator testing the following error was hit 3 times: ERROR - ConnectionError on http://redfish.dmtf.org/schemas/v1/Privileges_v1.xml: ConnectionError(ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))) Network glitch somewhere but inspired this change. Long term not sure if the allow list makes sense. While still used today (and for the immediate future) it should attempt to accurately reflect the implemented schemas in bmcweb. The allow list was added in 349a2ac3 to save space. Information on the CI Redfish Validator testing can be found at https://github.com/openbmc/openbmc-test-automation/search?q=Redfish-Service-Validator The test redownloads the schemas each time. Tested: Validator passed. See the new schema: { "@odata.id": "/redfish/v1/JsonSchemas/Privileges" }, Change-Id: Iaf3de36b211efab4115a17fd43f0263b8bd3107f Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2021-05-20Move to 2021.1Gunnar Mills116-544/+2676
Update the script to point at 2021.1 and run it. Since we have an exclude list, this only brings in new versions of schemas bmcweb already uses. Overview of 2021.1: https://www.dmtf.org/sites/default/files/Redfish_Release_2021.1_Overview.pdf Features IBM plans to use: Resource, Action, Enum, and Property Deprecated Messages Boot Progress: Setup Entered System: Stop Boot On Fault Chassis: Spare Part Number Enabled for Memory, Processor Log Entry: AutomatedServiceNotify, Resolution Power Modes Enable/Disable USB Tested: Clean run of the validator passes. Change-Id: Ib22e5ea314c41ae354930b2c5857fe9512859507 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2021-04-14Remove OemCrashdump_v1 from index.xmlGunnar Mills1-3/+0
8401529 removed OemCrashdump.json but didn't from $metadata/index.xml and the update_schemas.py. This is causing the following validator fail and holding up the bump: ERROR - The following schema URIs referenced from $metadata could not be retrieved: /redfish/v1/schema/OemCrashdump_v1.xml See https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/42245 Tested: None. Change-Id: I6106bb19c725c088b7343722c1001f4e188e216d Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2021-04-03log_services: Remove raw PECI commandJason M. Bills3-178/+0
The raw PECI command is recommended not to include in a standard build, so removing it from the bmcweb to avoid accidental inclusion. Tested: Confirmed that the raw PECI command is gone. Change-Id: I2b52e0ede089da6df6ca3ad304194de8af27b709 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2021-03-15Remove default.css from the imageEd Tanous1-99/+0
This is primarily to save space, and remove cruft. As part of the "old" json->html parser, this file was used to do the syntax highlighting for the hilight-js class we used. That parser has been removed, so this code is now dead. Tested: Has no external impact to test. Code builds. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Iebbf97003d41818abc2a9eae68c23c636f13d2e6