summaryrefslogtreecommitdiff
path: root/static
AgeCommit message (Collapse)AuthorFilesLines
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
2021-01-26Exclude not used schemasGunnar Mills231-50380/+1
Created a list of all used schemas, and a few being added for use in reviews now. Exclude all other schemas. Developers if they wish to use a new schema will have to add it to this list and rerun update_schemas.py. Size of obmc-phosphor-image-witherspoon-<date>.rootfs.squashfs-xz: Before 2020.4: 19451904 With 2020.4, before this commit: 19492864 With this commit: 19275776 Tested: Validator passes. Change-Id: I23272049aa38c51ac7af0d3b0f5b4641a349a487 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2021-01-25Move to 2020.4Gunnar Mills191-837/+10461
2020.4 contains a lot of new schemas. New feature include: new power and thermal schemas, conditions, and new account types. For more information, see: https://www.dmtf.org/sites/default/files/Redfish_Release_2020.4_Overview.pdf Tested: Validator passes. Able to see new schemas. Change-Id: I7fb860c84fa4cff80698dcb26a463b155e6faba7 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2021-01-07Remove unused filesEd Tanous1-2/+0
Remove some ancient files that are no longer used or required. 1. JenkinsFile: Was used when this was a project that only existed on my desktop, and I used a private Jenkins instance to test it. Today, bmcweb uses the openbmc CI, which doesn't require this file. 2. scripts/run_clang_tiidy.py. This script is now part of the clang builds themselves, so it should be used from there. 3. src/ast*.cpp and src/test_resources. These were left from when bmcweb handled the ast video driver itself, and had unit tests to prove it worked. The code to run the unit tests has been long removed, we just forgot to remove the tests. 4. static/highlight.pack.js. This was previously used for json parsing in the HTML UI. It is no longer used as of commit 57fce80e24cfe08e530e0697d6c70bba14076d1c and should've been removed as part of it, but unfortunately was not. Tested: None of the above were used previously, so should have no measurable impact to the build. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I757b0dc8e4dc6cc93ba60d39218016e2f4d47ed0
2020-11-10Redfish Session : Support ClientOriginIPAddressSunitha Harish2-10/+0
This commit implements the ClientOriginIPAddress property on the session resource. The IP address is persisted across the reboot Tested by: 1. Create session POST https://${bmc}/redfish/v1/SessionService/Sessions -d '{"UserName":<>, "Password":<>}' 2. Check the session gets updated with the ClientOriginIPAddress GET https://${bmc}/redfish/v1/SessionService/Sessions/<id> 3. Redfish validator passed 4. Create session and reboot the BMC to ensure the IP address is persisted 5. Tested the basic auth populates the clientIp at req Signed-off-by: Sunitha Harish <sunharis@in.ibm.com> Change-Id: Iaa60d0657c991bde4bcf6c86819055c71c92e421
2020-10-29Revert "Redfish Session : Support ClientOriginIPAddress"Ed Tanous2-0/+10
This reverts commit e436008377fbcf287be02c9e9e1b59c6627d7673. Reason for revert: This breaks several things. 1. Not all login endpoints are handled, which lead to returning blank ip addresses 2. IP addresses are not persisted. 3. This crashes occasionally on remote_endpoint, and ignores ec. Change-Id: I58c875721cf48bf02db833c9c57a9eead5e249d5
2020-10-08Redfish Session : Support ClientOriginIPAddressSunitha Harish2-10/+0
This commit implements the ClientOriginIPAddress property on the session resource Tested by: 1. Create session POST https://${bmc}/redfish/v1/SessionService/Sessions -d '{"UserName":<>, "Password":<>}' 2. Check the session gets updated with the ClientOriginIPAddress GET https://${bmc}/redfish/v1/SessionService/Sessions/<id> 3. Redfish validator passed Signed-off-by: Sunitha Harish <sunharis@in.ibm.com> Change-Id: I4c5c6f651bb6faec0cb1b1b78d9da593ecb85ff0
2020-09-27Remove OEM schemas and related code for Dump LogServicesAsmitha Karunanithi5-317/+0
In this commit, Oem schemas for Dump LogServices are removed as per the latest Redfish schemas. Also, the code is changed w.r.t the latest schema changes. Redfish Validator Passed. Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com> Change-Id: I12c8d283cd54c32e71a2b11857e7c4cce89b9f0a
2020-09-24Move to 2020.3Asmitha Karunanithi132-1187/+11565
Run the script update_schemas.py by pointing it to 2020.3 An overview of 2020.3 release can be found at: https://www.dmtf.org/sites/default/files/Redfish_Release_2020.3_Overview.pdf Tested: Loaded on a Witherspoon and Validator passed with the latest schemas Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com> Change-Id: I6c7a2e0cbdbe599930ba453a1d8c134c22136306
2020-09-24Improve JSON->HTML conversionEd Tanous2-0/+29
The existing JSON to html conversion is quite unfortunate, as it runs several very expensive regular expressions on an output to properly invoke the correct behavior, and to escape things like links. This patchset adjusts the behavior to directly dump the tree to HTML, skipping the json step entirely. Most of the code was pulled from the nlohmann::serializer class. Small side node: This also resolves the CSP issue with the inline CSS classes that are currently embedded in the json UI. Note, in terms of user facing behavior, this finally fixes the CSS issue, so the div is now centered as designed. Previously it was left justified. Tested: Ran several redfish schemas and compared to old ones. Output appears the same in the window, and content security policy warnings are gone. Verified several links works as expected, and verified the behavior of all base types, as well as empty arrays and empty objects. All appear to work correctly. Signed-off-by: Ed Tanous <ed@tanous.net> Change-Id: Id9bf6dc33acb1603f009de4cd322e81d83f334be
2020-09-23schema: add missing tagsJames Feist2-3/+3
Tested: Made validator pass for OemManager Change-Id: I2acef893bb5ead465ebdfb631259f34f8e93031d Signed-off-by: James Feist <james.feist@linux.intel.com>
2020-08-11VirtualMedia fixes for Redfish Service ValidatorPrzemyslaw Czarnowski2-30/+10
Removes all warnings and errors for VirtualMedia - rework for OemVirtualMedia - minor adjustments for jsons Tested: Redfish Service Validator ran with no errors and/or warnings Change-Id: Ic027166153a807a8bd3a6c04f042969f16e0dc6a Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
2020-07-28Redfish: Minor changes in the Oem schemas for dumpAsmitha Karunanithi4-6/+60
In this commit, CollectDiagnisticData action in OemLogService schema is updated with two parameters. It also includes dereferencing the unused namespace in metadata xml file. Tested-By: Redfish Validator - Passed Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com> Change-Id: I093ddaef9fa786767b2853e235571a4664ee759c
2020-07-10Codespell spelling fixesGunnar Mills2-24/+24
These spelling errors were found using https://github.com/codespell-project/codespell Tested: Built and ran against validator. Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Change-Id: I214fe102550295578cfdf0fc58305897d261ce55
2020-07-10Spelling: 's/Coefficent/Coefficient/gGunnar Mills2-32/+32
Tested: Top commit (along with this) was built and ran against validator. Signed-off-by: Gunnar Mills <gmills@us.ibm.com> Change-Id: Ie5af15941250b795215cee87e757e56cce26c46e
2020-06-23Add non-versioned NamespaceGunnar Mills2-0/+8
Redfish schemas have a non-versioned Namespace of the schema: https://github.com/openbmc/bmcweb/blob/master/static/redfish/v1/schema/OemSession_v1.xml#L19 https://github.com/openbmc/bmcweb/blob/master/static/redfish/v1/schema/Zone_v1.xml#L42 Add that to OemLogEntry and OemLogService. This fixes the "badNamespaceInclude" Redfish validator errors. These schemas used to have this but was removed in https://github.com/openbmc/bmcweb/commit/239c4b88e53fc39f1e3ac9597acfcd8378bdfc4e# Alternative to https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/33918/4/static/redfish/v1/%2524metadata/index.xml Tested: Validator passes. Change-Id: Ibcc831db3d5c243bd0fff2e527e04392aebeda5f Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2020-06-23Move to 2020.2Gunnar Mills165-2325/+6876
Point update_schemas.py at 2020.2 and run the script. An overview of 2020.2 can be found at: https://www.dmtf.org/sites/default/files/Redfish_Release_2020.2_Overview.pdf Tested: Loaded on a Witherspoon and ran the validator. See the new schemas. Change-Id: Idb6cbc58efe484dcffa0cc22deff3a4746af67ed Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2020-06-22Redfish: Changes in Oem schemas for dumpAsmitha Karunanithi4-172/+111
Implemented Oem schemas for extending LogService and LogEntry Signed-off-by: Asmitha Karunanithi <asmitk01@in.ibm.com> Change-Id: I37d56b33403700ee65cd6ec7dee06395525d335c
2020-06-10New OpenBMC OEM schema for SessionSunitha Harish3-0/+93
This commit defines the OemSession schema for storing - the clients unique identifier - the IP Address from where the session is created. Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com> Change-Id: I759cda25dbb2dadd9b3d14cca9076e6412b41287
2020-05-28Redfish:Define new Oem schemas for dumpRavi Teja5-0/+316
Implemented Oem schemas for extending LogService and LogEntry Testing: redfish validator passed. Change-Id: I89a76cf3bd991b36a6aa48871f25d03fbbe30f66 Signed-off-by: Ravi Teja <raviteja28031990@gmail.com>
2020-05-20Move to 2020.1Gunnar Mills206-2251/+5478
Make changes to update_schemas.py needed for the move and run update_schemas.py. Need 1.3.6 or later version of Redfish-Service-Validator. CI uses the master branch of Redfish-Service-Validator, which has this fix. Redfish-Service-Validators before 1.3.6 will incorrectly throw errors in message registries like (Task Event Message Registry) /redfish/v1/Registries/TaskEvent/TaskEvent and (Base Message Registry) /redfish/v1/Registries/Base/Base. For more information: https://redfishforum.com/thread/323/validator-errors-when-moving-release This does introduce some "warnDeprecated" due to "Severity" becoming Deprecated in MessageRegistry v1_4_0. Since all bmcweb Registries are <v1_4_0, not a real problem. Redfish has no Base Message Registry and Task Event Message Registry available to move to something that uses MessageRegistry v1_4_0. Will take up with Redfish. 2020.1 includes new features like AutoRebot (Boot -> AutomaticRetry), factory reset (ResetToDefaults action), and Modified Event Log property which are in OpenBMC's D-Bus interfaces today. Tested: Built bmcweb, loaded on a Witherspoon, and ran the validator. Validator passed. See new schemas: curl -k https://${bmc}/redfish/v1/JsonSchemas/SecureBootDatabase { "@odata.context": "/redfish/v1/$metadata#JsonSchemaFile.JsonSchemaFile", "@odata.id": "/redfish/v1/JsonSchemas/SecureBootDatabase", "@odata.type": "#JsonSchemaFile.v1_0_2.JsonSchemaFile", "Name": "SecureBootDatabase Schema File", Change-Id: If30fcc50276aea44d8a77ed547ee0cbd72e4cf1a Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2020-02-13Move to 2019.4Gunnar Mills126-379/+12546
Make changes to update_schemas.py needed for the move and run update_schemas.py. To see an overview of 2019.4 see https://www.dmtf.org/sites/default/files/Redfish_Release_2019.4_Overview.pdf Tested: Built bmcweb, loaded on a Witherspoon, and ran the validator. No errors. See new schemas: curl -k https://${bmc}/redfish/v1/JsonSchemas/VCATEntry { "@odata.context": "/redfish/v1/$metadata#JsonSchemaFile.JsonSchemaFile", "@odata.id": "/redfish/v1/JsonSchemas/VCATEntry", "@odata.type": "#JsonSchemaFile.v1_0_2.JsonSchemaFile", "Name": "VCATEntry Schema File", "Schema": "#VCATEntry.VCATEntry", Change-Id: I5ae6e3c655e44c82c4457515555bdb934dfb7763 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2020-02-10Move to 2019.3Gunnar Mills34-388/+3138
Make changes to update_schemas.py needed for the move and run update_schemas.py. old path (2019.2) DSP8010_2019.2/DSP8010_2019.2/json-schema/MemoryMetrics.v1_1_2.json DSP8010_2019.2/DSP8010_2019.2/openapi/Memory.v1_0_3.yaml DSP8010_2019.2/DSP8010_2019.2/csdl/AccelerationFunction_v1.xml new path (2019.3) DSP8010_2019.3/csdl/Memory_v1.xml DSP8010_2019.3/json-schema/UpdateService.v1_1_2.json DSP8010_2019.3/openapi/Zone.v1_3_1.yaml To see an overview of 2019.3 see https://www.dmtf.org/sites/default/files/Redfish_Release_2019.3_Overview.pdf Tested: Built bmcweb, loaded on a Witherspoon, and ran the validator. No errors. Change-Id: I0deaf88b884d65fffa31fcf66183ed61a930a073 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2020-02-07Update update_schemas.py with new OemGunnar Mills1-8/+8
Several Oem schemas have been added but the update_schemas.py has not been updated. Added them to the update_schemas.py so the static/redfish/v1/$metadata/index.xml is correctly built by update_schemas.py. This is needed to move us to 2019.3 and eventually 2019.4. Ideally, we would not just have a bunch of metadata_index.write to write the Oem schemas to $metadata/index.xml but this will do for now. https://github.com/openbmc/bmcweb/issues/32 is to improve this. Tested: Ran update_schemas.py and loaded that image on a Witherspoon and ran the validator. No errors. Change-Id: Iade028e690c31e25a72503d9352bc75eb7ee58dc Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2020-02-07Move Crashdump to OemCrashdumpGunnar Mills4-13/+13
All other Oem Schemas start with Oem. This is used by the update_schemas.py to determine an Oem schema and is a reasonable requirement for Oem schemas. https://github.com/openbmc/bmcweb/blob/a3268f98f308ca7c8660b1ace44d5b9a40be204b/scripts/update_schemas.py#L43 Tested: Ran the validator against this change on a Witherspoon with BMCWEB_ENABLE_REDFISH_CPU_LOG enabled and OemCheck true. Validator passed. Might be worth running on a system that actually uses BMCWEB_ENABLE_REDFISH_CPU_LOG. curl -k https://${bmc}/redfish/v1/Systems/system/LogServices/Crashdump { "@odata.context": "/redfish/v1/$metadata#LogService.LogService", "@odata.id": "/redfish/v1/Systems/system/LogServices/Crashdump", "@odata.type": "#LogService.v1_1_0.LogService", "Actions": { "#LogService.ClearLog": { "target": "/redfish/v1/Systems/system/LogServices/Crashdump/Actions/LogService.ClearLog" }, "Oem": { "#Crashdump.OnDemand": { "target": "/redfish/v1/Systems/system/LogServices/Crashdump/Actions/Oem/Crashdump.OnDemand" } } }, "Description": "Oem Crashdump Service", "Entries": { "@odata.id": "/redfish/v1/Systems/system/LogServices/Crashdump/Entries" }, "Id": "Oem Crashdump", "MaxNumberOfRecords": 3, "Name": "Open BMC Oem Crashdump Service", "OverWritePolicy": "WrapsWhenFull" } Change-Id: Iacc11be1284b99c2ed9a6c2ca0a936bd97855afb Signed-off-by: Gunnar Mills <gmills@us.ibm.com>