summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
2022-04-08registries: remove hardcoded size of MessageEntry arraysJason M. Bills1-3/+2
The latest C++ no longer requires the size of the array to be hardcoded. This removes the hardcoded size to simplify changes to the message arrays. Tested: Confirmed that event Messages are still correctly generated. Signed-off-by: Jason M. Bills <jason.m.bills@intel.com> Change-Id: I29e6a4a02c247865c275cf4ff71587bc188d5957
2022-03-28script: specify the interpreter to envNan Zhou3-3/+3
Env is generally more portable than hardcoding path. This change also keeps all scripts consistent. Tested: all can run directly. Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: Ia2636420e54fae24a5a339377de65957ed40cc7e
2022-03-08Drop message severityEd Tanous1-1/+0
In the way we store the message registry, we store both Severity and MessageSeverity. Severity as a field is deprecated, and in every case in every registry both fields have the same value. We shouldn't duplicate data in that way. This commit changes the parse_registries.py script to stop producing the Severity field into the struct. The few uses we have left are moved over to use MessageRegistry. Tested: Redfish service validator shows no errors on the /redfish/v1/Registries tree. Other errors present that were there previously and are unchanged. This saves a trivial amount: about 1kB on our compressed binary size. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ibbaf533dc59eb08365d6ed309aba16b54bc40ca1
2022-03-08Change message_registries namespace to registriesEd Tanous1-2/+2
The message_registries namespace is overly wordy, and results in very long defines. Doing this one minor change reduces the code by 50 lines. This seems worthwhile. Tested: Unit tests pass. Namespace change only. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ib1401580b3fa47596eb56cdc86e60eeeb1c2f952
2022-03-07Simplify parse_registries.pyEd Tanous1-54/+72
When formatting blocks of code, there's a lot of redundant registry.write calls that obfuscate a lot of the intent. When handling whitespace, this also makes the code a level harder to read. This commit tries to avoid large blocks of registry.write entries, to make the code easier to read. Tested: ran parse_registries.py, and verified via git that it generates the same files as it did previously. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I77a885fe3eb0738e4bfb53cf321b20f691572f5b
2022-03-07Make generated warning more prominent and helpfulEd Tanous1-7/+12
A number of reviews have been submitted that ignore this warning. While we now have 01caf624211197a993dbbd186149293f7053f9d8 which will catch these violations at CI time, that is arguably already too late, and developers will have wasted their time. This commit changes the warning to be multiple lines, with a caps header, such that it's less likely to be ignored. It also adds suggestions on how to proceed. As a note, this also standardizes privilege registry to use the same warning as the other files, which it didn't previously. Tested: Comment changes only, no functional changes. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I3224130dbf581dc962187b2fde4dc98ae26de082
2022-03-07Make parse_registries do whitespace properlyEd Tanous1-46/+49
Previously, parse_registries was not very careful about generating readable files, and relied on clang-format to "fix" them after the fact. Given they're generated, this is unforunate, and leads to some inconsistencies in reading the generated code. This commit changes the script to no longer rely on clang-format, and wrap the whole file in a clang-format off bracket. This means that our message registry generation will be consistent. As an added bonus, different versions of clang-format like to format these structures differently, so this removes one possible barrier to people updating these. This was initiated by the next patch in the series, which made a seemingly minor change to a comment, which caused a significant change in this file because of clang-format versioning. Tested: ran parse_registries.py and saw build passing. Whitespace changes only. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Id48bb43dd9d8ecc83de1840f2f1045a87e2ff796
2022-03-02Add ManagerDiagnosticData schemaSui Chen1-0/+1
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-28Generate indexes for message registriesEd Tanous1-2/+14
Being able to index into the message registry constexpr arrays will be useful in the future, so update the parse_registries script to generate an Index enum class, that allows directly indexing into the constexpr table when necessary. These indexes are used in the patchset here: https://gerrit.openbmc-project.xyz/c/openbmc/bmcweb/+/50950 to avoid a binary search lookup for each entry. Tested: No-op change, code inspection only. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I345cc26a2b17b5bcd8cfb0055642f4ae443caad4
2022-02-25scripts: websocket: make ssl optionalNan Zhou1-1/+8
Tested: The following command worked. ``` python scripts/websocket_test.py --host localhost:18080 --no-ssl ``` Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: Ib14bd8ecdb5f0cad4a8e0478d69abcdc3e46c3ec
2022-02-15Regenerate generated code as part of the buildEd Tanous1-1/+1
There are a number of cases where people don't realize that the schemas are owned by Redfish, and that some of the generated files (registries, indexes) are in fact generated, and shouldn't be modified by hand. This commit forces a regeneration of all those files within Jenkins, each time we do a local build, then does a git diff to compare if the upstream schema files and generated files are different than what is checked in, it will print the diff immediately in the Jenkins build. This should hopefully give much faster feedback to users that their change needs to modify the right files. As part of this commit, we also need to take the version string out of clang-format. CI/the system should own the clang-format version. Related commit: https://gerrit.openbmc-project.xyz/c/openbmc/openbmc-build-scripts/+/51041] Tested: Ran script, build passed. Removed the schema fixes from patch series, saw build failed. Did the same with running the openbmc-build-scripts unit test script. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I17eb0e106be267e8dbba7053b0b07ec617893c86
2022-02-10Update schema pack to 2021.4Sui Chen1-1/+1
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-01-26Implement Cable schemaShantappa Teekappanavar1-0/+2
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"sunitakx1-0/+1
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
2022-01-10Bump up privilege_registry to Redfish_1.2.0Shantappa Teekappanavar1-1/+1
Testing: - The privilege_registry.hpp was generated successfully after running the parse_registries script - bmcweb was built with newly generated privilege registry file Signed-off-by: Shantappa Teekappanavar <sbteeks@yahoo.com> Change-Id: I84b5f3eccbbb2c4f12b326b99fb41192b12d245a
2021-12-17Add GET method for TriggersLukasz Kazmierczak1-0/+1
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 Kazmierczak1-0/+1
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-14hostlogger_test.py: reformat with blackPatrick Williams1-12/+16
pycodestyle was throwing errors in CI. Run 'black' to reformat the script. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I5138493c1e0641f0e927d0cc463ff6023f54454a
2021-12-10Redfish: Script to Expose Host Log EntriesSpencerKu1-0/+88
Simple script to expose host serial console logs, Search and get the log via redfish in every 5 seconds option: --host : Host to connect to --cert : File path to cert --username : Username to connect with --password : Password to use Signed-off-by: SpencerKu <Spencer.Ku@quantatw.com> Change-Id: Ia95735e2f03a4361ee876774b5906df18ab013b8
2021-12-01Move to 2021.3Gunnar Mills1-5/+5
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 Mills1-5/+5
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-09-23Bump up base_message_registry to version Base.1.11.0Sunitha Harish1-1/+1
Tested by: Code compiles Signed-off-by: Sunitha Harish <sunharis@in.ibm.com> Change-Id: I229e5662eb20889e6da5575de31dc3c27c63ecd2
2021-08-17Fix update_schemas scriptSzymon Dompke1-6/+7
Script update_schemas.py was incorrectly generating schemas since change f395daac96c8122623700c2b124d905266ea8223. This was caused by treating 'edm' as 'edmx' during parse process. Additionally, glob pattern was incorrectly skipping all files starting with letter 'O', instead of 'Oem' phrase. This lead to python exceptions during generation, as the script was trying to recreate existing directories like 'OperatingConfig'. Unused imports were removed. Tested: - running update_schemas.py no longer generates malformed data and no exception were thrown. - all files generated by update_schemas.py are generated identically as before regression. Signed-off-by: Szymon Dompke <szymon.dompke@intel.com> Change-Id: I5e2025ec8b264a38cbf5bb944142c83c0486ce50
2021-08-04Enable pycodestyleEd Tanous4-47/+84
This commit allows our python code to be run through the CI format-code scripts. The exact content is copied from sdbusplus. Tested, ran pycodeformat on each script, observed it passing. Ran each script individually. check_base_registry seems broken previous to this commit, although it provides the same output. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I7eacfa355b794f49308b900c2988809d2aa122c3
2021-07-13Make code compile with clang-13Ed Tanous1-2/+2
Clang-13 rightfully warns that the hasWebuiRoute variable isn't declared as static. This commit resolves that, and adds the static keyword so it can be used in multiple compile units. It also adds the static keyword to the privilege registry, and the inline keyword to many methods that now need it. clang-format is also updated to version 12 in parse_registies.py, as that's what CI uses, and what most people have installed. Tested: Followed clang-tidy instructions in README.md "bitbake bmcweb" step now succeeds. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Id43b13606754cb37a404799fce155599ac3a3240
2021-07-08Generated files should not be copyrightEd Tanous1-15/+1
Because these files are generated, there is no copyright that makes sense, as these are "derivative works". sdbusplus does not include these in its generated files, bmcweb should do the same. Tested: Code compiles. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I3c729f8c03176770b31b4f54ebdbdab92daae163
2021-07-08Automate PrivilegeRegistry to codeEd Tanous1-1/+74
This commit attempts to automate the creation of our privileges structures from the redfish privilege registry. It accomplishes this by updating parse_registries.py to also pull down the privilege registry from DMTF. The script then generates privilege_registry.hpp, which include const defines for all the privilege registry entries in the same format that the Privileges struct accepts. This allows new clients to simply reference the variable to these privilege structures, instead of having to manually (ie error pronely) put the privileges in themselves. This commit updates all the routes. For the moment, override and OEM schemas are not considered. Today we don't have any OEM-specific Redfish routes, so the existing ones inherit their parents schema. Overrides have other issues, and are already incorrect as Redfish defines them. Binary size remains unchanged after this patchset. Tested: Ran redfish service validator Ran test case from f9a6708c4c6490257e2eb6a8c04458f500902476 to ensure that the new privileges constructor didn't cause us to regress the brace construction initializer. Checked binary size with: gzip -c $BBPATH/tmp/work/s7106-openbmc-linux-gnueabi/obmc-phosphor-image/1.0-r0/rootfs/usr/bin/bmcweb | wc -c 1244048 (tested on previous patchset) Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ideede3d5b39d50bffe7fe78a0848bdbc22ac387f
2021-06-25Add Privileges schema to allow listGunnar Mills1-0/+1
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-06-10Update registriesEd Tanous1-2/+2
We've had some fields get updated in the base registry that didn't seem to run the script. This commit updates us to the latest base and TaskEvent Registries. This should have no impact. Tested: Code compiles. No functional impact. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Iea4ee79fc798b57efa0e915195f72711858c61b9
2021-06-10Update clang-format version in scriptsEd Tanous1-1/+1
We're currently on clang-format-11, the scripts should represent this. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Ic4d2719d4ae28e51e0579cdcc8e8efbd47b65dbe
2021-06-10Fix shadowing of parameter in scriptsEd Tanous1-12/+12
The python registries script used the variable json, which conflicts with the "import json" module. This commit changes the name of the variable to json_dict, which is hopefully a more generic name: Tested: Ran script, observed same behavior. Registries are out of date, but will be updated in a later commit. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: Icedc1d79ff5c9d8bfc8fe5eac96a1c6ea059272a
2021-05-20Move to 2021.1Gunnar Mills1-1/+1
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-5/+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-01-26Exclude not used schemasGunnar Mills1-0/+106
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 Mills1-1/+1
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-218/+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-09-27Remove OEM schemas and related code for Dump LogServicesAsmitha Karunanithi1-13/+1
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 Karunanithi1-2/+2
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-21Update error_messages to Base 1.8.1Jason M. Bills1-0/+61
The Base message registry has updated to 1.8.1. This updates our error_messages files to match. This changes from the deprecated 'Severity' to the new 'MessageSeverity' property. It also adds a script to compare our error_messages.cpp messages against the Base message registry and flag any differences. Tested: Ran the Redfish Validator and confirmed that this change does not introduce any new failures. Change-Id: I2e5101a5b4d0c0963569493451f99521e42b0f4d Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2020-07-30EventService: Add ResourceEvent registriesSunitha Harish1-0/+2
This commit adds new files for DMTF resource registry and corresponding json message definitions. Tested by: 1. GET https://${bmc}/redfish/v1/Registries 2. GET https://${bmc}/redfish/v1/Registries/ResourceEvent 3. GET https://${bmc}/redfish/v1/Registries/ResourceEvent/ResourceEvent 4. Redfish Validator passed ( giving out messages as == Severity: The given property is deprecated by revision: This property has been deprecated in favor of MessageSeverity, which ties the values to the enumerations defined for the Health property within Status.) Signed-off-by: Sunitha Harish <sunithaharish04@gmail.com> Change-Id: Iacbedaeca85c0dcfc955bcf9b10973c0d47c98e0
2020-07-13Move registries to v1_4_0.MessageRegistryGunnar Mills1-2/+3
This implements the MessageSeverity property which tools and users should use instead of the deprecated Severity property. Since the registries use common infrastructure, easiest if just bumped together and now allows grabbing the latest when implementing a new registry, e.g. ResourceEvent. Implement this new required property, MessageSeverity, in the openbmc registry. Follow Redfish registries in having both MessageSeverity and Severity. Modified parse_registries.py to look at latest Base and TaskEvent registries and ran parse_registries.py. Tested: Built and validator passes. See new registries: curl -k https://$bmc/redfish/v1/Registries/Base { "@odata.id": "/redfish/v1/Registries/Base", "@odata.type": "#MessageRegistryFile.v1_1_0.MessageRegistryFile", "Description": "DMTF Base Message Registry File Location", "Id": "Base", "Languages": [ "en" ], "Languages@odata.count": 1, "Location": [ { "Language": "en", "PublicationUri": "https://redfish.dmtf.org/registries/Base.1.8.1.json", "Uri": "/redfish/v1/Registries/Base/Base" } ], ... curl -k https://$bmc/redfish/v1/Registries/Base/Base { "@Redfish.Copyright": "Copyright 2014-2020 DMTF. All rights reserved.", "@odata.type": "#MessageRegistry.v1_4_0.MessageRegistry", "Description": "This registry defines the base messages for Redfish", "Id": "Base.1.8.1", "Language": "en", "Messages": { "AccessDenied": { "Description": "Indicates that while attempting to access, connect to or transfer to/from another resource, the service denied access.", "Message": "While attempting to establish a connection to %1, the service denied access.", "MessageSeverity": "Critical", "NumberOfArgs": 1, "ParamTypes": [ "string" ], "Resolution": "Attempt to ensure that the URI is correct and that the service has the appropriate credentials.", " ... Change-Id: I6495af0e02036ea527036d942d6b6b5f55178bb2 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2020-07-10parse_registries.py: Move to clang-format-10Gunnar Mills1-1/+1
Moving to clang-format-10 causes no changes to the registry files. Tested: Ran parse_registries.py Change-Id: Iac80c5ca784a08eecc206ed302b33b2d96caa7f6 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
2020-06-23Move to 2020.2Gunnar Mills1-1/+1
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-10New OpenBMC OEM schema for SessionSunitha Harish1-0/+6
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 Teja1-0/+12
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 Mills1-7/+3
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-03-19Add TaskEvent registryJames Feist1-9/+17
This updates the parse registries script and adds the task registry to be used by task service. This templates the original Base Registry so it can be reused for all registries. Tested: script works, validator passes Change-Id: Id1cf3a41fb76ccaadace114725480f410bfba3e8 Signed-off-by: James Feist <james.feist@linux.intel.com>
2020-02-26Fix formatting issues in the registry parsing scriptJason M. Bills1-6/+15
This removes a couple extraneous periods from the header and updates the std::array notation with the type and size so it will build correctly. Tested: Ran the script and it produced the same output as the current base message registry header file. Change-Id: I19908a6a5fbbafbfe84a6f8364b175bfc470d715 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2020-02-13Move to 2019.4Gunnar Mills1-3/+7
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 Mills1-7/+3
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>