1 module openconfig-types {
4 namespace "http://openconfig.net/yang/openconfig-types";
9 import openconfig-extensions { prefix oc-ext; }
13 "OpenConfig working group";
16 "OpenConfig working group
17 netopenconfig@googlegroups.com";
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.";
24 oc-ext:openconfig-version "0.4.0";
26 revision "2018-01-16" {
28 "Add interval to min/max/avg stats; add percentage stat";
32 revision "2017-08-16" {
34 "Apply fix for ieetfloat32 length parameter";
38 revision "2017-01-13" {
40 "Add ADDRESS_FAMILY identity";
44 revision "2016-11-14" {
46 "Correct length of ieeefloat32";
50 revision "2016-11-11" {
52 "Additional types - ieeefloat32 and routing-password";
56 revision "2016-05-31" {
58 "OpenConfig public release";
67 "Integer indicating a percentage value";
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.";
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.";
87 "RFC 6991 - Common YANG Data Types";
95 "An IEEE 32-bit floating point number. The format of this number
100 The floating point value is calculated using:
101 (-1)**S * 2**(Exponent-127) * (1+Fraction)";
104 typedef routing-password {
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.";
121 typedef stat-interval {
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.";
130 grouping stat-interval-state {
132 "Reusable leaf definition for stats computation interval";
135 type oc-types:stat-interval;
137 "The time interval over which the min/max/average statistics
138 are computed by the system.";
142 grouping avg-min-max-stats-precision1 {
144 "Common nodes for recording average, minimum, and
145 maximum values for a statistic. These values all have
146 fraction-digits set to 1.";
153 "The arithmetic mean value of the statistic over the
162 "The minimum value of the statistic over the sampling
171 "The maximum value of the statitic over the sampling
175 uses stat-interval-state;
178 grouping avg-min-max-instant-stats-precision1 {
180 "Common grouping for recording an instantaneous statistic value
181 in addition to avg-min-max stats";
188 "The instantaneous value of the statistic.";
191 uses avg-min-max-stats-precision1;
194 grouping avg-min-max-instant-stats-precision2-dB {
196 "Common grouping for recording dB values with 2 decimal
197 precision. Values include the instantaneous, average,
198 minimum, and maximum statistics";
206 "The instantaneous value of the statistic.";
215 "The arithmetic mean value of the statistic over the
225 "The minimum value of the statistic over the sampling
235 "The maximum value of the statistic over the sampling
239 uses stat-interval-state;
242 grouping avg-min-max-instant-stats-precision2-dBm {
244 "Common grouping for recording dBm values with 2 decimal
245 precision. Values include the instantaneous, average,
246 minimum, and maximum statistics";
254 "The instantaneous value of the statistic.";
263 "The arithmetic mean value of the statistic over the
273 "The minimum value of the statistic over the sampling
283 "The maximum value of the statistic over the sampling
287 uses stat-interval-state;
290 grouping avg-min-max-instant-stats-precision2-mA {
292 "Common grouping for recording mA values with 2 decimal
293 precision. Values include the instantaneous, average,
294 minimum, and maximum statistics";
302 "The instantaneous value of the statistic.";
311 "The arithmetic mean value of the statistic over the
321 "The minimum value of the statistic over the sampling
331 "The maximum value of the statistic over the sampling
335 uses stat-interval-state;
338 grouping avg-min-max-instant-stats-pct {
340 "Common grouping for percentage statistics.";
343 type oc-types:percentage;
345 "The instantaneous percentage value.";
349 type oc-types:percentage;
351 "The arithmetic mean value of the percentage measure of the
352 statistic over the sampling period.";
356 type oc-types:percentage;
358 "The minimum value of the percentage measure of the
359 statistic over the sampling period";
363 type oc-types:percentage;
365 "The maximum value of the percentage measure of the
366 statistic over the sampling period";
369 uses stat-interval-state;
372 identity ADDRESS_FAMILY {
374 "A base identity for all address families";
380 "The IPv4 address family";
386 "The IPv6 address family";
392 "The MPLS address family";
395 identity L2_ETHERNET {
398 "The 802.3 Ethernet address family";