Skip to content

Add "sequence-id" attribute for each term in qos classifers - #1526

Open
PranavAdityaCP wants to merge 1 commit into
openconfig:masterfrom
PranavAdityaCP:patch-1
Open

Add "sequence-id" attribute for each term in qos classifers #1526
PranavAdityaCP wants to merge 1 commit into
openconfig:masterfrom
PranavAdityaCP:patch-1

Conversation

@PranavAdityaCP

Copy link
Copy Markdown

Change Scope

Currently the terms in qos/classifers do not have any clear way based on which it can be ordered . Each term has a set of match conditions and an associated action and we could have multiple terms within a classifier, however it is not clear how to order the terms (in case the terms have overlapping match criteria, the order would determine the term and action that gets applied).
Please refer the open issue : #1387

Hence to address this requirement we are adding sequence-id as a new leaf under the paths

/qos/classifiers/classifier[name=*]/terms/term[id=*]/config/
/qos/classifiers/classifier[name=*]/terms/term[id=*]/status/

Note : It is backward compatible as it is a new leaf and NOT a key node

Tree View

+--rw classifiers
      +--rw classifier* [name]
         +--rw name       -> ../config/name
         +--rw config
         |  +--rw name?   string
         |  +--rw type?   enumeration {IPV4, IPV6, MPLS, IPV4_MULTICAST, IPV6_MULTICAST}
         +--ro state
         |  +--ro name?   string
         |  +--ro type?   enumeration {IPV4, IPV6, MPLS, IPV4_MULTICAST, IPV6_MULTICAST}
         +--rw terms
            +--rw term* [id]
               +--rw id            -> ../config/id
               +--rw config
               |  +--rw id?             string
  +            |  +--rw sequence-id?    uint32
               +--ro state
               |  +--ro id?             string
  +            |  +--ro sequence-id?    uint32
               +--rw conditions
               |  ...
               +--rw actions
                  ...

@google-cla

google-cla Bot commented Jul 27, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a sequence-id leaf to the QoS classifier term grouping in openconfig-qos-elements.yang to define the matching order of terms. The review feedback identifies a minor grammatical typo in the description of the new leaf and provides a suggestion to correct it.

Comment on lines +193 to +201
leaf sequence-id {
type uint32;
description
"The sequence id determines the order in which terms
are matched. The sequence id must be unique for each entry
in terms. Target devices should apply the terms
in ascending order determined by sequence id (low to
high), rather than the relying only on order in the list.";
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There is a grammatical typo in the description of the sequence-id leaf: "rather than the relying only on order in the list." should be "rather than relying only on the order in the list."

Suggested change
leaf sequence-id {
type uint32;
description
"The sequence id determines the order in which terms
are matched. The sequence id must be unique for each entry
in terms. Target devices should apply the terms
in ascending order determined by sequence id (low to
high), rather than the relying only on order in the list.";
}
leaf sequence-id {
type uint32;
description
"The sequence id determines the order in which terms
are matched. The sequence id must be unique for each entry
in terms. Target devices should apply the terms
in ascending order determined by sequence id (low to
high), rather than relying only on the order in the list.";
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant