initial realease

This commit is contained in:
FRUCHARD Damien
2023-09-21 11:07:20 +02:00
parent d369acc857
commit e102d8725d
32 changed files with 20526 additions and 1 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,86 @@
module ieee802-dot1cb-frer-types {
yang-version "1.1";
namespace urn:ieee:std:802.1Q:yang:ieee802-dot1cb-frer-types;
prefix dot1cb-frer-types;
organization
"Institute of Electrical and Electronics Engineers";
contact
"WG-URL: http://ieee802.org/1/
WG-EMail: stds-802-1-l@ieee.org
Contact: IEEE 802.1 Working Group Chair
Postal: C/O IEEE 802.1 Working Group
IEEE Standards Association
445 Hoes Lane
Piscataway, NJ 08854
USA
E-mail: stds-802-1-chairs@ieee.org";
description
"Management objects that control the frame replication and
elimination from IEEE Std 802.1CB-2017. This YANG data model conforms
to the Network Management Datastore Architecture defined in RFC 8342.
Copyright (C) IEEE (2021). This version of this YANG module is part
of IEEE Std 802.1CBcv; see the draft itself for full legal notices.";
revision 2021-05-06 {
description
"Published as part of IEEE Std 802.1CBcv-2021. Initial version.";
reference
"IEEE Std 802.1CBcv-2021, Frame Replication and Elimination for
Reliability - FRER YANG Data Model and Management Information Base
Module.";
}
typedef seq-rcvy-algorithm {
type enumeration {
enum vector {
value 0;
description
"The sequence recovery type used for the Vector Recovery
Algorithm.";
}
enum match {
value 1;
description
"The sequence recovery type used for the Match Recovery
Algorithm.";
}
}
description
"An enumerated value specifying which sequence recovery algorithm
is to be used for an instance of the Sequence recovery function.";
reference
"10.4.1.5 of IEEE Std 802.1CB-2017";
}
typedef seq-encaps-method {
type enumeration {
enum reserved {
value 0;
description
"Reserved value.";
}
enum r-tag {
value 1;
description
"The sequence encode decode type used for the R_TAG
encode/decode method.";
}
enum hsr-seq-tag {
value 2;
description
"The sequence encode decode type used for the HSR encode/decode
method.";
}
enum prp-seq-trailer {
value 3;
description
"The sequence encode decode type used for the PRP encode/decode
method.";
}
}
description
"An enumerated value indicating the type of encapsulation used for
an instance of the Sequence encode/ decode function.";
reference
"10.5.1.5 of IEEE Std 802.1CB-2017";
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,99 @@
module ieee802-dot1cb-stream-identification-types {
yang-version "1.1";
namespace
urn:ieee:std:802.1Q:yang:ieee802-dot1cb-stream-identification-types;
prefix dot1cb-sid-types;
organization
"Institute of Electrical and Electronics Engineers";
contact
"WG-URL: http://ieee802.org/1/
WG-EMail: stds-802-1-l@ieee.org
Contact: IEEE 802.1 Working Group Chair
Postal: C/O IEEE 802.1 Working Group
IEEE Standards Association
445 Hoes Lane
Piscataway, NJ 08854
USA
E-mail: stds-802-1-chairs@ieee.org";
description
"Management objects that control the stream identification from IEEE
Std 802.1CB-2017. This YANG data model conforms to the Network
Management Datastore Architecture defined in RFC 8342. Copyright (C)
IEEE (2021). This version of this YANG module is part of IEEE Std
802.1CBdb-2021; see the draft itself for full legal notices.";
revision 2021-06-14 {
description
"Published as part of IEEE Std 802.1CBdb-2021.
Added the stream identification type used for the Mask-and-match
identification method ";
reference
"IEEE Std 802.1CBdb-2021, Frame Replication and Elimination for
Reliability - Extended Stream identification functions.";
}
revision 2021-05-06 {
description
"Published as part of IEEE Std 802.1CBcv-2021. Initial version.";
reference
"IEEE Std 802.1CBcv-2021, Frame Replication and Elimination for
Reliability - FRER YANG Data Model and Management Information Base
Module.";
}
identity strid-idty {
description
"Root identity for all stream identification types";
}
typedef direction {
type boolean;
description
"A boolean object indicating whether the direction is out-facing
(True) or in-facing (False).";
reference
"10.4.1.3 of IEEE Std 802.1CB-2017";
}
typedef stream-id-function {
type enumeration {
enum reserved {
value 0;
description
"Reserved value.";
}
enum null-stream {
value 1;
description
"The stream identification type used for the Null Stream
identification method.";
}
enum smac-vlan {
value 2;
description
"The stream identification type used for the Source MAC and
VLAN Stream identification method.";
}
enum dmac-vlan {
value 3;
description
"The stream identification type used for the Active Destination
MAC and VLAN Stream identification method.";
}
enum ip {
value 4;
description
"The stream identification type used for the IP Stream
identification method.";
}
enum mask-and-match {
value 5;
description
"The stream identification type used for the Mask-and-match
identification method.";
}
}
description
"An enumerated value indicating the method used to identify packets
belonging to a Stream.";
reference
"9.1.1.6 of IEEE Std 802.1CBdb-2021";
}
}

View File

@@ -0,0 +1,817 @@
module ieee802-dot1cb-stream-identification {
yang-version "1.1";
namespace urn:ieee:std:802.1Q:yang:ieee802-dot1cb-stream-identification;
prefix dot1cb-sid;
import ieee802-types {
prefix ieee;
}
import ieee802-dot1q-types {
prefix dot1qtypes;
}
import ietf-inet-types {
prefix inet;
}
import ietf-interfaces {
prefix if;
}
import ieee802-dot1cb-stream-identification-types {
prefix dot1cb-sid-types;
}
organization
"Institute of Electrical and Electronics Engineers";
contact
"WG-URL: http://ieee802.org/1/
WG-EMail: stds-802-1-l@ieee.org
Contact: IEEE 802.1 Working Group Chair
Postal: C/O IEEE 802.1 Working Group
IEEE Standards Association
445 Hoes Lane
Piscataway, NJ 08854
USA
E-mail: stds-802-1-chairs@ieee.org";
description
"Management objects that control the stream identification from IEEE
Std 802.1CB-2017. This YANG data model conforms to the Network
Management Datastore Architecture defined in RFC 8342. Copyright (C)
IEEE (2021). This version of this YANG module is part of IEEE Std
802.1CBcv; see the draft itself for full legal notices.";
revision 2021-05-06 {
description
"Published as part of IEEE Std 802.1CBcv-2021. Initial version.";
reference
"IEEE Std 802.1CBcv-2021, Frame Replication and Elimination for
Reliability - FRER YANG Data Model and Management Information Base
Module.";
}
identity null-stream-identification {
base dot1cb-sid-types:strid-idty;
description
"Null Stream Identification";
}
identity smac-vlan-stream-identification {
base dot1cb-sid-types:strid-idty;
description
"Source MAC and VLAN Stream Identification";
}
identity dmac-vlan-stream-identification {
base dot1cb-sid-types:strid-idty;
description
"Active Destination MAC and VLAN Stream Identification";
}
identity ip-stream-identification {
base dot1cb-sid-types:strid-idty;
description
"IP Stream Identification";
}
typedef vlan-tag-identification-type {
type enumeration {
enum tagged {
value 1;
description
"A frame must have a VLAN tag to be recognized as belonging to
the Stream.";
}
enum priority {
value 2;
description
"A frame must be untagged, or have a VLAN tag with a VLAN ID =
0 to be recognized as belonging to the Stream.";
}
enum all {
value 3;
description
"A frame is recognized as belonging to the Stream whether
tagged or not.";
}
}
description
"Enumeration describing how a Stream can be identified using the
VLAN tag.";
}
typedef vlan-identifier-type {
type uint16 {
range "0 .. 4095";
}
description
"Specifies the vlan_identifier. A value of 0 indicates that the
vlan_identifier carries a special meaning.";
}
list stream-identity {
key "index";
description
"The Stream identity table consists of a set of tsnStreamIdEntry
objects, each relating to a single Stream, specifying the points in
the system where Stream identification functions are to be
instantiated. Each entry in the Stream identity table has a
tsnStreamIdHandle object specifying a stream_handle value and one
or more tsnStreamIdEntry objects describing one identification
method for that Stream. If a single Stream has multiple
identification methods, perhaps (but not necessarily) on different
ports, then there can be multiple tsnStreamIdEntry objects with the
same value for the tsnStreamIdHandle. If the HSR or PRP method or
the Sequence encode/decode function is applied to a packet, then
the LanId or PathId fields are also used to identify the Stream to
which the packet belongs.";
reference
"9.1. of IEEE Std 802.1CB-2017";
leaf index {
type uint32;
description
"If a single Stream has multiple identification methods, perhaps
(but not necessarily) on different ports, then there can be
multiple tsnStreamIdEntry objects with the same value for the
tsnStreamIdHandle";
}
leaf handle {
type uint32;
mandatory true;
description
"The objects in a given entry of the Stream identity table are
used to control packets whose stream_handle subparameter is equal
to the entrys tsnStreamIdHandle object. The specific values used
in the tsnStreamIdHandle object are not necessarily used in the
system; they are used only to relate the various management
objects in Clause 9 and Clause 10.";
reference
"9.1.1.1 of IEEE Std 802.1CB-2017";
}
container in-facing {
description
"Container for in-facing Stream identification functions.";
leaf-list input-port {
type if:interface-ref;
description
"The list of ports on which an in-facing Stream identification
function using this identification method is to be placed for
this Stream in the input (coming from the system forwarding
function) direction. Any number of tsnStreamIdEntry objects can
list the same port for the same tsnStreamIdHandle in its
tsnStreamIdInFacInputPortList.";
reference
"9.1.1.4 of IEEE Std 802.1CB-2017";
}
leaf-list output-port {
type if:interface-ref;
description
"The list of ports on which an in-facing Stream identification
function using this identification method is to be placed for
this Stream in the output (towards the system forwarding
function) direction. At most one tsnStreamIdEntry can list a
given port for a given tsnStreamIdHandle in its
tsnStreamIdInFacOutputPortList.";
reference
"9.1.1.2 of IEEE Std 802.1CB-2017";
}
}
container out-facing {
description
"Container for out-facing Stream identification functions.";
leaf-list input-port {
type if:interface-ref;
description
"The list of ports on which an out-facing Stream identification
function using this identification method is to be placed for
this Stream in the input (coming from the physical interface)
direction. Any number of tsnStreamIdEntry objects can list the
same port for the same tsnStreamIdHandle in its
tsnStreamIdOutFacInputPortList.";
reference
"9.1.1.5 of IEEE Std 802.1CB-2017";
}
leaf-list output-port {
type if:interface-ref;
description
"The list of ports on which an out-facing Stream identification
function using this identification method is to be placed for
this Stream in the output (towards the physical interface)
direction. At most one tsnStreamIdEntry can list a given port
for a given tsnStreamIdHandle in its
tsnStreamIdOutFacOutputPortList.";
reference
"9.1.1.3 of IEEE Std 802.1CB-2017";
}
}
choice parameters {
mandatory true;
description
"The number of controlling parameters for a Stream identification
method, their types and values, are specific to the
tsnStreamIdIdentificationType.";
reference
"9.1.1.7 of IEEE Std 802.1CB-2017";
container null-stream-identification {
description
"When instantiating an instance of the Null Stream
identification function for a particular input Stream, the
managed objects in this container serve as the
tsnStreamIdParameters managed object.";
reference
"9.1.2 of IEEE Std 802.1CB-2017";
container identification-type {
config false;
description
"The identification type indicating the method used to
identify packets belonging to the Stream. The identification
type contains a type number and an Organizationally Unique
Identifier (OUI) or Company ID (CID) to identify the
organization defining the identification method.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
leaf type-number {
type dot1cb-sid-types:stream-id-function;
default "null-stream";
description
"The stream identification type used for the Null Stream
identification method.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
}
leaf oui-cid {
type string {
pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}";
}
default "00-80-C2";
description
"The Organizationally Unique Identifier (OUI) or Company ID
(CID) to identify the organization defining the
identification method. For identification methods defined
in IEEE Std 802.1CB-2017 the OUI/CID is always 00-80-C2.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
}
}
leaf destination-mac {
type ieee:mac-address;
description
"Specifies the destination_address that identifies a packet
in an EISS indication primitive, to the Null Stream
identification function. The ieee:mac-address type has a
pattern that allows upper and lower case letters. To avoid
issues with string comparison, it is suggested to only use
Upper Case for the letters in the hexadecimal numbers. There
is still an issue with a difference between the IETF
mac-address definition and the IEEE mac-address definition,
so consider that if implementing code that compares
mac-addresses.";
reference
"9.1.2.1 of IEEE Std 802.1CB-2017";
}
leaf tagged {
type vlan-tag-identification-type;
description
"An enumerated value indicating whether a packet in an EISS
indication primitive to the Null Stream identification
function is permitted to have a VLAN tag.";
reference
"9.1.2.2 of IEEE Std 802.1CB-2017";
}
leaf vlan {
type vlan-identifier-type;
description
"Specifies the vlan_identifier parameter that identifies a
packet in an EISS indication primitive to the Null Stream
identification function. A value of 0 indicates that the
vlan_identifier parameter is ignored on EISS indication
primitives.";
reference
"9.1.2.3 of IEEE Std 802.1CB-2017";
}
}
container smac-vlan-stream-identification {
description
"When instantiating an instance of the Source MAC and VLAN
Stream identification function for a particular input Stream,
the managed objects in the following subclauses serve as the
tsnStreamIdParameters managed object.";
reference
"9.1.3 of IEEE Std 802.1CB-2017";
container identification-type {
config false;
description
"The identification type indicating the method used to
identify packets belonging to the Stream. The identification
type contains a type number and an Organizationally Unique
Identifier (OUI) or Company ID (CID) to identify the
organization defining the identification method.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
leaf type-number {
type dot1cb-sid-types:stream-id-function;
default "smac-vlan";
description
"The stream identification type used for the Source MAC and
VLAN Stream identification method.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
}
leaf oui-cid {
type string {
pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}";
}
default "00-80-C2";
description
"The Organizationally Unique Identifier (OUI) or Company ID
(CID) to identify the organization defining the
identification method. For identification methods defined
in IEEE Std 802.1CB-2017 the OUI/CID is always 00-80-C2.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
}
}
leaf source-mac {
type ieee:mac-address;
description
"Specifies the source_address that identifies a packet in an
EISS indication primitive, to the Source MAC and VLAN Stream
identification function. The ieee:mac-address type has a
pattern that allows upper and lower case letters. To avoid
issues with string comparison, it is suggested to only use
Upper Case for the letters in the hexadecimal numbers. There
is still an issue with a difference between the IETF
mac-address definition and the IEEE mac-address definition,
so consider that if implementing code that compares
mac-addresses.";
reference
"9.1.3.1 of IEEE Std 802.1CB-2017";
}
leaf tagged {
type vlan-tag-identification-type;
description
"An enumerated value indicating whether a packet in an EISS
indication primitive to the Source MAC and VLAN Stream
identification function is permitted to have a VLAN tag.";
reference
"9.1.3.2 of IEEE Std 802.1CB-2017";
}
leaf vlan {
type vlan-identifier-type;
description
"Specifies the vlan_identifier parameter that identifies a
packet in an EISS indication primitive to the Source MAC and
VLAN Stream identification function. A value of 0 indicates
that the vlan_identifier parameter is ignored on EISS
indication primitives.";
reference
"9.1.3.3 of IEEE Std 802.1CB-2017";
}
}
container dmac-vlan-stream-identification {
description
"When instantiating an instance of the Active Destination MAC
and VLAN Stream identification function for a particular output
Stream, the managed objects in the following subclauses, along
with those listed in 9.1.2, serve as the tsnStreamIdParameters
managed object.";
reference
"9.1.4 of IEEE Std 802.1CB-2017";
container identification-type {
config false;
description
"The identification type indicating the method used to
identify packets belonging to the Stream. The identification
type contains a type number and an Organizationally Unique
Identifier (OUI) or Company ID (CID) to identify the
organization defining the identification method.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
leaf type-number {
type dot1cb-sid-types:stream-id-function;
default "dmac-vlan";
description
"The stream identification type used for the Active
Destination MAC and VLAN Stream identification method.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
}
leaf oui-cid {
type string {
pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}";
}
default "00-80-C2";
description
"The Organizationally Unique Identifier (OUI) or Company ID
(CID) to identify the organization defining the
identification method. For identification methods defined
in IEEE Std 802.1CB-2017 the OUI/CID is always 00-80-C2.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
}
}
container down {
description
"Container for all parameters which are sent to lower layers.";
leaf destination-mac {
type ieee:mac-address;
description
"Specifies the destination_address parameter to use in the
EISS request primitive for output packets sent to lower
layers by the Active Destination MAC and VLAN Stream
identification function, and the destination_address that
identifies an input packet in an EISS indication primitive
to the Active Destination MAC and VLAN Stream
identification function. The ieee:mac-address type has a
pattern that allows upper and lower case letters. To avoid
issues with string comparison, it is suggested to only use
Upper Case for the letters in the hexadecimal numbers.
There is still an issue with a difference between the IETF
mac-address definition and the IEEE mac-address definition,
so consider that if implementing code that compares
mac-addresses.";
reference
"9.1.4.1 of IEEE Std 802.1CB-2017";
}
leaf tagged {
type vlan-tag-identification-type;
description
"An enumerated value indicating whether a packet in an EISS
indication or request primitive between the Active
Destination MAC and VLAN Stream identification function and
the lower layers is to have a VLAN tag. This variable is
not used in an FRER C-component. See 8.4.";
reference
"9.1.4.2 of IEEE Std 802.1CB-2017";
}
leaf vlan {
type vlan-identifier-type;
description
"Specifies the vlan_identifier parameter to use in the EISS
request primitive for output packets sent to lower layers
by the Active Destination MAC and VLAN Stream
identification function, and the vlan_identifier that
identifies an input packet in an EISS indication primitive
to the Active Destination MAC and VLAN Stream
identification function. A value of 0 indicates that the
vlan_identifier parameter is ignored on EISS indication
primitives.";
reference
"9.1.4.3 of IEEE Std 802.1CB-2017";
}
leaf priority {
type dot1qtypes:priority-type;
description
"Specifies the priority parameter to use in the EISS
request primitive for output packets sent to lower layers
by the Active Destination MAC and VLAN Stream
identification function for all packets in a particular
Stream.";
reference
"9.1.4.4 of IEEE Std 802.1CB-2017";
}
}
container up {
description
"Container for all parameters which are offered to higher
layers.";
leaf destination-mac {
type ieee:mac-address;
description
"Specifies the destination_address parameter to use in the
EISS indication primitive for input packets offered to
upper layers by the Active Destination MAC and VLAN Stream
identification layer. This address replaces the address
that was used to identify the packet
(tsnCpeDmacVlanDownDestMac). The ieee:mac-address type has
a pattern that allows upper and lower case letters. To
avoid issues with string comparison, it is suggested to
only use Upper Case for the letters in the hexadecimal
numbers. There is still an issue with a difference between
the IETF mac-address definition and the IEEE mac-address
definition, so consider that if implementing code that
compares mac-addresses.";
reference
"9.1.4.5 of IEEE Std 802.1CB-2017";
}
leaf tagged {
type vlan-tag-identification-type;
description
"An enumerated value indicating whether a packet in an EISS
indication or request primitive between the Active
Destination MAC and VLAN Stream identification function and
the upper layers is to have a VLAN tag. This variable is
used only by an end system and not by a relay system.";
reference
"9.1.4.6 of IEEE Std 802.1CB-2017";
}
leaf vlan {
type vlan-identifier-type;
description
"Specifies the vlan_identifier parameter to use in the EISS
indication primitive for packets offered to upper layers,
or the VLAN ID field for an IEEE 802.1Q tag in an ISS
mac_service_data_unit. This address replaces the VLAN ID
that was used to identify the packet
(tsnCpeDmacVlanDownVlan).";
reference
"9.1.4.7 of IEEE Std 802.1CB-2017";
}
leaf priority {
type dot1qtypes:priority-type;
description
"Specifies the priority parameter to use in the EISS
indication primitive for packets offered to upper layers.";
reference
"9.1.4.8 of IEEE Std 802.1CB-2017";
}
}
}
container ip-stream-identification {
description
"When instantiating an instance of the IP Stream identification
function, the parameters in the following subclauses replace
the tsnStreamIdParameters managed object.";
reference
"9.1.5 of IEEE Std 802.1CB-2017";
container identification-type {
config false;
description
"The identification type indicating the method used to
identify packets belonging to the Stream. The identification
type contains a type number and an Organizationally Unique
Identifier (OUI) or Company ID (CID) to identify the
organization defining the identification method.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
leaf type-number {
type dot1cb-sid-types:stream-id-function;
default "ip";
description
"The stream identification type used for the IP Stream
identification method.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
}
leaf oui-cid {
type string {
pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}";
}
default "00-80-C2";
description
"The Organizationally Unique Identifier (OUI) or Company ID
(CID) to identify the organization defining the
identification method. For identification methods defined
in IEEE Std 802.1CB-2017 the OUI/CID is always 00-80-C2.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
}
}
leaf destination-mac {
type ieee:mac-address;
description
"Specifies the destination_address parameter that identifies
a packet in an EISS indication primitive. The
ieee:mac-address type has a pattern that allows upper and
lower case letters. To avoid issues with string comparison,
it is suggested to only use Upper Case for the letters in the
hexadecimal numbers. There is still an issue with a
difference between the IETF mac-address definition and the
IEEE mac-address definition, so consider that if implementing
code that compares mac-addresses.";
reference
"9.1.5.1 of IEEE Std 802.1CB-2017";
}
leaf tagged {
type vlan-tag-identification-type;
description
"An enumerated value indicating whether a packet in an EISS
indication or request primitive to the IP Stream
identification function is to have a VLAN tag.";
reference
"9.1.5.2 of IEEE Std 802.1CB-2017";
}
leaf vlan {
type vlan-identifier-type;
description
"Specifies the vlan_identifier parameter that identifies a
packet in an EISS indication primitive. A value of 0
indicates that the frame is not to have a VLAN tag.";
reference
"9.1.5.3 of IEEE Std 802.1CB-2017";
}
leaf ip-source {
type inet:ip-address;
description
"Specifies the IPv4 (RFC 791) or IPv6 (RFC 2460) source
address parameter that must be matched to identify packets
coming up from lower layers. An address of all 0 indicates
that the IP source address is to be ignored on packets
received from lower layers.";
reference
"9.1.5.4 of IEEE Std 802.1CB-2017";
}
leaf ip-destination {
type inet:ip-address;
description
"Specifies the IPv4 (RFC 791) or IPv6 (RFC 2460) destination
address parameter that must be matched to identify packets
coming up from lower layers.";
reference
"9.1.5.5 of IEEE Std 802.1CB-2017";
}
leaf dscp {
type inet:dscp;
description
"Specifies the IPv4 (RFC 791) or IPv6 (RFC 2460)
differentiated services codepoint (DSCP, RFC 2474) that must
be matched to identify packets coming up from the lower
layers. A value of 64 decimal indicates that the DSCP is to
be ignored on packets received from lower layers.";
reference
"9.1.5.6 of IEEE Std 802.1CB-2017";
}
leaf next-protocol {
type enumeration {
enum none {
description
"No protocol is specified";
}
enum udp {
description
"UDP is specified as the next protocol.";
reference
"RFC 768";
}
enum tcp {
description
"TCP is specified as the next protocol.";
reference
"RFC 793";
}
enum sctp {
description
"SCTP is specified as the next protocol.";
reference
"RFC 4960";
}
}
description
"Specifies the IP next protocol parameter that must be
matched to identify packets coming up from lower layers. The
value of this parameter must specify either none, UDP (RFC
768), TCP (RFC 793), or SCTP (RFC 4960). If “none,” then the
tsnCpeIpIdSourcePort and tsnCpeIpIdDestinationPort managed
objects are not used.";
reference
"9.1.5.7 of IEEE Std 802.1CB-2017";
}
leaf source-port {
type inet:port-number;
description
"Specifies the TCP or UDP Source Port parameter that must be
matched to identify packets coming up from lower layers. A
value of 0 indicates that the Source Port number of the
packet is to be ignored on packets received from lower
layers.";
reference
"9.1.5.8 of IEEE Std 802.1CB-2017";
}
leaf destination-port {
type inet:port-number;
description
"Specifies the TCP or UDP Destination Port parameter that
must be matched to identify packets coming up from lower
layers. A value of 0 indicates that the Destination Port
number of the packet is to be ignored on packets received
from lower layers.";
reference
"9.1.5.9 of IEEE Std 802.1CB-2017";
}
}
container organization-specific {
description
"This container allows to select stream identification methods
that are defined by entities outside of IEEE 802.1.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
container identification-type {
description
"The identification type indicating the method used to
identify packets belonging to the Stream. The identification
type contains a type number and an Organizationally Unique
Identifier (OUI) or Company ID (CID) to identify the
organization defining the identification method.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
leaf type-number {
type int32 {
range "256..max";
}
description
"The type number used for an identification method defined
by an entity owning the OUI or CID for this identification
type.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
}
leaf oui-cid {
type string {
pattern "[0-9A-F]{2}(-[0-9A-F]{2}){2}";
}
description
"The Organizationally Unique Identifier (OUI) or Company ID
(CID) to identify the organization defining the
identification method.";
reference
"9.1.1.6 of IEEE Std 802.1CB-2017";
}
}
}
}
}
augment "/if:interfaces/if:interface/if:statistics" {
description
"The following counters are the counters for stream identification.
All counters are unsigned integers. If used on links faster than
650 000 000 bits per second, they shall be 64 bits in length to
ensure against excessively short wrap times.";
reference
"9.2 of IEEE Std 802.1CB-2017
9.3 of IEEE Std 802.1CB-2017";
container stream-id {
description
"This container contains the per-port as well as the
per-port-per-stream counters for stream identification.";
reference
"9.2 of IEEE Std 802.1CB-2017
9.3 of IEEE Std 802.1CB-2017";
container per-port-counters {
config false;
description
"Contains the per-port counters for stream identification. The
following counters are instantiated for each port on which the
Stream identification function is configured. The counters are
indexed by port number.";
reference
"9.3 of IEEE Std 802.1CB-2017";
leaf input-pkts {
type uint64;
config false;
description
"The tsnCpSidInputPackets counter is incremented once for
each packet identified by any Stream identification function
on this port. Its value equals the sum (modulo the size of
the counters) of all of the tsnCpsSidInputPackets counters on
this same port.";
reference
"9.3.1 of IEEE Std 802.1CB-2017";
}
leaf output-pkts {
type uint64;
config false;
description
"The tsnCpSidOutputPackets counter is incremented once for
each packet passed down the stack by any Stream
identification function on this port. Its value equals the
sum (modulo the size of the counters) of all of the
tsnCpsSidOutputPackets counters on this same port.";
reference
"9.3.2 of IEEE Std 802.1CB-2017";
}
}
list per-port-per-stream-counters {
key "direction-out-facing handle";
config false;
description
"Contains the per-port-per-stream counters for stream
identification. The following counters are instantiated for
each port on which the Stream identification function is
configured. The counters are indexed by port number, facing
(in-facing or out-facing), and stream_handle value
(tsnStreamIdHandle).";
reference
"9.2 of IEEE Std 802.1CB-2017";
leaf direction-out-facing {
type dot1cb-sid-types:direction;
description
"An object indicating whether the counters apply to
out-facing (True) or in-facing (False).";
}
leaf handle {
type leafref {
path '/stream-identity/handle';
}
description
"The according tsnStreamIdHandle for these counters.";
}
leaf input-pkts {
type uint64;
description
"The tsnCpsSidInputPackets counter is incremented once for
each packet identified by the Stream identification function.";
reference
"9.2.1 of IEEE Std 802.1CB-2017";
}
leaf output-pkts {
type uint64;
description
"The tsnCpsSidOutputPackets counter is incremented once for
each packet passed down the stack by the Stream
identification function.";
reference
"9.2.2 of IEEE Std 802.1CB-2017";
}
}
}
}
}

