1 module openconfig-yang-types {
4 namespace "http://openconfig.net/yang/types/yang";
7 import openconfig-extensions { prefix "oc-ext"; }
10 "OpenConfig working group";
13 "OpenConfig working group
17 "This module contains a set of extension types to the
18 YANG builtin types that are used across multiple
21 Portions of this code were derived from IETF RFC 6021.
22 Please reproduce this note if possible.
24 IETF code is subject to the following copyright and license:
25 Copyright (c) IETF Trust and the persons identified as authors of
29 Redistribution and use in source and binary forms, with or without
30 modification, is permitted pursuant to, and subject to the license
31 terms contained in, the Simplified BSD License set forth in
32 Section 4.c of the IETF Trust's Legal Provisions Relating
33 to IETF Documents (http://trustee.ietf.org/license-info).";
35 oc-ext:openconfig-version "0.1.2";
39 "Fixed unprintable character";
45 "Update copyright notice.";
51 "Initial module for inet types";
57 pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' +
58 '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4]' +
62 "An unsigned 32-bit integer expressed as a dotted quad. The
63 format is four octets written as decimal numbers separated
64 with a period character.";
69 pattern '^[0-9a-fA-F]*$';
72 "A string consisting of a hexadecimal characters.";
79 "A 32-bit counter. A counter value is a monotonically increasing
80 value which is used to express a count of a number of
81 occurrences of a particular event or entity. When the counter
82 reaches its maximum value, in this case 2^32-1, it wraps to 0.
84 Discontinuities in the counter are generally triggered only when
85 the counter is reset to zero.";
92 "A 64-bit counter. A counter value is a monotonically increasing
93 value which is used to express a count of a number of
94 occurrences of a particular event or entity. When a counter64
95 reaches its maximum value, 2^64-1, it loops to zero.
96 Discontinuities in a counter are generally triggered only when
97 the counter is reset to zero, through operator or system
101 typedef date-and-time {
104 '^[0-9]{4}\-[0-9]{2}\-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}' +
105 '(\.[0-9]+)?Z[+-][0-9]{2}:[0-9]{2}$';
108 "A date and time, expressed in the format described in RFC3339.
111 YYYY-MM-DDTHH:MM:SSZ+-hh:mm
113 where YYYY is the year, MM is the month expressed as a two-digit
114 month (zero padding if required), DD is the day of the month,
115 expressed as a two digit value. T is the literal character 'T',
116 HH is the hour of the day expressed as a two digit number, using
117 the 24-hour clock, MM is the minute of the hour expressed as a
118 two digit number. Z is the literal character 'Z', followed by a
119 timezone offset expressed in hours (hh) and minutes (mm), both
120 expressed as two digit numbers. The time offset is specified as
121 a positive or negative offset to UTC using the '+' or '-'
122 character preceding the offset.
124 Optionally, fractional seconds can be expressed after the minute
125 of the hour as a decimal number of unspecified precision
126 reflecting fractions of a second.";
128 "RFC3339 - Date and Time on the Internet: Timestamps";
134 "A gauge value may increase or decrease - and reflects a value
135 at a particular point in time. If the value of the variable
136 being modeled using the gauge exceeds its maximum - 2^64-1 in
137 this case - the gauge is set to its maximum value.";
140 typedef phys-address {
142 pattern '^([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?$';
145 "A physical layer address, expressed as a series of pairs of
146 hexadecimal digits.";
149 typedef mac-address {
151 pattern '^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$';
154 "An IEEE 802 MAC address";