xref: /openbmc/bmcweb/features/redfish/include/registries/task_event_message_registry.hpp (revision 4a102cd48c588d32c0a4d6610b4a9ed616f255f3)
140e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
240e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3043bec09SNan Zhou #pragma once
4e51c710eSJames Feist /****************************************************************
51cf53df0SEd Tanous  *                 READ THIS WARNING FIRST
6e51c710eSJames Feist  * This is an auto-generated header which contains definitions
7e51c710eSJames Feist  * 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.
13e51c710eSJames Feist  ***************************************************************/
1401c78a06SNan Zhou #include "registries.hpp"
1501c78a06SNan Zhou 
1601c78a06SNan Zhou #include <array>
17e51c710eSJames Feist 
184d99bbb0SEd Tanous // clang-format off
194d99bbb0SEd Tanous 
20*4a102cd4SPatrick Williams namespace redfish::registries
21e51c710eSJames Feist {
22*4a102cd4SPatrick Williams struct TaskEvent
23*4a102cd4SPatrick Williams {
24*4a102cd4SPatrick Williams static constexpr Header header = {
25ba27e59eSEd Tanous     "Copyright 2014-2020 DMTF in cooperation with the Storage Networking Industry Association (SNIA). All rights reserved.",
26fc8a2b87SEd Tanous     "#MessageRegistry.v1_4_1.MessageRegistry",
2756b81992SEd Tanous     1,
2856b81992SEd Tanous     0,
2956b81992SEd Tanous     3,
30e51c710eSJames Feist     "Task Event Message Registry",
31e51c710eSJames Feist     "en",
32e51c710eSJames Feist     "This registry defines the messages for task related events.",
33e51c710eSJames Feist     "TaskEvent",
34e51c710eSJames Feist     "DMTF",
35e51c710eSJames Feist };
36*4a102cd4SPatrick Williams 
37*4a102cd4SPatrick Williams static constexpr const char* url =
38fc8a2b87SEd Tanous     "https://redfish.dmtf.org/registries/TaskEvent.1.0.3.json";
39e51c710eSJames Feist 
40*4a102cd4SPatrick Williams static constexpr std::array registry =
414d99bbb0SEd Tanous {
424d99bbb0SEd Tanous     MessageEntry{
434d99bbb0SEd Tanous         "TaskAborted",
44e51c710eSJames Feist         {
45fc8a2b87SEd Tanous             "A task has completed with errors.",
46fc8a2b87SEd Tanous             "The task with Id '%1' has completed with errors.",
47e7808c93SGunnar Mills             "Critical",
48e51c710eSJames Feist             1,
49e51c710eSJames Feist             {
50e51c710eSJames Feist                 "string",
51e51c710eSJames Feist             },
52e51c710eSJames Feist             "None.",
53e51c710eSJames Feist         }},
54ba27e59eSEd Tanous     MessageEntry{
55ba27e59eSEd Tanous         "TaskCancelled",
56e51c710eSJames Feist         {
57e7808c93SGunnar Mills             "A task has been cancelled.",
58ba27e59eSEd Tanous             "Work on the task with Id '%1' has been halted prior to completion due to an explicit request.",
59e7808c93SGunnar Mills             "Warning",
60e51c710eSJames Feist             1,
61e51c710eSJames Feist             {
62e51c710eSJames Feist                 "string",
63e51c710eSJames Feist             },
64e51c710eSJames Feist             "None.",
65e51c710eSJames Feist         }},
664d99bbb0SEd Tanous     MessageEntry{
674d99bbb0SEd Tanous         "TaskCompletedOK",
68e51c710eSJames Feist         {
69e7808c93SGunnar Mills             "A task has completed.",
70e7808c93SGunnar Mills             "The task with Id '%1' has completed.",
71e7808c93SGunnar Mills             "OK",
72e51c710eSJames Feist             1,
73e51c710eSJames Feist             {
74e51c710eSJames Feist                 "string",
75e51c710eSJames Feist             },
76e51c710eSJames Feist             "None.",
77e51c710eSJames Feist         }},
784d99bbb0SEd Tanous     MessageEntry{
794d99bbb0SEd Tanous         "TaskCompletedWarning",
80e51c710eSJames Feist         {
81e7808c93SGunnar Mills             "A task has completed with warnings.",
82e7808c93SGunnar Mills             "The task with Id '%1' has completed with warnings.",
83e7808c93SGunnar Mills             "Warning",
84e51c710eSJames Feist             1,
85e51c710eSJames Feist             {
86e51c710eSJames Feist                 "string",
87e51c710eSJames Feist             },
88e51c710eSJames Feist             "None.",
89e51c710eSJames Feist         }},
904d99bbb0SEd Tanous     MessageEntry{
914d99bbb0SEd Tanous         "TaskPaused",
92e51c710eSJames Feist         {
93e7808c93SGunnar Mills             "A task has been paused.",
94e7808c93SGunnar Mills             "The task with Id '%1' has been paused.",
95e7808c93SGunnar Mills             "Warning",
96e51c710eSJames Feist             1,
97e51c710eSJames Feist             {
98e51c710eSJames Feist                 "string",
99e51c710eSJames Feist             },
100e51c710eSJames Feist             "None.",
101e51c710eSJames Feist         }},
102ba27e59eSEd Tanous     MessageEntry{
103ba27e59eSEd Tanous         "TaskProgressChanged",
104e51c710eSJames Feist         {
105e7808c93SGunnar Mills             "A task has changed progress.",
106ba27e59eSEd Tanous             "The task with Id '%1' has changed to progress %2 percent complete.",
107e7808c93SGunnar Mills             "OK",
108e51c710eSJames Feist             2,
109e51c710eSJames Feist             {
110e51c710eSJames Feist                 "string",
111e51c710eSJames Feist                 "number",
112e51c710eSJames Feist             },
113e51c710eSJames Feist             "None.",
114e51c710eSJames Feist         }},
1154d99bbb0SEd Tanous     MessageEntry{
1164d99bbb0SEd Tanous         "TaskRemoved",
117e51c710eSJames Feist         {
118e7808c93SGunnar Mills             "A task has been removed.",
119e7808c93SGunnar Mills             "The task with Id '%1' has been removed.",
120e7808c93SGunnar Mills             "Warning",
121e51c710eSJames Feist             1,
122e51c710eSJames Feist             {
123e51c710eSJames Feist                 "string",
124e51c710eSJames Feist             },
125e51c710eSJames Feist             "None.",
126e51c710eSJames Feist         }},
1274d99bbb0SEd Tanous     MessageEntry{
1284d99bbb0SEd Tanous         "TaskResumed",
129e51c710eSJames Feist         {
130e7808c93SGunnar Mills             "A task has been resumed.",
131e7808c93SGunnar Mills             "The task with Id '%1' has been resumed.",
132e7808c93SGunnar Mills             "OK",
133e51c710eSJames Feist             1,
134e51c710eSJames Feist             {
135e51c710eSJames Feist                 "string",
136e51c710eSJames Feist             },
137e51c710eSJames Feist             "None.",
138e51c710eSJames Feist         }},
1394d99bbb0SEd Tanous     MessageEntry{
1404d99bbb0SEd Tanous         "TaskStarted",
141e51c710eSJames Feist         {
142e7808c93SGunnar Mills             "A task has started.",
143e7808c93SGunnar Mills             "The task with Id '%1' has started.",
144e7808c93SGunnar Mills             "OK",
145e51c710eSJames Feist             1,
146e51c710eSJames Feist             {
147e51c710eSJames Feist                 "string",
148e51c710eSJames Feist             },
149e51c710eSJames Feist             "None.",
150e51c710eSJames Feist         }},
1514d99bbb0SEd Tanous 
152e51c710eSJames Feist };
15330a3c431SEd Tanous 
15430a3c431SEd Tanous enum class Index
15530a3c431SEd Tanous {
15630a3c431SEd Tanous     taskAborted = 0,
15730a3c431SEd Tanous     taskCancelled = 1,
15830a3c431SEd Tanous     taskCompletedOK = 2,
15930a3c431SEd Tanous     taskCompletedWarning = 3,
16030a3c431SEd Tanous     taskPaused = 4,
16130a3c431SEd Tanous     taskProgressChanged = 5,
16230a3c431SEd Tanous     taskRemoved = 6,
16330a3c431SEd Tanous     taskResumed = 7,
16430a3c431SEd Tanous     taskStarted = 8,
16530a3c431SEd Tanous };
166*4a102cd4SPatrick Williams }; // struct task_event
167*4a102cd4SPatrick Williams 
168*4a102cd4SPatrick Williams [[gnu::constructor]] inline void registerTaskEvent()
169*4a102cd4SPatrick Williams { registerRegistry<TaskEvent>(); }
170*4a102cd4SPatrick Williams 
171*4a102cd4SPatrick Williams } // namespace redfish::registries
172