xref: /openbmc/bmcweb/redfish-core/include/registries/license_message_registry.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1 // SPDX-License-Identifier: Apache-2.0
2 // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3 #pragma once
4 /****************************************************************
5  *                 READ THIS WARNING FIRST
6  * This is an auto-generated header which contains definitions
7  * for Redfish DMTF defined messages.
8  * DO NOT modify this registry outside of running the
9  * parse_registries.py script.  The definitions contained within
10  * this file are owned by DMTF.  Any modifications to these files
11  * should be first pushed to the relevant registry in the DMTF
12  * github organization.
13  ***************************************************************/
14 #include "registries.hpp"
15 
16 #include <array>
17 
18 // clang-format off
19 
20 namespace redfish::registries::license
21 {
22 const Header header = {
23     "Copyright 2014-2023 DMTF. All rights reserved.",
24     "#MessageRegistry.v1_6_2.MessageRegistry",
25     1,
26     0,
27     3,
28     "License Message Registry",
29     "en",
30     "This registry defines the license status and error messages.",
31     "License",
32     "DMTF",
33 };
34 constexpr const char* url =
35     "https://redfish.dmtf.org/registries/License.1.0.3.json";
36 
37 constexpr std::array registry =
38 {
39     MessageEntry{
40         "DaysBeforeExpiration",
41         {
42             "Indicates the number of days remaining on a license before expiration.",
43             "The license '%1' will expire in %2 days.",
44             "OK",
45             2,
46             {
47                 "string",
48                 "number",
49             },
50             "None.",
51         }},
52     MessageEntry{
53         "Expired",
54         {
55             "Indicates that a license has expired and its functionality was disabled.",
56             "The license '%1' has expired.",
57             "Warning",
58             1,
59             {
60                 "string",
61             },
62             "None.",
63         }},
64     MessageEntry{
65         "GracePeriod",
66         {
67             "Indicates that a license has expired and entered its grace period.",
68             "The license '%1' has expired, %2 day grace period before licensed functionality is disabled.",
69             "Warning",
70             2,
71             {
72                 "string",
73                 "number",
74             },
75             "None.",
76         }},
77     MessageEntry{
78         "InstallFailed",
79         {
80             "Indicates that the service failed to install the license.",
81             "Failed to install the license.  Reason: %1.",
82             "Critical",
83             1,
84             {
85                 "string",
86             },
87             "None.",
88         }},
89     MessageEntry{
90         "InvalidLicense",
91         {
92             "Indicates that the license was not recognized, is corrupted, or is invalid.",
93             "The content of the license was not recognized, is corrupted, or is invalid.",
94             "Critical",
95             0,
96             {},
97             "Verify the license content is correct and resubmit the request.",
98         }},
99     MessageEntry{
100         "LicenseInstalled",
101         {
102             "Indicates that a license was installed.",
103             "The license '%1' was installed.",
104             "OK",
105             1,
106             {
107                 "string",
108             },
109             "None.",
110         }},
111     MessageEntry{
112         "NotApplicableToTarget",
113         {
114             "Indicates that the license is not applicable to the target.",
115             "The license is not applicable to the target.",
116             "Critical",
117             0,
118             {},
119             "Check the license compatibility or applicability to the specified target.",
120         }},
121     MessageEntry{
122         "TargetsRequired",
123         {
124             "Indicates that one or more targets need to be specified with the license.",
125             "The license requires targets to be specified.",
126             "Critical",
127             0,
128             {},
129             "Add AuthorizedDevices to Links and resubmit the request.",
130         }},
131 
132 };
133 
134 enum class Index
135 {
136     daysBeforeExpiration = 0,
137     expired = 1,
138     gracePeriod = 2,
139     installFailed = 3,
140     invalidLicense = 4,
141     licenseInstalled = 5,
142     notApplicableToTarget = 6,
143     targetsRequired = 7,
144 };
145 } // namespace redfish::registries::license
146