xref: /openbmc/bmcweb/features/redfish/include/registries/license_message_registry.hpp (revision 40e9b92ec19acffb46f83a6e55b18974da5d708e)
1*40e9b92eSEd Tanous // SPDX-License-Identifier: Apache-2.0
2*40e9b92eSEd Tanous // SPDX-FileCopyrightText: Copyright OpenBMC Authors
3665e7602SGunnar Mills #pragma once
4665e7602SGunnar Mills /****************************************************************
5665e7602SGunnar Mills  *                 READ THIS WARNING FIRST
6665e7602SGunnar Mills  * This is an auto-generated header which contains definitions
7665e7602SGunnar Mills  * for Redfish DMTF defined messages.
8665e7602SGunnar Mills  * DO NOT modify this registry outside of running the
9665e7602SGunnar Mills  * parse_registries.py script.  The definitions contained within
10665e7602SGunnar Mills  * this file are owned by DMTF.  Any modifications to these files
11665e7602SGunnar Mills  * should be first pushed to the relevant registry in the DMTF
12665e7602SGunnar Mills  * github organization.
13665e7602SGunnar Mills  ***************************************************************/
14665e7602SGunnar Mills #include "registries.hpp"
15665e7602SGunnar Mills 
16665e7602SGunnar Mills #include <array>
17665e7602SGunnar Mills 
18665e7602SGunnar Mills // clang-format off
19665e7602SGunnar Mills 
20665e7602SGunnar Mills namespace redfish::registries::license
21665e7602SGunnar Mills {
22665e7602SGunnar Mills const Header header = {
23665e7602SGunnar Mills     "Copyright 2014-2023 DMTF. All rights reserved.",
24665e7602SGunnar Mills     "#MessageRegistry.v1_6_2.MessageRegistry",
2556b81992SEd Tanous     1,
2656b81992SEd Tanous     0,
2756b81992SEd Tanous     3,
28665e7602SGunnar Mills     "License Message Registry",
29665e7602SGunnar Mills     "en",
30665e7602SGunnar Mills     "This registry defines the license status and error messages.",
31665e7602SGunnar Mills     "License",
32665e7602SGunnar Mills     "DMTF",
33665e7602SGunnar Mills };
34665e7602SGunnar Mills constexpr const char* url =
35665e7602SGunnar Mills     "https://redfish.dmtf.org/registries/License.1.0.3.json";
36665e7602SGunnar Mills 
37665e7602SGunnar Mills constexpr std::array registry =
38665e7602SGunnar Mills {
39665e7602SGunnar Mills     MessageEntry{
40665e7602SGunnar Mills         "DaysBeforeExpiration",
41665e7602SGunnar Mills         {
42665e7602SGunnar Mills             "Indicates the number of days remaining on a license before expiration.",
43665e7602SGunnar Mills             "The license '%1' will expire in %2 days.",
44665e7602SGunnar Mills             "OK",
45665e7602SGunnar Mills             2,
46665e7602SGunnar Mills             {
47665e7602SGunnar Mills                 "string",
48665e7602SGunnar Mills                 "number",
49665e7602SGunnar Mills             },
50665e7602SGunnar Mills             "None.",
51665e7602SGunnar Mills         }},
52665e7602SGunnar Mills     MessageEntry{
53665e7602SGunnar Mills         "Expired",
54665e7602SGunnar Mills         {
55665e7602SGunnar Mills             "Indicates that a license has expired and its functionality was disabled.",
56665e7602SGunnar Mills             "The license '%1' has expired.",
57665e7602SGunnar Mills             "Warning",
58665e7602SGunnar Mills             1,
59665e7602SGunnar Mills             {
60665e7602SGunnar Mills                 "string",
61665e7602SGunnar Mills             },
62665e7602SGunnar Mills             "None.",
63665e7602SGunnar Mills         }},
64665e7602SGunnar Mills     MessageEntry{
65665e7602SGunnar Mills         "GracePeriod",
66665e7602SGunnar Mills         {
67665e7602SGunnar Mills             "Indicates that a license has expired and entered its grace period.",
68665e7602SGunnar Mills             "The license '%1' has expired, %2 day grace period before licensed functionality is disabled.",
69665e7602SGunnar Mills             "Warning",
70665e7602SGunnar Mills             2,
71665e7602SGunnar Mills             {
72665e7602SGunnar Mills                 "string",
73665e7602SGunnar Mills                 "number",
74665e7602SGunnar Mills             },
75665e7602SGunnar Mills             "None.",
76665e7602SGunnar Mills         }},
77665e7602SGunnar Mills     MessageEntry{
78665e7602SGunnar Mills         "InstallFailed",
79665e7602SGunnar Mills         {
80665e7602SGunnar Mills             "Indicates that the service failed to install the license.",
81665e7602SGunnar Mills             "Failed to install the license.  Reason: %1.",
82665e7602SGunnar Mills             "Critical",
83665e7602SGunnar Mills             1,
84665e7602SGunnar Mills             {
85665e7602SGunnar Mills                 "string",
86665e7602SGunnar Mills             },
87665e7602SGunnar Mills             "None.",
88665e7602SGunnar Mills         }},
89665e7602SGunnar Mills     MessageEntry{
90665e7602SGunnar Mills         "InvalidLicense",
91665e7602SGunnar Mills         {
92665e7602SGunnar Mills             "Indicates that the license was not recognized, is corrupted, or is invalid.",
93665e7602SGunnar Mills             "The content of the license was not recognized, is corrupted, or is invalid.",
94665e7602SGunnar Mills             "Critical",
95665e7602SGunnar Mills             0,
96665e7602SGunnar Mills             {},
97665e7602SGunnar Mills             "Verify the license content is correct and resubmit the request.",
98665e7602SGunnar Mills         }},
99665e7602SGunnar Mills     MessageEntry{
100665e7602SGunnar Mills         "LicenseInstalled",
101665e7602SGunnar Mills         {
102665e7602SGunnar Mills             "Indicates that a license was installed.",
103665e7602SGunnar Mills             "The license '%1' was installed.",
104665e7602SGunnar Mills             "OK",
105665e7602SGunnar Mills             1,
106665e7602SGunnar Mills             {
107665e7602SGunnar Mills                 "string",
108665e7602SGunnar Mills             },
109665e7602SGunnar Mills             "None.",
110665e7602SGunnar Mills         }},
111665e7602SGunnar Mills     MessageEntry{
112665e7602SGunnar Mills         "NotApplicableToTarget",
113665e7602SGunnar Mills         {
114665e7602SGunnar Mills             "Indicates that the license is not applicable to the target.",
115665e7602SGunnar Mills             "The license is not applicable to the target.",
116665e7602SGunnar Mills             "Critical",
117665e7602SGunnar Mills             0,
118665e7602SGunnar Mills             {},
119665e7602SGunnar Mills             "Check the license compatibility or applicability to the specified target.",
120665e7602SGunnar Mills         }},
121665e7602SGunnar Mills     MessageEntry{
122665e7602SGunnar Mills         "TargetsRequired",
123665e7602SGunnar Mills         {
124665e7602SGunnar Mills             "Indicates that one or more targets need to be specified with the license.",
125665e7602SGunnar Mills             "The license requires targets to be specified.",
126665e7602SGunnar Mills             "Critical",
127665e7602SGunnar Mills             0,
128665e7602SGunnar Mills             {},
129665e7602SGunnar Mills             "Add AuthorizedDevices to Links and resubmit the request.",
130665e7602SGunnar Mills         }},
131665e7602SGunnar Mills 
132665e7602SGunnar Mills };
133665e7602SGunnar Mills 
134665e7602SGunnar Mills enum class Index
135665e7602SGunnar Mills {
136665e7602SGunnar Mills     daysBeforeExpiration = 0,
137665e7602SGunnar Mills     expired = 1,
138665e7602SGunnar Mills     gracePeriod = 2,
139665e7602SGunnar Mills     installFailed = 3,
140665e7602SGunnar Mills     invalidLicense = 4,
141665e7602SGunnar Mills     licenseInstalled = 5,
142665e7602SGunnar Mills     notApplicableToTarget = 6,
143665e7602SGunnar Mills     targetsRequired = 7,
144665e7602SGunnar Mills };
145665e7602SGunnar Mills } // namespace redfish::registries::license
146