summaryrefslogtreecommitdiff
path: root/scripts/parse_registries.py
AgeCommit message (Collapse)AuthorFilesLines
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-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>
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-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>