Adding OpenConfig YANG models.
Change-Id: I0a2fdd5826e80933cf4b9ae939ff3051acec02aa
diff --git a/models/openconfig/src/main/yang/types/openconfig-inet-types.yang b/models/openconfig/src/main/yang/types/openconfig-inet-types.yang
new file mode 100644
index 0000000..498a6e4
--- /dev/null
+++ b/models/openconfig/src/main/yang/types/openconfig-inet-types.yang
@@ -0,0 +1,316 @@
+module openconfig-inet-types {
+
+ yang-version "1";
+ namespace "http://openconfig.net/yang/types/inet";
+ prefix "oc-inet";
+
+ import openconfig-extensions { prefix "oc-ext"; }
+
+ organization
+ "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ www.openconfig.net";
+
+ description
+ "This module contains a set of Internet address related
+ types for use in OpenConfig modules.
+
+ Portions of this code were derived from IETF RFC 6021.
+ Please reproduce this note if possible.
+
+ IETF code is subject to the following copyright and license:
+ Copyright (c) IETF Trust and the persons identified as authors of
+ the code.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, is permitted pursuant to, and subject to the license
+ terms contained in, the Simplified BSD License set forth in
+ Section 4.c of the IETF Trust's Legal Provisions Relating
+ to IETF Documents (http://trustee.ietf.org/license-info).";
+
+ oc-ext:openconfig-version "0.3.0";
+
+ revision 2017-07-06 {
+ description
+ "Add domain-name and host typedefs";
+ reference "0.3.0";
+ }
+
+ revision 2017-04-03 {
+ description
+ "Add ip-version typedef.";
+ reference "0.2.0";
+ }
+
+ revision 2017-04-03 {
+ description
+ "Update copyright notice.";
+ reference "0.1.1";
+ }
+
+ revision 2017-01-26 {
+ description
+ "Initial module for inet types";
+ reference "0.1.0";
+ }
+
+ // IPv4 and IPv6 types.
+
+ typedef ipv4-address {
+ type string {
+ pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' +
+ '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4]' +
+ '[0-9]|25[0-5])$';
+ }
+ description
+ "An IPv4 address in dotted quad notation using the default
+ zone.";
+ }
+
+ typedef ipv4-address-zoned {
+ type string {
+ pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' +
+ '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4]' +
+ '[0-9]|25[0-5])(%[a-zA-Z0-9_]+)$';
+ }
+ description
+ "An IPv4 address in dotted quad notation. This type allows
+ specification of a zone index to disambiguate identical
+ address values. For link-local addresses, the index is
+ typically the interface index or interface name.";
+ }
+
+ typedef ipv6-address {
+ type string {
+ pattern
+ // Must support compression through different lengths
+ // therefore this regexp is complex.
+ '^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' +
+ '([0-9a-fA-F]{1,4}:){1,7}:|' +
+ '([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|' +
+ '([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|' +
+ '([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|' +
+ '([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|' +
+ '([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|' +
+ '[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|' +
+ ':((:[0-9a-fA-F]{1,4}){1,7}|:)' +
+ ')$';
+ }
+ description
+ "An IPv6 address represented as either a full address; shortened
+ or mixed-shortened formats, using the default zone.";
+ }
+
+ typedef ipv6-address-zoned {
+ type string {
+ pattern
+ // Must support compression through different lengths
+ // therefore this regexp is complex.
+ '^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' +
+ '([0-9a-fA-F]{1,4}:){1,7}:|' +
+ '([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|' +
+ '([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|' +
+ '([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|' +
+ '([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|' +
+ '([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|' +
+ '[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|' +
+ ':((:[0-9a-fA-F]{1,4}){1,7}|:)' +
+ ')(%[a-zA-Z0-9_]+)$';
+ }
+ description
+ "An IPv6 address represented as either a full address; shortened
+ or mixed-shortened formats. This type allows specification of
+ a zone index to disambiguate identical address values. For
+ link-local addresses, the index is typically the interface
+ index or interface name.";
+ }
+
+ typedef ipv4-prefix {
+ type string {
+ pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' +
+ '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4]' +
+ '[0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))$';
+ }
+ description
+ "An IPv4 prefix represented in dotted quad notation followed by
+ a slash and a CIDR mask (0 <= mask <= 32).";
+ }
+
+ typedef ipv6-prefix {
+ type string {
+ pattern
+ '^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|' +
+ '([0-9a-fA-F]{1,4}:){1,7}:|' +
+ '([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}' +
+ '([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|' +
+ '([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|' +
+ '([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|' +
+ '([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|' +
+ '[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|' +
+ ':((:[0-9a-fA-F]{1,4}){1,7}|:)' +
+ ')/(12[0-8]|1[0-1][0-9]|[1-9][0-9]|[0-9])$';
+ }
+ description
+ "An IPv6 prefix represented in full, shortened, or mixed
+ shortened format followed by a slash and CIDR mask
+ (0 <= mask <= 128).";
+ }
+
+ typedef ip-address {
+ type union {
+ type ipv4-address;
+ type ipv6-address;
+ }
+ description
+ "An IPv4 or IPv6 address with no prefix specified.";
+ }
+
+ typedef ip-prefix {
+ type union {
+ type ipv4-prefix;
+ type ipv6-prefix;
+ }
+ description
+ "An IPv4 or IPv6 prefix.";
+ }
+
+ typedef ip-version {
+ type enumeration {
+ enum UNKNOWN {
+ value 0;
+ description
+ "An unknown or unspecified version of the Internet
+ protocol.";
+ }
+ enum IPV4 {
+ value 4;
+ description
+ "The IPv4 protocol as defined in RFC 791.";
+ }
+ enum IPV6 {
+ value 6;
+ description
+ "The IPv6 protocol as defined in RFC 2460.";
+ }
+ }
+ description
+ "This value represents the version of the IP protocol.
+ Note that integer representation of the enumerated values
+ are not specified, and are not required to follow the
+ InetVersion textual convention in SMIv2.";
+ reference
+ "RFC 791: Internet Protocol
+ RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
+ RFC 4001: Textual Conventions for Internet Network Addresses";
+ }
+
+ typedef domain-name {
+ type string {
+ length "1..253";
+ pattern
+ '((([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.)*' +
+ '([a-zA-Z0-9_]([a-zA-Z0-9\-_]){0,61})?[a-zA-Z0-9]\.?)' +
+ '|\.';
+ }
+ description
+ "The domain-name type represents a DNS domain name.
+ Fully quallified left to the models which utilize this type.
+
+ Internet domain names are only loosely specified. Section
+ 3.5 of RFC 1034 recommends a syntax (modified in Section
+ 2.1 of RFC 1123). The pattern above is intended to allow
+ for current practice in domain name use, and some possible
+ future expansion. It is designed to hold various types of
+ domain names, including names used for A or AAAA records
+ (host names) and other records, such as SRV records. Note
+ that Internet host names have a stricter syntax (described
+ in RFC 952) than the DNS recommendations in RFCs 1034 and
+ 1123, and that systems that want to store host names in
+ schema nodes using the domain-name type are recommended to
+ adhere to this stricter standard to ensure interoperability.
+
+ The encoding of DNS names in the DNS protocol is limited
+ to 255 characters. Since the encoding consists of labels
+ prefixed by a length bytes and there is a trailing NULL
+ byte, only 253 characters can appear in the textual dotted
+ notation.
+
+ Domain-name values use the US-ASCII encoding. Their canonical
+ format uses lowercase US-ASCII characters. Internationalized
+ domain names MUST be encoded in punycode as described in RFC
+ 3492";
+ }
+
+ typedef host {
+ type union {
+ type ip-address;
+ type domain-name;
+ }
+ description
+ "The host type represents either an unzoned IP address or a DNS
+ domain name.";
+ }
+
+ typedef as-number {
+ type uint32;
+ description
+ "A numeric identifier for an autonomous system (AS). An AS is a
+ single domain, under common administrative control, which forms
+ a unit of routing policy. Autonomous systems can be assigned a
+ 2-byte identifier, or a 4-byte identifier which may have public
+ or private scope. Private ASNs are assigned from dedicated
+ ranges. Public ASNs are assigned from ranges allocated by IANA
+ to the regional internet registries (RIRs).";
+ reference
+ "RFC 1930 Guidelines for creation, selection, and registration
+ of an Autonomous System (AS)
+ RFC 4271 A Border Gateway Protocol 4 (BGP-4)";
+ }
+
+ typedef dscp {
+ type uint8 {
+ range "0..63";
+ }
+ description
+ "A differentiated services code point (DSCP) marking within the
+ IP header.";
+ reference
+ "RFC 2474 Definition of the Differentiated Services Field
+ (DS Field) in the IPv4 and IPv6 Headers";
+ }
+
+ typedef ipv6-flow-label {
+ type uint32 {
+ range "0..1048575";
+ }
+ description
+ "The IPv6 flow-label is a 20-bit value within the IPv6 header
+ which is optionally used by the source of the IPv6 packet to
+ label sets of packets for which special handling may be
+ required.";
+ reference
+ "RFC 2460 Internet Protocol, Version 6 (IPv6) Specification";
+ }
+
+ typedef port-number {
+ type uint16;
+ description
+ "A 16-bit port number used by a transport protocol such as TCP
+ or UDP.";
+ reference
+ "RFC 768 User Datagram Protocol
+ RFC 793 Transmission Control Protocol";
+ }
+
+ typedef uri {
+ type string;
+ description
+ "An ASCII-encoded Uniform Resource Identifier (URI) as defined
+ in RFC 3986.";
+ reference
+ "RFC 3986 Uniform Resource Identifier (URI): Generic Syntax";
+ }
+}
diff --git a/models/openconfig/src/main/yang/types/openconfig-types.yang b/models/openconfig/src/main/yang/types/openconfig-types.yang
new file mode 100644
index 0000000..fa76f80
--- /dev/null
+++ b/models/openconfig/src/main/yang/types/openconfig-types.yang
@@ -0,0 +1,332 @@
+module openconfig-types {
+ yang-version "1";
+
+ namespace "http://openconfig.net/yang/openconfig-types";
+
+ prefix "oc-types";
+
+ // import statements
+ import openconfig-extensions { prefix oc-ext; }
+
+ // meta
+ organization
+ "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ netopenconfig@googlegroups.com";
+
+ description
+ "This module contains a set of general type definitions that
+ are used across OpenConfig models. It can be imported by modules
+ that make use of these types.";
+
+ oc-ext:openconfig-version "0.3.3";
+
+ revision "2017-08-16" {
+ description
+ "Apply fix for ieetfloat32 length parameter";
+ reference "0.3.3";
+ }
+
+ revision "2017-01-13" {
+ description
+ "Add ADDRESS_FAMILY identity";
+ reference "0.3.2";
+ }
+
+ revision "2016-11-14" {
+ description
+ "Correct length of ieeefloat32";
+ reference "0.3.1";
+ }
+
+ revision "2016-11-11" {
+ description
+ "Additional types - ieeefloat32 and routing-password";
+ reference "0.3.0";
+ }
+
+ revision "2016-05-31" {
+ description
+ "OpenConfig public release";
+ reference "0.2.0";
+ }
+
+ typedef percentage {
+ type uint8 {
+ range "0..100";
+ }
+ description
+ "Integer indicating a percentage value";
+ }
+
+ typedef std-regexp {
+ type string;
+ description
+ "This type definition is a placeholder for a standard
+ definition of a regular expression that can be utilised in
+ OpenConfig models. Further discussion is required to
+ consider the type of regular expressions that are to be
+ supported. An initial proposal is POSIX compatible.";
+ }
+
+ typedef timeticks64 {
+ type uint64;
+ description
+ "This type is based on the timeticks type defined in
+ RFC 6991, but with 64-bit width. It represents the time,
+ modulo 2^64, in hundredths of a second between two epochs.";
+ reference
+ "RFC 6991 - Common YANG Data Types";
+ }
+
+ typedef ieeefloat32 {
+ type binary {
+ length "4";
+ }
+ description
+ "An IEEE 32-bit floating point number. The format of this number
+ is of the form:
+ 1-bit sign
+ 8-bit exponent
+ 23-bit fraction
+ The floating point value is calculated using:
+ (-1)**S * 2**(Exponent-127) * (1+Fraction)";
+ }
+
+ typedef routing-password {
+ type string;
+ description
+ "This type is indicative of a password that is used within
+ a routing protocol which can be returned in plain text to the
+ NMS by the local system. Such passwords are typically stored
+ as encrypted strings. Since the encryption used is generally
+ well known, it is possible to extract the original value from
+ the string - and hence this format is not considered secure.
+ Leaves specified with this type should not be modified by
+ the system, and should be returned to the end-user in plain
+ text. This type exists to differentiate passwords, which
+ may be sensitive, from other string leaves. It could, for
+ example, be used by the NMS to censor this data when
+ viewed by particular users.";
+ }
+
+ grouping avg-min-max-stats-precision1 {
+ description
+ "Common nodes for recording average, minimum, and
+ maximum values for a statistic. These values all have
+ fraction-digits set to 1.";
+
+ leaf avg {
+ type decimal64 {
+ fraction-digits 1;
+ }
+ description
+ "The arithmetic mean value of the statistic over the
+ sampling period.";
+ }
+
+ leaf min {
+ type decimal64 {
+ fraction-digits 1;
+ }
+ description
+ "The minimum value of the statistic over the sampling
+ period";
+ }
+
+ leaf max {
+ type decimal64 {
+ fraction-digits 1;
+ }
+ description
+ "The maximum value of the statitic over the sampling
+ period";
+ }
+ }
+
+ grouping avg-min-max-instant-stats-precision1 {
+ description
+ "Common grouping for recording an instantaneous statistic value
+ in addition to avg-min-max stats";
+
+ leaf instant {
+ type decimal64 {
+ fraction-digits 1;
+ }
+ description
+ "The instantaneous value of the statistic.";
+ }
+
+ uses avg-min-max-stats-precision1;
+ }
+
+ grouping avg-min-max-instant-stats-precision2-dB {
+ description
+ "Common grouping for recording dB values with 2 decimal
+ precision. Values include the instantaneous, average,
+ minimum, and maximum statistics";
+
+ leaf instant {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dB;
+ description
+ "The instantaneous value of the statistic.";
+ }
+
+ leaf avg {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dB;
+ description
+ "The arithmetic mean value of the statistic over the
+ sampling period.";
+ }
+
+ leaf min {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dB;
+ description
+ "The minimum value of the statistic over the sampling
+ period";
+ }
+
+ leaf max {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dB;
+ description
+ "The maximum value of the statistic over the sampling
+ period";
+ }
+ }
+
+ grouping avg-min-max-instant-stats-precision2-dBm {
+ description
+ "Common grouping for recording dBm values with 2 decimal
+ precision. Values include the instantaneous, average,
+ minimum, and maximum statistics";
+
+ leaf instant {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dBm;
+ description
+ "The instantaneous value of the statistic.";
+ }
+
+ leaf avg {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dBm;
+ description
+ "The arithmetic mean value of the statistic over the
+ sampling period.";
+ }
+
+ leaf min {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dBm;
+ description
+ "The minimum value of the statistic over the sampling
+ period";
+ }
+
+ leaf max {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units dBm;
+ description
+ "The maximum value of the statistic over the sampling
+ period";
+ }
+ }
+
+ grouping avg-min-max-instant-stats-precision2-mA {
+ description
+ "Common grouping for recording mA values with 2 decimal
+ precision. Values include the instantaneous, average,
+ minimum, and maximum statistics";
+
+ leaf instant {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units mA;
+ description
+ "The instantaneous value of the statistic.";
+ }
+
+ leaf avg {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units mA;
+ description
+ "The arithmetic mean value of the statistic over the
+ sampling period.";
+ }
+
+ leaf min {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units mA;
+ description
+ "The minimum value of the statistic over the sampling
+ period";
+ }
+
+ leaf max {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ units mA;
+ description
+ "The maximum value of the statistic over the sampling
+ period";
+ }
+ }
+
+ identity ADDRESS_FAMILY {
+ description
+ "A base identity for all address families";
+ }
+
+ identity IPV4 {
+ base ADDRESS_FAMILY;
+ description
+ "The IPv4 address family";
+ }
+
+ identity IPV6 {
+ base ADDRESS_FAMILY;
+ description
+ "The IPv6 address family";
+ }
+
+ identity MPLS {
+ base ADDRESS_FAMILY;
+ description
+ "The MPLS address family";
+ }
+
+ identity L2_ETHERNET {
+ base ADDRESS_FAMILY;
+ description
+ "The 802.3 Ethernet address family";
+ }
+
+}
diff --git a/models/openconfig/src/main/yang/types/openconfig-yang-types.yang b/models/openconfig/src/main/yang/types/openconfig-yang-types.yang
new file mode 100644
index 0000000..749fac4
--- /dev/null
+++ b/models/openconfig/src/main/yang/types/openconfig-yang-types.yang
@@ -0,0 +1,156 @@
+module openconfig-yang-types {
+
+ yang-version "1";
+ namespace "http://openconfig.net/yang/types/yang";
+ prefix "oc-yang";
+
+ import openconfig-extensions { prefix "oc-ext"; }
+
+ organization
+ "OpenConfig working group";
+
+ contact
+ "OpenConfig working group
+ www.openconfig.net";
+
+ description
+ "This module contains a set of extension types to the
+ YANG builtin types that are used across multiple
+ OpenConfig models.
+
+ Portions of this code were derived from IETF RFC 6021.
+ Please reproduce this note if possible.
+
+ IETF code is subject to the following copyright and license:
+ Copyright (c) IETF Trust and the persons identified as authors of
+ the code.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, is permitted pursuant to, and subject to the license
+ terms contained in, the Simplified BSD License set forth in
+ Section 4.c of the IETF Trust's Legal Provisions Relating
+ to IETF Documents (http://trustee.ietf.org/license-info).";
+
+ oc-ext:openconfig-version "0.1.2";
+
+ revision 2017-07-30 {
+ description
+ "Fixed unprintable character";
+ reference "0.1.2";
+ }
+
+ revision 2017-04-03 {
+ description
+ "Update copyright notice.";
+ reference "0.1.1";
+ }
+
+ revision 2017-01-26 {
+ description
+ "Initial module for inet types";
+ reference "0.1.0";
+ }
+
+ typedef dotted-quad {
+ type string {
+ pattern '^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|' +
+ '25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4]' +
+ '[0-9]|25[0-5])$';
+ }
+ description
+ "An unsigned 32-bit integer expressed as a dotted quad. The
+ format is four octets written as decimal numbers separated
+ with a period character.";
+ }
+
+ typedef hex-string {
+ type string {
+ pattern '^[0-9a-fA-F]*$';
+ }
+ description
+ "A string consisting of a hexadecimal characters.";
+ }
+
+ typedef counter32 {
+ type uint32;
+ description
+
+ "A 32-bit counter. A counter value is a monotonically increasing
+ value which is used to express a count of a number of
+ occurrences of a particular event or entity. When the counter
+ reaches its maximum value, in this case 2^32-1, it wraps to 0.
+
+ Discontinuities in the counter are generally triggered only when
+ the counter is reset to zero.";
+ }
+
+ typedef counter64 {
+ type uint64;
+ description
+
+ "A 64-bit counter. A counter value is a monotonically increasing
+ value which is used to express a count of a number of
+ occurrences of a particular event or entity. When a counter64
+ reaches its maximum value, 2^64-1, it loops to zero.
+ Discontinuities in a counter are generally triggered only when
+ the counter is reset to zero, through operator or system
+ intervention.";
+ }
+
+ typedef date-and-time {
+ type string {
+ pattern
+ '^[0-9]{4}\-[0-9]{2}\-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}' +
+ '(\.[0-9]+)?Z[+-][0-9]{2}:[0-9]{2}$';
+ }
+ description
+ "A date and time, expressed in the format described in RFC3339.
+ That is to say:
+
+ YYYY-MM-DDTHH:MM:SSZ+-hh:mm
+
+ where YYYY is the year, MM is the month expressed as a two-digit
+ month (zero padding if required), DD is the day of the month,
+ expressed as a two digit value. T is the literal character 'T',
+ HH is the hour of the day expressed as a two digit number, using
+ the 24-hour clock, MM is the minute of the hour expressed as a
+ two digit number. Z is the literal character 'Z', followed by a
+ timezone offset expressed in hours (hh) and minutes (mm), both
+ expressed as two digit numbers. The time offset is specified as
+ a positive or negative offset to UTC using the '+' or '-'
+ character preceding the offset.
+
+ Optionally, fractional seconds can be expressed after the minute
+ of the hour as a decimal number of unspecified precision
+ reflecting fractions of a second.";
+ reference
+ "RFC3339 - Date and Time on the Internet: Timestamps";
+ }
+
+ typedef gauge64 {
+ type uint64;
+ description
+ "A gauge value may increase or decrease - and reflects a value
+ at a particular point in time. If the value of the variable
+ being modeled using the gauge exceeds its maximum - 2^64-1 in
+ this case - the gauge is set to its maximum value.";
+ }
+
+ typedef phys-address {
+ type string {
+ pattern '^([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?$';
+ }
+ description
+ "A physical layer address, expressed as a series of pairs of
+ hexadecimal digits.";
+ }
+
+ typedef mac-address {
+ type string {
+ pattern '^[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}$';
+ }
+ description
+ "An IEEE 802 MAC address";
+ }
+}