1 module org-openroadm-syslog {
2 namespace "http://org/openroadm/syslog";
3 prefix org-openroadm-syslog;
5 import ietf-inet-types {
7 revision-date 2013-07-15;
15 "This module contains a collection of YANG definitions
16 for Syslog configuration.
18 Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
19 All other rights reserved.
21 Redistribution and use in source and binary forms, with or without modification,
22 are permitted provided that the following conditions are met:
24 * Redistributions of source code must retain the above copyright notice, this
25 list of conditions and the following disclaimer.
26 * Redistributions in binary form must reproduce the above copyright notice,
27 this list of conditions and the following disclaimer in the documentation and/or
28 other materials provided with the distribution.
29 * Neither the Members of the Open ROADM MSA Agreement nor the names of its
30 contributors may be used to endorse or promote products derived from this software
31 without specific prior written permission.
33 THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
34 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
35 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
36 IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
37 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
38 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
39 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
40 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
41 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 POSSIBILITY OF SUCH DAMAGE.
44 Also contains code components extracted from IETF Interfaces. These code components
45 are copyrighted and licensed as follows:
47 Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
50 This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
51 to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
52 publication of this document. Please review these documents carefully, as they
53 describe your rights and restrictions with respect to this document. Code Components
54 extracted from this document must include Simplified BSD License text as described in
55 Section 4.e of the Trust Legal Provisions and are provided without warranty as
56 described in the Simplified BSD License.";
58 "RFC 5424: The Syslog Protocol";
78 "Version 2.0.1 - added revision-date to imports";
85 feature selector-sevop-config {
87 "This feature represents the ability to select messages
88 using the additional operators equal to, or not equal to
89 when comparing the Syslog message severity.";
92 feature selector-match-config {
94 "This feature represents the ability to select messages based
95 on a Posix 1003.2 regular expression pattern match.";
98 identity syslog-facility {
100 "The base identity to represent syslog facilities";
108 "Emergency Level Msg";
118 "Critical Level Msg";
133 "Notification Level Msg";
138 "Informational Level Msg";
143 "Debugging Level Msg";
148 "This enum describes the case where all severities
154 "This enum describes the case where no severities
159 "The definitions for Syslog message severity as per RFC 5424.
160 Extended the RFC definition with enums for all and none";
163 grouping syslog-severity {
165 "This grouping defines the Syslog severity which is used to
166 select log messages.";
171 "This leaf specifies the Syslog message severity. When
172 severity is specified, the default severity comparison
173 is all messages of the specified severity and greater are
174 selected. 'all' is a special case which means all severities
175 are selected. 'none' is a special case which means that
176 no selection should occur or disable this filter.";
178 leaf severity-operator {
179 when "../severity != 'all' and
180 ../severity != 'none'" {
182 "The severity-operator is not applicable for severity 'all' or
185 if-feature "selector-sevop-config";
187 enum equals-or-higher {
189 "This enum specifies all messages of the specified
190 severity and higher are logged according to the
195 "This enum specifies all messages that are for
196 the specified severity are logged according to the
201 "This enum specifies all messages that are not for
202 the specified severity are logged according to the
206 default "equals-or-higher";
208 "This leaf describes the option to specify how the
209 severity comparison is performed.";
213 grouping syslog-selector {
215 "This grouping defines a Syslog selector which is used to
216 select log messages for the log-action (buffer, file,
217 etc). Choose one of the following:
219 log-facility [<facility> <severity>...]";
220 container log-selector {
222 "This container describes the log selector parameters
224 choice selector-facility {
227 "This choice describes the option to specify no
228 facilities, or a specific facility which can be
229 all for all facilities.";
230 case no-log-facility {
232 "This case specifies no facilities will match when
233 comparing the Syslog message facility. This is a
234 method that can be used to effectively disable a
235 particular log-action (buffer, file, etc).";
239 "This leaf specifies that no facilities are selected
240 for this log-action.";
245 "This case specifies one or more specified facilities
246 will match when comparing the Syslog message facility.";
250 "This list describes a collection of Syslog
251 facilities and severities.";
255 base syslog-facility;
260 "This enum describes the case where all
261 facilities are requested.";
266 "The leaf uniquely identifies a Syslog facility.";
268 uses syslog-severity;
277 "This container describes the configuration parameters for
279 leaf local-syslog-filename {
284 "The syslog file name. It should be a fully qualified name
285 so that the user can get the file using transfer RPC.";
287 container log-actions {
289 "This container describes the log-action parameters
293 "This container describes the configuration parameters for
298 "This list describes a collection of remote logging
303 "An arbitrary name for the endpoint to connect to.";
308 "This choice describes the transport option.";
312 "This container describes the TCP transport
315 "RFC 6587: Transmission of Syslog Messages over TCP";
319 "The leaf uniquely specifies the address of
320 the remote host. One of the following must
321 be specified: an ipv4 address, an ipv6
322 address, or a host name.";
325 type inet:port-number;
328 "This leaf specifies the port number used to
329 deliver messages to the remote server.";
336 "This container describes the UDP transport
339 "RFC 5426: Transmission of Syslog Messages over UDP";
343 "The leaf uniquely specifies the address of
344 the remote host. One of the following must be
345 specified: an ipv4 address, an ipv6 address,
349 type inet:port-number;
352 "This leaf specifies the port number used to
353 deliver messages to the remote server.";
358 uses syslog-selector;