summaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)AuthorFilesLines
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>
2020-02-07Update update_schemas.py with new OemGunnar Mills1-1/+24
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>
2019-10-12Update Redfish schemas to 2019.2Ed Tanous1-16/+32
Note, the DMTF changed the format of the schema file pack yet again, so the script changes now to compensate for that. Tested: Ran schema validator. One unrelated failure in LogEntry, and 4 new warnings in PCIe devices (we're using a deprecated property). All other endpoints pass. Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I81c030a7c5a6a32cc12a5e7e02a9441b7891bc5d
2019-10-11Fix a bunch of warningsEd Tanous1-17/+17
using the list of warnings from here: https://github.com/lefticus/cppbestpractices/blob/e73393f25a85f83fed7399d8b65cb117d00b2231/02-Use_the_Tools_Available.md#L100 Seems like a good place to start, and would improve things a bit type-wise. This patchset attempts to correct all the issues in one shot. Tested: It builds. Will test various subsystems that have been touched Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I588c26440e5a97f718a0f0ea74cc84107d53aa1e
2019-10-10Update websocket test scriptEd Tanous1-20/+59
This commit reworks the websocket test script to be more usable without editing it. Namely it: 1. Moves the script to the websockets library, as it seems to be in more use 2. Implements an argument parser, so the script doesn't require modification of host and username/password variables to use. 3. Moves to basic auth, which doesn't require a secondary login 4. implements better parsing of the result rather than simply printing the json scructure directly. Tested: Ran ./websocket_test.py --host <myhostname> Observed streaming sensor values in the form: System_Airflow 72.00 CFM Fan_1 6153.00 RPM System_Airflow 72.22 CFM Fan_6 6048.00 RPM System_Airflow 72.24 CFM Baseboard_12Volt 12.21 Volts P105_PCH_AUX 1.05 Volts PSU1_Input_Power 94.62 Watts PSU2_Output_Current 6.72 Amps Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I617f73a5b70f61a391e9c61638f0bcf4437bf6ce
2019-05-10Redfish: fix warning in validatorEd Tanous1-1/+1
The validator gives warnings like: URI acquired ends in slash: /redfish/v1/JsonSchemas/Zone These warnings don't actually result in warnings, because the trailing slash has always been a question in the spec, but we might as well do it correctly, even if most of the tools don't take an issue with it. Tested: Ran service validator, saw no new failures, and observed no errors mentioned above. Signed-off-by: Ed Tanous <ed.tanous@intel.com> Change-Id: I184422d7a14838339253c945d7a0c91878093e17
2019-05-08Parse Message Registry header info from the fileJason M. Bills1-2/+15
This extends the Message Registry parsing to include header details that are part of the redfish resource. Tested: Verified that the MessageRegistry info all returns correctly in the redfish response. Change-Id: I6179c07f4067cd4520fce3e774d18530fede0a95 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2019-05-08Remove the static Base Message Registry fileJason M. Bills1-0/+85
This change removes the static Base Message Registry file and replaces it with a compile-time structure. A script is used to pull the Base Message Registry file from the DMTF and parse it into the .hpp structure. Tested: Verified that after running the script, I can get the same Redfish data back from the existing endpoints without using the static files. Change-Id: Ide3c61ecff62801c06619d5c3edc2229c945d8e7 Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
2019-03-11Redfish: Fix incorrect reference tag added as part of update_schemas.py scriptMarri Devender Rao1-1/+1
Change-Id: I763534d54b7630aec30883d04e02b4f478c10ab4 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
2019-02-07Fix bad link in Redfish JsonSchemas IDEd Tanous1-2/+2
Change-Id: I993ae392d87a19acd51fe093f8244a9c781dd339 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
2019-02-02Redfish: Update schema files to 2018.3Marri Devender Rao1-26/+30
Redfish schema 2018.3 was released on January 11th, 2019. While there aren't any plans to utilize any of the new services, it makes sense to keep up to date with the latest static data. This commit was largely done automatically using the update_schemas.py script. Change-Id: I74c6fac08d21629ca976ff8694fce011b5247e34 Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
2019-01-07Update schema files to 2018.2Ed Tanous1-2/+2
Redfish schema 2018.2 was released on September 20th, 2018. While there aren't any plans to utilize any of the new services, it makes sense to keep up to date with the latest static data. This commit was largely done automatically using the update_schemas.py script. Change-Id: Ieaa9f1ab2a47244ef201cfe9a064744d7d156745 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
2018-10-29[scripts] Avoid deleting Oem Schemas During UpdateJames Feist1-1/+4
Don't delete Oem json and xml files. Change-Id: I2e4e2a49c776442c5d5e9d85400d3f6dba1f1d5a Signed-off-by: James Feist <james.feist@linux.intel.com>
2018-10-16Fix JsonSchema indexesEd Tanous1-11/+82
JsonSchema was throwing errors in the validator, so implement changes to the update script to add the appropiate indexes. Tested by: Schema validator passes on the JsonSchema Fields Change-Id: I6cb2737901b55c1089aef744d3ce3c3dfe13f17f Signed-off-by: Ed Tanous <ed.tanous@intel.com>
2018-09-17Implement JsonSchema endpointEd Tanous1-0/+92
This patchset implements JsonSchema support, and automates our update of the XML metadata, and Json schema files in the future by way of a python script. Change-Id: Iec6f580d10736678149db18d87be2f140b535be9 Signed-off-by: Ed Tanous <ed.tanous@intel.com> Signed-off-by: James Feist <james.feist@linux.intel.com>
2018-08-24Make dbus monitor compatible with phosphor-restEd Tanous1-0/+21
This patchset makes the dbus monitor compatible with the upstream dbus monitor, which should help adoption. Performance seems greatly improved compared to the python implementation. The example given in the documentation of watching for sensors and state changes is checked in as a test script websocket_test.py, and seems to consume less of the CPU than the actual sensors that get produced (about 4% CPU on my ast2500) when producing 30 sensor updates per second. This can likely be improved in the future by batching change events, but it seems to be performant enough for the moment. Tested: Used test script checked in, and verified webui can register state change events properly. Change-Id: I7d4c61d0259b7773eb46df0f59f8fea1c7796450 Signed-off-by: Ed Tanous <ed.tanous@intel.com>
2018-08-15Remove VScode specific scriptEd Tanous1-29/+0
Latest version of vscode CMake plugin does this automatically, so this script has no reason to exist anymore. Change-Id: I917822c4359b85bd7afca610b25145377a07606b Signed-off-by: Ed Tanous <ed.tanous@intel.com>
2018-04-25Remove hunter and submodulesEd tanous2-422/+0
And use external project instead. This should make it easier to keep our systems up to date with yocto. Change-Id: Id2c9f3e474eebf2194eaf58b0c572f7a1421def6
2017-10-11Large updates to webserverEd Tanous1-236/+108
Do not merge yet Change-Id: I38c56844c1b0e3e8e5493c2705e62e6db7ee2102
2017-06-07incrementalEd Tanous1-31/+35
2017-05-23IncrementalEd Tanous1-2/+4
2017-05-13inrementalEd Tanous1-1/+1
2017-05-11incrementalEd Tanous1-2/+2
2017-04-25incrementalEd Tanous1-3/+26
2017-04-18incrementalEd Tanous1-1/+5
2017-04-05Make app middlewares not require specific instances of appEd Tanous3-1/+435
2017-04-05Add route printerEd Tanous1-112/+130
2017-04-03incrementalEd Tanous1-10/+7
2017-03-25incrementalEd Tanous1-42/+120
2017-03-21incrementalEd Tanous1-49/+87
2017-03-13incrementalEd Tanous1-25/+109
2017-03-08incrementalEd Tanous1-5/+5
2017-03-04incremetnalEd Tanous1-1/+6
2017-03-03incrementalEd Tanous2-29/+81
2017-03-01incrementalEd Tanous1-0/+29
2017-02-28incrementalEd Tanous1-1/+2
2017-02-28update start and add vscode scriptEd Tanous1-0/+28