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 AT&T Intellectual Property. 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.";
57 reference "RFC 5424: The Syslog Protocol";
69 "Version 2.0.1 - added revision-date to imports";
76 feature selector-sevop-config {
78 "This feature represents the ability to select messages
79 using the additional operators equal to, or not equal to
80 when comparing the Syslog message severity.";
83 feature selector-match-config {
85 "This feature represents the ability to select messages based
86 on a Posix 1003.2 regular expression pattern match.";
89 identity syslog-facility {
91 "The base identity to represent syslog facilities";
99 "Emergency Level Msg";
109 "Critical Level Msg";
124 "Notification Level Msg";
129 "Informational Level Msg";
134 "Debugging Level Msg";
139 "This enum describes the case where all severities
145 "This enum describes the case where no severities
150 "The definitions for Syslog message severity as per RFC 5424.
151 Extended the RFC definition with enums for all and none";
154 grouping syslog-severity {
156 "This grouping defines the Syslog severity which is used to
157 select log messages.";
162 "This leaf specifies the Syslog message severity. When
163 severity is specified, the default severity comparison
164 is all messages of the specified severity and greater are
165 selected. 'all' is a special case which means all severities
166 are selected. 'none' is a special case which means that
167 no selection should occur or disable this filter.";
169 leaf severity-operator {
171 "../severity != 'all' and
172 ../severity != 'none'" {
174 "The severity-operator is not applicable for severity 'all' or
177 if-feature "selector-sevop-config";
179 enum "equals-or-higher" {
181 "This enum specifies all messages of the specified
182 severity and higher are logged according to the
187 "This enum specifies all messages that are for
188 the specified severity are logged according to the
193 "This enum specifies all messages that are not for
194 the specified severity are logged according to the
198 default "equals-or-higher";
200 "This leaf describes the option to specify how the
201 severity comparison is performed.";
205 grouping syslog-selector {
207 "This grouping defines a Syslog selector which is used to
208 select log messages for the log-action (buffer, file,
209 etc). Choose one of the following:
211 log-facility [<facility> <severity>...]";
212 container log-selector {
214 "This container describes the log selector parameters
216 choice selector-facility {
219 "This choice describes the option to specify no
220 facilities, or a specific facility which can be
221 all for all facilities.";
222 case no-log-facility {
224 "This case specifies no facilities will match when
225 comparing the Syslog message facility. This is a
226 method that can be used to effectively disable a
227 particular log-action (buffer, file, etc).";
231 "This leaf specifies that no facilities are selected
232 for this log-action.";
237 "This case specifies one or more specified facilities
238 will match when comparing the Syslog message facility.";
242 "This list describes a collection of Syslog
243 facilities and severities.";
247 base syslog-facility;
252 "This enum describes the case where all
253 facilities are requested.";
258 "The leaf uniquely identifies a Syslog facility.";
260 uses syslog-severity;
269 "This container describes the configuration parameters for
271 leaf local-syslog-filename {
276 "The syslog file name. It should be a fully qualified name
277 so that the user can get the file using transfer RPC.";
279 container log-actions {
281 "This container describes the log-action parameters
285 "This container describes the configuration parameters for
290 "This list describes a collection of remote logging
295 "An arbitrary name for the endpoint to connect to.";
300 "This choice describes the transport option.";
304 "This container describes the TCP transport
306 reference "RFC 6587: Transmission of Syslog Messages over TCP";
310 "The leaf uniquely specifies the address of
311 the remote host. One of the following must
312 be specified: an ipv4 address, an ipv6
313 address, or a host name.";
316 type inet:port-number;
319 "This leaf specifies the port number used to
320 deliver messages to the remote server.";
327 "This container describes the UDP transport
329 reference "RFC 5426: Transmission of Syslog Messages over UDP";
333 "The leaf uniquely specifies the address of
334 the remote host. One of the following must be
335 specified: an ipv4 address, an ipv6 address,
339 type inet:port-number;
342 "This leaf specifies the port number used to
343 deliver messages to the remote server.";
348 uses syslog-selector;