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-types@2018-01-16.yang
1 module openconfig-types {
2   yang-version "1";
3
4   namespace "http://openconfig.net/yang/openconfig-types";
5
6   prefix "oc-types";
7
8   // import statements
9   import openconfig-extensions { prefix oc-ext; }
10
11   // meta
12   organization
13     "OpenConfig working group";
14
15   contact
16     "OpenConfig working group
17     netopenconfig@googlegroups.com";
18
19   description
20     "This module contains a set of general type definitions that
21     are used across OpenConfig models. It can be imported by modules
22     that make use of these types.";
23
24   oc-ext:openconfig-version "0.4.0";
25
26   revision "2018-01-16" {
27     description
28       "Add interval to min/max/avg stats; add percentage stat";
29     reference "0.4.0";
30   }
31
32   revision "2017-08-16" {
33     description
34       "Apply fix for ieetfloat32 length parameter";
35     reference "0.3.3";
36   }
37
38   revision "2017-01-13" {
39     description
40       "Add ADDRESS_FAMILY identity";
41     reference "0.3.2";
42   }
43
44   revision "2016-11-14" {
45     description
46       "Correct length of ieeefloat32";
47     reference "0.3.1";
48   }
49
50   revision "2016-11-11" {
51     description
52       "Additional types - ieeefloat32 and routing-password";
53     reference "0.3.0";
54   }
55
56   revision "2016-05-31" {
57     description
58       "OpenConfig public release";
59     reference "0.2.0";
60   }
61
62   typedef percentage {
63     type uint8 {
64       range "0..100";
65     }
66     description
67       "Integer indicating a percentage value";
68   }
69
70   typedef std-regexp {
71     type string;
72     description
73       "This type definition is a placeholder for a standard
74       definition of a regular expression that can be utilised in
75       OpenConfig models. Further discussion is required to
76       consider the type of regular expressions that are to be
77       supported. An initial proposal is POSIX compatible.";
78   }
79
80   typedef timeticks64 {
81     type uint64;
82     description
83      "This type is based on the timeticks type defined in
84      RFC 6991, but with 64-bit width.  It represents the time,
85      modulo 2^64, in hundredths of a second between two epochs.";
86     reference
87       "RFC 6991 - Common YANG Data Types";
88   }
89
90   typedef ieeefloat32 {
91     type binary {
92       length "4";
93     }
94     description
95       "An IEEE 32-bit floating point number. The format of this number
96       is of the form:
97         1-bit  sign
98         8-bit  exponent
99         23-bit fraction
100       The floating point value is calculated using:
101         (-1)**S * 2**(Exponent-127) * (1+Fraction)";
102   }
103
104   typedef routing-password {
105     type string;
106     description
107       "This type is indicative of a password that is used within
108       a routing protocol which can be returned in plain text to the
109       NMS by the local system. Such passwords are typically stored
110       as encrypted strings. Since the encryption used is generally
111       well known, it is possible to extract the original value from
112       the string - and hence this format is not considered secure.
113       Leaves specified with this type should not be modified by
114       the system, and should be returned to the end-user in plain
115       text. This type exists to differentiate passwords, which
116       may be sensitive, from other string leaves. It could, for
117       example, be used by the NMS to censor this data when
118       viewed by particular users.";
119   }
120
121   typedef stat-interval {
122     type uint64;
123     units nanoseconds;
124     description
125       "A time interval over which a set of statistics is computed.
126       A common usage is to report the interval over which
127       avg/min/max stats are computed and reported.";
128   }
129
130   grouping stat-interval-state {
131     description
132       "Reusable leaf definition for stats computation interval";
133
134     leaf interval {
135       type oc-types:stat-interval;
136       description
137         "The time interval over which the min/max/average statistics
138         are computed by the system.";
139     }
140   }
141
142   grouping avg-min-max-stats-precision1 {
143     description
144       "Common nodes for recording average, minimum, and
145       maximum values for a statistic.  These values all have
146       fraction-digits set to 1.";
147
148     leaf avg {
149       type decimal64 {
150         fraction-digits 1;
151       }
152       description
153         "The arithmetic mean value of the statistic over the
154         sampling period.";
155     }
156
157     leaf min {
158       type decimal64 {
159         fraction-digits 1;
160       }
161       description
162         "The minimum value of the statistic over the sampling
163         period";
164     }
165
166     leaf max {
167       type decimal64 {
168         fraction-digits 1;
169       }
170       description
171         "The maximum value of the statitic over the sampling
172         period";
173     }
174
175     uses stat-interval-state;
176   }
177
178   grouping avg-min-max-instant-stats-precision1 {
179     description
180       "Common grouping for recording an instantaneous statistic value
181       in addition to avg-min-max stats";
182
183     leaf instant {
184       type decimal64 {
185         fraction-digits 1;
186       }
187       description
188         "The instantaneous value of the statistic.";
189     }
190
191     uses avg-min-max-stats-precision1;
192   }
193
194   grouping avg-min-max-instant-stats-precision2-dB {
195     description
196       "Common grouping for recording dB values with 2 decimal
197       precision. Values include the instantaneous, average,
198       minimum, and maximum statistics";
199
200     leaf instant {
201       type decimal64 {
202         fraction-digits 2;
203       }
204       units dB;
205       description
206         "The instantaneous value of the statistic.";
207     }
208
209     leaf avg {
210       type decimal64 {
211         fraction-digits 2;
212       }
213       units dB;
214       description
215         "The arithmetic mean value of the statistic over the
216         sampling period.";
217     }
218
219     leaf min {
220       type decimal64 {
221         fraction-digits 2;
222       }
223       units dB;
224       description
225         "The minimum value of the statistic over the sampling
226         period";
227     }
228
229     leaf max {
230       type decimal64 {
231         fraction-digits 2;
232       }
233       units dB;
234       description
235         "The maximum value of the statistic over the sampling
236         period";
237     }
238
239     uses stat-interval-state;
240   }
241
242   grouping avg-min-max-instant-stats-precision2-dBm {
243     description
244       "Common grouping for recording dBm values with 2 decimal
245       precision. Values include the instantaneous, average,
246       minimum, and maximum statistics";
247
248     leaf instant {
249       type decimal64 {
250         fraction-digits 2;
251       }
252       units dBm;
253       description
254         "The instantaneous value of the statistic.";
255     }
256
257     leaf avg {
258       type decimal64 {
259         fraction-digits 2;
260       }
261       units dBm;
262       description
263         "The arithmetic mean value of the statistic over the
264         sampling period.";
265     }
266
267     leaf min {
268       type decimal64 {
269         fraction-digits 2;
270       }
271       units dBm;
272       description
273         "The minimum value of the statistic over the sampling
274         period";
275     }
276
277     leaf max {
278       type decimal64 {
279         fraction-digits 2;
280       }
281       units dBm;
282       description
283         "The maximum value of the statistic over the sampling
284         period";
285     }
286
287     uses stat-interval-state;
288   }
289
290   grouping avg-min-max-instant-stats-precision2-mA {
291     description
292       "Common grouping for recording mA values with 2 decimal
293       precision. Values include the instantaneous, average,
294       minimum, and maximum statistics";
295
296     leaf instant {
297       type decimal64 {
298         fraction-digits 2;
299       }
300       units mA;
301       description
302         "The instantaneous value of the statistic.";
303     }
304
305     leaf avg {
306       type decimal64 {
307         fraction-digits 2;
308       }
309       units mA;
310       description
311         "The arithmetic mean value of the statistic over the
312         sampling period.";
313     }
314
315     leaf min {
316       type decimal64 {
317         fraction-digits 2;
318       }
319       units mA;
320       description
321         "The minimum value of the statistic over the sampling
322         period";
323     }
324
325     leaf max {
326       type decimal64 {
327         fraction-digits 2;
328       }
329       units mA;
330       description
331         "The maximum value of the statistic over the sampling
332         period";
333     }
334
335     uses stat-interval-state;
336   }
337
338   grouping avg-min-max-instant-stats-pct {
339     description
340       "Common grouping for percentage statistics.";
341
342     leaf instant {
343       type oc-types:percentage;
344       description
345         "The instantaneous percentage value.";
346     }
347
348     leaf avg {
349       type oc-types:percentage;
350       description
351         "The arithmetic mean value of the percentage measure of the
352         statistic over the sampling period.";
353     }
354
355     leaf min {
356       type oc-types:percentage;
357       description
358         "The minimum value of the percentage measure of the
359         statistic over the sampling period";
360     }
361
362     leaf max {
363       type oc-types:percentage;
364       description
365         "The maximum value of the percentage measure of the
366         statistic over the sampling period";
367     }
368
369     uses stat-interval-state;
370   }
371
372   identity ADDRESS_FAMILY {
373     description
374       "A base identity for all address families";
375   }
376
377   identity IPV4 {
378     base ADDRESS_FAMILY;
379     description
380       "The IPv4 address family";
381   }
382
383   identity IPV6 {
384     base ADDRESS_FAMILY;
385     description
386       "The IPv6 address family";
387   }
388
389   identity MPLS {
390     base ADDRESS_FAMILY;
391     description
392       "The MPLS address family";
393   }
394
395   identity L2_ETHERNET {
396     base ADDRESS_FAMILY;
397     description
398       "The 802.3 Ethernet address family";
399   }
400
401 }