View File

@@ -0,0 +1,315 @@
module ieee802-dot1q-ats {
yang-version "1.1";
namespace urn:ieee:std:802.1Q:yang:ieee802-dot1q-ats;
prefix ats;
import ietf-yang-types {
prefix yang;
}
import ietf-interfaces {
prefix if;
}
import ieee802-dot1q-types {
prefix dot1qtypes;
}
import ieee802-dot1q-bridge {
prefix dot1q;
}
import ieee802-dot1q-stream-filters-gates {
prefix sfsg;
}
organization
"IEEE 802.1 Working Group";
contact
"WG-URL: http://ieee802.org/1/
WG-EMail: stds-802-1-l@ieee.org
Contact: IEEE 802.1 Working Group Chair
Postal: C/O IEEE 802.1 Working Group
IEEE Standards Association
445 Hoes Lane
Piscataway, NJ 08854
USA
E-mail: stds-802-1-chairs@ieee.org";
description
"This module provides management of 802.1Q bridge components that support
Asynchronous Traffic Shaping (ATS).";
revision 2020-11-06 {
description
"Published as part of IEEE Std 802.1Qcr-2020.
Initial version.";
reference
"IEEE Std 802.1Qcr-2020, Bridges and Bridged Networks -
Asynchronous Traffic Shaping.";
}
typedef scheduler-ref-type {
type leafref {
path
'/dot1q:bridges'+
'/dot1q:bridge'+
'/dot1q:component'+
'/ats:schedulers'+
'/ats:scheduler-instance-table'+
'/ats:scheduler-instance-id';
}
description
"This type is used to refer to an ATS scheduler instance.";
}
typedef scheduler-group-ref-type {
type leafref {
path
'/dot1q:bridges'+
'/dot1q:bridge'+
'/dot1q:component'+
'/ats:scheduler-groups'+
'/ats:scheduler-group-instance-table'+
'/ats:scheduler-group-instance-id';
}
description
"This type is used to refer to an ATS scheduler group instance.";
}
augment
"/dot1q:bridges"+
"/dot1q:bridge"+
"/dot1q:component"+
"/sfsg:stream-filters"+
"/sfsg:stream-filter-instance-table" {
description
"Augments the Bridge component stream filter for ATS schedulers.";
container scheduler {
description
"Enapsulates ATS scheduler nodes.";
leaf scheduler-ref {
type ats:scheduler-ref-type;
description
"A reference to the ATS scheduler associated with this stream
filter.";
}
leaf scheduler-enable {
type boolean;
default "false";
description
"If TRUE, this stream filter has an associated ATS scheduler
referenced by scheduler-ref. If FALSE, no ATS scheduler is
associated with this stream filter (scheduler-ref is ignored).";
}
}
}
augment "/if:interfaces/if:interface/dot1q:bridge-port" {
description
"Augments Bridge Ports by ATS per-Port parameters.";
container ats-port-parameters {
description
"This container comprises all ATS per-Port parameters.";
leaf discarded-frames-count {
type yang:counter64;
config false;
description
"A counter of frames discarded by ATS scheduler instances
associated with the Bridge Port.";
reference
"12.31.7.3 of IEEE Std 802.1Qcr-2020";
}
}
}
augment "/dot1q:bridges/dot1q:bridge/dot1q:component" {
description
"Augments the Bridge component by
a) ATS schedulers
b) ATS scheduler groups";
container schedulers {
description
"This container comprises all nodes related to an ATS schedulers.";
list scheduler-instance-table {
key "scheduler-instance-id";
description
"Each list entry comprises a set of parameters that defines a
single ATS scheduler instance, as detailed in Table 12-33.";
reference
"12.31.5 of IEEE Std 802.1Qcr-2020";
leaf scheduler-instance-id {
type uint32;
mandatory true;
description
"A unique index identifying this ATS scheduler instance.";
reference
"12.31.5.1 of IEEE Std 802.1Qcr-2020
8.6.5.6 of IEEE Std 802.1Qcr-2020";
}
leaf committed-information-rate {
type uint64;
units "bits/second";
mandatory true;
description
"The committed information rate parameter of this ATS scheduler
instance.";
reference
"12.31.5.3 of IEEE Std 802.1Qcr-2020
8.6.5.6 of IEEE Std 802.1Qcr-2020";
}
leaf committed-burst-size {
type uint32;
units "bits";
mandatory true;
description
"The committed burst size parameter of this ATS scheduler
instance.";
reference
"12.31.5.2 of IEEE Std 802.1Qcr-2020
8.6.5.6 of IEEE Std 802.1Qcr-2020";
}
leaf scheduler-group-ref {
type ats:scheduler-group-ref-type;
mandatory true;
description
"A reference to the scheduler group (12.32.5) associated with
this ATS scheduler instance. Multiple ATS scheduler instances
can be associated to one scheduler group, as detailed in
8.6.5.6.";
reference
"12.31.6 of IEEE Std 802.1Qcr-2020";
}
}
leaf max-scheduler-instances {
type uint32;
config false;
description
"The maximum number of ATS scheduler instances supported by this
Bridge component.";
reference
"12.31.1.5 of IEEE Std 802.1Qcr-2020";
}
}
container scheduler-groups {
description
"This container comprises all ATS scheduler group related nodes.";
list scheduler-group-instance-table {
key "scheduler-group-instance-id";
description
"Each list entry comprises a set of parameters that defines a
single ATS scheduler group instance.";
reference
"12.31.6 of IEEE Std 802.1Qcr-2020
8.6.5.6 of IEEE Std 802.1Qcr-2020";
leaf scheduler-group-instance-id {
type uint32;
description
"A unique index identifying this ATS scheduler group instance.";
reference
"12.31.6.1 of IEEE Std 802.1Qcr-2020
8.6.5.6 of IEEE Std 802.1Qcr-2020";
}
leaf max-residence-time {
type uint32;
units "nanoseconds";
mandatory true;
description
"The maximum residence time parameter of the ATS scheduler
group.";
reference
"8.6.11.2.13 of IEEE Std 802.1Qcr-2020
8.6.5.6 of IEEE Std 802.1Qcr-2020";
}
}
leaf max-scheduler-group-instances {
type uint32;
config false;
description
"The maximum number of ATS scheduler group instances supported by
this Bridge component.";
reference
"12.31.1.6 of IEEE Std 802.1Qcr-2020
8.6.5.6 of IEEE Std 802.1Qcr-2020";
}
container scheduler-timing-characteristics {
description
"This container comprises all ATS scheduler timing
characteristics related nodes.";
list scheduler-timing-characteristics-table {
key "reception-port transmission-port";
config false;
description
"Each list entry comprises the timing characteristics of a
reception Port transmission Port pair, as detailed in Table
12-36.";
reference
"12.31.8 of IEEE Std 802.1Qcr-2020
8.6.11 of IEEE Std 802.1Qcr-2020";
leaf reception-port {
type dot1qtypes:port-number-type;
config false;
mandatory true;
description
"A reference to the associated reception Port.";
reference
"12.31.8.1 of IEEE Std 802.1Qcr-2020";
}
leaf transmission-port {
type dot1qtypes:port-number-type;
config false;
mandatory true;
description
"A reference to the associated transmission Port.";
reference
"12.31.8.2 of IEEE Std 802.1Qcr-2020";
}
leaf clock-offset-variation-max {
type uint32;
units "nanoseconds";
config false;
mandatory true;
description
"The maximum clock offset variation associated with the
reception Port transmission Port pair.";
reference
"12.31.8.3 of IEEE Std 802.1Qcr-2020";
}
leaf clock-rate-deviation-max {
type uint32;
units "ppm";
config false;
mandatory true;
description
"The maximum clock rate deviation associated with the
reception Port transmission Port pair.";
reference
"12.31.8.4 of IEEE Std 802.1Qcr-2020";
}
leaf arrival-recognition-delay-max {
type uint32;
units "nanoseconds";
config false;
mandatory true;
description
"The maximum arrival time recognition delay associated with
the reception Port transmission Port pair.";
reference
"12.31.8.5 of IEEE Std 802.1Qcr-2020";
}
leaf processing-delay-min {
type uint32;
units "nanoseconds";
config false;
mandatory true;
description
"The minimum processing delay associated with the reception
Port transmission Port pair.";
reference
"12.31.8.6 of IEEE Std 802.1Qcr-2020";
}
leaf processing-delay-max {
type uint32;
units "nanoseconds";
config false;
mandatory true;
description
"The maximum processing delay associated with the reception
Port transmission Port pair.";
reference
"12.31.8.7 of IEEE Std 802.1Qcr-2020";
}
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,151 @@
module ieee802-dot1q-preemption {
namespace urn:ieee:std:802.1Q:yang:ieee802-dot1q-preemption;
prefix preempt;
import ieee802-dot1q-types {
prefix dot1q-types;
}
import ietf-interfaces {
prefix if;
}
import ieee802-dot1q-bridge {
prefix dot1q;
}
organization
"IEEE 802.1 Working Group";
contact
"WG-URL: http://www.ieee802.org/1/
WG-EMail: stds-802-1-L@ieee.org
Contact: IEEE 802.1 Working Group Chair
Postal: C/O IEEE 802.1 Working Group
IEEE Standards Association
445 Hoes Lane
P.O. Box 1331
Piscataway
NJ 08855-1331
USA
E-mail: STDS-802-1-L@IEEE.ORG";
description
"This module provides for management of IEEE Std 802.1Q Bridges
that support Frame Preemption.";
revision 2020-07-07 {
description
"Published as part of IEEE Std 802.1Qcw.
Initial version.";
reference
"IEEE Std 802.1Qcw - Bridges and Bridged Networks — Amendment:
YANG Data Models for Scheduled Traffic, Frame Preemption, and
Per-Stream Filtering and Policing.";
}
feature frame-preemption {
description
"Frame preemption supported.";
reference
"IEEE Std 802.1Q-2018";
}
augment "/if:interfaces/if:interface/dot1q:bridge-port" {
if-feature "frame-preemption";
description
"Augment bridge-port with Frame Preemption configuration.";
container frame-preemption-parameters {
description
"A table containing a set of frame preemption parameters, one
for each Port. All writeable objects in this table must be
persistent over power up restart/reboot.";
reference
"12.30.1 of IEEE Std 802.1Q-2018";
list frame-preemption-status-table {
key "priority";
description
"The framePreemptionStatusTable consists of 8
framePreemptionAdminStatus values, one per priority";
reference
"12.30.1.1 of IEEE Std 802.1Q-2018";
leaf priority {
type dot1q-types:priority-type;
description
"Priority.";
}
leaf frame-preemption-status {
type enumeration {
enum express {
description
"Frames queued for the priority are to be transmitted
using the express service for the Port.";
}
enum preemptible {
description
"Frames queued for the priority are to be transmitted
using the preemptible service for the Port and
preemption is enabled for the Port.";
}
}
default "express";
description
"The value of the framePreemptionAdminStatus parameter for
the traffic class. The default value of the
framePreemptionAdminStatus parameter is express. The
value of this object must be retained across
reinitializations of the management system.";
reference
"12.30.1.1.1 of IEEE Std 802.1Q-2018";
}
}
leaf hold-advance {
type uint32;
units "nanoseconds";
config false;
description
"The value of the holdAdvance parameter for the Port in
nanoseconds. There is no default value; the holdAdvance is a
property of the underlying MAC.";
reference
"12.30.1.2 of IEEE Std 802.1Q-2018";
}
leaf release-advance {
type uint32;
units "nanoseconds";
config false;
description
"The value of the releaseAdvance parameter for the Port in
nanoseconds. There is no default value; the releaseAdvance
is a property of the underlying MAC.";
reference
"12.30.1.3 of IEEE Std 802.1Q-2018";
}
leaf preemption-active {
type boolean;
config false;
description
"TRUE if preemption is both supported by the MAC and
currently active.";
reference
"12.30.1.4 of IEEE Std 802.1Q-2018";
}
leaf hold-request {
type enumeration {
enum hold {
value 1;
description
"A hold request has been issued to the MAC.";
}
enum release {
value 2;
description
"A release request has been issued to the MAC.";
}
}
config false;
description
"The value of the holdRequest parameter for the Port, either
hold (1) or release (2). The value of this object is release
(2) on system initialization.";
reference
"12.30.1.5 of IEEE Std 802.1Q-2018";
}
}
}
}

View File

@@ -0,0 +1,385 @@
module ieee802-dot1q-stream-filters-gates {
yang-version "1.1";
namespace urn:ieee:std:802.1Q:yang:ieee802-dot1q-stream-filters-gates;
prefix sfsg;
import ieee802-dot1q-bridge {
prefix dot1q;
}
organization
"IEEE 802.1 Working Group";
contact
"WG-URL: http://ieee802.org/1/
WG-EMail: stds-802-1-l@ieee.org
Contact: IEEE 802.1 Working Group Chair
Postal: C/O IEEE 802.1 Working Group
IEEE Standards Association
445 Hoes Lane
Piscataway, NJ 08854
USA
E-mail: stds-802-1-chairs@ieee.org";
description
"This module provides management of 802.1Q bridge components that support
Stream Filters and Stream Gates.";
revision 2020-11-06 {
description
"Published as part of IEEE Std 802.1Qcr-2020.
Initial version.";
reference
"IEEE Std 802.1Qcr-2020, Bridges and Bridged Networks -
Asynchronous Traffic Shaping.";
}
feature closed-gate-state {
description
"The bridge component supports gate state closed.";
reference
"IEEE Std 802.1Qcr-2020";
}
/* Types and groupings */
typedef priority-spec-type {
type enumeration {
enum zero {
value 0;
description
"Priority 0";
}
enum one {
value 1;
description
"Priority 1";
}
enum two {
value 2;
description
"Priority 2";
}
enum three {
value 3;
description
"Priority 3";
}
enum four {
value 4;
description
"Priority 4";
}
enum five {
value 5;
description
"Priority 5";
}
enum six {
value 6;
description
"Priority 6";
}
enum seven {
value 7;
description
"Priority 7";
}
enum wildcard {
description
"wildcard value";
}
}
}
typedef ipv-spec-type {
type enumeration {
enum zero {
value 0;
description
"Priority 0";
}
enum one {
value 1;
description
"Priority 1";
}
enum two {
value 2;
description
"Priority 2";
}
enum three {
value 3;
description
"Priority 3";
}
enum four {
value 4;
description
"Priority 4";
}
enum five {
value 5;
description
"Priority 5";
}
enum six {
value 6;
description
"Priority 6";
}
enum seven {
value 7;
description
"Priority 7";
}
enum null {
description
"null value";
}
}
description
"An IPV can be either of the following:
1) The null value. For a frame that passes through the gate, the
priority value associated with the frame is used to determine
the frames traffic class, using the Traffic Class Table as
specified in 8.6.6.
2) An internal priority value. For a frame that passes through the
gate, the IPV is used, in place of the priority value
associated with the frame, to determine the frames traffic
class, using the Traffic Class Table as specified in 8.6.6.";
reference
"8.6.5.2 of IEEE Std 802.1Qcr-2020";
}
typedef gate-state-value-type {
type enumeration {
enum closed {
description
"Gate closed";
}
enum open {
description
"Gate open";
}
}
description
"The gate-state-value-type indicates a gate state, open or closed,
for the stream gate.";
reference
"12.31.3.2.1 of IEEE Std 802.1Qcr-2020";
}
typedef stream-gate-ref {
type leafref {
path
'/dot1q:bridges'+
'/dot1q:bridge'+
'/dot1q:component'+
'/sfsg:stream-gates'+
'/sfsg:stream-gate-instance-table'+
'/sfsg:stream-gate-instance-id';
}
description
"This type is used to refer to a stream gate instance.";
}
augment "/dot1q:bridges/dot1q:bridge/dot1q:component" {
description
"Augments the Bridge component with stream filters and stream gates.";
container stream-filters {
description
"This container encapsulates all nodes related to stream bilters.";
reference
"12.31.1 of IEEE Std 802.1Qcr-2020
12.31.2 of IEEE Std 802.1Qcr-2020
12.31.3 of IEEE Std 802.1Qcr-2020";
list stream-filter-instance-table {
key "stream-filter-instance-id";
description
"Each list entry contains a set of parameters that defines a
single stream filter (8.6.5.1) with associated maximum SDU size
filtering (8.6.5.3.1), as detailed in Table 12-32. Entries can be
created or removed dynamically in implementations that support
dynamic configuration of stream filters. The value of the
stream-handle-spec and priority-spec parameters associated with a
received frame determine which stream filter is selected by the
frame, and therefore what combination of filtering and policing
actions is applied to the frame. If the stream-handle-spec and
priority-spec parameters associated with a received frame match
more than one stream filter, the stream filter that is selected
is the one that appears earliest in the ordered list. If a
received frames stream-handle-spec and priority-spec does not
match any of the stream filters in the list, the frame is
processed as if stream filters and stream gates would not be
supported.";
reference
"12.31.2 of IEEE Std 802.1Qcr-2020";
leaf stream-filter-instance-id {
type uint32;
mandatory true;
description
"An integer index value that determines the place of the stream
filter in the ordered list of stream filter instances. The
values are ordered according to their integer value; smaller
values appear earlier in the ordered list.";
reference
"12.31.2.1 of IEEE Std 802.1Qcr-2020";
}
choice stream-handle-spec {
description
"The stream_handle specification data type allows either of the
following to be represented:
a) A stream_handle value, represented as an integer.
b) The wildcard value, which matches any frame";
reference
"12.31.2.2 of IEEE Std 802.1Qcr-2020";
/* NOTE: The mapping of the wildcard literal is
* other than in the MIB definition, where
* the wildcard value is mapped to -1.
*/
case wildcard {
leaf wildcard {
type empty;
description
"The stream handle specification represents a wildcard value.";
}
}
case stream-handle {
leaf stream-handle {
type uint32;
mandatory true;
description
"The stream handle specification refers to a stream_handle
value.";
}
}
}
leaf priority-spec {
type priority-spec-type;
mandatory true;
description
"The priority specification data type allows either of the
following to be represented:
a) A priority value, represented as an integer.
b) The wildcard value, which matches any priority.";
reference
"12.31.2.3 of IEEE Std 802.1Qcr-2020";
}
leaf max-sdu-size {
type uint32;
units "octets";
mandatory true;
description
"The allowed maximum SDU size, in octets. If set to 0, any SDU
size is accepted.";
reference
"8.6.5.3.1 of IEEE Std 802.1Qcr-2020";
}
leaf stream-blocked-due-to-oversize-frame-enabled {
type boolean;
default "false";
description
"A value of true indicates that
stream-blocked-due-to-oversize-frame is set to true as soon as
a frame exceeds max-sdu-size.";
reference
"8.6.5.3.1 of IEEE Std 802.1Qcr-2020";
}
leaf stream-blocked-due-to-oversize-frame {
type boolean;
default "false";
description
"Indicates by value true that frames are permanently discarded
as a result of an initial frame exceeding max-sdu-size. The
value of stream-blocked-due-to-oversize-frame can be
administratively reset to false.";
reference
"8.6.5.3.1 of IEEE Std 802.1Qcr-2020";
}
leaf stream-gate-ref {
type stream-gate-ref;
mandatory true;
description
"This node refers to the stream gate (12.31.3) that is
associated with the stream filter. The relationship between
stream filters and stream gates is many to one; a given stream
filter can be associated with only one stream gate, but there
can be multiple stream filters associated with a given stream
gate.";
reference
"12.31.2.4 of IEEE Std 802.1Qcr-2020";
}
}
leaf max-stream-filter-instances {
type uint32;
config false;
description
"The maximum number of stream filter instances supported by this
Bridge component.";
reference
"12.31.1.1 of IEEE Std 802.1Qcr-2020
8.6.5.1 of IEEE Std 802.1Qcr-2020";
}
}
container stream-gates {
description
"This container encapsulates all nodes related to Stream Gates.";
list stream-gate-instance-table {
key "stream-gate-instance-id";
description
"Each list entry contains a set of parameters that defines a
single stream gate (8.6.5.2), as detailed in Table 12-33. Entries
in the table can be created or removed dynamically in
implementations that support dynamic configuration of stream
gates.";
reference
"12.31.3 of IEEE Std 802.1Qcr-2020";
leaf stream-gate-instance-id {
type uint32;
description
"An integer table index that allows the stream gate to be
referenced from Stream Filter Instance Table entries.";
reference
"12.31.2.4 of IEEE Std 802.1Qcr-2020
8.6.5.3 of IEEE Std 802.1Qcr-2020
8.6.5.4 of IEEE Std 802.1Qcr-2020";
}
leaf gate-enable {
type boolean;
default "false";
description
"A Boolean variable that indicates whether the operation of the
state machines is enabled (TRUE) or disabled (FALSE). This
variable is set by management. The default value of this
variable is FALSE.";
reference
"8.6.9.4.14 of IEEE Std 802.1Q-2018";
}
leaf admin-gate-states {
type gate-state-value-type;
default "open";
description
"The administratively set gate state of this gate.";
reference
"12.31.3.2.1 of IEEE Std 802.1Qcr-2020
8.6.10.4 of IEEE Std 802.1Qcr-2020";
}
leaf admin-ipv {
type ipv-spec-type;
default "null";
description
"The administratively set internal priority value
specification.";
reference
"12.31.3.3 of IEEE Std 802.1Qcr-2020
8.6.10.6 of IEEE Std 802.1Qcr-2020
8.6.5.4 of IEEE Std 802.1Qcr-2020";
}
}
leaf max-stream-gate-instances {
type uint32;
config false;
description
"The maximum number of Stream Gate instances supported by this
Bridge component.";
reference
"12.31.1.2 of IEEE Std 802.1Qcr-2020";
}
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,89 @@
module ieee802-types {
namespace urn:ieee:std:802.1Q:yang:ieee802-types;
prefix ieee;
organization
"IEEE 802.1 Working Group";
contact
"WG-URL: http://www.ieee802.org/1/
WG-EMail: stds-802-1-L@ieee.org
Contact: IEEE 802.1 Working Group Chair
Postal: C/O IEEE 802.1 Working Group
IEEE Standards Association
445 Hoes Lane
P.O. Box 1331
Piscataway
NJ 08854
USA
E-mail: STDS-802-1-L@IEEE.ORG";
description
"This module contains a collection of generally useful derived
data types for IEEE YANG models.";
revision 2020-10-23 {
description
"New revision date because Qcx project finished.";
reference
"6.3.3.4 of IEEE Std 802.1AS-2020";
}
revision 2019-03-07 {
description
"Adding types to define rational numbers and PTP time.";
reference
"6.3.3.4 of IEEE Std 802.1AS-2020";
}
revision 2018-03-07 {
description
"Published as part of IEEE Std 802.1Q-2018. Initial version.";
reference
"IEEE Std 802.1Q-2018, Bridges and Bridged Networks.";
}
typedef mac-address {
type string {
pattern "[0-9a-fA-F]{2}(-[0-9a-fA-F]{2}){5}";
}
description
"The mac-address type represents a MAC address in the canonical
format and hexadecimal format specified by IEEE Std 802. The
hexidecimal representation uses uppercase characters.";
reference
"3.1 of IEEE Std 802-2014
8.1 of IEEE Std 802-2014";
}
grouping rational-grouping {
description
"Definition of a non-negative rational number.";
leaf numerator {
type uint32;
description
"Numerator of the rational number.";
}
leaf denominator {
type uint32 {
range "1..4294967295";
}
description
"Denominator of the rational number.";
}
}
grouping ptp-time-grouping {
description
"This grouping specifies a PTP timestamp, represented as a
48-bit unsigned integer number of seconds and a 32-bit unsigned
integer number of nanoseconds.";
reference
"6.3.3.4 of IEEE Std 802.1AS";
leaf seconds {
type uint64;
description
"This is the integer portion of the timestamp in units of
seconds. The upper 16 bits are always zero.";
}
leaf nanoseconds {
type uint32;
description
"This is the fractional portion of the timestamp in units of
nanoseconds. This value is always less than 10^9.";
}
}
}

View File

@@ -0,0 +1,458 @@
module ietf-inet-types {
namespace "urn:ietf:params:xml:ns:yang:ietf-inet-types";
prefix "inet";
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
WG Chair: David Kessens
<mailto:david.kessens@nsn.com>
WG Chair: Juergen Schoenwaelder
<mailto:j.schoenwaelder@jacobs-university.de>
Editor: Juergen Schoenwaelder
<mailto:j.schoenwaelder@jacobs-university.de>";
description
"This module contains a collection of generally useful derived
YANG data types for Internet addresses and related things.
Copyright (c) 2013 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).
This version of this YANG module is part of RFC 6991; see
the RFC itself for full legal notices.";
revision 2013-07-15 {
description
"This revision adds the following new data types:
- ip-address-no-zone
- ipv4-address-no-zone
- ipv6-address-no-zone";
reference
"RFC 6991: Common YANG Data Types";
}
revision 2010-09-24 {
description
"Initial revision.";
reference
"RFC 6021: Common YANG Data Types";
}
/*** collection of types related to protocol fields ***/
typedef ip-version {
type enumeration {
enum unknown {
value "0";
description
"An unknown or unspecified version of the Internet
protocol.";
}
enum ipv4 {
value "1";
description
"The IPv4 protocol as defined in RFC 791.";
}
enum ipv6 {
value "2";
description
"The IPv6 protocol as defined in RFC 2460.";
}
}
description
"This value represents the version of the IP protocol.
In the value set and its semantics, this type is equivalent
to the InetVersion textual convention of the SMIv2.";
reference
"RFC 791: Internet Protocol
RFC 2460: Internet Protocol, Version 6 (IPv6) Specification
RFC 4001: Textual Conventions for Internet Network Addresses";
}
typedef dscp {
type uint8 {
range "0..63";
}
description
"The dscp type represents a Differentiated Services Code Point
that may be used for marking packets in a traffic stream.
In the value set and its semantics, this type is equivalent
to the Dscp textual convention of the SMIv2.";
reference
"RFC 3289: Management Information Base for the Differentiated
Services Architecture
RFC 2474: Definition of the Differentiated Services Field
(DS Field) in the IPv4 and IPv6 Headers
RFC 2780: IANA Allocation Guidelines For Values In
the Internet Protocol and Related Headers";
}
typedef ipv6-flow-label {
type uint32 {
range "0..1048575";
}
description
"The ipv6-flow-label type represents the flow identifier or Flow
Label in an IPv6 packet header that may be used to
discriminate traffic flows.
In the value set and its semantics, this type is equivalent
to the IPv6FlowLabel textual convention of the SMIv2.";
reference
"RFC 3595: Textual Conventions for IPv6 Flow Label
RFC 2460: Internet Protocol, Version 6 (IPv6) Specification";
}
typedef port-number {
type uint16 {
range "0..65535";
}
description
"The port-number type represents a 16-bit port number of an
Internet transport-layer protocol such as UDP, TCP, DCCP, or
SCTP. Port numbers are assigned by IANA. A current list of
all assignments is available from <http://www.iana.org/>.
Note that the port number value zero is reserved by IANA. In
situations where the value zero does not make sense, it can
be excluded by subtyping the port-number type.
In the value set and its semantics, this type is equivalent
to the InetPortNumber textual convention of the SMIv2.";
reference
"RFC 768: User Datagram Protocol
RFC 793: Transmission Control Protocol
RFC 4960: Stream Control Transmission Protocol
RFC 4340: Datagram Congestion Control Protocol (DCCP)
RFC 4001: Textual Conventions for Internet Network Addresses";
}
/*** collection of types related to autonomous systems ***/
typedef as-number {
type uint32;
description
"The as-number type represents autonomous system numbers
which identify an Autonomous System (AS). An AS is a set
of routers under a single technical administration, using
an interior gateway protocol and common metrics to route
packets within the AS, and using an exterior gateway
protocol to route packets to other ASes. IANA maintains
the AS number space and has delegated large parts to the
regional registries.
Autonomous system numbers were originally limited to 16
bits. BGP extensions have enlarged the autonomous system
number space to 32 bits. This type therefore uses an uint32
base type without a range restriction in order to support
a larger autonomous system number space.
In the value set and its semantics, this type is equivalent
to the InetAutonomousSystemNumber textual convention of
the SMIv2.";
reference
"RFC 1930: Guidelines for creation, selection, and registration
of an Autonomous System (AS)
RFC 4271: A Border Gateway Protocol 4 (BGP-4)
RFC 4001: Textual Conventions for Internet Network Addresses
RFC 6793: BGP Support for Four-Octet Autonomous System (AS)
Number Space";
}
/*** collection of types related to IP addresses and hostnames ***/
typedef ip-address {
type union {
type inet:ipv4-address;
type inet:ipv6-address;
}
description
"The ip-address type represents an IP address and is IP
version neutral. The format of the textual representation
implies the IP version. This type supports scoped addresses
by allowing zone identifiers in the address format.";
reference
"RFC 4007: IPv6 Scoped Address Architecture";
}
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])'
+ '(%[\p{N}\p{L}]+)?';
}
description
"The ipv4-address type represents an IPv4 address in
dotted-quad notation. The IPv4 address may include a zone
index, separated by a % sign.
The zone index is used to disambiguate identical address
values. For link-local addresses, the zone index will
typically be the interface index number or the name of an
interface. If the zone index is not present, the default
zone of the device will be used.
The canonical format for the zone index is the numerical
format";
}
typedef ipv6-address {
type string {
pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
+ '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
+ '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}'
+ '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))'
+ '(%[\p{N}\p{L}]+)?';
pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|'
+ '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)'
+ '(%.+)?';
}
description
"The ipv6-address type represents an IPv6 address in full,
mixed, shortened, and shortened-mixed notation. The IPv6
address may include a zone index, separated by a % sign.
The zone index is used to disambiguate identical address
values. For link-local addresses, the zone index will
typically be the interface index number or the name of an
interface. If the zone index is not present, the default
zone of the device will be used.
The canonical format of IPv6 addresses uses the textual
representation defined in Section 4 of RFC 5952. The
canonical format for the zone index is the numerical
format as described in Section 11.2 of RFC 4007.";
reference
"RFC 4291: IP Version 6 Addressing Architecture
RFC 4007: IPv6 Scoped Address Architecture
RFC 5952: A Recommendation for IPv6 Address Text
Representation";
}
typedef ip-address-no-zone {
type union {
type inet:ipv4-address-no-zone;
type inet:ipv6-address-no-zone;
}
description
"The ip-address-no-zone type represents an IP address and is
IP version neutral. The format of the textual representation
implies the IP version. This type does not support scoped
addresses since it does not allow zone identifiers in the
address format.";
reference
"RFC 4007: IPv6 Scoped Address Architecture";
}
typedef ipv4-address-no-zone {
type inet:ipv4-address {
pattern '[0-9\.]*';
}
description
"An IPv4 address without a zone index. This type, derived from
ipv4-address, may be used in situations where the zone is
known from the context and hence no zone index is needed.";
}
typedef ipv6-address-no-zone {
type inet:ipv6-address {
pattern '[0-9a-fA-F:\.]*';
}
description
"An IPv6 address without a zone index. This type, derived from
ipv6-address, may be used in situations where the zone is
known from the context and hence no zone index is needed.";
reference
"RFC 4291: IP Version 6 Addressing Architecture
RFC 4007: IPv6 Scoped Address Architecture
RFC 5952: A Recommendation for IPv6 Address Text
Representation";
}
typedef ip-prefix {
type union {
type inet:ipv4-prefix;
type inet:ipv6-prefix;
}
description
"The ip-prefix type represents an IP prefix and is IP
version neutral. The format of the textual representations
implies the IP version.";
}
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
"The ipv4-prefix type represents an IPv4 address prefix.
The prefix length is given by the number following the
slash character and must be less than or equal to 32.
A prefix length value of n corresponds to an IP address
mask that has n contiguous 1-bits from the most
significant bit (MSB) and all other bits set to 0.
The canonical format of an IPv4 prefix has all bits of
the IPv4 address set to zero that are not part of the
IPv4 prefix.";
}
typedef ipv6-prefix {
type string {
pattern '((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}'
+ '((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|'
+ '(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}'
+ '(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))'
+ '(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8])))';
pattern '(([^:]+:){6}(([^:]+:[^:]+)|(.*\..*)))|'
+ '((([^:]+:)*[^:]+)?::(([^:]+:)*[^:]+)?)'
+ '(/.+)';
}
description
"The ipv6-prefix type represents an IPv6 address prefix.
The prefix length is given by the number following the
slash character and must be less than or equal to 128.
A prefix length value of n corresponds to an IP address
mask that has n contiguous 1-bits from the most
significant bit (MSB) and all other bits set to 0.
The IPv6 address should have all bits that do not belong
to the prefix set to zero.
The canonical format of an IPv6 prefix has all bits of
the IPv6 address set to zero that are not part of the
IPv6 prefix. Furthermore, the IPv6 address is represented
as defined in Section 4 of RFC 5952.";
reference
"RFC 5952: A Recommendation for IPv6 Address Text
Representation";
}
/*** collection of domain name and URI types ***/
typedef domain-name {
type string {
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]\.?)'
+ '|\.';
length "1..253";
}
description
"The domain-name type represents a DNS domain name. The
name SHOULD be fully qualified whenever possible.
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.
The description clause of schema nodes using the domain-name
type MUST describe when and how these names are resolved to
IP addresses. Note that the resolution of a domain-name value
may require to query multiple DNS records (e.g., A for IPv4
and AAAA for IPv6). The order of the resolution process and
which DNS record takes precedence can either be defined
explicitly or may depend on the configuration of the
resolver.
Domain-name values use the US-ASCII encoding. Their canonical
format uses lowercase US-ASCII characters. Internationalized
domain names MUST be A-labels as per RFC 5890.";
reference
"RFC 952: DoD Internet Host Table Specification
RFC 1034: Domain Names - Concepts and Facilities
RFC 1123: Requirements for Internet Hosts -- Application
and Support
RFC 2782: A DNS RR for specifying the location of services
(DNS SRV)
RFC 5890: Internationalized Domain Names in Applications
(IDNA): Definitions and Document Framework";
}
typedef host {
type union {
type inet:ip-address;
type inet:domain-name;
}
description
"The host type represents either an IP address or a DNS
domain name.";
}
typedef uri {
type string;
description
"The uri type represents a Uniform Resource Identifier
(URI) as defined by STD 66.
Objects using the uri type MUST be in US-ASCII encoding,
and MUST be normalized as described by RFC 3986 Sections
6.2.1, 6.2.2.1, and 6.2.2.2. All unnecessary
percent-encoding is removed, and all case-insensitive
characters are set to lowercase except for hexadecimal
digits, which are normalized to uppercase as described in
Section 6.2.2.1.
The purpose of this normalization is to help provide
unique URIs. Note that this normalization is not
sufficient to provide uniqueness. Two URIs that are
textually distinct after this normalization may still be
equivalent.
Objects using the uri type may restrict the schemes that
they permit. For example, 'data:' and 'urn:' schemes
might not be appropriate.
A zero-length URI is not a valid URI. This can be used to
express 'URI absent' where required.
In the value set and its semantics, this type is equivalent
to the Uri SMIv2 textual convention defined in RFC 5017.";
reference
"RFC 3986: Uniform Resource Identifier (URI): Generic Syntax
RFC 3305: Report from the Joint W3C/IETF URI Planning Interest
Group: Uniform Resource Identifiers (URIs), URLs,
and Uniform Resource Names (URNs): Clarifications
and Recommendations
RFC 5017: MIB Textual Conventions for Uniform Resource
Identifiers (URIs)";
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,876 @@
module ietf-ip {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-ip";
prefix ip;
import ietf-interfaces {
prefix if;
}
import ietf-inet-types {
prefix inet;
}
import ietf-yang-types {
prefix yang;
}
organization
"IETF NETMOD (Network Modeling) Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
Editor: Martin Bjorklund
<mailto:mbj@tail-f.com>";
description
"This module contains a collection of YANG definitions for
managing IP implementations.
Copyright (c) 2018 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
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8344; see
the RFC itself for full legal notices.";
revision 2018-02-22 {
description
"Updated to support NMDA.";
reference
"RFC 8344: A YANG Data Model for IP Management";
}
revision 2014-06-16 {
description
"Initial revision.";
reference
"RFC 7277: A YANG Data Model for IP Management";
}
/*
* Features
*/
feature ipv4-non-contiguous-netmasks {
description
"Indicates support for configuring non-contiguous
subnet masks.";
}
feature ipv6-privacy-autoconf {
description
"Indicates support for privacy extensions for stateless address
autoconfiguration in IPv6.";
reference
"RFC 4941: Privacy Extensions for Stateless Address
Autoconfiguration in IPv6";
}
/*
* Typedefs
*/
typedef ip-address-origin {
type enumeration {
enum other {
description
"None of the following.";
}
enum static {
description
"Indicates that the address has been statically
configured -- for example, using the Network Configuration
Protocol (NETCONF) or a command line interface.";
}
enum dhcp {
description
"Indicates an address that has been assigned to this
system by a DHCP server.";
}
enum link-layer {
description
"Indicates an address created by IPv6 stateless
autoconfiguration that embeds a link-layer address in its
interface identifier.";
}
enum random {
description
"Indicates an address chosen by the system at
random, e.g., an IPv4 address within 169.254/16, a
temporary address as described in RFC 4941, or a
semantically opaque address as described in RFC 7217.";
reference
"RFC 4941: Privacy Extensions for Stateless Address
Autoconfiguration in IPv6
RFC 7217: A Method for Generating Semantically Opaque
Interface Identifiers with IPv6 Stateless
Address Autoconfiguration (SLAAC)";
}
}
description
"The origin of an address.";
}
typedef neighbor-origin {
type enumeration {
enum other {
description
"None of the following.";
}
enum static {
description
"Indicates that the mapping has been statically
configured -- for example, using NETCONF or a command line
interface.";
}
enum dynamic {
description
"Indicates that the mapping has been dynamically resolved
using, for example, IPv4 ARP or the IPv6 Neighbor
Discovery protocol.";
}
}
description
"The origin of a neighbor entry.";
}
/*
* Data nodes
*/
augment "/if:interfaces/if:interface" {
description
"IP parameters on interfaces.
If an interface is not capable of running IP, the server
must not allow the client to configure these parameters.";
container ipv4 {
presence
"Enables IPv4 unless the 'enabled' leaf
(which defaults to 'true') is set to 'false'";
description
"Parameters for the IPv4 address family.";
leaf enabled {
type boolean;
default true;
description
"Controls whether IPv4 is enabled or disabled on this
interface. When IPv4 is enabled, this interface is
connected to an IPv4 stack, and the interface can send
and receive IPv4 packets.";
}
leaf forwarding {
type boolean;
default false;
description
"Controls IPv4 packet forwarding of datagrams received by,
but not addressed to, this interface. IPv4 routers
forward datagrams. IPv4 hosts do not (except those
source-routed via the host).";
}
leaf mtu {
type uint16 {
range "68..max";
}
units "octets";
description
"The size, in octets, of the largest IPv4 packet that the
interface will send and receive.
The server may restrict the allowed values for this leaf,
depending on the interface's type.
If this leaf is not configured, the operationally used MTU
depends on the interface's type.";
reference
"RFC 791: Internet Protocol";
}
list address {
key "ip";
description
"The list of IPv4 addresses on the interface.";
leaf ip {
type inet:ipv4-address-no-zone;
description
"The IPv4 address on the interface.";
}
choice subnet {
mandatory true;
description
"The subnet can be specified as a prefix length or,
if the server supports non-contiguous netmasks, as
a netmask.";
leaf prefix-length {
type uint8 {
range "0..32";
}
description
"The length of the subnet prefix.";
}
leaf netmask {
if-feature ipv4-non-contiguous-netmasks;
type yang:dotted-quad;
description
"The subnet specified as a netmask.";
}
}
leaf origin {
type ip-address-origin;
config false;
description
"The origin of this address.";
}
}
list neighbor {
key "ip";
description
"A list of mappings from IPv4 addresses to
link-layer addresses.
Entries in this list in the intended configuration are
used as static entries in the ARP Cache.
In the operational state, this list represents the ARP
Cache.";
reference
"RFC 826: An Ethernet Address Resolution Protocol";
leaf ip {
type inet:ipv4-address-no-zone;
description
"The IPv4 address of the neighbor node.";
}
leaf link-layer-address {
type yang:phys-address;
mandatory true;
description
"The link-layer address of the neighbor node.";
}
leaf origin {
type neighbor-origin;
config false;
description
"The origin of this neighbor entry.";
}
}
}
container ipv6 {
presence
"Enables IPv6 unless the 'enabled' leaf
(which defaults to 'true') is set to 'false'";
description
"Parameters for the IPv6 address family.";
leaf enabled {
type boolean;
default true;
description
"Controls whether IPv6 is enabled or disabled on this
interface. When IPv6 is enabled, this interface is
connected to an IPv6 stack, and the interface can send
and receive IPv6 packets.";
}
leaf forwarding {
type boolean;
default false;
description
"Controls IPv6 packet forwarding of datagrams received by,
but not addressed to, this interface. IPv6 routers
forward datagrams. IPv6 hosts do not (except those
source-routed via the host).";
reference
"RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
Section 6.2.1, IsRouter";
}
leaf mtu {
type uint32 {
range "1280..max";
}
units "octets";
description
"The size, in octets, of the largest IPv6 packet that the
interface will send and receive.
The server may restrict the allowed values for this leaf,
depending on the interface's type.
If this leaf is not configured, the operationally used MTU
depends on the interface's type.";
reference
"RFC 8200: Internet Protocol, Version 6 (IPv6)
Specification
Section 5";
}
list address {
key "ip";
description
"The list of IPv6 addresses on the interface.";
leaf ip {
type inet:ipv6-address-no-zone;
description
"The IPv6 address on the interface.";
}
leaf prefix-length {
type uint8 {
range "0..128";
}
mandatory true;
description
"The length of the subnet prefix.";
}
leaf origin {
type ip-address-origin;
config false;
description
"The origin of this address.";
}
leaf status {
type enumeration {
enum preferred {
description
"This is a valid address that can appear as the
destination or source address of a packet.";
}
enum deprecated {
description
"This is a valid but deprecated address that should
no longer be used as a source address in new
communications, but packets addressed to such an
address are processed as expected.";
}
enum invalid {
description
"This isn't a valid address, and it shouldn't appear
as the destination or source address of a packet.";
}
enum inaccessible {
description
"The address is not accessible because the interface
to which this address is assigned is not
operational.";
}
enum unknown {
description
"The status cannot be determined for some reason.";
}
enum tentative {
description
"The uniqueness of the address on the link is being
verified. Addresses in this state should not be
used for general communication and should only be
used to determine the uniqueness of the address.";
}
enum duplicate {
description
"The address has been determined to be non-unique on
the link and so must not be used.";
}
enum optimistic {
description
"The address is available for use, subject to
restrictions, while its uniqueness on a link is
being verified.";
}
}
config false;
description
"The status of an address. Most of the states correspond
to states from the IPv6 Stateless Address
Autoconfiguration protocol.";
reference
"RFC 4293: Management Information Base for the
Internet Protocol (IP)
- IpAddressStatusTC
RFC 4862: IPv6 Stateless Address Autoconfiguration";
}
}
list neighbor {
key "ip";
description
"A list of mappings from IPv6 addresses to
link-layer addresses.
Entries in this list in the intended configuration are
used as static entries in the Neighbor Cache.
In the operational state, this list represents the
Neighbor Cache.";
reference
"RFC 4861: Neighbor Discovery for IP version 6 (IPv6)";
leaf ip {
type inet:ipv6-address-no-zone;
description
"The IPv6 address of the neighbor node.";
}
leaf link-layer-address {
type yang:phys-address;
mandatory true;
description
"The link-layer address of the neighbor node.
In the operational state, if the neighbor's 'state' leaf
is 'incomplete', this leaf is not instantiated.";
}
leaf origin {
type neighbor-origin;
config false;
description
"The origin of this neighbor entry.";
}
leaf is-router {
type empty;
config false;
description
"Indicates that the neighbor node acts as a router.";
}
leaf state {
type enumeration {
enum incomplete {
description
"Address resolution is in progress, and the
link-layer address of the neighbor has not yet been
determined.";
}
enum reachable {
description
"Roughly speaking, the neighbor is known to have been
reachable recently (within tens of seconds ago).";
}
enum stale {
description
"The neighbor is no longer known to be reachable, but
until traffic is sent to the neighbor no attempt
should be made to verify its reachability.";
}
enum delay {
description
"The neighbor is no longer known to be reachable, and
traffic has recently been sent to the neighbor.
Rather than probe the neighbor immediately, however,
delay sending probes for a short while in order to
give upper-layer protocols a chance to provide
reachability confirmation.";
}
enum probe {
description
"The neighbor is no longer known to be reachable, and
unicast Neighbor Solicitation probes are being sent
to verify reachability.";
}
}
config false;
description
"The Neighbor Unreachability Detection state of this
entry.";
reference
"RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
Section 7.3.2";
}
}
leaf dup-addr-detect-transmits {
type uint32;
default 1;
description
"The number of consecutive Neighbor Solicitation messages
sent while performing Duplicate Address Detection on a
tentative address. A value of zero indicates that
Duplicate Address Detection is not performed on
tentative addresses. A value of one indicates a single
transmission with no follow-up retransmissions.";
reference
"RFC 4862: IPv6 Stateless Address Autoconfiguration";
}
container autoconf {
description
"Parameters to control the autoconfiguration of IPv6
addresses, as described in RFC 4862.";
reference
"RFC 4862: IPv6 Stateless Address Autoconfiguration";
leaf create-global-addresses {
type boolean;
default true;
description
"If enabled, the host creates global addresses as
described in RFC 4862.";
reference
"RFC 4862: IPv6 Stateless Address Autoconfiguration
Section 5.5";
}
leaf create-temporary-addresses {
if-feature ipv6-privacy-autoconf;
type boolean;
default false;
description
"If enabled, the host creates temporary addresses as
described in RFC 4941.";
reference
"RFC 4941: Privacy Extensions for Stateless Address
Autoconfiguration in IPv6";
}
leaf temporary-valid-lifetime {
if-feature ipv6-privacy-autoconf;
type uint32;
units "seconds";
default 604800;
description
"The time period during which the temporary address
is valid.";
reference
"RFC 4941: Privacy Extensions for Stateless Address
Autoconfiguration in IPv6
- TEMP_VALID_LIFETIME";
}
leaf temporary-preferred-lifetime {
if-feature ipv6-privacy-autoconf;
type uint32;
units "seconds";
default 86400;
description
"The time period during which the temporary address is
preferred.";
reference
"RFC 4941: Privacy Extensions for Stateless Address
Autoconfiguration in IPv6
- TEMP_PREFERRED_LIFETIME";
}
}
}
}
/*
* Legacy operational state data nodes
*/
augment "/if:interfaces-state/if:interface" {
status deprecated;
description
"Data nodes for the operational state of IP on interfaces.";
container ipv4 {
presence
"Present if IPv4 is enabled on this interface";
config false;
status deprecated;
description
"Interface-specific parameters for the IPv4 address family.";
leaf forwarding {
type boolean;
status deprecated;
description
"Indicates whether IPv4 packet forwarding is enabled or
disabled on this interface.";
}
leaf mtu {
type uint16 {
range "68..max";
}
units "octets";
status deprecated;
description
"The size, in octets, of the largest IPv4 packet that the
interface will send and receive.";
reference
"RFC 791: Internet Protocol";
}
list address {
key "ip";
status deprecated;
description
"The list of IPv4 addresses on the interface.";
leaf ip {
type inet:ipv4-address-no-zone;
status deprecated;
description
"The IPv4 address on the interface.";
}
choice subnet {
status deprecated;
description
"The subnet can be specified as a prefix length or,
if the server supports non-contiguous netmasks, as
a netmask.";
leaf prefix-length {
type uint8 {
range "0..32";
}
status deprecated;
description
"The length of the subnet prefix.";
}
leaf netmask {
if-feature ipv4-non-contiguous-netmasks;
type yang:dotted-quad;
status deprecated;
description
"The subnet specified as a netmask.";
}
}
leaf origin {
type ip-address-origin;
status deprecated;
description
"The origin of this address.";
}
}
list neighbor {
key "ip";
status deprecated;
description
"A list of mappings from IPv4 addresses to
link-layer addresses.
This list represents the ARP Cache.";
reference
"RFC 826: An Ethernet Address Resolution Protocol";
leaf ip {
type inet:ipv4-address-no-zone;
status deprecated;
description
"The IPv4 address of the neighbor node.";
}
leaf link-layer-address {
type yang:phys-address;
status deprecated;
description
"The link-layer address of the neighbor node.";
}
leaf origin {
type neighbor-origin;
status deprecated;
description
"The origin of this neighbor entry.";
}
}
}
container ipv6 {
presence
"Present if IPv6 is enabled on this interface";
config false;
status deprecated;
description
"Parameters for the IPv6 address family.";
leaf forwarding {
type boolean;
default false;
status deprecated;
description
"Indicates whether IPv6 packet forwarding is enabled or
disabled on this interface.";
reference
"RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
Section 6.2.1, IsRouter";
}
leaf mtu {
type uint32 {
range "1280..max";
}
units "octets";
status deprecated;
description
"The size, in octets, of the largest IPv6 packet that the
interface will send and receive.";
reference
"RFC 8200: Internet Protocol, Version 6 (IPv6)
Specification
Section 5";
}
list address {
key "ip";
status deprecated;
description
"The list of IPv6 addresses on the interface.";
leaf ip {
type inet:ipv6-address-no-zone;
status deprecated;
description
"The IPv6 address on the interface.";
}
leaf prefix-length {
type uint8 {
range "0..128";
}
mandatory true;
status deprecated;
description
"The length of the subnet prefix.";
}
leaf origin {
type ip-address-origin;
status deprecated;
description
"The origin of this address.";
}
leaf status {
type enumeration {
enum preferred {
description
"This is a valid address that can appear as the
destination or source address of a packet.";
}
enum deprecated {
description
"This is a valid but deprecated address that should
no longer be used as a source address in new
communications, but packets addressed to such an
address are processed as expected.";
}
enum invalid {
description
"This isn't a valid address, and it shouldn't appear
as the destination or source address of a packet.";
}
enum inaccessible {
description
"The address is not accessible because the interface
to which this address is assigned is not
operational.";
}
enum unknown {
description
"The status cannot be determined for some reason.";
}
enum tentative {
description
"The uniqueness of the address on the link is being
verified. Addresses in this state should not be
used for general communication and should only be
used to determine the uniqueness of the address.";
}
enum duplicate {
description
"The address has been determined to be non-unique on
the link and so must not be used.";
}
enum optimistic {
description
"The address is available for use, subject to
restrictions, while its uniqueness on a link is
being verified.";
}
}
status deprecated;
description
"The status of an address. Most of the states correspond
to states from the IPv6 Stateless Address
Autoconfiguration protocol.";
reference
"RFC 4293: Management Information Base for the
Internet Protocol (IP)
- IpAddressStatusTC
RFC 4862: IPv6 Stateless Address Autoconfiguration";
}
}
list neighbor {
key "ip";
status deprecated;
description
"A list of mappings from IPv6 addresses to
link-layer addresses.
This list represents the Neighbor Cache.";
reference
"RFC 4861: Neighbor Discovery for IP version 6 (IPv6)";
leaf ip {
type inet:ipv6-address-no-zone;
status deprecated;
description
"The IPv6 address of the neighbor node.";
}
leaf link-layer-address {
type yang:phys-address;
status deprecated;
description
"The link-layer address of the neighbor node.";
}
leaf origin {
type neighbor-origin;
status deprecated;
description
"The origin of this neighbor entry.";
}
leaf is-router {
type empty;
status deprecated;
description
"Indicates that the neighbor node acts as a router.";
}
leaf state {
type enumeration {
enum incomplete {
description
"Address resolution is in progress, and the
link-layer address of the neighbor has not yet been
determined.";
}
enum reachable {
description
"Roughly speaking, the neighbor is known to have been
reachable recently (within tens of seconds ago).";
}
enum stale {
description
"The neighbor is no longer known to be reachable, but
until traffic is sent to the neighbor no attempt
should be made to verify its reachability.";
}
enum delay {
description
"The neighbor is no longer known to be reachable, and
traffic has recently been sent to the neighbor.
Rather than probe the neighbor immediately, however,
delay sending probes for a short while in order to
give upper-layer protocols a chance to provide
reachability confirmation.";
}
enum probe {
description
"The neighbor is no longer known to be reachable, and
unicast Neighbor Solicitation probes are being sent
to verify reachability.";
}
}
status deprecated;
description
"The Neighbor Unreachability Detection state of this
entry.";
reference
"RFC 4861: Neighbor Discovery for IP version 6 (IPv6)
Section 7.3.2";
}
}
}
}
}

View File

@@ -0,0 +1,293 @@
module ietf-network-topology {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-network-topology";
prefix nt;
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
import ietf-network {
prefix nw;
reference
"RFC 8345: A YANG Data Model for Network Topologies";
}
organization
"IETF I2RS (Interface to the Routing System) Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/i2rs/>
WG List: <mailto:i2rs@ietf.org>
Editor: Alexander Clemm
<mailto:ludwig@clemm.org>
Editor: Jan Medved
<mailto:jmedved@cisco.com>
Editor: Robert Varga
<mailto:robert.varga@pantheon.tech>
Editor: Nitin Bahadur
<mailto:nitin_bahadur@yahoo.com>
Editor: Hariharan Ananthakrishnan
<mailto:hari@packetdesign.com>
Editor: Xufeng Liu
<mailto:xufeng.liu.ietf@gmail.com>";
description
"This module defines a common base model for a network topology,
augmenting the base network data model with links to connect
nodes, as well as termination points to terminate links
on nodes.
Copyright (c) 2018 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
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8345;
see the RFC itself for full legal notices.";
revision 2018-02-26 {
description
"Initial revision.";
reference
"RFC 8345: A YANG Data Model for Network Topologies";
}
typedef link-id {
type inet:uri;
description
"An identifier for a link in a topology. The precise
structure of the link-id will be up to the implementation.
The identifier SHOULD be chosen such that the same link in a
real network topology will always be identified through the
same identifier, even if the data model is instantiated in
separate datastores. An implementation MAY choose to capture
semantics in the identifier -- for example, to indicate the
type of link and/or the type of topology of which the link is
a part.";
}
typedef tp-id {
type inet:uri;
description
"An identifier for termination points on a node. The precise
structure of the tp-id will be up to the implementation.
The identifier SHOULD be chosen such that the same termination
point in a real network topology will always be identified
through the same identifier, even if the data model is
instantiated in separate datastores. An implementation MAY
choose to capture semantics in the identifier -- for example,
to indicate the type of termination point and/or the type of
node that contains the termination point.";
}
grouping link-ref {
description
"This grouping can be used to reference a link in a specific
network. Although it is not used in this module, it is
defined here for the convenience of augmenting modules.";
leaf link-ref {
type leafref {
path "/nw:networks/nw:network[nw:network-id=current()/../"+
"network-ref]/nt:link/nt:link-id";
require-instance false;
}
description
"A type for an absolute reference to a link instance.
(This type should not be used for relative references.
In such a case, a relative path should be used instead.)";
}
uses nw:network-ref;
}
grouping tp-ref {
description
"This grouping can be used to reference a termination point
in a specific node. Although it is not used in this module,
it is defined here for the convenience of augmenting
modules.";
leaf tp-ref {
type leafref {
path "/nw:networks/nw:network[nw:network-id=current()/../"+
"network-ref]/nw:node[nw:node-id=current()/../"+
"node-ref]/nt:termination-point/nt:tp-id";
require-instance false;
}
description
"A type for an absolute reference to a termination point.
(This type should not be used for relative references.
In such a case, a relative path should be used instead.)";
}
uses nw:node-ref;
}
augment "/nw:networks/nw:network" {
description
"Add links to the network data model.";
list link {
key "link-id";
description
"A network link connects a local (source) node and
a remote (destination) node via a set of the respective
node's termination points. It is possible to have several
links between the same source and destination nodes.
Likewise, a link could potentially be re-homed between
termination points. Therefore, in order to ensure that we
would always know to distinguish between links, every link
is identified by a dedicated link identifier. Note that a
link models a point-to-point link, not a multipoint link.";
leaf link-id {
type link-id;
description
"The identifier of a link in the topology.
A link is specific to a topology to which it belongs.";
}
container source {
description
"This container holds the logical source of a particular
link.";
leaf source-node {
type leafref {
path "../../../nw:node/nw:node-id";
require-instance false;
}
description
"Source node identifier. Must be in the same topology.";
}
leaf source-tp {
type leafref {
path "../../../nw:node[nw:node-id=current()/../"+
"source-node]/termination-point/tp-id";
require-instance false;
}
description
"This termination point is located within the source node
and terminates the link.";
}
}
container destination {
description
"This container holds the logical destination of a
particular link.";
leaf dest-node {
type leafref {
path "../../../nw:node/nw:node-id";
require-instance false;
}
description
"Destination node identifier. Must be in the same
network.";
}
leaf dest-tp {
type leafref {
path "../../../nw:node[nw:node-id=current()/../"+
"dest-node]/termination-point/tp-id";
require-instance false;
}
description
"This termination point is located within the
destination node and terminates the link.";
}
}
list supporting-link {
key "network-ref link-ref";
description
"Identifies the link or links on which this link depends.";
leaf network-ref {
type leafref {
path "../../../nw:supporting-network/nw:network-ref";
require-instance false;
}
description
"This leaf identifies in which underlay topology
the supporting link is present.";
}
leaf link-ref {
type leafref {
path "/nw:networks/nw:network[nw:network-id=current()/"+
"../network-ref]/link/link-id";
require-instance false;
}
description
"This leaf identifies a link that is a part
of this link's underlay. Reference loops in which
a link identifies itself as its underlay, either
directly or transitively, are not allowed.";
}
}
}
}
augment "/nw:networks/nw:network/nw:node" {
description
"Augments termination points that terminate links.
Termination points can ultimately be mapped to interfaces.";
list termination-point {
key "tp-id";
description
"A termination point can terminate a link.
Depending on the type of topology, a termination point
could, for example, refer to a port or an interface.";
leaf tp-id {
type tp-id;
description
"Termination point identifier.";
}
list supporting-termination-point {
key "network-ref node-ref tp-ref";
description
"This list identifies any termination points on which a
given termination point depends or onto which it maps.
Those termination points will themselves be contained
in a supporting node. This dependency information can be
inferred from the dependencies between links. Therefore,
this item is not separately configurable. Hence, no
corresponding constraint needs to be articulated.
The corresponding information is simply provided by the
implementing system.";
leaf network-ref {
type leafref {
path "../../../nw:supporting-node/nw:network-ref";
require-instance false;
}
description
"This leaf identifies in which topology the
supporting termination point is present.";
}
leaf node-ref {
type leafref {
path "../../../nw:supporting-node/nw:node-ref";
require-instance false;
}
description
"This leaf identifies in which node the supporting
termination point is present.";
}
leaf tp-ref {
type leafref {
path "/nw:networks/nw:network[nw:network-id=current()/"+
"../network-ref]/nw:node[nw:node-id=current()/../"+
"node-ref]/termination-point/tp-id";
require-instance false;
}
description
"Reference to the underlay node (the underlay node must
be in a different topology).";
}
}
}
}
}

