diff --git a/release/models/policy-forwarding/openconfig-pf-forwarding-policies.yang b/release/models/policy-forwarding/openconfig-pf-forwarding-policies.yang index a4f4f51e48..fafc47f85b 100644 --- a/release/models/policy-forwarding/openconfig-pf-forwarding-policies.yang +++ b/release/models/policy-forwarding/openconfig-pf-forwarding-policies.yang @@ -25,7 +25,13 @@ submodule openconfig-pf-forwarding-policies { "This submodule contains configuration and operational state relating to the definition of policy-forwarding policies."; - oc-ext:openconfig-version "1.1.0"; + oc-ext:openconfig-version "1.2.0"; + + revision "2026-03-13" { + description + "Add count as a policy-forwarding action."; + reference "1.2.0"; + } revision "2025-12-16" { description @@ -171,6 +177,8 @@ submodule openconfig-pf-forwarding-policies { "Reference to the identifier for the forwarding-policy."; } + uses pf-policy-user-counters; + container config { description "Configuration options relating to the forwarding @@ -257,6 +265,7 @@ submodule openconfig-pf-forwarding-policies { } } } + } } } @@ -306,6 +315,76 @@ submodule openconfig-pf-forwarding-policies { } } + + grouping pf-policy-user-counters { + description + "Grouping for user-defined counters for policy-forwarding policies."; + + container policy-counters { + description + "Container for counters defined within policy-forwarding policies."; + + list policy-counter { + key "name"; + + description + "A list of counters for a given policy-forwarding policy. Counters + are defined per policy. The counters are updated where defined as + a policy-forwarding action. One or more rules may contain actions + that reference the same policy-counter."; + + leaf name { + type leafref { + path "../config/name"; + } + description + "Reference to the name of the policy counter."; + } + + container config { + description + "Configuration parameters for a policy-counter."; + + leaf name { + type string; + description + "A unique name for a policy-counter."; + } + } + + container state { + config false; + description + "Operational state parameters for the user-defined counter."; + + leaf name { + type string; + description + "A unique name for the user-defined counter."; + } + + container counters { + description + "A container for the counter values."; + + leaf packets { + type oc-yang:counter64; + description + "The number of packets matching the rules where this counter + is defined as an action."; + } + leaf bytes { + type oc-yang:counter64; + description + "The number of bytes matching the rules where this counter + is defined as an action."; + } + } + } + } + } + } + grouping pf-forwarding-policy-rule-config { description "Configuration parameters relating to a policy rule."; @@ -535,6 +614,15 @@ grouping pf-forwarding-policy-action-forwarding-config { description "Forwarding policy action configuration parameters."; + leaf count { + type leafref { + path "../../../../../policy-counters/policy-counter/config/name"; + } + description + "When specified, the system will increment the referenced user + defined counter."; + } + leaf discard { type boolean; status deprecated; diff --git a/release/models/policy-forwarding/openconfig-pf-interfaces.yang b/release/models/policy-forwarding/openconfig-pf-interfaces.yang index ced33c3448..13d7007adb 100644 --- a/release/models/policy-forwarding/openconfig-pf-interfaces.yang +++ b/release/models/policy-forwarding/openconfig-pf-interfaces.yang @@ -19,7 +19,13 @@ submodule openconfig-pf-interfaces { "This submodule contains groupings related to the association between interfaces and policy forwarding rules."; - oc-ext:openconfig-version "1.1.0"; + oc-ext:openconfig-version "1.2.0"; + + revision "2026-03-13" { + description + "Add count as a policy-forwarding action."; + reference "1.2.0"; + } revision "2025-12-16" { description diff --git a/release/models/policy-forwarding/openconfig-pf-path-groups.yang b/release/models/policy-forwarding/openconfig-pf-path-groups.yang index 5e27ca7a76..d9f75dd8ae 100644 --- a/release/models/policy-forwarding/openconfig-pf-path-groups.yang +++ b/release/models/policy-forwarding/openconfig-pf-path-groups.yang @@ -18,7 +18,13 @@ submodule openconfig-pf-path-groups { forwarding entities together to be used as policy forwarding targets."; - oc-ext:openconfig-version "1.1.0"; + oc-ext:openconfig-version "1.2.0"; + + revision "2026-03-13" { + description + "Add count as a policy-forwarding action."; + reference "1.2.0"; + } revision "2025-12-16" { description diff --git a/release/models/policy-forwarding/openconfig-policy-forwarding.yang b/release/models/policy-forwarding/openconfig-policy-forwarding.yang index d69d7fe68a..fcf0067e8e 100644 --- a/release/models/policy-forwarding/openconfig-policy-forwarding.yang +++ b/release/models/policy-forwarding/openconfig-policy-forwarding.yang @@ -86,7 +86,13 @@ module openconfig-policy-forwarding { The forwarding action of the corresponding policy is set to PATH_GROUP and references the configured group of LSPs."; - oc-ext:openconfig-version "1.1.0"; + oc-ext:openconfig-version "1.2.0"; + + revision "2026-03-13" { + description + "Add count as a policy-forwarding action."; + reference "1.2.0"; + } revision "2025-12-16" { description