summaryrefslogtreecommitdiffstats
path: root/mof/60_LMI_Journald.mof
blob: 938b3d282029d7b8c91d6ccc03efab150a79c22d (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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
/*
 * Copyright (C) 2013-2014 Red Hat, Inc.  All rights reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 *
 * Authors: Tomas Bzatek <tbzatek@redhat.com>
 */

[ Version("0.4.2"), Provider("cmpi:cmpiLMI_Journald") ]
class LMI_JournalMessageLog: CIM_MessageLog
{
    [ Implemented(true), Override("CreationClassName"), Key ]
    String CreationClassName;

    [ Implemented(true), Override("Name"), Key ]
    String Name;

    [ Implemented(true), Override("Capabilities") ]
    uint16 Capabilities[];

    [ Implemented(true), Override("TimeOfLastChange") ]
    datetime TimeOfLastChange;


    [ Implemented(true), Description (
          "Requests that an iteration of the MessageLog be "
          "established and that the iterator be set to the first "
          "entry in the Log. An identifier for the iterator is "
          "returned as an output parameter of the method. \n"
          "\n"
          "Regarding iteration, you have 2 choices: 1) Embed "
          "iteration data in the method call, and allow "
          "implementations to track/ store this data manually; or, "
          "2) Iterate using a separate object (for example, class "
          "ActiveIterator) as an iteration agent. The first "
          "approach is used here for interoperability. The second "
          "requires an instance of the Iterator object for EACH "
          "iteration in progress. 2\'s functionality could be "
          "implemented underneath 1.\n"
          "\n"
          "The return value from PositionToFirstRecord is 0 "
          "if the request was successfully executed, 1 if the "
          "request is not supported and some other value if an "
          "error occurred." ),
      ValueMap { "0", "1", "2" },
      Values { "Success", "Not supported", "Failed" } ]
    uint32 PositionToFirstRecord(
          [IN ( false ), OUT, Description (
             "An identifier for the iterator." )]
       string IterationIdentifier);


    [ Implemented(true), Description (
          "Requests that an iteration of the MessageLog be "
          "established and that the iterator be set to the last "
          "entry in the Log. An identifier for the iterator is "
          "returned as an output parameter of the method. \n"
          "\n"
          "The return value from PositionToFirstRecord is 0 "
          "if the request was successfully executed, 1 if the "
          "request is not supported and some other value if an "
          "error occurred." ),
      ValueMap { "0", "1", "2" },
      Values { "Success", "Not supported", "Failed" } ]
    uint32 PositionToLastRecord(
          [IN ( false ), OUT, Description (
             "An identifier for the iterator." )]
       string IterationIdentifier);


    [ Implemented(true), Description (
          "Requests that the Log\'s iteration identifier be "
          "advanced or retreated a specific number of records, or "
          "set to the entry at a specified numeric location. These "
          "two different behaviors are accomplished using the input "
          "parameters of the method. Advancing or retreating is "
          "achieved by setting the MoveAbsolute boolean to FALSE, "
          "and then specifying the number of entries to advance or "
          "retreat as positive or negative values in the "
          "RecordNumber parameter. Moving to a specific record "
          "number is accomplished by setting the MoveAbsolute input "
          "parameter to TRUE, and then placing the record number "
          "into the RecordNumber parameter. This can only be done "
          "if the Capabilities array includes a value of 7, "
          "\"Supports Addressing by Ordinal Record Number\". \n"
          "\n"
          "After the method completes and if ordinal record numbers "
          "are supported (the Capabilities array includes a 7), the "
          "current record number is returned in the RecordNumber "
          "output parameter. Otherwise, the value of the parameter "
          "is undefined. \n"
          "Note that only relative movement is supported in "
          "LMI_JournalMessageLog for the moment.\n"
          "\n"
          "IterationIdentifier is defined as an Input/Output method "
          "parameter to allow the Log to embed state information in "
          "the Identifier and potentially let the identifier be "
          "maintained by the using application. \n"
          "\n"
          "The return value from PositionAtRecord is 0 if "
          "the request was successfully executed, 1 if the request "
          "is not supported and some other value if an error "
          "occurred. If the request is not supported, check the "
          "Capabilities array regarding support for ordinal record "
          "number addressing and backward movement in the Log "
          "(values 7 and 4, respectively)." ),
      ValueMap { "0", "1", "2" },
      Values { "Success", "Not supported", "Failed" } ]
    uint32 PositionAtRecord(
         [IN, OUT, Description (
             "An identifier for the iterator." )]
      string IterationIdentifier,
         [IN, Description (
             "Advancing or retreating the IterationIdentifier is "
             "achieved by setting the MoveAbsolute boolean to "
             "FALSE, and specifying the number of entries to "
             "advance or retreat as positive or negative values "
             "in the RecordNumber parameter. Moving to a "
             "specific record number is accomplished by setting "
             "the MoveAbsolute parameter to TRUE, and placing "
             "the record number into the RecordNumber parameter."
             "For LMI_JournalMessageLog, the only supported value "
             "is FALSE." )]
      boolean MoveAbsolute,
         [IN, OUT, Description (
             "The relative or absolute record number." )]
      sint64 RecordNumber);


    [ Implemented(true), Description (
          "Requests that the record indicated by the "
          "IterationIdentifier be retrieved from the MessageLog. "
          "After retrieval, the IterationIdentifier may be advanced "
          "to the next record by setting the PositionToNext input "
          "parameter to TRUE. Two output parameters are defined for "
          "the method - RecordData which holds the contents of the "
          "Log entry (as an array of bytes that can be recast to an "
          "appropriate format), and RecordNumber which returns the "
          "current record number addressed via the Iteration "
          "Identifier. The RecordNumber parameter is only "
          "defined/valid when the Capabilities array indicates that "
          "ordinal record number addressing is supported (a value "
          "of 7). For LMI_JournalMessageLog, this stays unset.\n"
          "\n"
          "IterationIdentifier is defined as an Input/Output method "
          "parameter to allow the Log to embed state information in "
          "the Identifier and potentially let the identifier be "
          "maintained by the using application. \n"
          "\n"
          "The return value from GetRecord is 0 if the "
          "request was successfully executed, 1 if the request is "
          "not supported, and some other value if an error "
          "occurred." ),
      ValueMap { "0", "1", "2" },
      Values { "Success", "Not supported", "Failed" } ]
    uint32 GetRecord(
         [IN, OUT, Description (
             "An identifier for the iterator." )]
      string IterationIdentifier,
         [IN, Description (
             "Boolean indicating that the Iteration Identifier "
             "should be advanced to the next record, after "
             "retrieving the current Log entry." )]
      boolean PositionToNext,
         [IN ( false ), OUT, Description (
             "The record number, unused in LMI_JournalMessageLog." )]
      uint64 RecordNumber,
         [IN ( false ), OUT, Description (
             "The record data. This array carries a UTF-8 encoded "
             "string in array of uint8 as defined by the model. "
             "Users are supposed to recast this free-form data "
             "to get a readable representation." )]
      uint8 RecordData[]);

     [ Implemented(true), Description (
          "Requests that an iteration of the Log, identified by the "
          "IterationIdentifier input parameter, be stopped. The "
          "return value from CancelIteration is 0 if the "
          "request was successfully executed, 1 if the request is "
          "not supported and some other value if an error occurred." ),
      ValueMap { "0", "1", "2" },
      Values { "Success", "Not supported", "Failed" } ]
    uint32 CancelIteration(
         [IN, Description ( "An identifier for the iterator." )]
      string IterationIdentifier);
};

[ Version("0.4.1"), Provider("cmpi:cmpiLMI_Journald") ]
class LMI_JournalLogRecord: CIM_LogRecord
{
    [ Implemented(true), Override("LogCreationClassName"), Key ]
    String LogCreationClassName;

    [ Implemented(true), Override("LogName"), Key ]
    String LogName;

    [ Implemented(true), Override("CreationClassName"), Key ]
    String CreationClassName;

    [ Implemented(true), Override("RecordID"), Key ]
    String RecordID;

    [ Implemented(true), Override("MessageTimestamp"), Key ]
    datetime MessageTimestamp;

    [ Implemented(true),
      Description("Hostname of the system where the log record has been sent from.") ]
    String HostName;

    [ Implemented(true), Override("DataFormat") ]
    String DataFormat;

    [ Implemented(true), Override("PerceivedSeverity") ]
    uint16 PerceivedSeverity;
};

[ Version("0.4.1"), Provider("cmpi:cmpiLMI_Journald"),
  Association ]
class LMI_JournalRecordInLog: CIM_RecordInLog
{
    [ Override("MessageLog"), Key ]
    LMI_JournalMessageLog REF MessageLog;

    [ Override("LogRecord"), Key ]
    LMI_JournalLogRecord REF LogRecord;
};

[ Version("0.4.1"), Provider("cmpi:cmpiLMI_Journald"),
  Indication ]
class LMI_JournalLogRecordInstanceCreationIndication: CIM_InstCreation
{
};