fix ServiceHandler SpotBugs false positives
[transportpce.git] / tests / honeynode / 1.2.1 / honeynode-plugin-impl / src / main / resources / honeycomb-minimal-resources / config / yang / openconfig / openconfig-if-ethernet@2018-01-05.yang
1 module openconfig-if-ethernet {
2
3   yang-version "1";
4
5   // namespace
6   namespace "http://openconfig.net/yang/interfaces/ethernet";
7
8   prefix "oc-eth";
9
10   // import some basic types
11   import openconfig-interfaces { prefix oc-if; }
12   import iana-if-type { prefix ift; }
13   import openconfig-yang-types { prefix oc-yang; }
14   import openconfig-extensions { prefix oc-ext; }
15
16   // meta
17   organization "OpenConfig working group";
18
19   contact
20     "OpenConfig working group
21     netopenconfig@googlegroups.com";
22
23   description
24     "Model for managing Ethernet interfaces -- augments the OpenConfig
25     model for interface configuration and state.";
26
27   oc-ext:openconfig-version "2.3.0";
28
29   revision "2018-01-05" {
30     description
31       "Add logical loopback to interface.";
32     reference "2.3.0";
33   }
34
35   revision "2017-12-21" {
36     description
37       "Added IPv6 router advertisement configuration.";
38     reference "2.1.0";
39   }
40
41   revision "2017-07-14" {
42     description
43       "Added Ethernet/IP state data; Add dhcp-client;
44       migrate to OpenConfig types modules; Removed or
45       renamed opstate values";
46     reference "2.0.0";
47   }
48
49   revision "2016-12-22" {
50     description
51       "Fixes to Ethernet interfaces model";
52     reference "1.1.0";
53   }
54
55   // extension statements
56
57   // feature statements
58
59   // identity statements
60
61   identity ETHERNET_SPEED {
62     description "base type to specify available Ethernet link
63     speeds";
64   }
65
66   identity SPEED_10MB {
67     base ETHERNET_SPEED;
68     description "10 Mbps Ethernet";
69   }
70
71   identity SPEED_100MB {
72     base ETHERNET_SPEED;
73     description "100 Mbps Ethernet";
74   }
75
76   identity SPEED_1GB {
77     base ETHERNET_SPEED;
78     description "1 GBps Ethernet";
79   }
80
81   identity SPEED_10GB {
82     base ETHERNET_SPEED;
83     description "10 GBps Ethernet";
84   }
85
86   identity SPEED_25GB {
87     base ETHERNET_SPEED;
88     description "25 GBps Ethernet";
89   }
90
91   identity SPEED_40GB {
92     base ETHERNET_SPEED;
93     description "40 GBps Ethernet";
94   }
95
96   identity SPEED_50GB {
97     base ETHERNET_SPEED;
98     description "50 GBps Ethernet";
99   }
100
101   identity SPEED_100GB {
102     base ETHERNET_SPEED;
103     description "100 GBps Ethernet";
104   }
105
106   identity SPEED_UNKNOWN {
107     base ETHERNET_SPEED;
108     description
109       "Interface speed is unknown.  Systems may report
110       speed UNKNOWN when an interface is down or unpopuplated (e.g.,
111       pluggable not present).";
112   }
113
114   // typedef statements
115
116
117   // grouping statements
118
119   grouping ethernet-interface-config {
120     description "Configuration items for Ethernet interfaces";
121
122     leaf mac-address {
123       type oc-yang:mac-address;
124       description
125         "Assigns a MAC address to the Ethernet interface.  If not
126         specified, the corresponding operational state leaf is
127         expected to show the system-assigned MAC address.";
128     }
129
130     leaf auto-negotiate {
131       type boolean;
132       default true;
133       description
134         "Set to TRUE to request the interface to auto-negotiate
135         transmission parameters with its peer interface.  When
136         set to FALSE, the transmission parameters are specified
137         manually.";
138       reference
139         "IEEE 802.3-2012 auto-negotiation transmission parameters";
140     }
141
142     leaf duplex-mode {
143       type enumeration {
144         enum FULL {
145           description "Full duplex mode";
146         }
147         enum HALF {
148           description "Half duplex mode";
149         }
150       }
151       description
152         "When auto-negotiate is TRUE, this optionally sets the
153         duplex mode that will be advertised to the peer.  If
154         unspecified, the interface should negotiate the duplex mode
155         directly (typically full-duplex).  When auto-negotiate is
156         FALSE, this sets the duplex mode on the interface directly.";
157     }
158
159     leaf port-speed {
160       type identityref {
161         base ETHERNET_SPEED;
162       }
163       description
164         "When auto-negotiate is TRUE, this optionally sets the
165         port-speed mode that will be advertised to the peer for
166         negotiation.  If unspecified, it is expected that the
167         interface will select the highest speed available based on
168         negotiation.  When auto-negotiate is set to FALSE, sets the
169         link speed to a fixed value -- supported values are defined
170         by ETHERNET_SPEED identities";
171     }
172
173     leaf enable-flow-control {
174       type boolean;
175       default false;
176       description
177         "Enable or disable flow control for this interface.
178         Ethernet flow control is a mechanism by which a receiver
179         may send PAUSE frames to a sender to stop transmission for
180         a specified time.
181
182         This setting should override auto-negotiated flow control
183         settings.  If left unspecified, and auto-negotiate is TRUE,
184         flow control mode is negotiated with the peer interface.";
185       reference
186         "IEEE 802.3x";
187     }
188   }
189
190   grouping ethernet-interface-state-counters {
191     description
192       "Ethernet-specific counters and statistics";
193
194     // ingress counters
195
196     leaf in-mac-control-frames {
197       type oc-yang:counter64;
198       description
199         "MAC layer control frames received on the interface";
200     }
201
202     leaf in-mac-pause-frames {
203       type oc-yang:counter64;
204       description
205         "MAC layer PAUSE frames received on the interface";
206     }
207
208     leaf in-oversize-frames {
209       type oc-yang:counter64;
210       description
211         "Number of oversize frames received on the interface";
212     }
213
214     leaf in-jabber-frames {
215       type oc-yang:counter64;
216       description
217         "Number of jabber frames received on the
218         interface.  Jabber frames are typically defined as oversize
219         frames which also have a bad CRC.  Implementations may use
220         slightly different definitions of what constitutes a jabber
221         frame.  Often indicative of a NIC hardware problem.";
222     }
223
224     leaf in-fragment-frames {
225       type oc-yang:counter64;
226       description
227         "Number of fragment frames received on the interface.";
228     }
229
230     leaf in-8021q-frames {
231       type oc-yang:counter64;
232       description
233         "Number of 802.1q tagged frames received on the interface";
234     }
235
236     leaf in-crc-errors {
237       type oc-yang:counter64;
238       description
239         "Number of receive error events due to FCS/CRC check
240         failure";
241     }
242
243     // egress counters
244
245     leaf out-mac-control-frames {
246       type oc-yang:counter64;
247       description
248         "MAC layer control frames sent on the interface";
249     }
250
251     leaf out-mac-pause-frames {
252       type oc-yang:counter64;
253       description
254         "MAC layer PAUSE frames sent on the interface";
255     }
256
257     leaf out-8021q-frames {
258       type oc-yang:counter64;
259       description
260         "Number of 802.1q tagged frames sent on the interface";
261     }
262   }
263
264   grouping ethernet-interface-state {
265     description
266       "Grouping for defining Ethernet-specific operational state";
267
268     leaf hw-mac-address {
269       type oc-yang:mac-address;
270       description
271         "Represenets the 'burned-in',  or system-assigned, MAC
272         address for the Ethernet interface.";
273     }
274
275     leaf negotiated-duplex-mode {
276       type enumeration {
277         enum FULL {
278           description "Full duplex mode";
279         }
280         enum HALF {
281           description "Half duplex mode";
282         }
283       }
284       description
285         "When auto-negotiate is set to TRUE, and the interface has
286         completed auto-negotiation with the remote peer, this value
287         shows the duplex mode that has been negotiated.";
288     }
289
290     leaf negotiated-port-speed {
291       type identityref {
292         base ETHERNET_SPEED;
293       }
294       description
295         "When auto-negotiate is set to TRUE, and the interface has
296         completed auto-negotiation with the remote peer, this value
297         shows the interface speed that has been negotiated.";
298     }
299
300     container counters {
301       description "Ethernet interface counters";
302
303       uses ethernet-interface-state-counters;
304
305     }
306
307   }
308
309   // data definition statements
310
311   grouping ethernet-top {
312     description "top-level Ethernet config and state containers";
313
314     container ethernet {
315       description
316         "Top-level container for ethernet configuration
317         and state";
318
319       container config {
320         description "Configuration data for ethernet interfaces";
321
322         uses ethernet-interface-config;
323
324       }
325
326       container state {
327
328         config false;
329         description "State variables for Ethernet interfaces";
330
331         uses ethernet-interface-config;
332         uses ethernet-interface-state;
333
334       }
335
336     }
337   }
338
339   // augment statements
340
341   augment "/oc-if:interfaces/oc-if:interface" {
342     description "Adds addtional Ethernet-specific configuration to
343     interfaces model";
344
345     uses ethernet-top {
346       when "oc-if:state/oc-if:type = 'ift:ethernetCsmacd'" {
347       description "Additional interface configuration parameters when
348       the interface type is Ethernet";
349       }
350     }
351   }
352
353   // rpc statements
354
355   // notification statements
356
357 }