fix ServiceHandler SpotBugs false positives
[transportpce.git] / tests / honeynode / 2.2.1 / honeynode-plugin-impl / src / main / resources / honeycomb-minimal-resources / config / yang / devices / org-openroadm-lldp@2018-10-19.yang
1 module org-openroadm-lldp {
2   namespace "http://org/openroadm/lldp";
3   prefix org-openroadm-lldp;
4
5   import ietf-inet-types {
6     prefix inet;
7     revision-date 2013-07-15;
8   }
9   import org-openroadm-device {
10     prefix org-openroadm-device;
11     revision-date 2018-10-19;
12   }
13   import iana-afn-safi {
14     prefix ianaaf;
15     revision-date 2013-07-04;
16   }
17   import org-openroadm-resource-types {
18     prefix org-openroadm-resource-types;
19     revision-date 2018-10-19;
20   }
21   import ietf-yang-types {
22     prefix yang;
23     revision-date 2013-07-15;
24   }
25
26   organization
27     "Open ROADM MSA";
28   contact
29     "OpenROADM.org";
30   description
31     "YANG definitions for lldp protocol.
32
33      Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
34      AT&T Intellectual Property.  All other rights reserved.
35
36      Redistribution and use in source and binary forms, with or without modification,
37      are permitted provided that the following conditions are met:
38
39      * Redistributions of source code must retain the above copyright notice, this
40        list of conditions and the following disclaimer.
41      * Redistributions in binary form must reproduce the above copyright notice,
42        this list of conditions and the following disclaimer in the documentation and/or
43        other materials provided with the distribution.
44      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
45        contributors may be used to endorse or promote products derived from this software
46        without specific prior written permission.
47
48      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
49      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
50      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
51      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
52      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
53      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
54      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
55      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
56      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
57      POSSIBILITY OF SUCH DAMAGE.";
58
59   revision 2018-10-19 {
60     description
61       "Version 2.2.1";
62   }
63   revision 2017-12-15 {
64     description
65       "Version 2.2";
66   }
67   revision 2017-09-29 {
68     description
69       "Version 2.1";
70   }
71   revision 2017-07-28 {
72     description
73       "Version 2.0.1 - added revision-date to imports";
74   }
75   revision 2017-06-26 {
76     description
77       "Version 2.0";
78   }
79   revision 2016-10-14 {
80     description
81       "Version 1.2";
82   }
83
84   grouping nbr-info-grp {
85     description
86       "Display LLDP Neighbour ";
87     leaf remoteSysName {
88       type string;
89       description
90         "remote neighbour system name";
91     }
92     leaf remoteMgmtAddressSubType {
93       type ianaaf:address-family;
94       description
95         "remote neighbour Management Address Subtype Enumeration";
96     }
97     leaf remoteMgmtAddress {
98       type inet:ip-address;
99       description
100         "remote neighbour management address";
101     }
102     leaf remotePortIdSubType {
103       type enumeration {
104         enum "other" {
105           value 0;
106           description
107             "reserved";
108         }
109         enum "ifalias" {
110           value 1;
111           description
112             "Interface Alias (IfAlias - IETF RFC 2863) ";
113         }
114         enum "portcomponent" {
115           value 2;
116           description
117             "Port component (EntPhysicalAlias IETF RFC 4133)";
118         }
119         enum "macaddress" {
120           value 3;
121           description
122             "MAC address (IEEE Std 802) ";
123         }
124         enum "networkaddress" {
125           value 4;
126           description
127             "Network Address";
128         }
129         enum "ifname" {
130           value 5;
131           description
132             "Interface Name (ifName - IETF RFC 2863)";
133         }
134         enum "agentcircuitid" {
135           value 6;
136           description
137             "Agent Circuit Id (IETF RFC 3046)";
138         }
139         enum "local" {
140           value 7;
141           description
142             "Locally assigned";
143         }
144       }
145       description
146         "remote neighbour Port ID Subtype Enumeration";
147     }
148     leaf remotePortId {
149       type string;
150       description
151         "remote neighbour port Id";
152     }
153     leaf remoteChassisIdSubType {
154       type enumeration {
155         enum "reserved" {
156           value 0;
157           description
158             "reserved";
159         }
160         enum "chassiscomponent" {
161           value 1;
162           description
163             "Chassis component (EntPhysicalAlias IETF RFC 4133)";
164         }
165         enum "ifalias" {
166           value 2;
167           description
168             "Interface Alias (IfAlias - IETF RFC 2863) ";
169         }
170         enum "portcomponent" {
171           value 3;
172           description
173             "Port component (EntPhysicalAlias IETF RFC 4133)";
174         }
175         enum "macaddress" {
176           value 4;
177           description
178             "MAC address (IEEE Std 802) ";
179         }
180         enum "networkaddress" {
181           value 5;
182           description
183             "Network Address";
184         }
185         enum "ifname" {
186           value 6;
187           description
188             "Interface Name (ifName - IETF RFC 2863)";
189         }
190         enum "local" {
191           value 7;
192           description
193             "Locally assigned";
194         }
195       }
196       description
197         "Chassis ID Subtype Enumeration";
198     }
199     leaf remoteChassisId {
200       type string;
201       description
202         "remote neighbour Chassis Id";
203     }
204   }
205
206   grouping lldp-container {
207     container lldp {
208       description
209         "LLDP configurable and retrievable";
210       container global-config {
211         description
212           "LLDP global configurations";
213         leaf adminStatus {
214           type enumeration {
215             enum "disable" {
216               value 0;
217               description
218                 "Disable the LLDP feature per NE";
219             }
220             enum "enable" {
221               value 1;
222               description
223                 "Enable the LLDP feature per NE";
224             }
225           }
226           default "enable";
227           description
228             "LLDP feature Enable/Disable per NE";
229         }
230         leaf msgTxInterval {
231           type uint16 {
232             range "5..32768";
233           }
234           default "30";
235           description
236             "LLDP frame Retransmit Interval in seconds";
237         }
238         leaf msgTxHoldMultiplier {
239           type uint8 {
240             range "2..10";
241           }
242           default "4";
243           description
244             "TTL value for the TLVs transmitter over wire in seconds";
245         }
246       }
247       list port-config {
248         key "ifName";
249         description
250           "LLDP port configurations";
251         leaf ifName {
252           type leafref {
253             path "/org-openroadm-device:org-openroadm-device/org-openroadm-device:interface/org-openroadm-device:name";
254           }
255           description
256             "Ethernet interface name where LLDP runs";
257         }
258         leaf adminStatus {
259           type enumeration {
260             enum "disable" {
261               value 0;
262               description
263                 "Disables the LLDP frames transmit and receive on specific interface";
264             }
265             enum "txandrx" {
266               value 1;
267               description
268                 "Enable Transmit and Receive LLDP frames on specific interface";
269             }
270           }
271           default "txandrx";
272           description
273             "LLDP enable per port basis";
274         }
275       }
276       container nbr-list {
277         config false;
278         description
279           "LLDP Oper data - Neighbour List information";
280         list if-name {
281           key "ifName";
282           leaf ifName {
283             type string;
284             description
285               "Ethernet interface name where LLDP runs";
286           }
287           uses nbr-info-grp;
288         }
289       }
290     }
291   }
292
293   notification lldp-nbr-info-change {
294     description
295       "LLDP: Neighbor Information Changed
296        remoteSysName
297        remoteSysMgmtAddressSubType
298        remoteSysMgmtAddress
299        remotePortIdSubType
300        remotePortId
301        remoteChassisIdSubType
302        remoteChassisId
303        All of the above attributes are sent in event";
304     leaf notification-type {
305       type org-openroadm-resource-types:resource-notification-type;
306     }
307     leaf resource-type {
308       type org-openroadm-resource-types:resource-type-enum;
309       description
310         "resource-type for this notification is interface";
311     }
312     leaf resource {
313       type string;
314       description
315         "resource interface-name";
316     }
317     container nbr-info {
318       uses nbr-info-grp;
319     }
320     leaf event-time {
321       type yang:date-and-time;
322     }
323   }
324   augment "/org-openroadm-device:org-openroadm-device/org-openroadm-device:protocols" {
325     when "/org-openroadm-device:org-openroadm-device/org-openroadm-device:info/org-openroadm-device:node-type='rdm' or /org-openroadm-device:org-openroadm-device/org-openroadm-device:info/org-openroadm-device:node-type='ila'";
326     uses lldp-container;
327   }
328 }