1 module org-openroadm-syslog {
2 namespace "http://org/openroadm/syslog";
3 prefix org-openroadm-syslog;
5 import ietf-inet-types {
9 organization "Open ROADM MSA";
13 "This module contains a collection of YANG definitions
14 for Syslog configuration.
16 Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
17 AT&T Intellectual Property. All other rights reserved.
19 Redistribution and use in source and binary forms, with or without modification,
20 are permitted provided that the following conditions are met:
22 * Redistributions of source code must retain the above copyright notice, this
23 list of conditions and the following disclaimer.
24 * Redistributions in binary form must reproduce the above copyright notice,
25 this list of conditions and the following disclaimer in the documentation and/or
26 other materials provided with the distribution.
27 * Neither the Members of the Open ROADM MSA Agreement nor the names of its
28 contributors may be used to endorse or promote products derived from this software
29 without specific prior written permission.
31 THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT ''AS IS''
32 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
33 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
34 IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA AGREEMENT BE LIABLE FOR ANY DIRECT,
35 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
36 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
37 OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
38 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40 POSSIBILITY OF SUCH DAMAGE.
42 Also contains code components extracted from IETF Interfaces. These code components
43 are copyrighted and licensed as follows:
45 Copyright (c) 2016 IETF Trust and the persons identified as the document authors.
48 This document is subject to BCP 78 and the IETF Trust’s Legal Provisions Relating
49 to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of
50 publication of this document. Please review these documents carefully, as they
51 describe your rights and restrictions with respect to this document. Code Components
52 extracted from this document must include Simplified BSD License text as described in
53 Section 4.e of the Trust Legal Provisions and are provided without warranty as
54 described in the Simplified BSD License.";
55 reference "RFC 5424: The Syslog Protocol";
62 feature selector-sevop-config {
64 "This feature represents the ability to select messages
65 using the additional operators equal to, or not equal to
66 when comparing the Syslog message severity.";
69 feature selector-match-config {
71 "This feature represents the ability to select messages based
72 on a Posix 1003.2 regular expression pattern match.";
75 // copied from draft of ietf-ietf-syslog-types.yang
76 identity syslog-facility {
78 "The base identity to represent syslog facilities";
81 // copied from draft of ietf-ietf-syslog-types.yang;
82 // extended the enum set to include all and none
88 "Emergency Level Msg";
113 "Notification Level Msg";
118 "Informational Level Msg";
123 "Debugging Level Msg";
128 "This enum describes the case where all severities
134 "This enum describes the case where no severities
139 "The definitions for Syslog message severity as per RFC 5424.
140 Extended the RFC definition with enums for all and none";
143 grouping syslog-severity {
145 "This grouping defines the Syslog severity which is used to
146 select log messages.";
151 "This leaf specifies the Syslog message severity. When
152 severity is specified, the default severity comparison
153 is all messages of the specified severity and greater are
154 selected. 'all' is a special case which means all severities
155 are selected. 'none' is a special case which means that
156 no selection should occur or disable this filter.";
158 leaf severity-operator {
160 "../severity != 'all' and
161 ../severity != 'none'" {
163 "The severity-operator is not applicable for severity 'all' or
166 if-feature selector-sevop-config;
168 enum "equals-or-higher" {
170 "This enum specifies all messages of the specified
171 severity and higher are logged according to the
176 "This enum specifies all messages that are for
177 the specified severity are logged according to the
182 "This enum specifies all messages that are not for
183 the specified severity are logged according to the
187 default "equals-or-higher";
189 "This leaf describes the option to specify how the
190 severity comparison is performed.";
194 grouping syslog-selector {
196 "This grouping defines a Syslog selector which is used to
197 select log messages for the log-action (buffer, file,
198 etc). Choose one of the following:
200 log-facility [<facility> <severity>...]";
201 container log-selector {
203 "This container describes the log selector parameters
205 choice selector-facility {
208 "This choice describes the option to specify no
209 facilities, or a specific facility which can be
210 all for all facilities.";
211 case no-log-facility {
213 "This case specifies no facilities will match when
214 comparing the Syslog message facility. This is a
215 method that can be used to effectively disable a
216 particular log-action (buffer, file, etc).";
220 "This leaf specifies that no facilities are selected
221 for this log-action.";
226 "This case specifies one or more specified facilities
227 will match when comparing the Syslog message facility.";
231 "This list describes a collection of Syslog
232 facilities and severities.";
236 base syslog-facility;
241 "This enum describes the case where all
242 facilities are requested.";
247 "The leaf uniquely identifies a Syslog facility.";
249 uses syslog-severity;
258 "This container describes the configuration parameters for
260 container log-actions {
262 "This container describes the log-action parameters
266 "This container describes the configuration parameters for
271 "This list describes a collection of remote logging
276 "An arbitrary name for the endpoint to connect to.";
281 "This choice describes the transport option.";
285 "This container describes the TCP transport
287 reference "RFC 6587: Transmission of Syslog Messages over TCP";
291 "The leaf uniquely specifies the address of
292 the remote host. One of the following must
293 be specified: an ipv4 address, an ipv6
294 address, or a host name.";
297 type inet:port-number;
300 "This leaf specifies the port number used to
301 deliver messages to the remote server.";
308 "This container describes the UDP transport
310 reference "RFC 5426: Transmission of Syslog Messages over UDP";
314 "The leaf uniquely specifies the address of
315 the remote host. One of the following must be
316 specified: an ipv4 address, an ipv6 address,
320 type inet:port-number;
323 "This leaf specifies the port number used to
324 deliver messages to the remote server.";
329 uses syslog-selector;