View File

@@ -0,0 +1,192 @@
module ietf-network {
yang-version 1.1;
namespace "urn:ietf:params:xml:ns:yang:ietf-network";
prefix nw;
import ietf-inet-types {
prefix inet;
reference
"RFC 6991: Common YANG Data Types";
}
organization
"IETF I2RS (Interface to the Routing System) Working Group";
contact
"WG Web: <https://datatracker.ietf.org/wg/i2rs/>
WG List: <mailto:i2rs@ietf.org>
Editor: Alexander Clemm
<mailto:ludwig@clemm.org>
Editor: Jan Medved
<mailto:jmedved@cisco.com>
Editor: Robert Varga
<mailto:robert.varga@pantheon.tech>
Editor: Nitin Bahadur
<mailto:nitin_bahadur@yahoo.com>
Editor: Hariharan Ananthakrishnan
<mailto:hari@packetdesign.com>
Editor: Xufeng Liu
<mailto:xufeng.liu.ietf@gmail.com>";
description
"This module defines a common base data model for a collection
of nodes in a network. Node definitions are further used
in network topologies and inventories.
Copyright (c) 2018 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
(https://trustee.ietf.org/license-info).
This version of this YANG module is part of RFC 8345;
see the RFC itself for full legal notices.";
revision 2018-02-26 {
description
"Initial revision.";
reference
"RFC 8345: A YANG Data Model for Network Topologies";
}
typedef node-id {
type inet:uri;
description
"Identifier for a node. The precise structure of the node-id
will be up to the implementation. For example, some
implementations MAY pick a URI that includes the network-id
as part of the path. The identifier SHOULD be chosen
such that the same node in a real network topology will
always be identified through the same identifier, even if
the data model is instantiated in separate datastores. An
implementation MAY choose to capture semantics in the
identifier -- for example, to indicate the type of node.";
}
typedef network-id {
type inet:uri;
description
"Identifier for a network. The precise structure of the
network-id will be up to the implementation. The identifier
SHOULD be chosen such that the same network will always be
identified through the same identifier, even if the data model
is instantiated in separate datastores. An implementation MAY
choose to capture semantics in the identifier -- for example,
to indicate the type of network.";
}
grouping network-ref {
description
"Contains the information necessary to reference a network --
for example, an underlay network.";
leaf network-ref {
type leafref {
path "/nw:networks/nw:network/nw:network-id";
require-instance false;
}
description
"Used to reference a network -- for example, an underlay
network.";
}
}
grouping node-ref {
description
"Contains the information necessary to reference a node.";
leaf node-ref {
type leafref {
path "/nw:networks/nw:network[nw:network-id=current()/../"+
"network-ref]/nw:node/nw:node-id";
require-instance false;
}
description
"Used to reference a node.
Nodes are identified relative to the network that
contains them.";
}
uses network-ref;
}
container networks {
description
"Serves as a top-level container for a list of networks.";
list network {
key "network-id";
description
"Describes a network.
A network typically contains an inventory of nodes,
topological information (augmented through the
network-topology data model), and layering information.";
leaf network-id {
type network-id;
description
"Identifies a network.";
}
container network-types {
description
"Serves as an augmentation target.
The network type is indicated through corresponding
presence containers augmented into this container.";
}
list supporting-network {
key "network-ref";
description
"An underlay network, used to represent layered network
topologies.";
leaf network-ref {
type leafref {
path "/nw:networks/nw:network/nw:network-id";
require-instance false;
}
description
"References the underlay network.";
}
}
list node {
key "node-id";
description
"The inventory of nodes of this network.";
leaf node-id {
type node-id;
description
"Uniquely identifies a node within the containing
network.";
}
list supporting-node {
key "network-ref node-ref";
description
"Represents another node that is in an underlay network
and that supports this node. Used to represent layering
structure.";
leaf network-ref {
type leafref {
path "../../../nw:supporting-network/nw:network-ref";
require-instance false;
}
description
"References the underlay network of which the
underlay node is a part.";
}
leaf node-ref {
type leafref {
path "/nw:networks/nw:network/nw:node/nw:node-id";
require-instance false;
}
description
"References the underlay node itself.";
}
}
}
}
}
}

View File

@@ -0,0 +1,474 @@
module ietf-yang-types {
namespace "urn:ietf:params:xml:ns:yang:ietf-yang-types";
prefix "yang";
organization
"IETF NETMOD (NETCONF Data Modeling Language) Working Group";
contact
"WG Web: <http://tools.ietf.org/wg/netmod/>
WG List: <mailto:netmod@ietf.org>
WG Chair: David Kessens
<mailto:david.kessens@nsn.com>
WG Chair: Juergen Schoenwaelder
<mailto:j.schoenwaelder@jacobs-university.de>
Editor: Juergen Schoenwaelder
<mailto:j.schoenwaelder@jacobs-university.de>";
description
"This module contains a collection of generally useful derived
YANG data types.
Copyright (c) 2013 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).
This version of this YANG module is part of RFC 6991; see
the RFC itself for full legal notices.";
revision 2013-07-15 {
description
"This revision adds the following new data types:
- yang-identifier
- hex-string
- uuid
- dotted-quad";
reference
"RFC 6991: Common YANG Data Types";
}
revision 2010-09-24 {
description
"Initial revision.";
reference
"RFC 6021: Common YANG Data Types";
}
/*** collection of counter and gauge types ***/
typedef counter32 {
type uint32;
description
"The counter32 type represents a non-negative integer
that monotonically increases until it reaches a
maximum value of 2^32-1 (4294967295 decimal), when it
wraps around and starts increasing again from zero.
Counters have no defined 'initial' value, and thus, a
single value of a counter has (in general) no information
content. Discontinuities in the monotonically increasing
value normally occur at re-initialization of the
management system, and at other times as specified in the
description of a schema node using this type. If such
other times can occur, for example, the creation of
a schema node of type counter32 at times other than
re-initialization, then a corresponding schema node
should be defined, with an appropriate type, to indicate
the last discontinuity.
The counter32 type should not be used for configuration
schema nodes. A default statement SHOULD NOT be used in
combination with the type counter32.
In the value set and its semantics, this type is equivalent
to the Counter32 type of the SMIv2.";
reference
"RFC 2578: Structure of Management Information Version 2
(SMIv2)";
}
typedef zero-based-counter32 {
type yang:counter32;
default "0";
description
"The zero-based-counter32 type represents a counter32
that has the defined 'initial' value zero.
A schema node of this type will be set to zero (0) on creation
and will thereafter increase monotonically until it reaches
a maximum value of 2^32-1 (4294967295 decimal), when it
wraps around and starts increasing again from zero.
Provided that an application discovers a new schema node
of this type within the minimum time to wrap, it can use the
'initial' value as a delta. It is important for a management
station to be aware of this minimum time and the actual time
between polls, and to discard data if the actual time is too
long or there is no defined minimum time.
In the value set and its semantics, this type is equivalent
to the ZeroBasedCounter32 textual convention of the SMIv2.";
reference
"RFC 4502: Remote Network Monitoring Management Information
Base Version 2";
}
typedef counter64 {
type uint64;
description
"The counter64 type represents a non-negative integer
that monotonically increases until it reaches a
maximum value of 2^64-1 (18446744073709551615 decimal),
when it wraps around and starts increasing again from zero.
Counters have no defined 'initial' value, and thus, a
single value of a counter has (in general) no information
content. Discontinuities in the monotonically increasing
value normally occur at re-initialization of the
management system, and at other times as specified in the
description of a schema node using this type. If such
other times can occur, for example, the creation of
a schema node of type counter64 at times other than
re-initialization, then a corresponding schema node
should be defined, with an appropriate type, to indicate
the last discontinuity.
The counter64 type should not be used for configuration
schema nodes. A default statement SHOULD NOT be used in
combination with the type counter64.
In the value set and its semantics, this type is equivalent
to the Counter64 type of the SMIv2.";
reference
"RFC 2578: Structure of Management Information Version 2
(SMIv2)";
}
typedef zero-based-counter64 {
type yang:counter64;
default "0";
description
"The zero-based-counter64 type represents a counter64 that
has the defined 'initial' value zero.
A schema node of this type will be set to zero (0) on creation
and will thereafter increase monotonically until it reaches
a maximum value of 2^64-1 (18446744073709551615 decimal),
when it wraps around and starts increasing again from zero.
Provided that an application discovers a new schema node
of this type within the minimum time to wrap, it can use the
'initial' value as a delta. It is important for a management
station to be aware of this minimum time and the actual time
between polls, and to discard data if the actual time is too
long or there is no defined minimum time.
In the value set and its semantics, this type is equivalent
to the ZeroBasedCounter64 textual convention of the SMIv2.";
reference
"RFC 2856: Textual Conventions for Additional High Capacity
Data Types";
}
typedef gauge32 {
type uint32;
description
"The gauge32 type represents a non-negative integer, which
may increase or decrease, but shall never exceed a maximum
value, nor fall below a minimum value. The maximum value
cannot be greater than 2^32-1 (4294967295 decimal), and
the minimum value cannot be smaller than 0. The value of
a gauge32 has its maximum value whenever the information
being modeled is greater than or equal to its maximum
value, and has its minimum value whenever the information
being modeled is smaller than or equal to its minimum value.
If the information being modeled subsequently decreases
below (increases above) the maximum (minimum) value, the
gauge32 also decreases (increases).
In the value set and its semantics, this type is equivalent
to the Gauge32 type of the SMIv2.";
reference
"RFC 2578: Structure of Management Information Version 2
(SMIv2)";
}
typedef gauge64 {
type uint64;
description
"The gauge64 type represents a non-negative integer, which
may increase or decrease, but shall never exceed a maximum
value, nor fall below a minimum value. The maximum value
cannot be greater than 2^64-1 (18446744073709551615), and
the minimum value cannot be smaller than 0. The value of
a gauge64 has its maximum value whenever the information
being modeled is greater than or equal to its maximum
value, and has its minimum value whenever the information
being modeled is smaller than or equal to its minimum value.
If the information being modeled subsequently decreases
below (increases above) the maximum (minimum) value, the
gauge64 also decreases (increases).
In the value set and its semantics, this type is equivalent
to the CounterBasedGauge64 SMIv2 textual convention defined
in RFC 2856";
reference
"RFC 2856: Textual Conventions for Additional High Capacity
Data Types";
}
/*** collection of identifier-related types ***/
typedef object-identifier {
type string {
pattern '(([0-1](\.[1-3]?[0-9]))|(2\.(0|([1-9]\d*))))'
+ '(\.(0|([1-9]\d*)))*';
}
description
"The object-identifier type represents administratively
assigned names in a registration-hierarchical-name tree.
Values of this type are denoted as a sequence of numerical
non-negative sub-identifier values. Each sub-identifier
value MUST NOT exceed 2^32-1 (4294967295). Sub-identifiers
are separated by single dots and without any intermediate
whitespace.
The ASN.1 standard restricts the value space of the first
sub-identifier to 0, 1, or 2. Furthermore, the value space
of the second sub-identifier is restricted to the range
0 to 39 if the first sub-identifier is 0 or 1. Finally,
the ASN.1 standard requires that an object identifier
has always at least two sub-identifiers. The pattern
captures these restrictions.
Although the number of sub-identifiers is not limited,
module designers should realize that there may be
implementations that stick with the SMIv2 limit of 128
sub-identifiers.
This type is a superset of the SMIv2 OBJECT IDENTIFIER type
since it is not restricted to 128 sub-identifiers. Hence,
this type SHOULD NOT be used to represent the SMIv2 OBJECT
IDENTIFIER type; the object-identifier-128 type SHOULD be
used instead.";
reference
"ISO9834-1: Information technology -- Open Systems
Interconnection -- Procedures for the operation of OSI
Registration Authorities: General procedures and top
arcs of the ASN.1 Object Identifier tree";
}
typedef object-identifier-128 {
type object-identifier {
pattern '\d*(\.\d*){1,127}';
}
description
"This type represents object-identifiers restricted to 128
sub-identifiers.
In the value set and its semantics, this type is equivalent
to the OBJECT IDENTIFIER type of the SMIv2.";
reference
"RFC 2578: Structure of Management Information Version 2
(SMIv2)";
}
typedef yang-identifier {
type string {
length "1..max";
pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*';
pattern '.|..|[^xX].*|.[^mM].*|..[^lL].*';
}
description
"A YANG identifier string as defined by the 'identifier'
rule in Section 12 of RFC 6020. An identifier must
start with an alphabetic character or an underscore
followed by an arbitrary sequence of alphabetic or
numeric characters, underscores, hyphens, or dots.
A YANG identifier MUST NOT start with any possible
combination of the lowercase or uppercase character
sequence 'xml'.";
reference
"RFC 6020: YANG - A Data Modeling Language for the Network
Configuration Protocol (NETCONF)";
}
/*** collection of types related to date and time***/
typedef date-and-time {
type string {
pattern '\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?'
+ '(Z|[\+\-]\d{2}:\d{2})';
}
description
"The date-and-time type is a profile of the ISO 8601
standard for representation of dates and times using the
Gregorian calendar. The profile is defined by the
date-time production in Section 5.6 of RFC 3339.
The date-and-time type is compatible with the dateTime XML
schema type with the following notable exceptions:
(a) The date-and-time type does not allow negative years.
(b) The date-and-time time-offset -00:00 indicates an unknown
time zone (see RFC 3339) while -00:00 and +00:00 and Z
all represent the same time zone in dateTime.
(c) The canonical format (see below) of data-and-time values
differs from the canonical format used by the dateTime XML
schema type, which requires all times to be in UTC using
the time-offset 'Z'.
This type is not equivalent to the DateAndTime textual
convention of the SMIv2 since RFC 3339 uses a different
separator between full-date and full-time and provides
higher resolution of time-secfrac.
The canonical format for date-and-time values with a known time
zone uses a numeric time zone offset that is calculated using
the device's configured known offset to UTC time. A change of
the device's offset to UTC time will cause date-and-time values
to change accordingly. Such changes might happen periodically
in case a server follows automatically daylight saving time
(DST) time zone offset changes. The canonical format for
date-and-time values with an unknown time zone (usually
referring to the notion of local time) uses the time-offset
-00:00.";
reference
"RFC 3339: Date and Time on the Internet: Timestamps
RFC 2579: Textual Conventions for SMIv2
XSD-TYPES: XML Schema Part 2: Datatypes Second Edition";
}
typedef timeticks {
type uint32;
description
"The timeticks type represents a non-negative integer that
represents the time, modulo 2^32 (4294967296 decimal), in
hundredths of a second between two epochs. When a schema
node is defined that uses this type, the description of
the schema node identifies both of the reference epochs.
In the value set and its semantics, this type is equivalent
to the TimeTicks type of the SMIv2.";
reference
"RFC 2578: Structure of Management Information Version 2
(SMIv2)";
}
typedef timestamp {
type yang:timeticks;
description
"The timestamp type represents the value of an associated
timeticks schema node at which a specific occurrence
happened. The specific occurrence must be defined in the
description of any schema node defined using this type. When
the specific occurrence occurred prior to the last time the
associated timeticks attribute was zero, then the timestamp
value is zero. Note that this requires all timestamp values
to be reset to zero when the value of the associated timeticks
attribute reaches 497+ days and wraps around to zero.
The associated timeticks schema node must be specified
in the description of any schema node using this type.
In the value set and its semantics, this type is equivalent
to the TimeStamp textual convention of the SMIv2.";
reference
"RFC 2579: Textual Conventions for SMIv2";
}
/*** collection of generic address types ***/
typedef phys-address {
type string {
pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?';
}
description
"Represents media- or physical-level addresses represented
as a sequence octets, each octet represented by two hexadecimal
numbers. Octets are separated by colons. The canonical
representation uses lowercase characters.
In the value set and its semantics, this type is equivalent
to the PhysAddress textual convention of the SMIv2.";
reference
"RFC 2579: Textual Conventions for SMIv2";
}
typedef mac-address {
type string {
pattern '[0-9a-fA-F]{2}(:[0-9a-fA-F]{2}){5}';
}
description
"The mac-address type represents an IEEE 802 MAC address.
The canonical representation uses lowercase characters.
In the value set and its semantics, this type is equivalent
to the MacAddress textual convention of the SMIv2.";
reference
"IEEE 802: IEEE Standard for Local and Metropolitan Area
Networks: Overview and Architecture
RFC 2579: Textual Conventions for SMIv2";
}
/*** collection of XML-specific types ***/
typedef xpath1.0 {
type string;
description
"This type represents an XPATH 1.0 expression.
When a schema node is defined that uses this type, the
description of the schema node MUST specify the XPath
context in which the XPath expression is evaluated.";
reference
"XPATH: XML Path Language (XPath) Version 1.0";
}
/*** collection of string types ***/
typedef hex-string {
type string {
pattern '([0-9a-fA-F]{2}(:[0-9a-fA-F]{2})*)?';
}
description
"A hexadecimal string with octets represented as hex digits
separated by colons. The canonical representation uses
lowercase characters.";
}
typedef uuid {
type string {
pattern '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-'
+ '[0-9a-fA-F]{4}-[0-9a-fA-F]{12}';
}
description
"A Universally Unique IDentifier in the string representation
defined in RFC 4122. The canonical representation uses
lowercase characters.
The following is an example of a UUID in string representation:
f81d4fae-7dec-11d0-a765-00a0c91e6bf6
";
reference
"RFC 4122: A Universally Unique IDentifier (UUID) URN
Namespace";
}
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 number expressed in the dotted-quad
notation, i.e., four octets written as decimal numbers
and separated with the '.' (full stop) character.";
}
}