summaryrefslogtreecommitdiff
path: root/redfish-core/include/registries/license_message_registry.hpp
blob: 1132cb423429193347dc812cd8688220db73e084 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#pragma once
/****************************************************************
 *                 READ THIS WARNING FIRST
 * This is an auto-generated header which contains definitions
 * for Redfish DMTF defined messages.
 * DO NOT modify this registry outside of running the
 * parse_registries.py script.  The definitions contained within
 * this file are owned by DMTF.  Any modifications to these files
 * should be first pushed to the relevant registry in the DMTF
 * github organization.
 ***************************************************************/
#include "registries.hpp"

#include <array>

// clang-format off

namespace redfish::registries::license
{
const Header header = {
    "Copyright 2014-2023 DMTF. All rights reserved.",
    "#MessageRegistry.v1_6_2.MessageRegistry",
    "License.1.0.3",
    "License Message Registry",
    "en",
    "This registry defines the license status and error messages.",
    "License",
    "1.0.3",
    "DMTF",
};
constexpr const char* url =
    "https://redfish.dmtf.org/registries/License.1.0.3.json";

constexpr std::array registry =
{
    MessageEntry{
        "DaysBeforeExpiration",
        {
            "Indicates the number of days remaining on a license before expiration.",
            "The license '%1' will expire in %2 days.",
            "OK",
            2,
            {
                "string",
                "number",
            },
            "None.",
        }},
    MessageEntry{
        "Expired",
        {
            "Indicates that a license has expired and its functionality was disabled.",
            "The license '%1' has expired.",
            "Warning",
            1,
            {
                "string",
            },
            "None.",
        }},
    MessageEntry{
        "GracePeriod",
        {
            "Indicates that a license has expired and entered its grace period.",
            "The license '%1' has expired, %2 day grace period before licensed functionality is disabled.",
            "Warning",
            2,
            {
                "string",
                "number",
            },
            "None.",
        }},
    MessageEntry{
        "InstallFailed",
        {
            "Indicates that the service failed to install the license.",
            "Failed to install the license.  Reason: %1.",
            "Critical",
            1,
            {
                "string",
            },
            "None.",
        }},
    MessageEntry{
        "InvalidLicense",
        {
            "Indicates that the license was not recognized, is corrupted, or is invalid.",
            "The content of the license was not recognized, is corrupted, or is invalid.",
            "Critical",
            0,
            {},
            "Verify the license content is correct and resubmit the request.",
        }},
    MessageEntry{
        "LicenseInstalled",
        {
            "Indicates that a license was installed.",
            "The license '%1' was installed.",
            "OK",
            1,
            {
                "string",
            },
            "None.",
        }},
    MessageEntry{
        "NotApplicableToTarget",
        {
            "Indicates that the license is not applicable to the target.",
            "The license is not applicable to the target.",
            "Critical",
            0,
            {},
            "Check the license compatibility or applicability to the specified target.",
        }},
    MessageEntry{
        "TargetsRequired",
        {
            "Indicates that one or more targets need to be specified with the license.",
            "The license requires targets to be specified.",
            "Critical",
            0,
            {},
            "Add AuthorizedDevices to Links and resubmit the request.",
        }},

};

enum class Index
{
    daysBeforeExpiration = 0,
    expired = 1,
    gracePeriod = 2,
    installFailed = 3,
    invalidLicense = 4,
    licenseInstalled = 5,
    notApplicableToTarget = 6,
    targetsRequired = 7,
};
} // namespace redfish::registries::license