140e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0 240e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors 3043bec09SNan Zhou #pragma once 474eec26bSSunitha Harish /**************************************************************** 51cf53df0SEd Tanous * READ THIS WARNING FIRST 674eec26bSSunitha Harish * This is an auto-generated header which contains definitions 774eec26bSSunitha Harish * for Redfish DMTF defined messages. 81cf53df0SEd Tanous * DO NOT modify this registry outside of running the 90e2d0691SJason M. Bills * parse_registries.py script. The definitions contained within 101cf53df0SEd Tanous * this file are owned by DMTF. Any modifications to these files 111cf53df0SEd Tanous * should be first pushed to the relevant registry in the DMTF 121cf53df0SEd Tanous * github organization. 1374eec26bSSunitha Harish ***************************************************************/ 1401c78a06SNan Zhou #include "registries.hpp" 1501c78a06SNan Zhou 1601c78a06SNan Zhou #include <array> 1774eec26bSSunitha Harish 184d99bbb0SEd Tanous // clang-format off 194d99bbb0SEd Tanous 20*4a102cd4SPatrick Williams namespace redfish::registries 2174eec26bSSunitha Harish { 22*4a102cd4SPatrick Williams struct ResourceEvent 23*4a102cd4SPatrick Williams { 24*4a102cd4SPatrick Williams static constexpr Header header = { 2575ec825cSEd Tanous "Copyright 2014-2023 DMTF in cooperation with the Storage Networking Industry Association (SNIA). All rights reserved.", 2675ec825cSEd Tanous "#MessageRegistry.v1_6_0.MessageRegistry", 2756b81992SEd Tanous 1, 2856b81992SEd Tanous 3, 2956b81992SEd Tanous 0, 3074eec26bSSunitha Harish "Resource Event Message Registry", 3174eec26bSSunitha Harish "en", 3274eec26bSSunitha Harish "This registry defines the messages to use for resource events.", 3374eec26bSSunitha Harish "ResourceEvent", 3474eec26bSSunitha Harish "DMTF", 3574eec26bSSunitha Harish }; 36*4a102cd4SPatrick Williams 37*4a102cd4SPatrick Williams static constexpr const char* url = 3875ec825cSEd Tanous "https://redfish.dmtf.org/registries/ResourceEvent.1.3.0.json"; 3974eec26bSSunitha Harish 40*4a102cd4SPatrick Williams static constexpr std::array registry = 414d99bbb0SEd Tanous { 42ba27e59eSEd Tanous MessageEntry{ 4375ec825cSEd Tanous "AggregationSourceDiscovered", 4475ec825cSEd Tanous { 4575ec825cSEd Tanous "Indicates that a new aggregation source has been discovered.", 4675ec825cSEd Tanous "A aggregation source of connection method `%1` located at `%2` has been discovered.", 4775ec825cSEd Tanous "OK", 4875ec825cSEd Tanous 2, 4975ec825cSEd Tanous { 5075ec825cSEd Tanous "string", 5175ec825cSEd Tanous "string", 5275ec825cSEd Tanous }, 5375ec825cSEd Tanous "The aggregation source is available to the service and can be identified using the identified connection method.", 5475ec825cSEd Tanous }}, 5575ec825cSEd Tanous MessageEntry{ 56ba27e59eSEd Tanous "LicenseAdded", 5774eec26bSSunitha Harish { 5874eec26bSSunitha Harish "Indicates that a license has been added.", 59ba27e59eSEd Tanous "A license for '%1' has been added. The following message was returned: '%2'.", 6074eec26bSSunitha Harish "OK", 6174eec26bSSunitha Harish 2, 6274eec26bSSunitha Harish { 6374eec26bSSunitha Harish "string", 6474eec26bSSunitha Harish "string", 6574eec26bSSunitha Harish }, 6674eec26bSSunitha Harish "See vendor specific instructions for specific actions.", 6774eec26bSSunitha Harish }}, 68ba27e59eSEd Tanous MessageEntry{ 69ba27e59eSEd Tanous "LicenseChanged", 7074eec26bSSunitha Harish { 7174eec26bSSunitha Harish "Indicates that a license has changed.", 72ba27e59eSEd Tanous "A license for '%1' has changed. The following message was returned: '%2'.", 7374eec26bSSunitha Harish "Warning", 7474eec26bSSunitha Harish 2, 7574eec26bSSunitha Harish { 7674eec26bSSunitha Harish "string", 7774eec26bSSunitha Harish "string", 7874eec26bSSunitha Harish }, 7974eec26bSSunitha Harish "See vendor specific instructions for specific actions.", 8074eec26bSSunitha Harish }}, 81ba27e59eSEd Tanous MessageEntry{ 82ba27e59eSEd Tanous "LicenseExpired", 8374eec26bSSunitha Harish { 8474eec26bSSunitha Harish "Indicates that a license has expired.", 85ba27e59eSEd Tanous "A license for '%1' has expired. The following message was returned: '%2'.", 8674eec26bSSunitha Harish "Warning", 8774eec26bSSunitha Harish 2, 8874eec26bSSunitha Harish { 8974eec26bSSunitha Harish "string", 9074eec26bSSunitha Harish "string", 9174eec26bSSunitha Harish }, 9274eec26bSSunitha Harish "See vendor specific instructions for specific actions.", 9374eec26bSSunitha Harish }}, 9474eec26bSSunitha Harish MessageEntry{ 9574eec26bSSunitha Harish "ResourceChanged", 9674eec26bSSunitha Harish { 97ba27e59eSEd Tanous "Indicates that one or more resource properties have changed. This is not used whenever there is another event message for that specific change, such as only the state has changed.", 9874eec26bSSunitha Harish "One or more resource properties have changed.", 9974eec26bSSunitha Harish "OK", 10074eec26bSSunitha Harish 0, 10174eec26bSSunitha Harish {}, 10274eec26bSSunitha Harish "None.", 10374eec26bSSunitha Harish }}, 104ba27e59eSEd Tanous MessageEntry{ 105ba27e59eSEd Tanous "ResourceCreated", 10674eec26bSSunitha Harish { 107ba27e59eSEd Tanous "Indicates that all conditions of a successful creation operation have been met.", 10874eec26bSSunitha Harish "The resource has been created successfully.", 10974eec26bSSunitha Harish "OK", 11074eec26bSSunitha Harish 0, 11174eec26bSSunitha Harish {}, 11274eec26bSSunitha Harish "None", 11374eec26bSSunitha Harish }}, 114ba27e59eSEd Tanous MessageEntry{ 115ba27e59eSEd Tanous "ResourceErrorThresholdCleared", 11674eec26bSSunitha Harish { 117ba27e59eSEd Tanous "Indicates that a specified resource property has cleared its error threshold. Examples would be drive I/O errors, or network link errors.", 118ba27e59eSEd Tanous "The resource property %1 has cleared the error threshold of value %2.", 11974eec26bSSunitha Harish "OK", 12074eec26bSSunitha Harish 2, 12174eec26bSSunitha Harish { 12274eec26bSSunitha Harish "string", 12374eec26bSSunitha Harish "number", 12474eec26bSSunitha Harish }, 12574eec26bSSunitha Harish "None.", 12674eec26bSSunitha Harish }}, 127ba27e59eSEd Tanous MessageEntry{ 128ba27e59eSEd Tanous "ResourceErrorThresholdExceeded", 12974eec26bSSunitha Harish { 130ba27e59eSEd Tanous "Indicates that a specified resource property has exceeded its error threshold. Examples would be drive I/O errors, or network link errors.", 131ba27e59eSEd Tanous "The resource property %1 has exceeded error threshold of value %2.", 13274eec26bSSunitha Harish "Critical", 13374eec26bSSunitha Harish 2, 13474eec26bSSunitha Harish { 13574eec26bSSunitha Harish "string", 13674eec26bSSunitha Harish "number", 13774eec26bSSunitha Harish }, 13874eec26bSSunitha Harish "None.", 13974eec26bSSunitha Harish }}, 14074eec26bSSunitha Harish MessageEntry{ 14174eec26bSSunitha Harish "ResourceErrorsCorrected", 14274eec26bSSunitha Harish { 143ba27e59eSEd Tanous "Indicates that a specified resource property has corrected errors. Examples would be drive I/O errors, or network link errors.", 14474eec26bSSunitha Harish "The resource property %1 has corrected errors of type '%2'.", 14574eec26bSSunitha Harish "OK", 14674eec26bSSunitha Harish 2, 14774eec26bSSunitha Harish { 14874eec26bSSunitha Harish "string", 14974eec26bSSunitha Harish "string", 15074eec26bSSunitha Harish }, 15174eec26bSSunitha Harish "None.", 15274eec26bSSunitha Harish }}, 15374eec26bSSunitha Harish MessageEntry{ 15474eec26bSSunitha Harish "ResourceErrorsDetected", 15574eec26bSSunitha Harish { 156ba27e59eSEd Tanous "Indicates that a specified resource property has detected errors. Examples would be drive I/O errors, or network link errors.", 15774eec26bSSunitha Harish "The resource property %1 has detected errors of type '%2'.", 15874eec26bSSunitha Harish "Warning", 15974eec26bSSunitha Harish 2, 16074eec26bSSunitha Harish { 16174eec26bSSunitha Harish "string", 16274eec26bSSunitha Harish "string", 16374eec26bSSunitha Harish }, 16474eec26bSSunitha Harish "Resolution dependent upon error type.", 16574eec26bSSunitha Harish }}, 166ba27e59eSEd Tanous MessageEntry{ 16775ec825cSEd Tanous "ResourcePaused", 16875ec825cSEd Tanous { 16975ec825cSEd Tanous "Indicates that the power state of a resource has changed to paused.", 17075ec825cSEd Tanous "The resource `%1` has been paused.", 17175ec825cSEd Tanous "OK", 17275ec825cSEd Tanous 1, 17375ec825cSEd Tanous { 17475ec825cSEd Tanous "string", 17575ec825cSEd Tanous }, 17675ec825cSEd Tanous "None.", 17775ec825cSEd Tanous }}, 17875ec825cSEd Tanous MessageEntry{ 17975ec825cSEd Tanous "ResourcePoweredOff", 18075ec825cSEd Tanous { 18175ec825cSEd Tanous "Indicates that the power state of a resource has changed to powered off.", 18275ec825cSEd Tanous "The resource `%1` has powered off.", 18375ec825cSEd Tanous "OK", 18475ec825cSEd Tanous 1, 18575ec825cSEd Tanous { 18675ec825cSEd Tanous "string", 18775ec825cSEd Tanous }, 18875ec825cSEd Tanous "None.", 18975ec825cSEd Tanous }}, 19075ec825cSEd Tanous MessageEntry{ 19175ec825cSEd Tanous "ResourcePoweredOn", 19275ec825cSEd Tanous { 19375ec825cSEd Tanous "Indicates that the power state of a resource has changed to powered on.", 19475ec825cSEd Tanous "The resource `%1` has powered on.", 19575ec825cSEd Tanous "OK", 19675ec825cSEd Tanous 1, 19775ec825cSEd Tanous { 19875ec825cSEd Tanous "string", 19975ec825cSEd Tanous }, 20075ec825cSEd Tanous "None.", 20175ec825cSEd Tanous }}, 20275ec825cSEd Tanous MessageEntry{ 20375ec825cSEd Tanous "ResourcePoweringOff", 20475ec825cSEd Tanous { 20575ec825cSEd Tanous "Indicates that the power state of a resource has changed to powering off.", 20675ec825cSEd Tanous "The resource `%1` is powering off.", 20775ec825cSEd Tanous "OK", 20875ec825cSEd Tanous 1, 20975ec825cSEd Tanous { 21075ec825cSEd Tanous "string", 21175ec825cSEd Tanous }, 21275ec825cSEd Tanous "None.", 21375ec825cSEd Tanous }}, 21475ec825cSEd Tanous MessageEntry{ 21575ec825cSEd Tanous "ResourcePoweringOn", 21675ec825cSEd Tanous { 21775ec825cSEd Tanous "Indicates that the power state of a resource has changed to powering on.", 21875ec825cSEd Tanous "The resource `%1` is powering on.", 21975ec825cSEd Tanous "OK", 22075ec825cSEd Tanous 1, 22175ec825cSEd Tanous { 22275ec825cSEd Tanous "string", 22375ec825cSEd Tanous }, 22475ec825cSEd Tanous "None.", 22575ec825cSEd Tanous }}, 22675ec825cSEd Tanous MessageEntry{ 227ba27e59eSEd Tanous "ResourceRemoved", 22874eec26bSSunitha Harish { 229ba27e59eSEd Tanous "Indicates that all conditions of a successful remove operation have been met.", 23074eec26bSSunitha Harish "The resource has been removed successfully.", 23174eec26bSSunitha Harish "OK", 23274eec26bSSunitha Harish 0, 23374eec26bSSunitha Harish {}, 23474eec26bSSunitha Harish "None", 23574eec26bSSunitha Harish }}, 2364d99bbb0SEd Tanous MessageEntry{ 2374d99bbb0SEd Tanous "ResourceSelfTestCompleted", 23874eec26bSSunitha Harish { 23974eec26bSSunitha Harish "Indicates that a self-test has completed.", 24074eec26bSSunitha Harish "A self-test has completed.", 24174eec26bSSunitha Harish "OK", 24274eec26bSSunitha Harish 0, 24374eec26bSSunitha Harish {}, 24474eec26bSSunitha Harish "None.", 24574eec26bSSunitha Harish }}, 246ba27e59eSEd Tanous MessageEntry{ 247ba27e59eSEd Tanous "ResourceSelfTestFailed", 24874eec26bSSunitha Harish { 249ba27e59eSEd Tanous "Indicates that a self-test has failed. Suggested resolution may be provided as OEM data.", 250ba27e59eSEd Tanous "A self-test has failed. The following message was returned: '%1'.", 25174eec26bSSunitha Harish "Critical", 25274eec26bSSunitha Harish 1, 25374eec26bSSunitha Harish { 25474eec26bSSunitha Harish "string", 25574eec26bSSunitha Harish }, 25674eec26bSSunitha Harish "See vendor specific instructions for specific actions.", 25774eec26bSSunitha Harish }}, 25874eec26bSSunitha Harish MessageEntry{ 25975ec825cSEd Tanous "ResourceStateChanged", 26075ec825cSEd Tanous { 26175ec825cSEd Tanous "Indicates that the state of a resource has changed.", 26275ec825cSEd Tanous "The state of resource `%1` has changed to %2.", 26375ec825cSEd Tanous "OK", 26475ec825cSEd Tanous 2, 26575ec825cSEd Tanous { 26675ec825cSEd Tanous "string", 26775ec825cSEd Tanous "string", 26875ec825cSEd Tanous }, 26975ec825cSEd Tanous "None.", 27075ec825cSEd Tanous }}, 27175ec825cSEd Tanous MessageEntry{ 27274eec26bSSunitha Harish "ResourceStatusChangedCritical", 27374eec26bSSunitha Harish { 27474eec26bSSunitha Harish "Indicates that the health of a resource has changed to Critical.", 27574eec26bSSunitha Harish "The health of resource `%1` has changed to %2.", 27674eec26bSSunitha Harish "Critical", 27774eec26bSSunitha Harish 2, 27874eec26bSSunitha Harish { 27974eec26bSSunitha Harish "string", 28074eec26bSSunitha Harish "string", 28174eec26bSSunitha Harish }, 28274eec26bSSunitha Harish "None.", 28374eec26bSSunitha Harish }}, 28474eec26bSSunitha Harish MessageEntry{ 28574eec26bSSunitha Harish "ResourceStatusChangedOK", 28674eec26bSSunitha Harish { 28774eec26bSSunitha Harish "Indicates that the health of a resource has changed to OK.", 28874eec26bSSunitha Harish "The health of resource '%1' has changed to %2.", 28974eec26bSSunitha Harish "OK", 29074eec26bSSunitha Harish 2, 29174eec26bSSunitha Harish { 29274eec26bSSunitha Harish "string", 29374eec26bSSunitha Harish "string", 29474eec26bSSunitha Harish }, 29574eec26bSSunitha Harish "None.", 29674eec26bSSunitha Harish }}, 29774eec26bSSunitha Harish MessageEntry{ 29874eec26bSSunitha Harish "ResourceStatusChangedWarning", 29974eec26bSSunitha Harish { 30074eec26bSSunitha Harish "Indicates that the health of a resource has changed to Warning.", 30174eec26bSSunitha Harish "The health of resource `%1` has changed to %2.", 30274eec26bSSunitha Harish "Warning", 30374eec26bSSunitha Harish 2, 30474eec26bSSunitha Harish { 30574eec26bSSunitha Harish "string", 30674eec26bSSunitha Harish "string", 30774eec26bSSunitha Harish }, 30874eec26bSSunitha Harish "None.", 30974eec26bSSunitha Harish }}, 31074eec26bSSunitha Harish MessageEntry{ 31174eec26bSSunitha Harish "ResourceVersionIncompatible", 31274eec26bSSunitha Harish { 313ba27e59eSEd Tanous "Indicates that an incompatible version of software has been detected. Examples may be after a component or system level software update.", 31474eec26bSSunitha Harish "An incompatible version of software '%1' has been detected.", 31574eec26bSSunitha Harish "Warning", 31674eec26bSSunitha Harish 1, 31774eec26bSSunitha Harish { 31874eec26bSSunitha Harish "string", 31974eec26bSSunitha Harish }, 320ba27e59eSEd Tanous "Compare the version of the resource with the compatible version of the software.", 32174eec26bSSunitha Harish }}, 322ba27e59eSEd Tanous MessageEntry{ 323ba27e59eSEd Tanous "ResourceWarningThresholdCleared", 32474eec26bSSunitha Harish { 325ba27e59eSEd Tanous "Indicates that a specified resource property has cleared its warning threshold. Examples would be drive I/O errors, or network link errors. Suggested resolution may be provided as OEM data.", 326ba27e59eSEd Tanous "The resource property %1 has cleared the warning threshold of value %2.", 32774eec26bSSunitha Harish "OK", 32874eec26bSSunitha Harish 2, 32974eec26bSSunitha Harish { 33074eec26bSSunitha Harish "string", 33174eec26bSSunitha Harish "number", 33274eec26bSSunitha Harish }, 33374eec26bSSunitha Harish "None.", 33474eec26bSSunitha Harish }}, 335ba27e59eSEd Tanous MessageEntry{ 336ba27e59eSEd Tanous "ResourceWarningThresholdExceeded", 33774eec26bSSunitha Harish { 338ba27e59eSEd Tanous "Indicates that a specified resource property has exceeded its warning threshold. Examples would be drive I/O errors, or network link errors. Suggested resolution may be provided as OEM data.", 339ba27e59eSEd Tanous "The resource property %1 has exceeded its warning threshold of value %2.", 34074eec26bSSunitha Harish "Warning", 34174eec26bSSunitha Harish 2, 34274eec26bSSunitha Harish { 34374eec26bSSunitha Harish "string", 34474eec26bSSunitha Harish "number", 34574eec26bSSunitha Harish }, 34674eec26bSSunitha Harish "None.", 34774eec26bSSunitha Harish }}, 34874eec26bSSunitha Harish MessageEntry{ 34975ec825cSEd Tanous "TestMessage", 35075ec825cSEd Tanous { 35175ec825cSEd Tanous "A test message used to validate event delivery mechanisms.", 35275ec825cSEd Tanous "Test message.", 35375ec825cSEd Tanous "OK", 35475ec825cSEd Tanous 0, 35575ec825cSEd Tanous {}, 35675ec825cSEd Tanous "None.", 35775ec825cSEd Tanous }}, 35875ec825cSEd Tanous MessageEntry{ 35974eec26bSSunitha Harish "URIForResourceChanged", 36074eec26bSSunitha Harish { 361ba27e59eSEd Tanous "Indicates that the URI for a resource has changed. Examples for this would be physical component replacement or redistribution.", 36274eec26bSSunitha Harish "The URI for the resource has changed.", 36374eec26bSSunitha Harish "OK", 36474eec26bSSunitha Harish 0, 36574eec26bSSunitha Harish {}, 36674eec26bSSunitha Harish "None.", 36774eec26bSSunitha Harish }}, 3684d99bbb0SEd Tanous 36974eec26bSSunitha Harish }; 37030a3c431SEd Tanous 37130a3c431SEd Tanous enum class Index 37230a3c431SEd Tanous { 37375ec825cSEd Tanous aggregationSourceDiscovered = 0, 37475ec825cSEd Tanous licenseAdded = 1, 37575ec825cSEd Tanous licenseChanged = 2, 37675ec825cSEd Tanous licenseExpired = 3, 37775ec825cSEd Tanous resourceChanged = 4, 37875ec825cSEd Tanous resourceCreated = 5, 37975ec825cSEd Tanous resourceErrorThresholdCleared = 6, 38075ec825cSEd Tanous resourceErrorThresholdExceeded = 7, 38175ec825cSEd Tanous resourceErrorsCorrected = 8, 38275ec825cSEd Tanous resourceErrorsDetected = 9, 38375ec825cSEd Tanous resourcePaused = 10, 38475ec825cSEd Tanous resourcePoweredOff = 11, 38575ec825cSEd Tanous resourcePoweredOn = 12, 38675ec825cSEd Tanous resourcePoweringOff = 13, 38775ec825cSEd Tanous resourcePoweringOn = 14, 38875ec825cSEd Tanous resourceRemoved = 15, 38975ec825cSEd Tanous resourceSelfTestCompleted = 16, 39075ec825cSEd Tanous resourceSelfTestFailed = 17, 39175ec825cSEd Tanous resourceStateChanged = 18, 39275ec825cSEd Tanous resourceStatusChangedCritical = 19, 39375ec825cSEd Tanous resourceStatusChangedOK = 20, 39475ec825cSEd Tanous resourceStatusChangedWarning = 21, 39575ec825cSEd Tanous resourceVersionIncompatible = 22, 39675ec825cSEd Tanous resourceWarningThresholdCleared = 23, 39775ec825cSEd Tanous resourceWarningThresholdExceeded = 24, 39875ec825cSEd Tanous testMessage = 25, 39975ec825cSEd Tanous uRIForResourceChanged = 26, 40030a3c431SEd Tanous }; 401*4a102cd4SPatrick Williams }; // struct resource_event 402*4a102cd4SPatrick Williams 403*4a102cd4SPatrick Williams [[gnu::constructor]] inline void registerResourceEvent() 404*4a102cd4SPatrick Williams { registerRegistry<ResourceEvent>(); } 405*4a102cd4SPatrick Williams 406*4a102cd4SPatrick Williams } // namespace redfish::registries 407