1 #pragma once
2 /****************************************************************
3  *                 READ THIS WARNING FIRST
4  * This is an auto-generated header which contains definitions
5  * for Redfish DMTF defined messages.
6  * DO NOT modify this registry outside of running the
7  * parse_registries.py script.  The definitions contained within
8  * this file are owned by DMTF.  Any modifications to these files
9  * should be first pushed to the relevant registry in the DMTF
10  * github organization.
11  ***************************************************************/
12 #include "registries.hpp"
13 
14 #include <array>
15 
16 // clang-format off
17 
18 namespace redfish::registries::composition
19 {
20 const Header header = {
21     "Copyright 2019-2023 DMTF. All rights reserved.",
22     "#MessageRegistry.v1_6_2.MessageRegistry",
23     "Composition.1.1.2",
24     "Composition Message Registry",
25     "en",
26     "This registry defines the messages for composition related events.",
27     "Composition",
28     "1.1.2",
29     "DMTF",
30 };
31 constexpr const char* url =
32     "https://redfish.dmtf.org/registries/Composition.1.1.2.json";
33 
34 constexpr std::array registry =
35 {
36     MessageEntry{
37         "ConstrainedResourceAlreadyReserved",
38         {
39             "Indicates that the requested resources are already reserved in response to a constrained composition request.",
40             "The requested resources are reserved under reservation '%1'.",
41             "Critical",
42             1,
43             {
44                 "string",
45             },
46             "Delete the reservation containing the resources and resubmit the request.",
47         }},
48     MessageEntry{
49         "EmptyManifest",
50         {
51             "Indicates that the manifest contains no stanzas or that a stanza in the manifest contains no request.",
52             "The provided manifest is empty or a stanza in the manifest contains no request.",
53             "Warning",
54             0,
55             {},
56             "Provide a request content for the manifest and resubmit.",
57         }},
58     MessageEntry{
59         "IncompatibleZone",
60         {
61             "Indicates that not all referenced resource blocks are in the same resource zone.",
62             "The requested resource blocks span multiple resource zones.",
63             "Critical",
64             0,
65             {},
66             "Request resource blocks from the same resource zone.",
67         }},
68     MessageEntry{
69         "NoResourceMatch",
70         {
71             "Indicates that the service could not find a matching resource based on the given parameters.",
72             "The requested resources of type '%1' are not available for allocation.",
73             "Critical",
74             1,
75             {
76                 "string",
77             },
78             "Change parameters associated with the resource, such as quantity or performance, and resubmit the request.",
79         }},
80     MessageEntry{
81         "ResourceBlockChanged",
82         {
83             "Indicates that a resource block has changed.  This is not used whenever there is another event message for that specific change, such as when only the state has changed.",
84             "Resource block '%1' has changed on the service.",
85             "OK",
86             1,
87             {
88                 "string",
89             },
90             "None.",
91         }},
92     MessageEntry{
93         "ResourceBlockCompositionStateChanged",
94         {
95             "Indicates that the composition state of a resource block has changed, specifically the value of the `CompositionState` property within `CompositionStatus`.",
96             "The composition status of the resource block '%1' has changed.",
97             "OK",
98             1,
99             {
100                 "string",
101             },
102             "None.",
103         }},
104     MessageEntry{
105         "ResourceBlockInUse",
106         {
107             "Indicates that the composition request contains a resource block that is unable to participate in more compositions.",
108             "Resource block '%1' cannot be part of any new compositions.",
109             "Warning",
110             1,
111             {
112                 "string",
113             },
114             "Remove the resource block from the request and resubmit the request.",
115         }},
116     MessageEntry{
117         "ResourceBlockInvalid",
118         {
119             "Indicates that the `Id` of a referenced resource block is no longer valid.",
120             "Resource block '%1' is not valid.",
121             "Critical",
122             1,
123             {
124                 "string",
125             },
126             "Remove the resource block and resubmit the request.",
127         }},
128     MessageEntry{
129         "ResourceBlockNotFound",
130         {
131             "Indicates that the referenced resource block was not found.",
132             "Resource block '%1' was not found.",
133             "Critical",
134             1,
135             {
136                 "string",
137             },
138             "Remove the resource block and resubmit the request.",
139         }},
140     MessageEntry{
141         "ResourceBlockStateChanged",
142         {
143             "Indicates that the state of a resource block has changed, specifically the value of the `State` property within `Status`.",
144             "The state of resource block '%1' has changed.",
145             "OK",
146             1,
147             {
148                 "string",
149             },
150             "None.",
151         }},
152     MessageEntry{
153         "ResourceZoneMembershipChanged",
154         {
155             "Indicates that the membership of a resource zone has changed due to resource blocks being added or removed from the resource zone.",
156             "The membership of resource zone '%1' has been changed.",
157             "OK",
158             1,
159             {
160                 "string",
161             },
162             "None.",
163         }},
164     MessageEntry{
165         "SpecifiedResourceAlreadyReserved",
166         {
167             "Indicates that a resource block is already reserved in response to a specific composition request.",
168             "Resource block '%1' is already reserved under reservation '%2'.",
169             "Critical",
170             2,
171             {
172                 "string",
173                 "string",
174             },
175             "Delete the reservation containing the resource block or select a different resource block and resubmit the request.",
176         }},
177     MessageEntry{
178         "UnableToProcessStanzaRequest",
179         {
180             "Indicates that the manifest provided for the `Compose` action contains a stanza with `Content` that could not be processed.",
181             "The provided manifest for the Compose action of type %1 contains a stanza with Id of value '%2' with a Content parameter that could not be processed.",
182             "Critical",
183             2,
184             {
185                 "string",
186                 "string",
187             },
188             "Add the Content parameter to the stanza or remove the stanza, and resubmit the request.",
189         }},
190 
191 };
192 
193 enum class Index
194 {
195     constrainedResourceAlreadyReserved = 0,
196     emptyManifest = 1,
197     incompatibleZone = 2,
198     noResourceMatch = 3,
199     resourceBlockChanged = 4,
200     resourceBlockCompositionStateChanged = 5,
201     resourceBlockInUse = 6,
202     resourceBlockInvalid = 7,
203     resourceBlockNotFound = 8,
204     resourceBlockStateChanged = 9,
205     resourceZoneMembershipChanged = 10,
206     specifiedResourceAlreadyReserved = 11,
207     unableToProcessStanzaRequest = 12,
208 };
209 } // namespace redfish::registries::composition
210