diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index acbb7b9ca..39a35b9df 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -3,7 +3,7 @@ tagged with "Note" can be removed from the template.] [Note: Before this PR can be reviewed please agree to the CLA covering this repo. Please also review the contribution guide - -https://github.com/openconfig/public/blob/master/doc/external-contributions-guide.md] +https://github.com/openconfig/public/blob/master/doc/contributions-guide.md] ### Change Scope diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index c69587e0f..ee27c1bb8 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -23,7 +23,19 @@ submodule openconfig-aft-common { "Submodule containing definitions of groupings that are re-used across multiple contexts within the AFT model."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.8.0"; + + revision "2024-09-19" { + description + "Add atomic-exempt attribute to AFT counters containers."; + reference "2.8.0"; + } + + revision "2024-09-05" { + description + "Add encap-headers to AFT model."; + reference "2.7.0"; + } revision "2024-04-25" { description @@ -217,38 +229,212 @@ submodule openconfig-aft-common { container ip-in-ip { description - "When specified, the packet has an IP-in-IP header applied to it before - forwarding to the specified next-hop."; + "When specified, the packet has an IP-in-IP header applied to it + before forwarding to the specified next-hop. + + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; container state { config false; description "State parameters relating to IP-in-IP encapsulation."; - uses aft-common-entry-nexthop-ipip-state; + + uses aft-common-entry-nexthop-ip-state; } } container gre { description "When specified, the packet has an GRE - (Generic Routing Encapsulation)header applied to + (Generic Routing Encapsulation) header applied to it before forwarding to the specified next-hop. encapsulate-header leaf should be set to GRE for this - to apply"; + to apply. + + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; container state { config false; description "State parameters relating to GRE encapsulation."; + uses aft-common-entry-nexthop-gre-state; } } + container encap-headers { + description + "Container for packet encapsulation headers. When leaves in this + container are populated, it indicates encapsulation of the packet + matching the next-hop is performed using a stack of one or more + headers defined in the list encap-header. + + Each entry in the list must indicate an encapsulation type and + populate a container with the parameters for that encapsulation + header."; + + list encap-header { + description + "A list of headers added on top of a packet ordered by the + index value. The inner-most header is the 0th value and is + adjacent to the original packet. Additional headers may be + added in index order. + + For example, in an encapsulation stack for MPLS in UDPv4, the + first index in the list is the MPLS header and the second + index is a UDPv4 header."; + + key "index"; + + leaf index { + type leafref { + path "../state/index"; + } + description + "A unique index identifying an encapsulation header in a stack + of encapsulation headers."; + } + + container state { + description + "State parameters relating to encapsulation headers."; + + uses aft-common-nexthop-encap-headers-state; + } + + container gre { + when "../state/type = 'oc-aftt:GRE'"; + description + "Container of nodes for GRE encapsulation."; + + container state { + description + "State parameters relating to GRE encapsulation headers."; + + uses aft-common-entry-nexthop-gre-state; + } + } + + container ipv4 { + when "../state/type = 'oc-aftt:IPV4'"; + description + "Container of nodes for UDP in IPv4 encapsulation. When this + container is used, an IPv4 packet with no transport header + is added to the encapsulation list."; + + container state { + description + "State parameters relating to IP encapsulation headers."; + + uses aft-common-entry-nexthop-ip-state; + } + } + + container ipv6 { + when "../state/type = 'oc-aftt:IPV6'"; + description + "Container of nodes for UDP in IPv6 encapsulation. When this + container is used, an IPv6 packet with no transport header + is added to the encapsulation list."; + + container state { + description + "State parameters relating to IP encapsulation headers."; + + uses aft-common-entry-nexthop-ip-state; + } + } + + container mpls { + when "../state/type = 'oc-aftt:MPLS'"; + description + "Container of nodes for MPLS encapsulation."; + + container state { + description + "State parameters relating to MPLS encapsulation headers."; + + uses aft-common-entry-nexthop-mpls-state; + } + } + + container udp-v4 { + when "../state/type = 'oc-aftt:UDPV4'"; + description + "Container of nodes for UDP in IPv4 encapsulation. When this + container is used, an IPv4 header with a UDP header is added + to the encapsulation list."; + + container state { + description + "State parameters relating to UDP in IPv4 encapsulation + headers."; + + uses aft-common-entry-nexthop-encap-udp-state; + } + } + + container udp-v6 { + when "../state/type = 'oc-aftt:UDPV6'"; + description + "Container of nodes for UDP in IPv6 encapsulation. When this + container is used, an IPv6 header with a UDP header is added + to the encapsulation list."; + + container state { + description + "State parameters relating to UDP in IPv6 encapsulation + headers."; + + uses aft-common-entry-nexthop-encap-udp-state; + } + } + + container vxlan { + when "../state/type = 'oc-aftt:VXLAN'"; + description + "Container of nodes for VXLAN encapsulation."; + + container state { + description + "State parameters relating to VXLAN encapsulation headers."; + + uses aft-common-entry-nexthop-vxlan-state; + } + } + + } + } + uses oc-if:interface-ref-state; } } } + grouping aft-common-nexthop-encap-headers-state { + description + "Operational state parameters relating to encapsulation headers."; + + leaf index { + type uint8; + description + "A pointer to an entry in an ordered list of encapsulation headers."; + } + + leaf type { + type oc-aftt:encapsulation-header-type; + description + "Defines which type of packet header should be used."; + } + + } + grouping aft-common-entry-state { description "Operational state parameters relating to a forwarding entry"; @@ -294,14 +480,24 @@ submodule openconfig-aft-common { "Where applicable, the next hop label representing the virtual network identifier (VNI) for the forwarding entry. This leaf is applicable only to next-hops which include VXLAN encapsulation - header information"; + header information. + + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; } leaf tunnel-src-ip-address { type oc-inet:ip-address; description "Where applicable this represents the vxlan tunnel source ip address. - For VXLAN this represents the source VTEP ip address"; + For VXLAN this represents the source VTEP IP address. + + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; } } @@ -348,7 +544,7 @@ submodule openconfig-aft-common { default false; description "Flag that controls pop action, i.e., the top-most MPLS label - should be popped from the packet when switched by the system. + should be popped from the packet when switched by the system. The top-most MPLS label associated with pop action is equal to the label key used in 'mpls' AFT 'label-entry' list."; @@ -372,8 +568,12 @@ submodule openconfig-aft-common { system re-ordering of leaves is permitted by the system. A swap operation is reflected by entries in the - popped-mpls-label-stack and pushed-mpls-label-stack nodes."; + popped-mpls-label-stack and pushed-mpls-label-stack nodes. + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; } leaf encapsulate-header { @@ -381,7 +581,12 @@ submodule openconfig-aft-common { description "When forwarding a packet to the specified next-hop the local system performs an encapsulation of the packet - adding the - specified header type."; + specified header type. + + This node must be supported in addition to the + encap-headers/encap-header tree. A future release of OpenConfig + will deprecate this node in favor of the + encap-headers/encap-header subtree."; } leaf decapsulate-header { @@ -399,9 +604,9 @@ submodule openconfig-aft-common { uses aft-common-install-protocol; } - grouping aft-common-entry-nexthop-ipip-state { + grouping aft-common-entry-nexthop-ip-state { description - "IP-in-IP encapsulation applied on a next-hop"; + "IP encapsulation applied on a next-hop"; leaf src-ip { type oc-inet:ip-address; @@ -444,6 +649,115 @@ submodule openconfig-aft-common { } } + grouping aft-common-entry-nexthop-mpls-state { + description + "MPLS encapsulation of a packet."; + + leaf traffic-class { + type oc-mplst:mpls-tc; + description + "The value of the MPLS traffic class (TC) bits, formerly known as the + EXP bits."; + } + + leaf-list mpls-label-stack { + type oc-mplst:mpls-label; + ordered-by user; + description + "A stack of MPLS label values. The first entry in the list is the + label at the bottom of the stack. The bottom of the stack is adjacent + to the MPLS payload. + + For example, a packet with a label stack of two labels, the bottom + label being 42 and the top label being 8072 will be represented with + a leaf-list of [42, 8072]. The resulting packet, starting with the + beginning of the packet will be '[8072][42][Payload]'. + + Note: a swap operation is reflected by entries in the + popped-mpls-label-stack and the pushed-mpls-label-stack"; + } + } + + + grouping aft-common-entry-nexthop-encap-udp-state { + description + "UDP encapsulation applied on top of a packet."; + + leaf src-ip { + type oc-inet:ip-address; + description + "The source IP address for IP/UDP encapsulation."; + } + + leaf dst-ip { + type oc-inet:ip-address; + description + "Destination IP address for IP/UDP encapsulation."; + } + + leaf dscp { + type oc-inet:dscp; + description + "DSCP value to use for the UDP header of the encapsulated + packet."; + } + + leaf src-udp-port { + type oc-inet:port-number; + description + "Source UDP port number to use for the UDP header of the encapsulated + packet. The source UDP port should be derived from the payload + packet entropy. The exact methodology is implementation dependent, + but for example, the port could be derived from an entropy hash of + the payload or the source port (if present) of the payload."; + } + + leaf dst-udp-port { + type oc-inet:port-number; + description + "Source UDP port number to use for the UDP header of the encapsulated + packet. + + When the payload packet is MPLS, then RFC 7510 - Encapsulating MPLS + in UDP should be followed."; + reference + "RFC 7510 - Encapsulating MPLS in UDP specifies that 6635 must be + used for MPLS-in-UDP and 6636 must be used for MPLS-in-UDP with DTLS. + Because of this condition, no default is defined in OpenConfig. The + system is expected to utilize the appropriate port."; + } + + leaf ip-ttl { + type uint8; + description + "This leaf reflects the configured/default IP TTL value that is used + in the outer header during packet encapsulation. When this leaf is + not set, the TTL value of the inner packet is copied over as the + outer packet's IP TTL value during encapsulation."; + } + } + + grouping aft-common-entry-nexthop-vxlan-state { + description + "VXLAN encapsulation applied on top of a packet."; + + leaf vni-label { + type oc-evpn-types:evi-id; + description + "Where applicable, the next hop label representing the virtual + network identifier (VNI) for the forwarding entry. This leaf is + applicable only to next-hops which include VXLAN encapsulation + header information"; + } + + leaf tunnel-src-ip-address { + type oc-inet:ip-address; + description + "Where applicable this represents the vxlan tunnel source ip address. + For VXLAN this represents the source VTEP ip address"; + } + } + grouping aft-common-install-protocol { description "Grouping for a common reference to the protocol which @@ -785,6 +1099,7 @@ submodule openconfig-aft-common { } grouping aft-common-entry-counter-state { + oc-ext:telemetry-atomic-exempt; description "Counters relating to a forwarding entry"; @@ -804,6 +1119,7 @@ submodule openconfig-aft-common { } grouping aft-common-backup-entry-counter-state { + oc-ext:telemetry-atomic-exempt; description "Counters relating to a backup forwarding entry"; diff --git a/release/models/aft/openconfig-aft-ethernet.yang b/release/models/aft/openconfig-aft-ethernet.yang index b2c0758df..52d038a62 100644 --- a/release/models/aft/openconfig-aft-ethernet.yang +++ b/release/models/aft/openconfig-aft-ethernet.yang @@ -20,7 +20,19 @@ submodule openconfig-aft-ethernet { "Submodule containing definitions of groupings for the abstract forwarding tables for Ethernet."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.8.0"; + + revision "2024-09-19" { + description + "Add atomic-exempt attribute to AFT counters containers."; + reference "2.8.0"; + } + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.7.0"; + } revision "2024-04-25" { description diff --git a/release/models/aft/openconfig-aft-ipv4.yang b/release/models/aft/openconfig-aft-ipv4.yang index d582b2ad7..43c19f6a5 100644 --- a/release/models/aft/openconfig-aft-ipv4.yang +++ b/release/models/aft/openconfig-aft-ipv4.yang @@ -20,7 +20,19 @@ submodule openconfig-aft-ipv4 { "Submodule containing definitions of groupings for the abstract forwarding tables for IPv4."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.8.0"; + + revision "2024-09-19" { + description + "Add atomic-exempt attribute to AFT counters containers."; + reference "2.8.0"; + } + + revision "2024-09-05" { + description + "Add encapsulate-stack under aft next-hops."; + reference "2.7.0"; + } revision "2024-04-25" { description diff --git a/release/models/aft/openconfig-aft-ipv6.yang b/release/models/aft/openconfig-aft-ipv6.yang index c8aede635..f68138234 100644 --- a/release/models/aft/openconfig-aft-ipv6.yang +++ b/release/models/aft/openconfig-aft-ipv6.yang @@ -20,7 +20,19 @@ submodule openconfig-aft-ipv6 { "Submodule containing definitions of groupings for the abstract forwarding tables for IPv6."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.8.0"; + + revision "2024-09-19" { + description + "Add atomic-exempt attribute to AFT counters containers."; + reference "2.8.0"; + } + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.7.0"; + } revision "2024-04-25" { description diff --git a/release/models/aft/openconfig-aft-mpls.yang b/release/models/aft/openconfig-aft-mpls.yang index 2418a5a9e..add842110 100644 --- a/release/models/aft/openconfig-aft-mpls.yang +++ b/release/models/aft/openconfig-aft-mpls.yang @@ -21,7 +21,19 @@ submodule openconfig-aft-mpls { "Submodule containing definitions of groupings for the abstract forwarding table for MPLS label forwarding."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.8.0"; + + revision "2024-09-19" { + description + "Add atomic-exempt attribute to AFT counters containers."; + reference "2.8.0"; + } + + revision "2024-09-05" { + description + "Add encapsulate-stack under aft next-hops."; + reference "2.7.0"; + } revision "2024-04-25" { description diff --git a/release/models/aft/openconfig-aft-pf.yang b/release/models/aft/openconfig-aft-pf.yang index 8f0d5a243..8534f84fa 100644 --- a/release/models/aft/openconfig-aft-pf.yang +++ b/release/models/aft/openconfig-aft-pf.yang @@ -28,7 +28,19 @@ submodule openconfig-aft-pf { fields other than the destination address that is used in other forwarding tables."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.8.0"; + + revision "2024-09-19" { + description + "Add atomic-exempt attribute to AFT counters containers."; + reference "2.8.0"; + } + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.7.0"; + } revision "2024-04-25" { description diff --git a/release/models/aft/openconfig-aft-state-synced.yang b/release/models/aft/openconfig-aft-state-synced.yang index 3e0950826..5901b2c1e 100644 --- a/release/models/aft/openconfig-aft-state-synced.yang +++ b/release/models/aft/openconfig-aft-state-synced.yang @@ -16,7 +16,19 @@ submodule openconfig-aft-state-synced { "Submodule containing definitions of groupings for the state synced signals corresponding to various abstract forwarding tables."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.8.0"; + + revision "2024-09-19" { + description + "Add atomic-exempt attribute to AFT counters containers."; + reference "2.8.0"; + } + + revision "2024-07-18" { + description + "Add container for mpls-in-udp under next-hops aft entry state."; + reference "2.7.0"; + } revision "2024-04-25" { description diff --git a/release/models/aft/openconfig-aft-types.yang b/release/models/aft/openconfig-aft-types.yang index 4b7fc8f64..56d920b5f 100644 --- a/release/models/aft/openconfig-aft-types.yang +++ b/release/models/aft/openconfig-aft-types.yang @@ -16,7 +16,13 @@ module openconfig-aft-types { "Types related to the OpenConfig Abstract Forwarding Table (AFT) model"; - oc-ext:openconfig-version "1.1.0"; + oc-ext:openconfig-version "1.2.0"; + + revision "2024-07-18" { + description + "Add MPLS in UDP enums for encapsulate-header."; + reference "1.2.0"; + } revision "2022-05-05" { description @@ -89,6 +95,10 @@ module openconfig-aft-types { description "The encapsulation header is a VXLAN packet header"; } + enum UDP { + description + "The encapsulation header is UDP packet header."; + } } description "Types of tunnel encapsulation that are supported by systems as either diff --git a/release/models/aft/openconfig-aft.yang b/release/models/aft/openconfig-aft.yang index d1af3e977..d00303963 100644 --- a/release/models/aft/openconfig-aft.yang +++ b/release/models/aft/openconfig-aft.yang @@ -42,7 +42,19 @@ module openconfig-aft { is referred to as an Abstract Forwarding Table (AFT), rather than the FIB."; - oc-ext:openconfig-version "2.6.0"; + oc-ext:openconfig-version "2.8.0"; + + revision "2024-09-19" { + description + "Add atomic-exempt attribute to AFT counters containers."; + reference "2.8.0"; + } + + revision "2024-09-05" { + description + "Add encapsulate-stack under aft next-hops."; + reference "2.7.0"; + } revision "2024-04-25" { description diff --git a/release/models/bgp/openconfig-bgp-policy.yang b/release/models/bgp/openconfig-bgp-policy.yang index f4c0c18c4..a08c44b0d 100644 --- a/release/models/bgp/openconfig-bgp-policy.yang +++ b/release/models/bgp/openconfig-bgp-policy.yang @@ -28,7 +28,20 @@ module openconfig-bgp-policy { It augments the base routing-policy module with BGP-specific options for conditions and actions."; - oc-ext:openconfig-version "7.1.0"; + oc-ext:openconfig-version "8.1.0"; + + revision "2024-11-13" { + description + "Add use-last-as leaf to set-as-path-prepend to prepend last AS."; + reference "8.1.0"; + } + + revision "2024-08-23" { + description + "Separate the ability to set the BGP MED along with an appropriate + action."; + reference "8.0.0"; + } revision "2024-07-02" { description @@ -210,23 +223,40 @@ module openconfig-bgp-policy { typedef bgp-set-med-type { type union { type uint32; - type string { - pattern '[+-][0-9]+'; - oc-ext:posix-pattern '^[+-][0-9]+$'; - } type enumeration { enum IGP { - description "set the MED value to the IGP cost toward the - next hop for the route"; + description + "Set the MED value to the IGP cost toward the next hop for + the route"; } } } description - "Type definition for specifying how the BGP MED can - be set in BGP policy actions. The three choices are to set - the MED directly using the uint32 type or increment/decrement - using +/- notation in the string type or setting it to - the IGP cost using the enum (predefined value)."; + "Type definition for specifying how the BGP MED can be set in BGP + policy actions. The MED can be specified as a direct integer + value or setting it to the IGP cost. To be used in conjunction + with `bgp-set-med-action` in order to specify the appropriate + action to take on this value."; + } + + typedef bgp-set-med-action { + type enumeration { + enum SET { + description + "Action to set the MED to a specific value."; + } + enum ADD { + description + "Action to increment the previous MED value."; + } + enum SUBTRACT { + description + "Action to decrement the previous MED value."; + } + } + description + "Specifies which action to take on the value specified by the + bgp-set-med-type."; } // grouping statements @@ -896,9 +926,19 @@ module openconfig-bgp-policy { leaf asn { type oc-inet:as-number; description - "The AS number to prepend to the AS path. If this leaf is - not specified and repeat-n is set, then the local AS - number will be used for prepending."; + "The AS number to prepend to the AS path. If neither this + leaf nor use-last-as leaf is specified but repeat-n is set, then + the local AS number will be used for prepending."; + } + + leaf use-last-as { + type boolean; + description + "Indicates whether to use the last AS number, which is also the + most recent AS number, to prepend to the AS path. + If neither this leaf nor asn leaf is specified + but repeat-n is set, then the local AS number will be + used for prepending."; } } @@ -1345,8 +1385,24 @@ module openconfig-bgp-policy { leaf set-med { type bgp-set-med-type; - description "set the med metric attribute in the route - update"; + must "../set-med-action" { + error-message + "set-med cannot be specified without a valid set-med-action"; + } + description + "Set the MED metric attribute in the route update. When set, a + valid `set-med-action` must be specified."; + } + + leaf set-med-action { + type bgp-set-med-action; + must "../set-med" { + error-message + "set-med-action cannot be specified without a set-med value"; + } + description + "When set-med is specified, this leaf is mandatory to set the + appropriate action on the MED metric value."; } } diff --git a/release/models/ethernet-segments/openconfig-ethernet-segments.yang b/release/models/ethernet-segments/openconfig-ethernet-segments.yang index b09357564..0d490661f 100644 --- a/release/models/ethernet-segments/openconfig-ethernet-segments.yang +++ b/release/models/ethernet-segments/openconfig-ethernet-segments.yang @@ -8,6 +8,7 @@ module openconfig-ethernet-segments { import openconfig-extensions { prefix oc-ext; } import openconfig-interfaces { prefix oc-if; } + import openconfig-yang-types { prefix oc-yang-types; } import openconfig-evpn-types { prefix oc-evpn-types; } // meta @@ -23,7 +24,13 @@ module openconfig-ethernet-segments { The ethernet segments are used in EVPN services are defined for the whole device"; - oc-ext:openconfig-version "0.1.0"; + oc-ext:openconfig-version "0.2.0"; + + revision "2024-09-06" { + description + "Added ability to configure an explicit es-import-route-target for an ES"; + reference "0.2.0"; + } revision "2021-06-28" { description @@ -199,6 +206,17 @@ grouping evpn-ethernet-segment-df-config { "RFC 7432: BGP MPLS-Based Ethernet VPN"; } + leaf es-import-route-target { + type oc-yang-types:mac-address; + description + "Received ES routes with an ES-Import extended community set to this value + are imported into this ethernet segment. When configured by a user, the + es-import-route-target will be used, otherwise the system automatically + derives the value used by following the procedures in RFC 7432 Section 7.6."; + reference + "RFC 7432: BGP MPLS-Based Ethernet VPN Section 7.6"; + } + uses oc-if:interface-ref-common; } @@ -247,4 +265,4 @@ grouping evpn-ethernet-segment-df-config { uses evpn-ethernet-segment-top; -} \ No newline at end of file +} diff --git a/release/models/gnsi/openconfig-gnsi-acctz.yang b/release/models/gnsi/openconfig-gnsi-acctz.yang index d95ccccfb..258b40c77 100644 --- a/release/models/gnsi/openconfig-gnsi-acctz.yang +++ b/release/models/gnsi/openconfig-gnsi-acctz.yang @@ -10,9 +10,6 @@ module openconfig-gnsi-acctz { import openconfig-system-grpc { prefix oc-sys-grpc; } - import openconfig-types { - prefix oc-types; - } import openconfig-yang-types { prefix oc-yang; } @@ -30,7 +27,14 @@ module openconfig-gnsi-acctz { "This module provides counters of gNSI accountZ requests and responses and the quantity of data transferred."; - oc-ext:openconfig-version "0.2.0"; + oc-ext:openconfig-version "0.3.0"; + + revision 2024-10-07 { + description + "Remove `idle-timeouts` and `counters-last-cleared` leaves. + Relocate source-counters and client-counters to separate paths"; + reference "0.3.0"; + } revision 2024-02-13 { description @@ -116,54 +120,52 @@ module openconfig-gnsi-acctz { description "A collection of counters that were collected by the gNSI.acctz module while servicing acctz clients."; - - container client-counters { - description - "A collection of counters that were collected by the gNSI.acctz - module while servicing acctz clients."; - leaf history-istruncated { - type oc-yang:counter64; - description - "The total number of times that a RecordRequest resulted in - a RecordResponse being marked history-istruncated. ie: a - request was made for a timestamp that did not exist in the - history."; - } - leaf idle-timeouts { - type oc-yang:counter64; - description - "The total number of times that a client was disconnected - due to missing keepalives (ie: RecordRequests)."; - } - leaf record-requests { - type oc-yang:counter64; + container state { description - "The total number of RecordRequest RPCs that have been received."; - } - leaf record-responses { - type oc-yang:counter64; + "Operational state relating to acctz-counters."; + + container counters { description - "The total number of RecordResponse RPCs that have been sent."; + "A collection of counters that were collected by the gNSI.acctz + module while servicing acctz clients."; + + leaf history-istruncated { + type oc-yang:counter64; + description + "The total number of times that a RecordRequest resulted in + a RecordResponse being marked history-istruncated. ie: a + request was made for a timestamp that did not exist in the + history."; + } + leaf record-requests { + type oc-yang:counter64; + description + "The total number of RecordRequest messages that have been received."; + } + leaf record-responses { + type oc-yang:counter64; + description + "The total number of RecordResponse messages that have been sent."; + } } } } // gnsi.acctz producer statistics - grouping source-counters { + grouping source-records { description "A collection of counters for gNSI.acctz record production per service request type."; - container source-counters { + container source-records { description "A collection of counters for gNSI.acctz record production per service request type."; - list source-records { + list source-record { key "service type"; // unique "service type"; description - "The total number of times the gNSI.authz module denied access - to a RPC."; + "A collection of counters for each service request type."; leaf service { type leafref { @@ -194,11 +196,16 @@ module openconfig-gnsi-acctz { description "service request application enum for the gNSI.acctz record."; } - leaf records { - type oc-yang:counter64; + + container counters { description - "The total number of records produced for the service-request - type."; + "A collection of counters for gNSI.acctz record production per + service-type."; + leaf records { + type oc-yang:counter64; + description + "The total number of records produced for the service-type."; + } } } } @@ -207,30 +214,26 @@ module openconfig-gnsi-acctz { grouping grpc-server-acctz-counters { description - "A collection of counters from the gNSI.acctz module."; + "A collection of counters from the gNSI.acctz module that exist per grpc server."; - container acctz-counters { + container acctz { config false; description - "A collection of counters from the gNSI.acctz module - for acctz clients and sources."; - - container state { - description - "Operational state relating to acctz-counters."; - - leaf counters-last-cleared { - type oc-types:timeticks64; - description - "The last time that the counters were cleared (reset to - zero). This value is reported as nanoseconds since epoch - (January 1st, 1970 00:00:00 GMT)."; - } + "A collection of counters from the gNSI.acctz module that exist + per grpc server."; + uses client-counters; + } + } - uses client-counters; - } + grouping system-acctz-counters { + description + "A collection of counters from the gNSI.acctz module."; - uses source-counters; + container acctz { + config false; + description + "A collection of counters regarding the creation of gNSI.acctz records."; + uses source-records; } } @@ -238,8 +241,15 @@ module openconfig-gnsi-acctz { augment "/oc-sys:system/oc-sys-grpc:grpc-servers/oc-sys-grpc:grpc-server" { when "config[contains(services, 'oc-gnsi:GNSI')]/enable = 'true'"; description - "Counters collected by the gNSI.acctz module."; + "Counters collected by the gNSI.acctz module regarding grpc servers."; uses grpc-server-acctz-counters; } + + augment "/oc-sys:system/oc-sys:aaa/oc-sys:accounting" { + description + "Counters collected by the gNSI.acctz module regarding the system."; + + uses system-acctz-counters; + } } diff --git a/release/models/interfaces/openconfig-if-ethernet.yang b/release/models/interfaces/openconfig-if-ethernet.yang index 3991923f6..6c1dae27d 100644 --- a/release/models/interfaces/openconfig-if-ethernet.yang +++ b/release/models/interfaces/openconfig-if-ethernet.yang @@ -24,7 +24,15 @@ module openconfig-if-ethernet { "Model for managing Ethernet interfaces -- augments the OpenConfig model for interface configuration and state."; - oc-ext:openconfig-version "2.13.0"; + oc-ext:openconfig-version "2.14.0"; + + revision "2024-09-17" { + description + "Refactor config/state nodes to account for physical ethernet vs. + aggregate interface characteristics along with description updates + to indicate applicability."; + reference "2.14.0"; + } revision "2023-03-10" { description @@ -294,7 +302,9 @@ module openconfig-if-ethernet { // grouping statements grouping ethernet-interface-config { - description "Configuration items for Ethernet interfaces"; + description + "Common interface configuration for physical ethernet + logical + aggregate interfaces"; leaf mac-address { type oc-yang:mac-address; @@ -304,6 +314,31 @@ module openconfig-if-ethernet { expected to show the system-assigned MAC address."; } + leaf enable-flow-control { + type boolean; + default false; + description + "Enable or disable flow control for this interface. + Ethernet flow control is a mechanism by which a receiver + may send PAUSE frames to a sender to stop transmission for + a specified time. + + This setting should override auto-negotiated flow control + settings. If left unspecified, and auto-negotiate is TRUE, + flow control mode is negotiated with the peer interface."; + reference + "IEEE 802.3x"; + } + } + + grouping physical-interface-config { + description + "Configuration specific to physical ethernet interfaces. Note + that this grouping is to only apply when the interface `type` is + set to 'ianaift:ethernetCsmacd'. This is not currently restricted + by YANG language statements (must/when) due to uses of this module + within other domains (e.g. wifi)."; + leaf auto-negotiate { type boolean; default true; @@ -365,22 +400,6 @@ module openconfig-if-ethernet { by ETHERNET_SPEED identities"; } - leaf enable-flow-control { - type boolean; - default false; - description - "Enable or disable flow control for this interface. - Ethernet flow control is a mechanism by which a receiver - may send PAUSE frames to a sender to stop transmission for - a specified time. - - This setting should override auto-negotiated flow control - settings. If left unspecified, and auto-negotiate is TRUE, - flow control mode is negotiated with the peer interface."; - reference - "IEEE 802.3x"; - } - leaf fec-mode { type identityref { base INTERFACE_FEC; @@ -596,9 +615,13 @@ module openconfig-if-ethernet { } - grouping ethernet-interface-state { + grouping physical-interface-state { description - "Grouping for defining Ethernet-specific operational state"; + "Grouping for operational state specific to physical ethernet + interfaces. Note that this grouping is to only apply when the + interface `type` is set to 'ianaift:ethernetCsmacd'. This is not + currently restricted by YANG language statements (must/when) due + to uses of this module within other domains (e.g. wifi)."; leaf hw-mac-address { type oc-yang:mac-address; @@ -631,6 +654,11 @@ module openconfig-if-ethernet { completed auto-negotiation with the remote peer, this value shows the interface speed that has been negotiated."; } + } + + grouping ethernet-interface-state { + description + "Common state for physical ethernet and aggregate interfaces"; container counters { description "Ethernet interface counters"; @@ -653,7 +681,7 @@ module openconfig-if-ethernet { description "Configuration data for ethernet interfaces"; uses ethernet-interface-config; - + uses physical-interface-config; } container state { @@ -662,6 +690,8 @@ module openconfig-if-ethernet { description "State variables for Ethernet interfaces"; uses ethernet-interface-config; + uses physical-interface-config; + uses physical-interface-state; uses ethernet-interface-state; } diff --git a/release/models/interfaces/openconfig-if-ip.yang b/release/models/interfaces/openconfig-if-ip.yang index 8aebaaa06..e5632af50 100644 --- a/release/models/interfaces/openconfig-if-ip.yang +++ b/release/models/interfaces/openconfig-if-ip.yang @@ -44,7 +44,13 @@ module openconfig-if-ip { Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info)."; - oc-ext:openconfig-version "3.5.1"; + oc-ext:openconfig-version "3.6.0"; + + revision "2024-05-28" { + description + "Add gratuitous-arp-accepted for IPv4 and unsolicited-na-accepted for IPv6."; + reference "3.6.0"; + } revision "2024-03-13" { description @@ -480,6 +486,15 @@ revision "2023-06-30" { "RFC 791: Internet Protocol"; } + leaf gratuitous-arp-accepted { + type boolean; + description + "When set to true, gratuitous ARPs will be accepted and + the ARP table will be updated."; + reference + "RFC 826: An Ethernet Address Resolution Protocol"; + } + uses ip-common-global-config; @@ -605,6 +620,30 @@ revision "2023-06-30" { "RFC 4862: IPv6 Stateless Address Autoconfiguration"; } + leaf learn-unsolicited { + type enumeration { + enum NONE { + value 0; + } + enum GLOBAL { + value 1; + } + enum LINK_LOCAL { + value 2; + } + enum BOTH { + value 3; + } + } + default "NONE"; + description + "Sets if neighbors should be learned from unsolicited neighbor + advertisements for global or link local addresses or both."; + reference + "RFC 9131: Routers Creating Cache Entries upon + Receiving Unsolicited Neighbor Advertisements"; + } + uses ip-common-global-config; } diff --git a/release/models/interfaces/openconfig-interfaces.yang b/release/models/interfaces/openconfig-interfaces.yang index 2cf2bdc84..9d5342390 100644 --- a/release/models/interfaces/openconfig-interfaces.yang +++ b/release/models/interfaces/openconfig-interfaces.yang @@ -51,7 +51,14 @@ module openconfig-interfaces { Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info)."; - oc-ext:openconfig-version "3.7.1"; + oc-ext:openconfig-version "3.7.2"; + + revision "2024-12-05" { + description + "Description typo for unnumbered/interface-ref/config/subinterface leaf"; + reference + "3.7.2"; + } revision "2024-04-04" { description @@ -230,7 +237,7 @@ module openconfig-interfaces { "Reference to a subinterface -- this requires the base interface to be specified using the interface leaf in this container. If only a reference to a base interface - is requuired, this leaf should not be set."; + is required, this leaf should not be set."; } } diff --git a/release/models/multicast/openconfig-pim-types.yang b/release/models/multicast/openconfig-pim-types.yang index a1fc515cf..9e2aeac1c 100644 --- a/release/models/multicast/openconfig-pim-types.yang +++ b/release/models/multicast/openconfig-pim-types.yang @@ -21,7 +21,13 @@ module openconfig-pim-types { description "This module defines types related to the PIM protocol model."; - oc-ext:openconfig-version "0.1.1"; + oc-ext:openconfig-version "0.1.2"; + + revision "2024-05-31" { + description + "Add PIM bidirectional mode."; + reference "0.1.2"; + } revision "2018-11-21" { description @@ -62,6 +68,13 @@ module openconfig-pim-types { reference "RFC3973"; } + identity PIM_MODE_BIDIR { + base PIM_MODE; + description + "PIM bidirectional mode."; + reference "RFC5015"; + } + // typedef statements typedef dr-priority-type { diff --git a/release/models/multicast/openconfig-pim.yang b/release/models/multicast/openconfig-pim.yang index 56639da97..8225756f6 100644 --- a/release/models/multicast/openconfig-pim.yang +++ b/release/models/multicast/openconfig-pim.yang @@ -25,9 +25,15 @@ module openconfig-pim { www.openconfig.net"; description - "An OpenConfig model for Protocol Independent Multicast (PIM)."; + "An OpenConfig model for Protocol Independent Multicast (PIM) that supports IPv4 address family."; - oc-ext:openconfig-version "0.4.3"; + oc-ext:openconfig-version "0.4.4"; + + revision "2024-12-06" { + description + "Update PIM documentation to clarify that only ipv4 AF is supported."; + reference "0.4.4"; + } revision "2023-03-06" { description diff --git a/release/models/network-instance/openconfig-network-instance-policy.yang b/release/models/network-instance/openconfig-network-instance-policy.yang index d72e8f008..eda6cb09e 100644 --- a/release/models/network-instance/openconfig-network-instance-policy.yang +++ b/release/models/network-instance/openconfig-network-instance-policy.yang @@ -25,7 +25,14 @@ module openconfig-network-instance-policy { actions) for the network instance model. These statements are generally added to the routing policy model."; - oc-ext:openconfig-version "0.1.2"; + oc-ext:openconfig-version "0.1.3"; + + revision "2024-09-19" { + description + "Correct typo in description of + match-protocol-instance/protocol-name."; + reference "0.1.3"; + } revision "2023-07-25" { description @@ -74,7 +81,7 @@ revision "2018-11-21" { on in the local network instance. The string must match one of /network-instances/ network-instance/protocols/ - protocol/identifier in the local network + protocol/name in the local network instance."; } } diff --git a/release/models/oam/.spec.yml b/release/models/oam/.spec.yml new file mode 100644 index 000000000..c72f72b7f --- /dev/null +++ b/release/models/oam/.spec.yml @@ -0,0 +1,9 @@ +- name: openconfig-oam + docs: + - yang/oam/openconfig-oam.yang + - yang/oam/openconfig-cfm-types.yang + - yang/oam/openconfig-oam-cfm.yang + build: + - yang/oam/openconfig-oam.yang + - yang/oam/openconfig-oam-cfm.yang + run-ci: true diff --git a/release/models/oam/openconfig-cfm-types.yang b/release/models/oam/openconfig-cfm-types.yang new file mode 100644 index 000000000..c1f1ccae1 --- /dev/null +++ b/release/models/oam/openconfig-cfm-types.yang @@ -0,0 +1,392 @@ +module openconfig-cfm-types { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/oam/cfm-types"; + + prefix "oc-cfm-types"; + + // import some basic types + import openconfig-extensions { prefix oc-ext; } + + // google + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + netopenconfig@googlegroups.com"; + + description + "This module contains general data definitions for use in CFM"; + + oc-ext:openconfig-version "0.1.0"; + + revision "2024-09-11" { + description + "Initial revision"; + reference "0.1.0"; + } + +typedef name-key-type { + type string { + length "1..255"; + pattern '[0-9a-zA-Z\-_.]*'; + oc-ext:posix-pattern '^[0-9a-zA-Z\-_.]*$'; + } + description + "String type with at least 1 and up to 255 of the specified + characters."; +} + +typedef config-error-type { + type enumeration { + enum CFM_LEAK { + description + "MA x is associated with a specific VID list, one or more of + the VIDs in MA x can pass through the Bridge Port, no Down MEP + is configured on any Bridge Port for MA x, and some other MA + y, at a higher MD Level than MA x, and associated with at + least one of the VID(s) also in MA x, does have a MEP + configured on the Bridge Port."; + } + enum CONFLICTING_VIDS { + description + "MA x is associated with a specific VID list, an Up MEP is + configured on MA x on the Bridge Port, and some other MA y, + associated with at least one of the VID(s) also in MA x, also + has an Up MEP configured on some Bridge Port."; + } + enum EXCESSIVE_LEVELS { + description + "The number of different MD Levels at which MIPs are to be + created on this port exceeds the Bridge's capabilities."; + } + enum OVERLAPPED_LEVELS { + description + "A MEP is created for one VID at one MD Level, but a MEP is + configured on another VID at that MD Level or higher, + exceeding the Bridge's capabilities."; + } + } + description + "While making the MIP creation evaluation described in 22.2.3, the + management entity can encounter errors in the configuration."; + } + + typedef mep-id-type { + description + "Maintenance association End Point Identifier (MEPID): A 12-bit + identifier, unique over a given Maintenance Association, identifying + a specific MEP."; + reference "[802.1q] 3.19 and 19.2.1"; + type uint16 { + range "1..8191"; + } + } + + typedef remote-mep-state-type { + description + "Operational state of the remote MEP state machine. This state + machine monitors the reception of valid CCMs from a remote MEP + with a specific MEPID. It uses a timer that expires in 3.5 times + the length of time indicated by the MA's ccm-interval object."; + + type enumeration { + enum RMEP_IDLE { + value 1; + description + "Momentary state during reset."; + } + enum RMEP_START { + value 2; + description + "The timer has not expired since the state machine was reset, + and no valid CCM has yet been received."; + } + enum RMEP_FAILED { + value 3; + description + "The timer has expired, both since the state machine was + reset, and since a valid CCM was received."; + } + enum RMEP_OK { + value 4; + description + "The timer has not expired since a valid CCM was received."; + } + } + } + + typedef mep-defects-type { + type enumeration { + enum DEF_RDI_CCM { + value 1; + description + "A REMOTE MEP reported that RDI bit in its last CCM."; + } + enum DEF_MAC_STATUS { + value 2; + description + "Either some remote MEP is reporting its Interface Status TLV + as not isUp, or all remote MEPs are reporting a Port Status + TLV that contains some value other than psUp."; + } + enum DEF_REMOTE_CCM { + value 3; + description + "The MEP is not receiving valid CCMs from at least one of the + remote MEPs."; + } + enum DEF_ERROR_CCM { + value 4; + description + "The MEP has received at least one invalid CCM whose CCM + Interval has not yet timed out."; + } + enum DEF_XCON_CCM { + value 5; + description + "The MEP has received at last one CCM from either another MAID + or a lower MD level whose CCM Interval has not yet timed out."; + } + } + description + "A MEP can detect and report a number of defects, and multiple + defects can be present at the same time."; + } + + typedef fng-state-type { + type enumeration { + enum FNG_RESET { + value 1; + description + "No defect has been present since the MEP's fng-reset-time + timer expired, or since the state machine was last reset."; + } + enum FNG_DEFECT { + value 2; + description + "A defect is present, but not for a long enough time to be + reported."; + } + enum FNG_REPORT_DEFECT { + value 3; + description + "A momentary state during which the defect is reported by + sending a fault-alarm notification, if that action is enabled."; + } + enum FNG_DEFECT_REPORTED { + value 4; + description + "A defect is present, and some defect has been reported."; + } + enum FNG_DEFECT_CLEARING { + value 5; + description + "No defect is present, but the MEP's fng-reset-time timer has + not yet expired."; + } + } + description + "Indicates the different states of the MEP Fault Notification + Generator State Machine."; + } + + typedef operational-state-type { + + type enumeration { + enum ENABLED { + description + "The MEP is able to provide OAM capabilities and has been set to + active via the 'administrative-state' leaf."; + } + enum DISABLED { + description + "The MEP is not able to provide OAM capabilities, for example + because it has been disabled via the administrative-state leaf, + has detected an operational failure condition, or has failed an + internal test."; + } + enum UNKNOWN { + description + "The MEP is unable to report the operational state."; + } + } + description + "This attribute indicates the operational state (current capability) of + a MEP."; + reference + "[MEF7.1] 9.2.5"; + } + + typedef fault-alarm-type { + type enumeration { + enum ADDRESS { + value 1; + description + "Indicates that a Network address to which Fault Alarms are to + be transmitted should be used."; + } + enum NOT_TRANSMITTED { + value 2; + description + "Indicates that Fault alarms are not to be transmitted."; + } + } + description + "The Fault Alarm indicators."; + } + typedef interface-status-type { + + type enumeration { + enum NO_STATUS_TLV { + description "Indicates either that no CCM has been received or that + no interface status TLV was present in the last CCM received."; + } + enum UP { + description "The interface is ready to pass packets."; + } + enum DOWN { + description "The interface cannot pass packets."; + } + enum TESTING { + description "The interface is in some test mode."; + } + enum UNKNOWN { + description "The interface status cannot be determined for some reason."; + } + enum DORMANT { + description "The interface is not in a state to pass packets but is in + a pending state, waiting for some external event."; + } + enum NOT_PRESENT { + description "Some component of the interface is missing."; + } + enum LOWER_LAYER_DOWN { + description "The interface is down due to state of the lower layer + interfaces."; + } + } + description + "The set of values available from the Interface Status TLV in CCM PDUs + including the default no-status-tlv"; + reference + "[802.1q] 20.19.4, 12.14.7.6.3:g + IEEE8021-CFM-MIB.Dot1agCfmInterfaceStatus"; + } + + typedef port-status-type { + type enumeration { + enum NO_STATUS_TLV { + description "Indicates either that no CCM has been received or that + no port status TLV was present in the last CCM received."; + } + enum BLOCKED { + description "Ordinary data cannot pass freely through the port on + which the remote MEP resides. Value of enableRmepDefect + is equal to false."; + } + enum UP { + description "Ordinary data can pass freely through the port on which + the remote MEP resides. Value of enableRmepDefect is + equal to true."; + } + } + description + "The set of values available from the Port Status TLV in CCM PDUs + including the default no-status-tlv"; + reference + "[802.1q] 20.19.3, 12.14.7.6.3:f + IEEE8021-CFM-MIB.Dot1agCfmPortStatus"; + } + + typedef highest-defect-priority-type { + type enumeration { + enum NONE { + value 0; + description + "No defects since Fault Notification Generator state machine + reset."; + } + enum DEF_RDI_CCM { + value 1; + description + "The last CCM received by this MEP from some remote MEP + contained the RDI bit set."; + } + enum DEF_MAC_STATUS { + value 2; + description + "The last CCM received by this MEP from some remote MEP + indicating that the transmitting MEP's associated MAC is + reporting its status via the Port Status TLV or Interface + Status TLV."; + } + enum DEF_REMOTE_CCM { + value 3; + description + "This MEP is not receiving CCMs from some other MEP in its + configured list."; + } + enum DEF_ERROR_CCM { + value 4; + description + "This MEP is receiving invalid CCMs."; + } + enum DEF_XCON_CCM { + value 5; + description + "This MEP is receiving CCMs that could be from some other MA."; + } + } + description + "An enumerated value, equal to the contents of the variable + highestDefect (20.35.9 and Table 20-1), indicating the + highest-priority defect that has been present since the MEP Fault + Notification Generator State Machine was last in the FNG_RESET + state. The integer value assigned to the enum value determines the + priority. The higher value corresponds to the higher priority."; + } + typedef lowest-alarm-priority-type { + type enumeration { + enum ALL_DEF { + value 1; + description + "Includes def_rdi-ccm, def_mac_status, def_remote_ccm, + def_error_ccm, and def_xcon_ccm."; + } + enum MAC_REMOTE_ERROR_XCON { + value 2; + description + "Only includes def_mac_status, def_remote_ccm, def_error_ccm, + and def_xcon_ccm."; + } + enum REMOTE_ERROR_XCON { + value 3; + description + "Includes def_remote_ccm, def_error_ccm, and def_xcon_ccm."; + } + enum ERROR_XCON { + value 4; + description + "Includes def_error_ccm and def_xcon_ccm."; + } + enum XCON { + value 5; + description + "Only def_xcon_ccm"; + } + enum NO_XCON { + value 6; + description + "No defects def_xcon or lower are to be reported."; + } + } + description + "Specifies the lowest priority defect that is allowed to generate + a Fault Alarm (20.9.5). The to be reported defects are identified + per enum value."; + } +} \ No newline at end of file diff --git a/release/models/oam/openconfig-oam-cfm.yang b/release/models/oam/openconfig-oam-cfm.yang new file mode 100644 index 000000000..dbf0888e7 --- /dev/null +++ b/release/models/oam/openconfig-oam-cfm.yang @@ -0,0 +1,1318 @@ +module openconfig-oam-cfm { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/oam/cfm"; + + prefix "oc-oam-cfm"; + import openconfig-vlan-types { prefix oc-vlan-types; } + import openconfig-interfaces { prefix oc-if; } + import openconfig-extensions { prefix oc-ext; } + import openconfig-yang-types { prefix oc-yang; } + import openconfig-cfm-types { prefix oc-cfm-types; } + import openconfig-oam { prefix oc-oam; } // imports the module being augmented + + + // google + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module defines a YANG data model for configuring and managing CFM + (Connectivity Fault Management) in a network device. The module includes + maintenance domains, associations, maintenance endpoints, + performance management policies and remote defect handling features"; + + oc-ext:openconfig-version "0.1.0"; + + revision "2024-09-11" { + description + "Initial revision"; + reference "0.1.0"; + } + + grouping cfm-top { + description "Top-level grouping for CFM configuration and state"; + + container cfm { + description + "Container for CFM configuration, state and perfomance measurement policies"; + + container domains { + description "A Container for CFM maintenance domain state and Configuration + on the local system"; + + list maintenance-domain { + key "md-id"; + description + "A Maintenance Domain managed object is required in order to create + an MA with a MAID that includes that Maintenance Domain’s Name. From + this Maintenance Domain managed object, all Maintenance + Association managed objects associated with that Maintenance + Domain managed object can be accessed, and thus controlled."; + reference "[802.1q] 12.14.5"; + + leaf md-id { + type leafref { + path "../config/md-id"; + } + description + "A unique maintenance domain name identifying the domain"; + reference + "[802.1q] 12.14.5"; + } + + container config { + description "Configuration data for a maintenance domain."; + uses cfm-domain-config; + } + + container state { + description "Operational data for a maintenance domain."; + config false; + uses cfm-domain-config; + } + + container maintenance-associations { + description + "Collection of maintenance associations within a + maintenance domain.Provides configuration and operational data + for the Maintenance Associations. A Maintenance Association is a set + of MEPs, each configured with the same MAID and MD level, + established to verify the integrity of a single service + instance. A Maintenance Association can be thought of as a + full mesh of Maintenance Entities among a set of MEPs so + configured."; + + list maintenance-association { + key "ma-id"; + description "Collection of maintenance associations within a maintenance domain."; + + leaf ma-id { + description "Key of the Maintenance Association list of entries."; + type leafref { + path "../config/ma-id"; + } + reference + "[802.1q] 12.14.6"; + } + + container config { + description "Configuration data for a maintenance association."; + uses maintenance-association-config; + } + + container state { + description "Operational data for a maintenance association."; + config false; + uses maintenance-association-config; + } // End MA State + + container mep-endpoints { + description "Container for full mesh MEPs under the maintenance association."; + + list mep-endpoint { + key "local-mep-id"; + description "collection of full mesh MEPs under the maintenance association."; + + leaf local-mep-id { + description "Local MEP identifier."; + type leafref { + path "../config/local-mep-id"; + } + } + + container config { + description "Configuration data for a MEP."; + uses mep-config; + } // end container config + + container state { + config false; + description " Operational tate data for a MEP."; + uses mep-config; + uses mep-oper-states; + } //end container mep state + + container pm-profiles { + description + "This container includes configuration and state objects for the Frame Loss + Measurement & Delay Measurement functions defined in [Y.1731] and [MEF SOAM PM IA]."; + + list pm-profile { + description " Measurement profile name and state."; + key "profile-name"; + + leaf "profile-name" { + description "A unique profile name identifying the profile"; + type leafref { + path "../config/profile-name"; + } + } + + container config { + description "Associated performance Measurement profile."; + + leaf "profile-name" { + description "A unique profile name identifying the profile"; + type string; + } + } + + container state { + description "Operational data for loss measurement."; + config false; + uses performance-measurement-config; + uses performance-measurement-state; + } + } + } + + container rdi { + description "rdi config for a mep."; + container config { + description "rdi config for a mep."; + uses rdi-config; + } + + container state { + description "rdi state for a mep."; + config false; + uses rdi-config; + } + + } + + container link-loss-forwarding { + description "link loss forwarding config for a mep."; + container config { + description + "Enable propagation of the remote + attachment-circuit link state to the + localattachment-circuit link state"; + uses link-loss-forwarding-config; + } + + container state { + description "link loss forwarding state for a mep."; + config false; + uses link-loss-forwarding-config; + } + } + container remote-meps { + description "Remote meps associated to a local mep"; + + list remote-mep { + description "Remote meps associated to a local mep"; + key "id"; + + leaf id { + description "Remote mep id."; + type leafref{ + path "../config/id"; + } + } + + container config { + description "Configuration data for a remote mep."; + uses remote-mep-config; + } + + container state { + description "Operational data for a remote mep."; + config false; + uses remote-mep-config; + uses mep-oper-states; + } + } // end list remote-mep + } // end container remote-meps + } // end list mep-endpoint + } // end container mep-enpoints + } // end MA list + } // end container MA + } // end list MD + } // end container domains + + container state { + description "Operational data for CFM."; + config false; + uses cfm-global-state; + } + + container performance-measurement-profiles-global { + description "This container includes configuration and state objects + for the Frame Loss Measurement and Delay measurement + functions as defined in [Y.1731] and [MEF SOAM PM IA]."; + + list performance-measurement-profile { + description "Performance measurement configuration and state."; + key "profile-name"; + + leaf "profile-name" { + description + "A unique profile name identifying the + Performance measurement profile"; + type leafref { + path "../config/profile-name"; + } + } + container config { + description + "Configuration data for Performance measurement profile."; + uses performance-measurement-config; + } + + container state { + description + "Statistical data for performance measurement profiles."; + config false; + uses performance-measurement-config; + uses performance-measurement-state; + } + } + } + } // End container cfm + } // End grouping cfm + + grouping maintenance-association-config { + description "Configuration for a maintenance association"; + + leaf ma-id { + type oc-cfm-types:name-key-type; + description "Key of the Maintenance Association list of entries."; + reference + "[802.1q] 12.14.6"; + } + + leaf group-name { + type string; + description + "Optional Bridge Group or Cross-connect Group name, if + Service Type is BridgeDomain or + CrossConnect"; +} + + leaf ma-name-type { + type enumeration { + enum PRIMARY_VID { + description + "Specifies the Primary VLAN ID."; + } + enum CHARACTER_STRING { + description + "RFC2579 DisplayString, except that the character + codes 0-31 (decimal) are not used."; + } + enum UINT16 { + description "2-octet integer/big endian."; + } + enum RFC2685_VPN_ID { + description "Specifies the RFC 2685 VPN ID."; + } + } + description + "Name type discriminator for the 'name' leaf."; + reference + "[802.1q] 12.14.5.3.2:b, Table 21-20 + IEEE8021-CFM-MIB.Dot1agCfmMaintAssocNameType"; + } + + + leaf primary-vid { + when "../ma-name-type = 'PRIMARY_VID'"; + mandatory true; + type oc-vlan-types:vlan-id; + description + "Primary VLAN ID. 12 bits represented in a 2-octet integer."; + } + + + leaf char-string { + when "../ma-name-type = 'CHARACTER_STRING'"; + mandatory true; + type string { + length "1..45"; + pattern '[ -~]*'; + oc-ext:posix-pattern '^[ -~]*$'; + } + description + "RFC2579 DisplayString, except that the character codes 0-31 + (decimal) are not used."; + } + + + leaf unsigned-int16 { + when "../ma-name-type = 'UINT16'"; + type uint16; + mandatory true; + description + "2-octet integer."; + } + + leaf vpn-oui { + when "../ma-name-type = 'RFC2685_VPN_ID'"; + type uint32 { + range "0..16777215"; + } + mandatory true; + description + "RFC2685 VPN ID. 3 octet VPN authority Organizationally + Unique Identifier followed by 4 octet VPN index identifying + VPN according to the OUI. 3 octet VPN authority + Organizationally Unique Identifier."; + } + + leaf vpn-index { + when "../ma-name-type = 'RFC2685_VPN_ID'"; + type uint32; + mandatory true; + description + "RFC2685 VPN ID. 3 octet VPN authority Organizationally + Unique Identifier followed by 4 octet VPN index identifying + VPN according to the OUI. + vpn-index is a 4 octet index identifying VPNaccording to the OUI."; + } + + leaf ccm-interval { + description "CCM transmission interval."; + type enumeration { + enum "300MS" { + description "300 milli milliseconds interval."; } + enum "1S" { + description "1 second interval."; } + enum "10S" { + description "10 seconds interval."; } + } + } // end ccm-interval + + leaf loss-threshold { + type uint16; + description "number of consecutive loss frames to trigger a loss event."; + } // end loss-threshold + } // end grouping maintenance-association-config + + grouping remote-mep-config { + description "Configuration for remote MEPS"; + + leaf id { + type oc-cfm-types:mep-id-type; + description "Remote MEP IDs in full mesh."; + reference + "Item a in 12.14.7.6.3, 20.20 of IEEE Std 802.1Q-2022"; + } + + leaf mac-address { + type oc-yang:mac-address; + description "Remote MEP IDs in full mesh."; + reference + "Item d in 12.14.7.6.3, 20.19.7 of IEEE Std 802.1Q-2022"; + } + } // end grouping + + grouping mep-oper-states { + description "Operational state of a MEP"; + + leaf oper-state { + type oc-cfm-types:operational-state-type; + description "Operational state of the MEP."; + } + + leaf interface-state { + type oc-cfm-types:interface-status-type; + description + "The state of the interface last reported by the local MEP in the TLV."; + reference + "[802.1q] 17.5"; + } + + leaf fng-state { + type oc-cfm-types:fng-state-type; + default "FNG_RESET"; + description + "The current state of the MEP Fault Notification Generator + state machine."; + reference + "Item f in 12.14.7.1.3, 20.35 of IEEE Std 802.1Q-2022"; + } + + leaf highest-priority-defect { + type oc-cfm-types:highest-defect-priority-type; + description + "The highest priority defect that has been present since + the MEPs Fault Notification Generator state machine was + last in the FNG_RESET state."; + reference + "Item n in 12.14.7.1.3, 20.35.9 of IEEE Std 802.1Q-2022"; + } + + leaf-list mep-defects { + type oc-cfm-types:mep-defects-type; + max-elements 5; + description + "Vector of boolean error conditions. + Multiple defects can be present at the same time."; + reference + "12.14.7.1.3 of IEEE Std 802.1Q-2022"; + } + + leaf present-rdi { + type boolean; + description + "A boolean value indicating the state of the RDI bit in CCMs + transmitted by this MEP. present-rdi is true if and only if one or more + of the variables someRMEPCCMdefect, someMACstatusDefect, errorCCMdefect, + or xconCCMdefect is true, and if the corresponding priority of that + variable, from mep-defects above, is greater than or equal to the + value of the variable lowestAlarmPri."; + } + + leaf-list config-errors-detected { + type oc-cfm-types:config-error-type; + max-elements 4; + description "Vector of enums of config error detected. i.e. [cfm-leak]"; + } + + leaf error-ccm-last-failure { + type binary { + length "1..128"; + } + description + "The last received CCM that triggered a def-error-ccm + fault."; + reference + "Itemt in 12.14.7.1.3, 20.21.2 of IEEE Std 802.1Q-2022"; + } + uses mep-counters-state; + } // end grouping mep-oper-states. + + grouping mep-counters-state { + description "Counters for a remote MEP"; + container counters { + description + "A collection of mep-related statistics objects."; + leaf mep-ccm-sequence-errors { + type oc-yang:counter64; + mandatory true; + description + "The total number of out-of-sequence CCMs received from + all remote MEPs."; + reference + "Item v in 12.14.7.1.3, 20.16.12 of IEEE Std 802.1Q-2022"; + } + + leaf mep-ccms-sent { + type oc-yang:counter64; + mandatory true; + description + "Total number of CCMs transmitted by the local MEP"; + reference + "Item w in 12.14.7.1.3, 20.10.2 of IEEE Std 802.1Q-2022"; + } + } + } + + grouping rmep-oper-states { + description "Operational state of a MEP"; + + leaf rmep-state { + type oc-cfm-types:remote-mep-state-type; + description + "The operational state of the remote MEP state machine"; + reference + "Item b in 12.14.7.6.3, 20.20 of IEEE Std 802.1Q-2022"; + } + + leaf rmep-failed-ok-time { + type oc-yang:counter32; + description + "The time (SysUpTime) at which the Remote MEP state + machine last entered either the RMEP_FAILED or RMEP_OK + state"; + reference + "Item c in 12.14.7.6.3 of IEEE Std 802.1Q-2022"; + } + leaf mac-address { + type oc-yang:mac-address; + description + "The MAC address of the remote MEP."; + reference + "Item d in 12.14.7.6.3, 20.19.7 of IEEE Std 802.1Q-2022"; + } + + leaf remote-defect-condition { + type boolean; + default false; + description + "State of the RDI bit in the last received CCM (true for + RDI=1), or false if none has been received.;"; + } + + leaf-list config-errors-detected { + type oc-cfm-types:config-error-type; + max-elements 4; + description "Vector of enums for config errors detected. i.e. [cfm-leak]"; + } + + leaf interface-status-tlv { + type oc-cfm-types:interface-status-type; + description + "An enumerated value of the Interface status TLV sent in the last CCM + from the local MEP or the default value no-status-tlv + indicating no CCM has been sent or no Interface Status TLV has + been sent."; + reference + "[802.1q] 17.5"; + } + + leaf port-status-tlv { + type oc-cfm-types:port-status-type; + description + "The enumerated value from the Port Status TLV from the last + CCM received from the remote MEP."; + reference + "[802.1q] 12.14.7.6.3:f"; + } + uses rmep-counters-state; + + } // end grouping mep-oper-states. + + + grouping rmep-counters-state { + description "Counters for a remote MEP"; + container counters { + description + "A collection of rmep-related statistics objects."; + leaf mep-ccm-sequence-errors { + type oc-yang:counter64; + mandatory true; + description + "The total number of out-of-sequence CCMs received from + the remote MEP."; + reference + "Item v in 12.14.7.1.3, 20.16.12 of IEEE Std 802.1Q-2022"; + } + leaf ccms-sent { + type oc-yang:counter64; + mandatory true; + description + "Total number of CCMs transmitted towards the Remote MEP"; + reference + "Item w in 12.14.7.1.3, 20.10.2 of IEEE Std 802.1Q-2022"; + } + } + } + + grouping mep-config { + description "Configuration for a MEP."; + + leaf ccm-enabled { + type boolean; + default "false"; + description + "Indicates whether the MEP can generate CCMs. If TRUE, the + MEP will generate CCM PDUs."; + reference + "Item g in 12.14.7.1.3, 20.10.1 of IEEE Std 802.1Q-2022"; + } + + leaf lowest-priority-defect { + type oc-cfm-types:lowest-alarm-priority-type; + default "MAC_REMOTE_ERROR_XCON"; + description + "The lowest priority defect that is allowed to generate + fault alarms."; + reference + "Item k in 12.14.7.1.3, 20.9.5 of IEEE Std 802.1Q-2022"; + } + + leaf fng-alarm-time { + type uint16 { + range "2500..10000"; + } + units "milliseconds"; + default "2500"; + description + "The time that defect must be present before a Fault Alarm + is issued."; + reference + "Item l in 12.14.7.1.3, 20.35.3 of IEEE Std 802.1Q-2022"; + } + + leaf fng-reset-time { + type uint16 { + range "2500..10000"; + } + units "milliseconds"; + default "10000"; + description + "The time that defects must be absent before resetting a + Fault Alarm."; + reference + "Item m in 12.14.7.1.3, 20.35.4 of IEEE Std 802.1Q-2022"; + } + + leaf local-mep-id { + type oc-cfm-types:mep-id-type; + description "The identifier of a Local MEP. Unique per given MA "; + } // end local-mep-id + + leaf interface { + type leafref { + path "/oc-if:interfaces/oc-if:interface/oc-if:name"; + } + description "Interface directly associated with the MEP id."; + } // end leaf interface + + leaf include-mep-port-status-in-tlv { + type boolean; + default true; + description + "Indicates whether a Port Status TLV is included in CCM frame + transmission. A value of 'true' indicates that the Port Status + TLV is to be included. A value of 'false' indicates that the + Port Status TLV is not to be included."; + reference + "[MEF7.1] 9.2.2"; + } + leaf include-mep-interface-status-in-tlv { + type boolean; + default true; + description + "Indicates whether a Interface Status TLV is included in CCM frame + transmission. A value of 'true' indicates that the Interface Status TLV + is to be included. A value of 'false' indicates that the Interface + Status TLV is not to be included."; + reference + "[MEF7.1] 9.2.2"; + } + + leaf direction { + description "The direction in which the MEP faces on the Bridge/Xconnect + Port. Example, up or down."; + type enumeration { + enum DOWN { + value 1; + description + "Down maintenance point, where CFM protocol messages are + dispatched away from the MAC Relay entity."; + } + enum UP { + value 2; + description + "Up maintenance point, where CFM protocol messages are + dispatched towards the MAC Relay entity."; + } + } + reference + "Item c in 12.14.7.1.3, 19.2 of IEEE Std 802.1Q-2022"; + } + + leaf auto-discovery { + type boolean; + description + "A boolean value to enable or disable auto-discovery. + users must configure explicitly true or false. + If unset, then it’s implementation specific."; + } + } + + grouping cfm-domain-config { + description "Config parameters relating to a CFM Maintenance Domain."; + + leaf md-id { + type oc-cfm-types:name-key-type; + description "The unique identifier for a Maintenance Domain."; + reference + "[802.1q] 12.14.5"; + } + + leaf level { + description "Level of the maintenance domain."; + type uint8 { + range "0..7"; + } + reference + "3.123, Item b in 12.14.5.1.3 of IEEE Std 802.1Q-2022"; + } + + leaf md-name-type { + type enumeration { + enum NONE { + description + "No format specified."; + } + enum DOMAIN_NAME { + description + "Domain Name like string, globally unique text string + derived from a DNS name."; + } + enum MAC_ADDRESS_AND_UINT { + description + "MAC address + 2-octet (unsigned) integer."; + } + enum CHARACTER_STRING { + description + "RFC2579 DisplayString, except that the character + codes 0-31 (decimal) are not used."; + } + } + description + "Type discriminator for the value described in the md 'name' leaf."; + reference + " IEEE8021-CFM-MIB.Dot1agCfmMaintDomainNameType"; + } + + + leaf none { + when "../md-name-type = 'NONE'"; + type boolean; + description + "No format specified, usually because there is not a + Maintenance Domain Name. The Maintenance Domain name + inserted in CFM protocol messages will be a zero length + OCTET string."; + } + + leaf dns-like-name { + when "../md-name-type = 'DOMAIN_NAME'"; + description + "Domain name like string, globally unique text string + derived from a DNS name."; + type string { + length "1..43"; + } + } + + leaf address { + when "../md-name-type = 'MAC_ADDRESS_AND_UINT'"; + type oc-yang:mac-address; + mandatory true; + description + "The MAC address."; + } + leaf unsigned-int { + when "../md-name-type = 'MAC_ADDRESS_AND_UINT'"; + type uint16; + mandatory true; + description + "The additional 2-octet (unsigned) integer."; + } + + leaf char-string { + when "../md-name-type = 'CHARACTER_STRING'"; + description + "The character string name of the Maintenance Domain."; + type string { + length "1..43"; + pattern "[ -~]*"; + oc-ext:posix-pattern '^[ -~]*$'; + } + } + } + + grouping cfm-global-state { + description "Operational parameters relating to a CFM Maintenance Domain."; + + leaf local-meps { + type uint32; + description "The total number of local-meps configured on the local system."; + } + + leaf local-meps-operational { + type uint32; + description "The total number of local-meps operational on the local system."; + } + + leaf cfm-domains { + type uint32; + description "The total number cfm domains configured on the local system."; + } + + leaf cfm-services { + type uint32; + description "The total number cfm services configured on the local system."; + } + + leaf down-meps { + type uint32; + description "The total number cfm down meps configured on the local system."; + } + + leaf up-meps { + type uint32; + description "The total number cfm down meps configured on the local system."; + } + + leaf disabled-misconfigured { + type uint32; + description "The total number of disabled cfm down meps configured on the local system."; + } + + leaf disabled-operational-errors { + type uint32; + description "The total number cfm operational errors on the local system."; + } + + leaf disabled-out-of-resources { + type uint32; + description "The total number cfm endpoints disabled due to lack of resources on the local system."; + } + + leaf peer-meps{ + type uint32; + description "The total number cfm peer meps configured."; + } + + leaf operational-peer-meps { + type uint32; + description + "The total number cfm peer meps operational."; + } + + leaf peer-meps-with-defects { + type uint32; + description "The total number cfm peer meps with defects."; + } + + leaf peer-meps-timed-out { + type uint32; + description "The total number cfm peer meps timed out."; + } + + // End cfm-global-state + } + + grouping delay-measurement-state { + description "Delay measurement state."; + + container delay-measurement-state { + description "Delay measurement state."; + + leaf frame-delay-two-way-min { + type uint32; + units microseconds; + description + "This object contains the minimum two-way frame delay calculated by this + MEP for this Measurement Interval. + + This object is undefined if measurement-type is dm1-transmitted + or dm1-received."; + } + leaf frame-delay-two-way-max { + type uint32; + units microseconds; + description + "This object contains the maximum two-way frame delay calculated by this + MEP for this Measurement Interval. + + This object is undefined if measurement-type is dm1DmTx or + dm1-received."; + } + leaf frame-delay-two-way-average { + type uint32; + units microseconds; + description + "This object contains the average two-way frame delay calculated by this + MEP for this Measurement Interval. + + This object is undefined if measurement-type is dm1-transmitted or + dm1-received."; + } + + leaf frame-delay-two-way-stddev { + type uint32; + units microseconds; + description + "This object contains the standard deviation of two-way frame delay calculated by this + MEP for this Measurement Interval. + + This object is undefined if measurement-type is dm1DmTx or + dm1-received."; + } + uses delay-measurement-counters-state; + } + } + + grouping loss-measurement-state { + description "Loss measurement state grouping."; + + container loss-measurement-state { + description "Loss measurement state container."; + + leaf far-end-min-frame-loss-ratio { + type uint32 { + range "0..100000"; + } + units milli-percent; + description + "This object contains the minimum one-way availability flr in the + egress direction (source --> destination), + from among the set of availability flr values + calculated by the MEP in this Measurement Interval. There is + one availability flr value for each 'delta_t' time period + within the Measurement Interval, as specified in MEF 10.2.1. + + The flr value is a ratio that is expressed as a percent with a + value of 0 (ratio 0.00) through 100000 (ratio 1.00). + + Units are in milli-percent, where 1 indicates 0.001 percent."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCurrentAvailStatsForwardMinFlr"; + } + leaf far-end-max-frame-loss-ratio { + type uint32 { + range "0..100000"; + } + units milli-percent; + description + "This object contains the maximum one-way availability flr in the + forward direction (source --> destination), + from among the set of availability flr + values calculated by the MEP in this Measurement Interval. + There is one availability flr value for each 'delta_t' time + period within the Measurement Interval, as specified in MEF + 10.2.1. + + The flr value is a ratio that is expressed as a percent with a + value of 0 (ratio 0.00) through 100000 (ratio 1.00). + + Units are in milli-percent, where 1 indicates 0.001 percent."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCurrentAvailStatsForwardMaxFlr"; + } + leaf far-end-average-frame-loss-ratio { + + type uint32 { + range "0..100000"; + } + units milli-percent; + + description + "This object contains the average one-way availability flr in the + forward direction, from among the set of availability flr + values calculated by the MEP in this Measurement Interval. + There is one availability flr value for each 'delta_t' time + period within the Measurement Interval, as specified in MEF + 10.2.1. + + The flr value is a ratio that is expressed as a percent with a + value of 0 (ratio 0.00) through 100000 (ratio 1.00). + + Units are in milli-percent, where 1 indicates 0.001 percent."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCurrentAvailStatsForwardAvgFlr"; + } + + leaf near-end-min-frame-loss-ratio { + type uint32 { + range "0..100000"; + } + units milli-percent; + description + "This object contains the minimum one-way availability flr in the + backward direction (destination --> source), + from among the set of availability flr + values calculated by the MEP in this Measurement Interval. + There is one availability flr value for each 'delta_t' time + period within the Measurement Interval, as specified in MEF + 10.2.1. + + The flr value is a ratio that is expressed as a percent with a + value of 0 (ratio 0.00) through 100000 (ratio 1.00). + + Units are in milli-percent, where 1 indicates 0.001 percent."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCurrentAvailStatsBackwardMinFlr"; + } + leaf near-end-max-frame-loss-ratio { + type uint32 { + range "0..100000"; + } + units milli-percent; + description + "This object contains the maximum one-way availability flr in the + backward direction, from among the set of availability flr + values calculated by the MEP in this Measurement Interval. + There is one availability flr value for each 'delta_t' time + period within the Measurement Interval, as specified in MEF + 10.2.1. + + The flr value is a ratio that is expressed as a percent with a + value of 0 (ratio 0.00) through 100000 (ratio 1.00). + Service OAM Performance Monitoring YANG Module + MEF 39 + + Units are in milli-percent, where 1 indicates 0.001 percent."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCurrentAvailStatsBackwardMaxFlr"; + } + + leaf near-end-average-frame-loss-ratio { + + type uint32 { + range "0..100000"; + } + units milli-percent; + + description + "This object contains the average one-way availability flr in the + backward direction, from among the set of availability flr + values calculated by the MEP in this Measurement Interval. + There is one availability flr value for each 'delta_t' time + period within the Measurement Interval, as specified in MEF + 10.2.1. + + The flr value is a ratio that is expressed as a percent with a + value of 0 (ratio 0.00) through 100000 (ratio 1.00). + + Units are in milli-percent, where 1 indicates 0.001 percent."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCurrentAvailStatsBackwardAvgFlr"; + } + + uses loss-measurement-counters-state; + } + } + + grouping loss-measurement-counters-state { + description "Loss-measurement-related measurement counters state."; + + container counters { + description + "A collection of loss-measurement-related statistics objects."; + + leaf slm-sent { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf slm-received { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf slr-sent { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf slr-received { + type oc-yang:counter64; + description "slm Probes sent."; + } + } + } + + grouping delay-measurement-counters-state { + description "Delay measurement counters state."; + + container counters { + description + "A collection of delay-measurement-related statistics objects."; + + leaf dmm-sent { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf dmm-received { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf dmr-sent { + type oc-yang:counter64; + description "slm Probes sent."; + } + + leaf dmr-received { + type oc-yang:counter64; + description "slm Probes sent."; + } + } + } + + grouping performance-measurement-state { + description "Performance measurement state grouping."; + + uses loss-measurement-state; + uses delay-measurement-state; + } + + grouping performance-measurement-config { + description "Performance measurement configuration."; + + leaf profile-name { + type string; + description "Name of the measurement profile."; + } + + leaf enable { + type boolean; + default false; + description "Enable or disable measurement."; + } + + leaf measurement-type { + type enumeration { + enum LMM { + description + "LMM SOAM PDU generated and received LMR responses tracked."; + } + enum SLM { + description + "SLM SOAM PDU generated and received SLR responses tracked."; + } + enum DMM { + description + "DMM SOAM PDU generated and received DMR responses tracked."; + } + enum CCM { + description + "CCM SOAM PDU generated and received CCM PDUs tracked."; + } + } + default SLM; + description + "This object specifies what type of Performance Measurement will be + performed."; + reference + "ITU Y1731"; + } + + leaf protocol-type { + description "protocol type."; + type enumeration { + enum SINGLE_ENDED { + description "single-ended measurement mode."; + } + enum DUAL_ENDED { + description "dual-ended measurement mode."; + } + } + reference + "https://datatracker.ietf.org/doc/html/rfc7456#section-4"; + } + + leaf frame-size { + type uint16; + description "Probe Frame size for measurement."; + } + + leaf measurement-interval { + type uint32 { + range "1..525600"; + } + units "minutes"; + description + "This object specifies the Measurement Interval for FLR statistics, in + minutes. + A Measurement Interval of 15 minutes needs to be supported, + other intervals may be supported."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCfgMeasurementInterval"; + } + + leaf repetition-period { + type uint32; + default 0; + description + "This object specifies a configurable repetition time between + Measurement Intervals in a Measurement session in hundredths of a + second. + + If the value is less than or equal to one Measurement Interval + there is no time gap between the end of one Measurement + Interval and the start of a new Measurement Interval. This is + the normal usage case. + + If the value is greater than one Measurement Interval there is + time gap between the end of one Measurement Interval and the + start of the next Measurement Interval."; + reference + "[MEF SOAM PM IA] R18, D3, R19, R20"; + } + + leaf intervals-archived { + type uint16; + description + "This object specifies the number of completed measurement intervals to + store in the history statistic table. + + At least 32 completed measurement intervals are to be + stored. 96 measurement intervals are recommended to be stored."; + reference + "MEF-SOAM-PM-MIB.mefSoamLmCfgNumIntervalsStored"; + } + + leaf packets-per-meaurement-period { + type uint16; + description "Number of probe packets to send within a measurement interval."; + } + + leaf burst-interval { + type uint32; + units "milliseconds"; + description "Interval between bursts within a measurement interval."; + } + + leaf packet-per-burst { + type uint32; + description + "if burst enabled. The leaf defines the number of packet per burst of probes. + packets-per-measurement-period / burst-interval"; + } + } + + grouping rdi-config { + description "Remote Defect Indication (RDI) configuration."; + + leaf transmit-on-defect { + type boolean; + description "Transmit RDI when a defect is detected."; + } + } + + grouping link-loss-forwarding-config { + description "Link loss forwarding configuration."; + + leaf enable { + type boolean; + description + "Enable propagation of the remote + attachment-circuit link state to the + local attachment-circuit link state"; + } + leaf damping-timer { + type uint64; + units milliseconds; + description + "The damping timer is the amount of time that the local + attachment-circuit link state will be held in the down state + after the remote attachment-circuit link state has been + detected to be up. The damping timer is used to prevent + flapping of the local attachment-circuit link state."; + } + + leaf action { + type enumeration { + enum "SHUTDOWN" { description "Shutdown action on link loss."; } + enum "ALARM" { description "Raise an alarm on link loss."; } + enum "DISABLE_ROUTING" { description "Mark interface non-routable."; } + } + description "Action to take on link loss."; + } + } + + // augment statements + + augment "/oc-oam:oam" { + description + "Add cfm related state and config to oam"; + uses cfm-top; + } +} \ No newline at end of file diff --git a/release/models/oam/openconfig-oam.yang b/release/models/oam/openconfig-oam.yang new file mode 100644 index 000000000..12a755874 --- /dev/null +++ b/release/models/oam/openconfig-oam.yang @@ -0,0 +1,53 @@ +module openconfig-oam { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/oam"; + + prefix "oc-oam"; + import openconfig-extensions { prefix oc-ext; } + + // google + organization "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net"; + + description + "This module defines a YANG data model for configuring and managing + EthernetOAM functions"; + + oc-ext:openconfig-version "0.1.0"; + + revision "2024-09-11" { + description + "Initial revision"; + reference "0.1.0"; + } + + grouping oam-top{ + description + "top level grouping for configuration and operational state parameters relating + to Ethernet OAM"; + + container oam { + description + "Operational state and configuration parameters relating to + Ethernet OAM"; + + container config { + description + "Configuration parameters relating to Ethernet OAM"; + } + container state { + config false; + description + "Operational state parameters relating to Ethernet OAM"; + } + } + } + + uses oam-top; +} \ No newline at end of file diff --git a/release/models/openconfig-extensions.yang b/release/models/openconfig-extensions.yang index 2e0fd9f07..56cc22cbb 100644 --- a/release/models/openconfig-extensions.yang +++ b/release/models/openconfig-extensions.yang @@ -18,7 +18,13 @@ module openconfig-extensions { "This module provides extensions to the YANG language to allow OpenConfig specific functionality and meta-data to be defined."; - oc-ext:openconfig-version "0.5.1"; + oc-ext:openconfig-version "0.6.0"; + + revision "2024-09-19" { + description + "Add telemetry-atomic-exempt annotation."; + reference "0.6.0"; + } revision "2022-10-05" { description @@ -154,7 +160,7 @@ module openconfig-extensions { extension telemetry-atomic { description "The telemetry-atomic annotation is specified in the context of - a subtree (containre, or list), and indicates that all nodes + a subtree (container, or list), and indicates that all nodes within the subtree are always updated together within the data model. For example, all elements under the subtree may be updated as a result of a new alarm being raised, or the arrival of a new @@ -164,6 +170,23 @@ module openconfig-extensions { optimisations for sending or storing the corresponding data."; } + extension telemetry-atomic-exempt { + description + "The telemetry-atomic-exempt annotation is specified in the context + of a node or subtree (container, or list), and indicates that the node + or all nodes within the subtree are not always updated together within + the data model of the parent tree. All elements under the subtree may + not be updated as a result of a new alarm being raised, or the arrival + of a new protocol message that updates the parent tree. + + This annotation allows parent tree containers with telemetry-atomic + annotation to not be updated when a more frequently updated node or + subtree. For example, a counters container is present. + + This extension should only be used when there is a parent that + contains telemetry-atomic extension."; + } + extension operational { description "The operational annotation is specified in the context of a diff --git a/release/models/optical-transport/openconfig-transport-types.yang b/release/models/optical-transport/openconfig-transport-types.yang index 7c3c6a481..34e2f8a65 100644 --- a/release/models/optical-transport/openconfig-transport-types.yang +++ b/release/models/optical-transport/openconfig-transport-types.yang @@ -22,7 +22,13 @@ module openconfig-transport-types { "This module contains general type definitions and identities for optical transport models."; - oc-ext:openconfig-version "1.0.0"; + oc-ext:openconfig-version "1.1.0"; + + revision "2024-11-21" { + description + "Add PROT_OTSI_A protocol type."; + reference "1.1.0"; + } revision "2024-07-24" { description @@ -855,6 +861,14 @@ module openconfig-transport-types { "FlexO protocol as defined in ITU-T G.709.1 and ITU-T G.709.3"; } + identity PROT_OTSI_A { + base TRIBUTARY_PROTOCOL_TYPE; + description + "OTSI_A is the digital adaptation between the OTSi and the + FlexO-x, or the regenerator section layer of the FlexO"; + reference "ITU-T G.798"; + } + identity PROT_ODUFLEX_GFP { base TRIBUTARY_PROTOCOL_TYPE; description "ODU Flex with GFP protocol"; diff --git a/release/models/platform/openconfig-platform-transceiver.yang b/release/models/platform/openconfig-platform-transceiver.yang index 81a6e7031..5a43801fe 100644 --- a/release/models/platform/openconfig-platform-transceiver.yang +++ b/release/models/platform/openconfig-platform-transceiver.yang @@ -66,15 +66,27 @@ module openconfig-platform-transceiver { specify a physical-channel within a TRANSCEIVER component (i.e. gray optic) that it is associated with."; - oc-ext:openconfig-version "0.14.0"; + oc-ext:openconfig-version "0.16.0"; -revision "2023-08-30" { + revision "2024-10-09" { + description + "Add status flags for transceiver host lanes and media channels."; + reference "0.16.0"; + } + + revision "2024-09-21" { + description + "Clearly define how physical channel power leaves are used."; + reference "0.15.0"; + } + + revision "2023-08-30" { description "Clarify transceiver module threshold for input-power."; reference "0.14.0"; } -revision "2023-08-30" { + revision "2023-08-30" { description "Add transceiver module temperature thresholds"; reference "0.13.0"; @@ -204,7 +216,11 @@ revision "2023-08-30" { Values include the instantaneous, average, minimum, and maximum statistics. If avg/min/max statistics are not supported, the target is expected to just supply the - instant value"; + instant value. In some cases, such as when the physical + channel has a leafref to an optical channel component and the + module-functional-type is TYPE_DIGITAL_COHERENT_OPTIC this + grouping will NOT be used as the data will be within the + optical-channel"; uses oc-types:avg-min-max-instant-stats-precision2-dBm; } @@ -221,7 +237,12 @@ revision "2023-08-30" { Values include the instantaneous, average, minimum, and maximum statistics. If avg/min/max statistics are not supported, the target is expected to just supply the - instant value"; + instant value. When the physical channel has a leafref to + an optical channel component and the module-functional-type is + TYPE_DIGITAL_COHERENT_OPTIC this represents the aggregate + total optical power value (signal and noise) whereas + optical power value within the optical-channel represents + the signal power"; uses oc-types:avg-min-max-instant-stats-precision2-dBm; } @@ -233,7 +254,11 @@ revision "2023-08-30" { with up to two decimal precision. Values include the instantaneous, average, minimum, and maximum statistics. If avg/min/max statistics are not supported, the target is - expected to just supply the instant value"; + expected to just supply the instant value. In some cases, + such as when the physical channel has a leafref to an optical + channel component and the module-functional-type is + TYPE_DIGITAL_COHERENT_OPTIC this grouping will NOT be used + as the data will be within the optical-channel"; uses oc-types:avg-min-max-instant-stats-precision2-mA; } @@ -251,7 +276,11 @@ revision "2023-08-30" { "The frequency in MHz of the individual physical channel (e.g. ITU C50 - 195.0THz and would be reported as 195,000,000 MHz in this model). This attribute is not - configurable on most client ports."; + configurable on most client ports In some cases, such as when + the physical channel has a leafref to an optical channel + component and the module-functional-type is + TYPE_DIGITAL_COHERENT_OPTIC this grouping will NOT be used + as the data will be within the optical-channel."; } } @@ -384,23 +413,28 @@ revision "2023-08-30" { uses oc-opt-types:avg-min-max-instant-stats-precision2-pct; } - uses physical-channel-state-extended { - when "../../../state/module-functional-type = 'oc-opt-types:TYPE_STANDARD_OPTIC'" { - description - "When the physical channel is of TYPE_STANDARD_OPTIC, the - extended state will be used"; - } + leaf tx-failure { + type boolean; + description + "Transmitter failure flag. + In earlier standards, including SFF-8436, SFF-8472, and QSFP-DD CMIS 4.0, + this flag was named Tx Fault."; + reference "QSFP-DD CMIS 5.0 Table 8-77, SFF-8472 Table 9-11, SFF-8436 Table 19"; } - } - grouping physical-channel-state-extended { - description - "Extended operational state data for physical client channels - for applications where the full physical channel config and - state are used. In some cases, such as when the physical - channel has a leafref to an optical channel component and the - module-functional-type is TYPE_DIGITAL_COHERENT_OPTIC this - grouping will NOT be used."; + leaf rx-los { + type boolean; + description + "Receiver loss-of-signal flag."; + reference "QSFP-DD CMIS 5.0 Table 8-78, SFF-8472 Table 9-11, SFF-8436 Table 19"; + } + + leaf rx-cdr-lol { + type boolean; + description + "Receiver clock-and-data-recovery loss-of-lock flag."; + reference "QSFP-DD CMIS 5.0 Table 8-78"; + } uses output-optical-frequency; uses optical-power-state; @@ -450,6 +484,83 @@ revision "2023-08-30" { } } + grouping host-lane-config { + description + "Configuration data for electrical host lanes."; + + leaf lane-number { + type uint8 { + range 1..max; + } + description + "Number identifying an electrical host lane carrying one serial + signal. Lanes are numbered starting with 1."; + reference "CMIS 5.0 section 2.3.4"; + } + } + + grouping host-lane-state { + description + "Operational state data for electrical host lanes."; + + leaf tx-los { + type boolean; + description + "Transmitter loss-of-signal flag."; + reference "CMIS 5.0 Table 8-77, SFF-8436 Table 19"; + } + + leaf tx-cdr-lol { + type boolean; + description + "Transmitter clock-and-data-recovery loss-of-lock flag."; + reference "CMIS 5.0 Table 8-77"; + } + } + + grouping host-lane-top { + description + "Top-level grouping for electrical host lanes."; + + container host-lanes { + description + "Enclosing container for host lanes."; + + list lane { + key "lane-number"; + description + "List of electrical host lanes, keyed by lane number. + The host lanes of a transceiver constitute its electrical interface + with the host system."; + reference "CMIS 5.0 section 4.1"; + + leaf lane-number { + type leafref { + path "../config/lane-number"; + } + description + "Reference to the host lane number."; + } + + container config { + description + "Configuration data for host lanes."; + + uses host-lane-config; + } + + container state { + config false; + description + "Operational state data for host lanes."; + + uses host-lane-config; + uses host-lane-state; + } + } + } + } + grouping transceiver-threshold-top { description "Top-level grouping for transceiver alarm thresholds for @@ -921,6 +1032,7 @@ revision "2023-08-30" { // physical channels are associated with a transceiver // component uses physical-channel-top; + uses host-lane-top; uses transceiver-threshold-top; } } diff --git a/release/models/platform/openconfig-platform-types.yang b/release/models/platform/openconfig-platform-types.yang index 88b0ef521..e2a1aacb6 100644 --- a/release/models/platform/openconfig-platform-types.yang +++ b/release/models/platform/openconfig-platform-types.yang @@ -22,9 +22,15 @@ module openconfig-platform-types { "This module defines data types (e.g., YANG identities) to support the OpenConfig component inventory model."; - oc-ext:openconfig-version "1.8.0"; + oc-ext:openconfig-version "1.9.0"; + revision "2024-11-04" { + description + "Add FAN_TRAY_CONTROLLER"; + reference "1.9.0"; + } + revision "2024-04-30" { description "Add FAN_TRAY"; @@ -339,6 +345,12 @@ module openconfig-platform-types { "Contains multiple fans that work in unison to cool the router components."; } + identity FAN_TRAY_CONTROLLER { + base OPENCONFIG_HARDWARE_COMPONENT; + description + "Controls the fan trays."; + } + identity SENSOR { base OPENCONFIG_HARDWARE_COMPONENT; description diff --git a/release/models/ptp/.spec.yml b/release/models/ptp/.spec.yml new file mode 100644 index 000000000..ff369d9e3 --- /dev/null +++ b/release/models/ptp/.spec.yml @@ -0,0 +1,8 @@ +- name: openconfig-ptp + docs: + - yang/ptp/openconfig-ptp-types.yang + - yang/ptp/openconfig-ptp.yang + build: + - yang/ptp/openconfig-ptp-types.yang + - yang/ptp/openconfig-ptp.yang + run-ci: true diff --git a/release/models/ptp/openconfig-ptp-types.yang b/release/models/ptp/openconfig-ptp-types.yang new file mode 100644 index 000000000..943569639 --- /dev/null +++ b/release/models/ptp/openconfig-ptp-types.yang @@ -0,0 +1,299 @@ +module openconfig-ptp-types { + + yang-version "1"; + + // namespace + namespace "http://openconfig.net/yang/ptp-types"; + + prefix "oc-ptp-types"; + + import openconfig-extensions { + prefix oc-ext; + } + + // meta + organization + "OpenConfig working group"; + + contact + "OpenConfig working group + www.openconfig.net "; + + description + "This module defines types and identities used in OpenConfig + models related to Precision Time Protocol (PTP). + + IEEE code is subject to the following copyright and license: + Copyright (c) 2020 by The Institute of Electrical and Electronics + Engineers, Inc. All rights reserved."; + + oc-ext:openconfig-version "1.0.0"; + + revision 2024-09-17 { + description + "Initial Public Version"; + reference "1.0.0"; + } + + // extension statements + + // feature statements + + // identity statements + + identity TIME_SOURCE { + description + "Enumeration for the source of time used by the Grandmaster + PTP Instance. + YANG identity is used so that a PTP Profile's YANG augment + can assign values, using numeric range F0 to FE hex."; + reference + "7.6.2.8 of IEEE Std 1588-2019"; + } + + identity CLOCK_CLASS { + description + "Enumeration that denotes the traceability, synchronization + state and expected performance of the time or frequency + distributed by the Grandmaster PTP Instance. + IEEE Std 1588 does not specify a name for each clock-class, + but the names below are intended to be as intuitive as possible. + YANG identity is used so that a PTP Profile's YANG augment + can assign values using a numeric range designated for use by + alternate PTP Profiles."; + reference + "7.6.2.5 of IEEE Std 1588-2019"; + } + + identity CLOCK_ACCURACY { + description + "Enumeration that indicates the expected accuracy of a + PTP Instance when it is the Grandmaster PTP Instance, + or in the event it becomes the Grandmaster PTP Instance. + The value shall be conservatively estimated by the PTP + Instance to a precision consistent with the value of the + selected clock-accuracy and of the next lower enumerated + value, for example, for clockAccuracy = 23 hex, between + 250 ns and 1000 ns. + IEEE Std 1588 does not specify a name for each clock-accuracy, + but the names below are intended to be as intuitive as possible. + YANG identity is used so that a PTP Profile's YANG augment + can assign values, using numeric range 80 to FD hex."; + reference + "7.6.2.6 of IEEE Std 1588-2019"; + } + + typedef clock-identity { + type string { + pattern "[0-9A-F]{2}(-[0-9A-F]{2}){7}"; + oc-ext:posix-pattern '^[0-9A-F]{2}(-[0-9A-F]{2}){7}$'; + } + description + "Identifies unique entities within a PTP Network, + e.g. a PTP Instance or an entity of a common service. + The identity is an 8-octet array, constructed according + to specifications in IEEE Std 1588, using an + organization identifier from the IEEE Registration + Authority. + Each octet is represented in YANG as a pair of + hexadecimal characters, using uppercase for a letter. + Each octet in the array is separated by the dash + character."; + reference + "5.3.4 of IEEE Std 1588-2019 + 7.5.2.2 of IEEE Std 1588-2019"; + } + + typedef time-interval { + type int64; + description + "Time interval, expressed in nanoseconds, multiplied by 2^16. + Positive or negative time intervals outside the maximum range + of this data type shall be encoded as the largest positive and + negative values of the data type, respectively."; + reference + "5.3.2 of IEEE Std 1588-2019"; + } + +typedef instance-type { + type enumeration { + enum OC { + value 0; + description + "Ordinary Clock"; + } + enum BC { + value 1; + description + "Boundary Clock"; + } + enum P2P_TC { + value 2; + description + "Peer-to-peer Transparent Clock"; + } + enum E2E_TC { + value 3; + description + "End-to-end Transparent Clock"; + } + } + description + "Enumeration for the type of PTP Instance. + Values for this enumeration are specified by the IEEE 1588 + standard exclusively."; + reference + "8.2.1.5.5 of IEEE Std 1588-2019"; + } + + + typedef unicast-multicast-enumeration { + type enumeration { + enum UNICAST { + value 1; + description + "unicast"; + } + enum MULTICAST { + value 2; + description + "multicast"; + } + } + description + "Type definition for options when setting the unicast-multicast + attribute in the default data set"; + } + + typedef delay-mechanism-enumeration { + type enumeration { + enum E2E { + value 1; + description + "The port uses the delay request-response mechanism."; + } + enum P2P { + value 2; + description + "The port uses the peer delay mechanism."; + } + enum DISABLED { + value 254; + description + "The port does not implement any delay mechanism."; + } + } + description + "The propagation-delay measuring option used by the + port. Values for this enumeration are specified + by the IEEE Std 1588 standard exclusively."; + reference + "IEEE Std 1588-2008: 8.2.5.4.4"; + } + + typedef port-state-enumeration { + type enumeration { + enum INITIALIZING { + value 1; + description + "The port is initializing its data sets, hardware, and + communication facilities."; + } + enum FAULTY { + value 2; + description + "The port is in the fault state."; + } + enum DISABLED { + value 3; + description + "The port is disabled and is not communicating PTP + messages (other than possibly PTP management + messages)."; + } + enum LISTENING { + value 4; + description + "The port is listening for an Announce message."; + } + enum PRE_MASTER { + value 5; + description + "The port is in the pre-master state."; + } + enum MASTER { + value 6; + description + "The port is behaving as a master port."; + } + enum PASSIVE { + value 7; + description + "The port is in the passive state."; + } + enum UNCALIBRATED { + value 8; + description + "A master port has been selected, but the port is still + in the uncalibrated state."; + } + enum SLAVE { + value 9; + description + "The port is synchronizing to the selected master port."; + } + } + description + "The current state of the protocol engine associated + with the port. Values for this enumeration are specified + by the IEEE Std 1588 standard exclusively."; + reference + "IEEE Std 1588-2008: 8.2.5.3.1, 9.2.5"; + } + + typedef network-transport-enumeration { + type enumeration { + enum L2 { + value 1; + description + "Layer 2 network"; + } + enum UDPV4 { + value 2; + description + "UDPv4 network"; + } + enum UDPV6 { + value 3; + description + "UDPv6 network"; + } + } + description + "Type definition for options when setting the network transport + attribute in the default data set"; + } + + typedef domain-profile-enumeration { + type enumeration { + enum IEEE1588 { + value 1; + description + "default profile"; + } + enum G8275.1 { + value 2; + description + "g8275.1 profile"; + } + enum G8275.2 { + value 3; + description + "g8275.2 profile"; + } + } + description + "Type definition for options when setting the domain-profile + attribute in the default data set"; + } +} diff --git a/release/models/ptp/openconfig-ptp.yang b/release/models/ptp/openconfig-ptp.yang new file mode 100644 index 000000000..8c2a4c714 --- /dev/null +++ b/release/models/ptp/openconfig-ptp.yang @@ -0,0 +1,1198 @@ +module openconfig-ptp { + + yang-version "1"; + + namespace "http://openconfig.net/yang/ptp"; + + prefix "oc-ptp"; + + import ietf-interfaces { prefix if; } + import openconfig-extensions { prefix oc-ext; } + import openconfig-ptp-types { prefix oc-ptp-types; } + + organization + "OpenConfig working group"; + contact + "OpenConfig working group + www.openconfig.net "; + description + "This YANG module defines a data model for the configuration + and state of IEEE Std 1588 clocks. IEEE Std 1588 specifies the + Precision Time Protocol (PTP). + + The nodes in this YANG module are designed for compatibility + with ietf-ptp.yang, the YANG data model for IEEE Std 1588-2008, + as specified in IETF RFC 8575. + + NOTE regarding default value: + PTP's concept of 'initialization value' is analogous to YANG's + concept of a 'default value'. According to 8.1.3.4 of + IEEE Std 1588-2019, the initialization value for configuration + is specified in IEEE Std 1588, but that value can be overridden + by a PTP Profile specification, or by the product that + implements PTP. This makes it challenging to repeat the + specification of initialization value using a YANG 'default' + statement, because there is no straightforward mechanism for + a PTP Profile's (or product's) YANG module to import this + module and override its YANG default. Since a YANG management + client can read the default value from the operational + datastore, there is no need to re-specify the default in YANG. + The implementer of PTP refers to the relevant PTP + specifications for the default (not YANG modules). + Therefore, this YANG module avoids use of the YANG 'default' + statement. + + NOTE regarding IEEE Std 1588 classification: + 8.1.2 of IEEE Std 1588-2019 specifies a classification of + each data set member, which corresponds to a leaf in YANG. + The relationship between 1588 classification and + YANG 'config' (i.e., whether the leaf is read-write) is: + - 1588 static: The leaf is 'config false' (read-only). + - 1588 configurable: The leaf is 'config true', which is + the default value for a YANG leaf. + - 1588 dynamic: A judgement is made on a member-by-member + basis. If the member corresponds to the first item of + 8.1.2.1.2 of IEEE Std 1588-2019 (i.e., value from protocol + only, such as log of protocol behavior), the YANG leaf + is 'config false'. Otherwise, the member's value can be + provided by an entity outside PTP (e.g., NETCONF or + RESTCONF client), and therefore the YANG leaf is + 'config true'. + + NOTE regarding terminology (two YANG modules): + To accommodate the need by some organizations to use the + original terminology specified by IEEE Std 1588, and the + need by some other organizations to use the alternative + terminology specified in 4.4 of IEEE Std 1588g-2022, + two YANG modules are provided by IEEE Std 1588e (MIB and + YANG Data Models). For a detailed explanation, see 15.4.2.11 + of IEEE Std 1588e. + This module uses the original terminology specified by + IEEE Std 1588 (master/slave). + + IEEE code is subject to the following copyright and license: + Copyright (c) 2020 by The Institute of Electrical and Electronics + Engineers, Inc. All rights reserved."; + + oc-ext:openconfig-version "1.0.0"; + + revision 2024-09-17 { + description + "Initial revision. IEEE Std 1588e-XXXX, IEEE Standard for a Precision + Clock Synchronization Protocol for Networked Measurement and Control + Systems - MIB and YANG Data Models."; + reference + "1.0.0"; + } + + grouping instance-config { + description + "Config state data of an instance of the PTP"; + + leaf id { + type uint32; + description + "The instance list is indexed using a number that is unique per PTP + Instance within the PTP Node, applicable to the management context + only (i.e. not used in PTP messages). The domain-number of the PTP + Instance is not used as the key to instance-list, since it is possible + for a PTP Node to contain multiple PTP Instances using the same + domain-number."; + reference + "8.1.4.2 of IEEE Std 1588-2019"; + } + } + + grouping instance-state { + description + "Operational state data of an instance of the PTP"; + + uses instance-config; + } + + grouping current-ds-state { + description + "Provides current data from operation of the protocol."; + reference + "8.2.2 of IEEE Std 1588-2019"; + + leaf steps-removed { + type uint16; + config false; + description + "The number of PTP Communication Paths traversed + between this PTP Instance and the Grandmaster + PTP Instance."; + reference + "8.2.2.2 of IEEE Std 1588-2019"; + } + + leaf offset-from-master { + type oc-ptp-types:time-interval; + config false; + description + "The current value of the time difference between + a Master PTP Instance and a Slave PTP Instance as + computed by the Slave PTP Instance. + NOTE - When a PTP Profile requires a Boundary + Clock to transfer offset information internally + from Slave PTP Port to Master PTP Port(s), this value + effectively returns the offset from the Grandmaster + PTP Instance."; + reference + "8.2.2.3 of IEEE Std 1588-2019"; + } + + leaf mean-path-delay { + type oc-ptp-types:time-interval; + config false; + status deprecated; + description + "In IEEE Std 1588-2008, currentDS.meanDelay was called + currentDS.meanPathDelay. While the specification of + this member is retained in the current standard, the + member is renamed to currentDS.meanDelay. This change + is consistent with other changes that ensure clarity + and consistency of naming, where + - 'path' is associated with the + request-response mechanism + - 'link' is associated with the + peer-to-peer delay mechanism"; + reference + "8.2.2.4 of IEEE Std 1588-2008"; + } + } + + grouping time-properties-ds-state { + description + "Provides data learned from the current Grandmaster PTP Instance."; + reference + "8.2.4 of IEEE Std 1588-2019"; + leaf current-utc-offset { + when "../current-utc-offset-valid='true'"; + type int16; + description + "Specified as in IERS Bulletin C, this provides + the offset from UTC (TAI - UTC). The offset is in + units of seconds."; + reference + "7.2.4 of IEEE Std 1588-2019 + 8.2.4.2 of IEEE Std 1588-2019"; + } + + leaf current-utc-offset-valid { + type boolean; + description + "The value of current-utc-offset-valid shall be true + if the values of current-utc-offset, leap59, and leap61 + are known to be correct, otherwise it shall be false. + NOTE - The constraint for leap59 and leap61 did not + exist in IEEE Std 1588-2008, and for compatibility, + corresponding when statements were not included below."; + reference + "8.2.4.3 of IEEE Std 1588-2019"; + } + + leaf leap59 { + type boolean; + description + "If the timescale is PTP, a true value for leap59 + shall indicate that the last minute of the + current UTC day contains 59 seconds. + If the timescale is not PTP, the value shall be + false."; + reference + "8.2.4.4 of IEEE Std 1588-2019"; + } + + leaf leap61 { + type boolean; + description + "If the timescale is PTP, a true value for leap61 shall indicate + that the last minute of the current UTC day contains 61 seconds. + If the timescale is not PTP, the value shall be false."; + reference + "8.2.4.5 of IEEE Std 1588-2019"; + } + + leaf time-traceable { + type boolean; + description + "The value of time-traceable shall be true if the timescale is + traceable to a primary reference; otherwise, the value shall be + false. The uncertainty specifications appropriate to the + evaluation of whether traceability to a primary reference is + achieved should be defined in the applicable PTP Profile. In + the absence of such a definition the value of time-traceable is + implementation specific."; + reference + "8.2.4.6 of IEEE Std 1588-2019"; + } + + leaf frequency-traceable { + type boolean; + description + "The value of time-traceable shall be true if the frequency + determining the timescale is traceable to a primary reference; + otherwise, the value shall be false. + The uncertainty specifications appropriate to the evaluation + of whether traceability to a primary reference is achieved + should be defined in the applicable PTP Profile. In the absence + of such a definition the value of frequency-traceable is + implementation specific."; + reference + "8.2.4.7 of IEEE Std 1588-2019"; + } + + leaf ptp-timescale { + type boolean; + description + "If ptp-timescale is true, the timescale of the Grandmaster PTP + Instance is PTP, which is the elapsed time since the PTP epoch + measured using the second defined by International Atomic Time (TAI). + If ptp-timescale is false, the timescale of the Grandmaster PTP + Instance is ARB, which is the elapsed time since an arbitrary epoch."; + reference + "7.2.1 of IEEE Std 1588-2019 + 8.2.4.8 of IEEE Std 1588-2019"; + } + + leaf time-source { + type identityref { + base oc-ptp-types:TIME_SOURCE; + } + description + "The source of time used by the Grandmaster + PTP Instance."; + reference + "7.6.2.8 of IEEE Std 1588-2019 + 8.2.4.9 of IEEE Std 1588-2019"; + } + } + + grouping default-ds-config { + description + "Config state data of default data set of the clock"; + + leaf priority1 { + type uint8; + description + "The IEEE Std 1588 priority1 of the PTP Instance. + Since priority1 is one of the first comparisons + performed by the Best Master Clock Algorithm (BMCA), + this leaf's configuration can be used to explicitly + select a Grandmaster PTP Instance. + Lower values take precedence. + The value of priority1 shall be configurable to any + value in the range 0 to 255, unless restricted by + limits established by the applicable PTP Profile."; + reference + "7.6.2.3 of IEEE Std 1588-2019 + 8.2.1.4.1 of IEEE Std 1588-2019"; + } + leaf priority2 { + type uint8; + description + "The IEEE Std 1588 priority2 of the PTP Instance. + The priority2 member is compared by the Best Master + Clock Algorithm (BMCA) after priority1 and clockQuality. + Lower values take precedence. + The value of priority2 shall be configurable to any + value in the range 0 to 255, unless restricted by + limits established by the applicable PTP Profile."; + reference + "7.6.2.4 of IEEE Std 1588-2019 + 8.2.1.4.2 of IEEE Std 1588-2019"; + } + leaf domain-number { + type uint8; + description + "The IEEE Std 1588 domainNumber of the PTP Instance. + A domain consists of one or more PTP Instances + communicating with each other as defined by the + protocol. A domain shall define the scope of PTP message + communication, state, operations, data sets, and + timescale. Therefore, each domain represents a distinct + time. + Within a PTP Network, a domain is identified by two + data set members: domainNumber and sdoId. + The domainNumber is the primary mechanism for end users + and system integrators to isolate the operation of a + PTP Instance from PTP messages used in other domains. + The value of the domainNumber shall be configurable + to values permitted in IEEE Std 1588, unless the + allowed values are further restricted by the applicable + PTP Profile."; + reference + "7.1 of IEEE Std 1588-2019 + 8.2.1.4.3 of IEEE Std 1588-2019"; + } + leaf slave-only { + type boolean; + description + "The value of slave-only shall be true if the + PTP Instance is a slave-only PTP Instance + (false for non-slave-only). + The slave-only member can be true for Ordinary Clocks + only. + When slave-only is true, the PTP Instance implements + special behavior in the context of the state machines + that determine port-state."; + reference + "8.2.1.4.4 of IEEE Std 1588-2019 + 9.2.2.1 of IEEE Std 1588-2019"; + } + + leaf instance-type { + type oc-ptp-types:instance-type; + description + "The type of PTP Instance. + This leaf is read-only unless support for write is + explicitly specified by the applicable PTP Profile or + product specification."; + reference + "8.2.1.5.5 of IEEE Std 1588-2019"; + } + + leaf sdo-id { + type uint16 { + range "0..4095"; + } + description + "The IEEE Std 1588 sdoId of the PTP Instance. + A domain consists of one or more PTP Instances + communicating with each other as defined by the + protocol. A domain shall define the scope of PTP message + communication, state, operations, data sets, and + timescale. Therefore, each domain represents a distinct + time. + Within a PTP Network, a domain is identified by two + data set members: domainNumber and sdoId. + The sdoId of a domain is a 12-bit integer in the + closed range 0 to 4095. + The sdoId member is the primary mechanism for providing + isolation of PTP Instances operating a PTP Profile + specified by a Standards Development Organization (SDO), + from other PTP Instances operating a PTP Profile + specified by a different SDO."; + reference + "7.1 of IEEE Std 1588-2019 + 8.2.1.4.5 of IEEE Std 1588-2019 + 16.5 of IEEE Std 1588-2019"; + } + leaf network-transport { + type oc-ptp-types:network-transport-enumeration; + description + "The network transport used for communication"; + } + leaf unicast-multicast { + type oc-ptp-types:unicast-multicast-enumeration; + description + "Whether the network transport uses unicast or + multicast communication"; + } + leaf domain-profile { + type oc-ptp-types:domain-profile-enumeration; + description + "The method to be used when comparing data sets during + the Best Master Clock Algorithm."; + } + } + + grouping clock-quality-top { + description + "Quality of a PTP Instance, which contains IEEE Std 1588 + clockClass, clockAccuracy and offsetScaledLogVariance. + PTP Instances with better quality are more likely to + become the Grandmaster PTP Instance."; + reference + "5.3.7 of IEEE Std 1588-2019 + 8.2.1.3.1 of IEEE Std 1588-2019"; + + leaf clock-class { + type identityref { + base oc-ptp-types:CLOCK_CLASS; + } + description + "The clockClass denotes the traceability of the time + or frequency distributed by the clock."; + reference + "7.6.2.5 of IEEE Std 1588-2019 + 8.2.1.3.1.2 of IEEE Std 1588-2019"; + } + + leaf clock-accuracy { + type identityref { + base oc-ptp-types:CLOCK_ACCURACY; + } + description + "The clockAccuracy indicates the accuracy of the clock + (Local Clock of the PTP Instance)."; + reference + "7.6.2.6 of IEEE Std 1588-2019 + 8.2.1.3.1.3 of IEEE Std 1588-2019"; + } + + leaf offset-scaled-log-variance { + type uint16; + description + "The offsetScaledLogVariance indicates the stability of the + clock (Local Clock of the PTP Instance). It provides an + estimate of the variations of the clock from a linear timescale + when it is not synchronized to another clock using the + protocol."; + reference + "7.6.2.7 of IEEE Std 1588-2019"; + } + } + + grouping default-ds-state { + description + "Operational state data of default data set of the clock"; + uses default-ds-config; + + leaf two-step-flag { + type boolean; + description + "When set to true, the PTP Instance is two-step, + otherwise the PTP Instance is one-step. + This data set member is no longer used. However, + the twoStepFlag of the PTP common header is used. + One step or two step egress behavior is allowed to + be specified per PTP Port, or per PTP Instance. + Management of the one/two step egress behavior of + a PTP Port is not provided by this standard, but + can be specified as extensions to the data sets by a + PTP Profile or a product specification."; + reference + "8.2.1.2.1 of IEEE Std 1588-2019"; + } + + leaf clock-identity { + type oc-ptp-types:clock-identity; + description + "The IEEE Std 1588 clockIdentity of the PTP Instance."; + reference + "8.2.1.2.2 of IEEE Std 1588-2019"; + } + + leaf number-ports { + type uint16; + description + "The number of PTP Ports on the PTP Instance. + For an Ordinary Clock, the value shall be one."; + reference + "8.2.1.2.3 of IEEE Std 1588-2019"; + } + } + + grouping default-ds-top { + description + "Top-level grouping for default data sets of the clock, + including configuration and operational state data"; + + container default-ds { + description + "The default data set of the PTP Instance."; + reference + "8.2.1 of IEEE Std 1588-2019"; + + container clock-quality { + description + "The IEEE Std 1588 clockQuality of the PTP Instance. + PTP Instances with better quality are more likely to + become the Grandmaster PTP Instance."; + reference + "8.2.1.3.1 of IEEE Std 1588-2019"; + + container config { + description + "Config state data of clock-quality"; + uses clock-quality-top; + } + container state { + config false; + description + "Operational state data of clock-quality"; + uses clock-quality-top; + } + } + container config { + description + "Config state data of default data set of the clock"; + uses default-ds-config; + } + container state { + config false; + description + "Operational state data of default data set of the clock"; + uses default-ds-state; + } + } + } + + grouping port-identity { + description + "The IEEE Std 1588 PortIdentity type identifies a + PTP Port or Link Port."; + reference + "5.3.5 of IEEE Std 1588-2019"; + + leaf clock-identity { + type oc-ptp-types:clock-identity; + description + "IEEE Std 1588 clockIdentity."; + } + + leaf port-number { + type uint16; + description + "IEEE Std 1588 portNumber. + If portNumber is unavailable, the value 0 can + be used, or this leaf can be omitted from the + operational datastore."; + reference + "7.5.2.3 of IEEE Std 1588-2019"; + } + } + + grouping parent-ds-state { + description + "The parent data set of the clock (see IEEE Std 1588-2008 + subclause 8.2.3)."; + reference + "IEEE Std 1588-2008: 8.2.3"; + + container parent-port-identity { + description + "The IEEE Std 1588 portIdentity of the PTP Port on the + Master PTP Instance that issues the Sync messages + used in synchronizing this PTP Instance."; + reference + "8.2.3.2 of IEEE Std 1588-2019"; + uses port-identity; + } + + leaf parent-stats { + type boolean; + description + "When set to true, the values of + parent-ds/observed-parent-offset-scaled-log-variance + and + parent-ds/observed-parent-clock-phase-change-rate + have been measured and are valid."; + reference + "8.2.3.3 of IEEE Std 1588-2019"; + } + + leaf observed-parent-offset-scaled-log-variance { + type uint16; + description + "Estimate of the variance of the phase offset of the + Local PTP Clock of the Parent PTP Instance as measured + with respect to the Local PTP Clock in the Slave PTP + Instance. This measurement is optional, but if not made, + the value of parent-ds/parent-stats shall be false."; + reference + "7.6.3.3 of IEEE Std 1588-2019 + 7.6.3.5 of IEEE Std 1588-2019 + 8.2.3.4 of IEEE Std 1588-2019"; + } + + leaf observed-parent-clock-phase-change-rate { + type int32; + description + "Estimate of the phase change rate of the + Local PTP Clock of the Parent PTP Instance as measured + by the Slave PTP Instance using its Local PTP Clock. + If the estimate exceeds the capacity of its data type, + this value shall be set to 7FFF FFFF (base 16) or + 8000 0000 (base 16), as appropriate. A positive sign + indicates that the phase change rate in the + Parent PTP Instance is greater than that in the + Slave PTP Instance. The measurement of this value is + optional, but if not measured, the value of + parent-ds/parent-stats shall be false."; + reference + "7.6.4.4 of IEEE Std 1588-2019 + 8.2.3.5 of IEEE Std 1588-2019"; + } + + leaf grandmaster-identity { + type oc-ptp-types:clock-identity; + description + "The IEEE Std 1588 clockIdentity of the Grandmaster PTP + Instance."; + reference + "8.2.3.6 of IEEE Std 1588-2019"; + } + + container grandmaster-clock-quality { + description + "The IEEE Std 1588 clockQuality of the Grandmaster PTP + Instance."; + reference + "8.2.3.7 of IEEE Std 1588-2019"; + uses clock-quality-top; + } + + leaf grandmaster-priority1 { + type uint8; + description + "The IEEE Std 1588 priority1 of the Grandmaster PTP + Instance."; + reference + "8.2.3.8 of IEEE Std 1588-2019"; + } + + leaf grandmaster-priority2 { + type uint8; + description + "The IEEE Std 1588 priority2 of the Grandmaster PTP + Instance."; + reference + "8.2.3.9 of IEEE Std 1588-2019"; + } + } + + grouping parent-ds-top { + description + "Top-level grouping for parent data sets of the clock, including + configuration and operational state data"; + + container parent-ds { + description + "Provides data learned from the parent of this PTP Instance (i.e. + master port on the other side of the path/link)."; + reference + "8.2.3 of IEEE Std 1588-2019"; + + container state { + description + "Operational state data of parent data set"; + config false; + uses parent-ds-state; + } + } + } + + grouping ports-top { + description + "Top-level grouping for port data sets of the clock, + including configuration and operational state data"; + container ports { + description + "YANG container that is used to get all PTP Ports + in the PTP Instance. + YANG does not allow get of all elements in a YANG list, + so a YANG container wrapping the YANG list is provided for + that purpose. The naming convention uses plural for the + wrapping YANG container, and singular for the YANG list."; + list port { + key "port-index"; + description + "List of data for each PTP Port in the PTP Instance. + While the PTP Instance is disabled, it is possible to + have zero PTP Ports (i.e., ports not yet created). + While the PTP Instance is enabled, an Ordinary Clock + will have one PTP Port, and a Boundary Clock or + Transparent Clock will have more than one PTP Port."; + reference + "8.1.4.2 of IEEE Std 1588-2019"; + + leaf port-index { + type leafref { + path "../config/port-index"; + } + description + "The port list is indexed using a number that is + unique per PTP Port within the PTP Instance, + applicable to the management context only + (i.e., not used in PTP messages)."; + } + + container config { + description + "Config state data of port data set of the clock"; + uses port-config-top; + } + + container state { + description + "operational state data of port data set of the clock"; + config false; + uses port-config-top; + } + + uses port-ds-top; + } + } + } + + grouping port-config-top { + description + "Configuration data of port data set of the clock"; + leaf port-index { + type uint16; + description + "The port list is indexed using a number that is + unique per PTP Port within the PTP Instance, + applicable to the management context only + (i.e., not used in PTP messages)."; + } + + leaf underlying-interface { + type if:interface-ref; + description + "Reference to the configured underlying IETF YANG + interface that is used by this PTP Port for + transport of PTP messages. Among other data, + physical identifiers for the interface + (e.g., MAC address) can be obtained using this + reference."; + reference + "RFC 8343"; + } + } + + grouping port-ds-state-top { + description + "Operational state data of port data set of the clock"; + + leaf port-state { + type oc-ptp-types:port-state-enumeration; + description + "Current state of the protocol engine associated + with this PTP Port."; + reference + "8.2.15.3.1 of IEEE Std 1588-2019"; + } + + leaf peer-mean-path-delay { + type oc-ptp-types:time-interval; + description + "In IEEE Std 1588-2008, this data set member was + called portDS.peerMeanPathDelay. While the + specification of this member is retained in the + current standard, the member is renamed to + portDS.meanLinkDelay (i.e., ../mean-link-delay). + This change is consistent with other changes that + ensure clarity and consistency of naming, where + - 'path' is associated with the + request-response mechanism + - 'link' is associated with the + peer-to-peer delay mechanism"; + reference + "8.2.5.3.3 of IEEE Std 1588-2008"; + } + } + + grouping port-ds-top { + description + "Top-level container for port data set of PTP Port."; + container port-ds { + description + "Primary data set for the PTP Port."; + reference + "8.2.15 of IEEE Std 1588-2019"; + + container config { + description + "Configuration data of port data set of the clock"; + uses port-ds-config-top; + } + + container state { + description + "Operational state data of port data set of the clock"; + config false; + uses port-ds-config-top; + uses port-ds-state-top; + } + } + } + + grouping port-ds-config-top { + description + "Top-level container for configuration port data set of PTP Port."; + + leaf log-announce-interval { + type int8; + description + "Logarithm to the base 2 of the mean IEEE Std 1588 + announceInterval, the time interval between + successive Announce messages sent by a PTP Port."; + reference + "7.7.2.2 of IEEE Std 1588-2019 + 8.2.15.4.1 of IEEE Std 1588-2019"; + } + + leaf announce-receipt-timeout { + type uint8; + description + "The integral multiple of IEEE Std 1588 + announceInterval that must pass without receipt of + an Announce message before the occurrence of the + event ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES. The range + shall be 2 to 255 subject to further restrictions of + the applicable PTP Profile. While 2 is permissible, + normally the value should be at least 3."; + reference + "7.7.3.1 of IEEE Std 1588-2019 + 8.2.15.4.2 of IEEE Std 1588-2019"; + } + + leaf log-sync-interval { + type int8; + description + "Logarithm to the base 2 of the mean IEEE Std 1588 + syncInterval, the time interval between successive + Sync messages, when transmitted as multicast + messages. The rates for unicast transmissions are + negotiated separately on a per PTP Port basis and + are not constrained by this leaf."; + reference + "7.7.2.3 of IEEE Std 1588-2019 + 8.2.15.4.3 of IEEE Std 1588-2019"; + } + + leaf delay-mechanism { + type oc-ptp-types:delay-mechanism-enumeration; + description + "The path delay measuring mechanism used by the PTP + Port in computing (propagation delay)."; + reference + "8.2.15.4.4 of IEEE Std 1588-2019"; + } + + leaf log-min-pdelay-req-interval { + type int8; + description + "Logarithm to the base 2 of the IEEE Std 1588 + minPdelayReqInterval, the minimum permitted + mean time interval between successive Pdelay_Req + messages sent over a PTP Link."; + reference + "7.7.2.5 of IEEE Std 1588-2019 + 8.2.15.4.5 of IEEE Std 1588-2019"; + } + + leaf version-number { + type uint8; + description + "The PTP major version in use on the PTP Port. + NOTE - This indicates the version of the + IEEE 1588 standard, and not the version of an + applicable PTP Profile."; + reference + "8.2.15.4.6 of IEEE Std 1588-2019"; + } + + leaf log-min-delay-req-interval { + type int8; + description + "Logarithm to the base 2 of the IEEE Std 1588 + minDelayReqInterval, the minimum permitted + mean time interval between successive Delay_Req + messages sent by a Slave PTP Instance."; + reference + "7.7.2.4 of IEEE Std 1588-2019 + 8.2.15.3.2 of IEEE Std 1588-2019"; + } + + leaf unicast-multicast { + type oc-ptp-types:unicast-multicast-enumeration; + description + "Whether the network transport uses unicast or + multicast communication"; + } + } + + grouping transparent-clock-default-ds-config-top { + description + "Top-level container for configuration default data set of transparent clock."; + + leaf delay-mechanism { + type oc-ptp-types:delay-mechanism-enumeration; + description + "The propagation delay measuring mechanism (e2e or p2p)."; + reference + "8.3.2.3.1 of IEEE Std 1588-2019"; + } + + leaf primary-domain { + type uint8; + description + "The domainNumber of the primary syntonization domain."; + reference + "8.3.2.3.2 of IEEE Std 1588-2019"; + } + + leaf two-step-flag { + type boolean; + description + "When set to true, the clock is a two-step clock; + otherwise,the clock is a one-step clock."; + } + } + grouping transparent-clock-top { + description + "Top-level container for configuration and operational state data of transparent clock."; + + container transparent-clock-default-ds { + description + "This default data set was specified in + IEEE Std 1588-2008, and under some interpretations, + it applied to all domains, which in turn means that it + represents multiple Transparent Clocks. + In IEEE Std 1588-2019, this data set is specified as + applying to the PTP Node (all domains), but the data set is + deprecated. For new designs, the standard recommends that + Transparent Clocks use the PTP Instance data sets + (i.e., /ptp/instances/instance[]), such that each + Transparent Clock supports a single PTP Instance and + domain."; + reference + "8.3.1 of IEEE Std 1588-2019"; + + container config { + description + "Top-level container for configuration data of transparent clock."; + uses transparent-clock-default-ds-config-top; + } + container state { + description + "Top-level container for operational state data of transparent clock."; + + config false; + + uses transparent-clock-default-ds-config-top; + + leaf clock-identity { + type oc-ptp-types:clock-identity; + description + "The clockIdentity of the local clock."; + reference + "8.3.2.2.1 of IEEE Std 1588-2019"; + } + + leaf number-ports { + type uint16; + description + "The number of PTP Ports of the device."; + reference + "8.3.2.2.2 of IEEE Std 1588-2019"; + } + } + } + + container transparent-clock-ports { + description + "YANG container that is used to get all ports of the + IEEE Std 1588 transparentClockPortDS. + YANG does not allow get of all elements in a YANG list, + so a YANG container wrapping the YANG list is provided for + that purpose. The naming convention uses plural for the + wrapping YANG container, and singular for the YANG list."; + + list port { + description + "This list of Transparent Clock port data sets was specified + in IEEE Std 1588-2008, and under some interpretations, + it applied to all domains, which in turn means that it + represents multiple Transparent Clocks. + In IEEE Std 1588-2019, this list is specified as + applying to the PTP Node (all domains), but the list is + deprecated. For new designs, the standard recommends that + Transparent Clocks use the PTP Instance data sets + (i.e., /ptp/instances/instance[]), such that each + Transparent Clock supports a single PTP Instance + and domain."; + reference + "8.3.1 of IEEE Std 1588-2019"; + key "port-index"; + leaf port-index { + description + "The port list is indexed using a number that is + unique per PTP Port within the PTP Instance, + applicable to the management context only + (i.e., not used in PTP messages)."; + type leafref { + path "../config/port-index"; + } + } + + container config { + description + "Top-level container for configuration data of transparent clock port."; + uses port-config-top; + } + + container state { + description + "Top-level container for operational state data of transparent clock port."; + config false; + uses port-config-top; + } + + container port-ds { + description + "IEEE Std 1588 transparentClockPortDS."; + reference + "8.3.3 of IEEE Std 1588-2019"; + + container config { + description + "Configuration data of transparent clock port data set."; + uses transparent-port-ds-config-top; + } + container state { + description + "Operational state data of transparent clock port data set."; + config false; + uses transparent-port-ds-config-top; + container port-identity { + description + "The IEEE Std 1588 portIdentity of this port."; + reference + "8.3.3.2.1 of IEEE Std 1588-2019"; + uses port-identity; + } + leaf peer-mean-path-delay { + type oc-ptp-types:time-interval; + description + "An estimate of the current one-way propagation delay + on the link when the delayMechanism is P2P; otherwise, + it is zero."; + reference + "8.3.3.3.3 of IEEE Std 1588-2019"; + } + } + } + } + } + } + + grouping transparent-port-ds-config-top { + description + "Top-level container for configuration port data set of transparent clock port."; + leaf log-min-pdelay-req-interval { + type int8; + description + "The logarithm to the base 2 of the + minPdelayReqInterval (minimum permitted mean time + interval between successive Pdelay_Req messages)."; + reference + "8.3.3.3.1 of IEEE Std 1588-2019"; + } + + leaf faulty-flag { + type boolean; + description + "Shall be true if the port is faulty and false + if the port is operating normally."; + reference + "8.3.3.3.2 of IEEE Std 1588-2019"; + } + + leaf network-transport { + type oc-ptp-types:network-transport-enumeration; + description + "The network transport used for communication"; + } + } + + grouping ptp-top { + description + "Top-level grouping for PTP configuration and operational state data"; + + container ptp { + description + "Contains all YANG nodes for the PTP data sets. This hierarchy can be + augmented with YANG nodes for a specific vendor or PTP Profile."; + + container instances { + description + "YANG container that is used to get all PTP Instances. YANG does not + allow get of all elements in a YANG list, so a YANG container wrapping + the YANG list is provided for that purpose. The naming convention uses + plural for the wrapping YANG container, and singular for the YANG list."; + + list instance { + key "id"; + description + "List of one or more PTP Instances in the product (PTP Node). Each + PTP Instance represents a distinct instance of PTP implementation + (i.e. distinct Ordinary Clock, Boundary Clock, or Transparent Clock), + maintaining a distinct time. PTP Instances may be created or deleted + dynamically in implementations that support dynamic create/delete."; + reference + "8.1.4.2 of IEEE Std 1588-2019"; + + leaf id { + type leafref { + path "../config/id"; + } + description + "The instance list is indexed using a number that is unique per PTP + Instance within the PTP Node, applicable to the management context + only (i.e. not used in PTP messages). The domain-number of the PTP + Instance is not used as the key to instance-list, since it is possible + for a PTP Node to contain multiple PTP Instances using the same + domain-number."; + reference + "8.1.4.2 of IEEE Std 1588-2019"; + } + + container config { + description + "Configuration data for PTP instance."; + uses instance-config; + } + + container state { + description + "Operational state data for PTP instance."; + config false; + uses instance-state; + } + + container current-ds { + description + "Current data set state data of PTP instance."; + container state { + description + "Operational state current data set of PTP instance."; + config false; + uses current-ds-state; + } + } + container time-properties-ds { + description + "Time properties data set of PTP instance."; + container config { + description + "Configuration data of time properties data set."; + uses time-properties-ds-state; + } + + container state { + description + "Operational state data of time properties data set."; + config false; + uses time-properties-ds-state; + } + } + + uses default-ds-top; + uses parent-ds-top; + uses ports-top; + } + } + + uses transparent-clock-top; + } + } + + uses ptp-top; +}