From 881b9e606c4b8a4d631e7c85dc84d303a8230dc9 Mon Sep 17 00:00:00 2001 From: Aaron Bamberger Date: Tue, 22 Oct 2024 11:59:28 -0500 Subject: [PATCH 1/5] Updates to the ES model to allow the configuration of an ES-import route target (#1109) * Add a new leaf "es-import-route-target" to the Ethernet Segment config model to allow the explicit configuration of an ES-import route target as per RFC7432 Section 7.6 --- .../openconfig-ethernet-segments.yang | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) 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 +} From 35b7954619d4c76dbb37903c6f494891b62618d6 Mon Sep 17 00:00:00 2001 From: romeyod <78448014+romeyod@users.noreply.github.com> Date: Tue, 22 Oct 2024 13:00:13 -0400 Subject: [PATCH 2/5] Define `telemetry-atomic-exempt` annotation. Add `telemetry-atomic-exempt` annotation to AFT counters containers (#1186) * Add atomic-exempt and use it in counters AFT --- release/models/aft/openconfig-aft-common.yang | 10 ++++++- .../models/aft/openconfig-aft-ethernet.yang | 8 +++++- release/models/aft/openconfig-aft-ipv4.yang | 8 +++++- release/models/aft/openconfig-aft-ipv6.yang | 8 +++++- release/models/aft/openconfig-aft-mpls.yang | 8 +++++- release/models/aft/openconfig-aft-pf.yang | 8 +++++- .../aft/openconfig-aft-state-synced.yang | 8 +++++- release/models/aft/openconfig-aft.yang | 8 +++++- release/models/openconfig-extensions.yang | 27 +++++++++++++++++-- 9 files changed, 83 insertions(+), 10 deletions(-) diff --git a/release/models/aft/openconfig-aft-common.yang b/release/models/aft/openconfig-aft-common.yang index 50eac8d8f..ee27c1bb8 100644 --- a/release/models/aft/openconfig-aft-common.yang +++ b/release/models/aft/openconfig-aft-common.yang @@ -23,7 +23,13 @@ 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.7.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 @@ -1093,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"; @@ -1112,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 3fbe6edab..52d038a62 100644 --- a/release/models/aft/openconfig-aft-ethernet.yang +++ b/release/models/aft/openconfig-aft-ethernet.yang @@ -20,7 +20,13 @@ submodule openconfig-aft-ethernet { "Submodule containing definitions of groupings for the abstract forwarding tables for Ethernet."; - oc-ext:openconfig-version "2.7.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 diff --git a/release/models/aft/openconfig-aft-ipv4.yang b/release/models/aft/openconfig-aft-ipv4.yang index 87fb7e6fa..43c19f6a5 100644 --- a/release/models/aft/openconfig-aft-ipv4.yang +++ b/release/models/aft/openconfig-aft-ipv4.yang @@ -20,7 +20,13 @@ submodule openconfig-aft-ipv4 { "Submodule containing definitions of groupings for the abstract forwarding tables for IPv4."; - oc-ext:openconfig-version "2.7.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 diff --git a/release/models/aft/openconfig-aft-ipv6.yang b/release/models/aft/openconfig-aft-ipv6.yang index 765830cd5..f68138234 100644 --- a/release/models/aft/openconfig-aft-ipv6.yang +++ b/release/models/aft/openconfig-aft-ipv6.yang @@ -20,7 +20,13 @@ submodule openconfig-aft-ipv6 { "Submodule containing definitions of groupings for the abstract forwarding tables for IPv6."; - oc-ext:openconfig-version "2.7.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 diff --git a/release/models/aft/openconfig-aft-mpls.yang b/release/models/aft/openconfig-aft-mpls.yang index c99e1c58f..add842110 100644 --- a/release/models/aft/openconfig-aft-mpls.yang +++ b/release/models/aft/openconfig-aft-mpls.yang @@ -21,7 +21,13 @@ submodule openconfig-aft-mpls { "Submodule containing definitions of groupings for the abstract forwarding table for MPLS label forwarding."; - oc-ext:openconfig-version "2.7.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 diff --git a/release/models/aft/openconfig-aft-pf.yang b/release/models/aft/openconfig-aft-pf.yang index 9980ad5f0..8534f84fa 100644 --- a/release/models/aft/openconfig-aft-pf.yang +++ b/release/models/aft/openconfig-aft-pf.yang @@ -28,7 +28,13 @@ submodule openconfig-aft-pf { fields other than the destination address that is used in other forwarding tables."; - oc-ext:openconfig-version "2.7.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 diff --git a/release/models/aft/openconfig-aft-state-synced.yang b/release/models/aft/openconfig-aft-state-synced.yang index fbe6eb5ca..5901b2c1e 100644 --- a/release/models/aft/openconfig-aft-state-synced.yang +++ b/release/models/aft/openconfig-aft-state-synced.yang @@ -16,7 +16,13 @@ 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.7.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 diff --git a/release/models/aft/openconfig-aft.yang b/release/models/aft/openconfig-aft.yang index de3ce202e..d00303963 100644 --- a/release/models/aft/openconfig-aft.yang +++ b/release/models/aft/openconfig-aft.yang @@ -42,7 +42,13 @@ module openconfig-aft { is referred to as an Abstract Forwarding Table (AFT), rather than the FIB."; - oc-ext:openconfig-version "2.7.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 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 From 9ab7c1fcce09bfca53acb7b9c78f1aa17c86da3d Mon Sep 17 00:00:00 2001 From: Emmanuel Ferdman Date: Wed, 23 Oct 2024 01:12:48 +0300 Subject: [PATCH 3/5] Update contributions guide reference (#1205) Signed-off-by: Emmanuel Ferdman --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From aca87f3e59c1e74744e9e01e4e6381b1094aea79 Mon Sep 17 00:00:00 2001 From: Ebben Aries Date: Wed, 23 Oct 2024 14:43:57 -0600 Subject: [PATCH 4/5] Refactor non-compliant/overlapping YANG definition for BGP MED (#1165) * Refactor non-compliant/overlapping YANG definition for BGP MED * (M) release/models/bgp/openconfig-bgp-policy.yang - Remove string type from bgp-set-med-type union - Add new bgp-set-med-action typedef to separate out action on MED values - Add new set-med-action leaf to be optionally utilized with set-med * Add constraints between med/action + add an explicit SET action --------- Co-authored-by: Darren Loher --- release/models/bgp/openconfig-bgp-policy.yang | 68 +++++++++++++++---- 1 file changed, 54 insertions(+), 14 deletions(-) diff --git a/release/models/bgp/openconfig-bgp-policy.yang b/release/models/bgp/openconfig-bgp-policy.yang index f4c0c18c4..ee5c34e01 100644 --- a/release/models/bgp/openconfig-bgp-policy.yang +++ b/release/models/bgp/openconfig-bgp-policy.yang @@ -28,7 +28,14 @@ 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.0.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 +217,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 @@ -1345,8 +1369,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."; } } From db78d44e93a97cef4db27f82bba3fba454e907a5 Mon Sep 17 00:00:00 2001 From: adityasingh-anet Date: Wed, 23 Oct 2024 20:36:14 -0500 Subject: [PATCH 5/5] Update openconfig-gnsi-acctz.yang (#1195) * Delete idle-timeouts and counters-last-cleared leaves * Split source-counters and client counters to be under separate augments Co-authored-by: Darren Loher --- .../models/gnsi/openconfig-gnsi-acctz.yang | 128 ++++++++++-------- 1 file changed, 69 insertions(+), 59 deletions(-) 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; + } }