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::license
19 {
20 const Header header = {
21     "Copyright 2014-2023 DMTF. All rights reserved.",
22     "#MessageRegistry.v1_6_2.MessageRegistry",
23     "License.1.0.3",
24     "License Message Registry",
25     "en",
26     "This registry defines the license status and error messages.",
27     "License",
28     "1.0.3",
29     "DMTF",
30 };
31 constexpr const char* url =
32     "https://redfish.dmtf.org/registries/License.1.0.3.json";
33 
34 constexpr std::array registry =
35 {
36     MessageEntry{
37         "DaysBeforeExpiration",
38         {
39             "Indicates the number of days remaining on a license before expiration.",
40             "The license '%1' will expire in %2 days.",
41             "OK",
42             2,
43             {
44                 "string",
45                 "number",
46             },
47             "None.",
48         }},
49     MessageEntry{
50         "Expired",
51         {
52             "Indicates that a license has expired and its functionality was disabled.",
53             "The license '%1' has expired.",
54             "Warning",
55             1,
56             {
57                 "string",
58             },
59             "None.",
60         }},
61     MessageEntry{
62         "GracePeriod",
63         {
64             "Indicates that a license has expired and entered its grace period.",
65             "The license '%1' has expired, %2 day grace period before licensed functionality is disabled.",
66             "Warning",
67             2,
68             {
69                 "string",
70                 "number",
71             },
72             "None.",
73         }},
74     MessageEntry{
75         "InstallFailed",
76         {
77             "Indicates that the service failed to install the license.",
78             "Failed to install the license.  Reason: %1.",
79             "Critical",
80             1,
81             {
82                 "string",
83             },
84             "None.",
85         }},
86     MessageEntry{
87         "InvalidLicense",
88         {
89             "Indicates that the license was not recognized, is corrupted, or is invalid.",
90             "The content of the license was not recognized, is corrupted, or is invalid.",
91             "Critical",
92             0,
93             {},
94             "Verify the license content is correct and resubmit the request.",
95         }},
96     MessageEntry{
97         "LicenseInstalled",
98         {
99             "Indicates that a license was installed.",
100             "The license '%1' was installed.",
101             "OK",
102             1,
103             {
104                 "string",
105             },
106             "None.",
107         }},
108     MessageEntry{
109         "NotApplicableToTarget",
110         {
111             "Indicates that the license is not applicable to the target.",
112             "The license is not applicable to the target.",
113             "Critical",
114             0,
115             {},
116             "Check the license compatibility or applicability to the specified target.",
117         }},
118     MessageEntry{
119         "TargetsRequired",
120         {
121             "Indicates that one or more targets need to be specified with the license.",
122             "The license requires targets to be specified.",
123             "Critical",
124             0,
125             {},
126             "Add AuthorizedDevices to Links and resubmit the request.",
127         }},
128 
129 };
130 
131 enum class Index
132 {
133     daysBeforeExpiration = 0,
134     expired = 1,
135     gracePeriod = 2,
136     installFailed = 3,
137     invalidLicense = 4,
138     licenseInstalled = 5,
139     notApplicableToTarget = 6,
140     targetsRequired = 7,
141 };
142 } // namespace redfish::registries::license
143