bbf-qos-policing

This module contains a collection of YANG definitions for supporting the Broadband Forum requirements on the management of Quali...

  • Version: 2023-12-15

    bbf-qos-policing@2023-12-15


    
      module bbf-qos-policing {
    
        yang-version 1.1;
    
        namespace
          "urn:bbf:yang:bbf-qos-policing";
    
        prefix bbf-qos-plc;
    
        import bbf-yang-types {
          prefix bbf-yang;
        }
        import bbf-qos-classifiers {
          prefix bbf-qos-cls;
        }
        import bbf-qos-policies {
          prefix bbf-qos-pol;
        }
        import bbf-qos-policing-types {
          prefix bbf-qos-plc-tp;
        }
        import bbf-dot1q-types {
          prefix bbf-dot1qt;
        }
        import bbf-qos-types {
          prefix bbf-qos-t;
        }
        import ietf-interfaces {
          prefix if;
        }
        import ietf-yang-types {
          prefix yang;
        }
        import bbf-frame-processing-types {
          prefix bbf-fpt;
        }
    
        organization
          "Broadband Forum <https://www.broadband-forum.org>
         Common YANG Work Area";
    
        contact
          "Comments or questions about this Broadband Forum YANG module
         should be directed to <mailto:help@broadband-forum.org>.
    
         Editor:      Nick Hancock, Adtran
    
         Editor:      Ludwig Pauwels, Nokia
    
         PS Leader:   Joey Boyd, Adtran
    
         WA Director: Joey Boyd, Adtran
    
         WA Director: Sven Ooghe, Nokia";
    
        description
          "This module contains a collection of YANG definitions for
         supporting the Broadband Forum requirements on the management of
         Quality of Service (QoS) as applicable to access network
         equipment. As such, this module is specific to access network
         equipment (e.g., BBF-specified Access Nodes and FTTdp DPUs).
    
         Specifically, this module augments classifiers to manage the
         policing of flows.
    
         Copyright (c) 2017-2023, Broadband Forum
    
         Redistribution and use in source and binary forms, with or
         without modification, are permitted provided that the following
         conditions are met:
    
         1. Redistributions of source code must retain the above copyright
            notice, this list of conditions and the following disclaimer.
    
         2. Redistributions in binary form must reproduce the above
            copyright notice, this list of conditions and the following
            disclaimer in the documentation and/or other materials
            provided with the distribution.
    
         3. Neither the name of the copyright holder nor the names of its
            contributors may be used to endorse or promote products
            derived from this software without specific prior written
            permission.
    
         THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
         CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,
         INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
         MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
         DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
         CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
         SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
         NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
         LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
         CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
         STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
         ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
         ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    
         The above license is used as a license under copyright only.
         Please reference the Forum IPR Policy for patent licensing terms
         <https://www.broadband-forum.org/ipr-policy>.
    
         Any moral rights which are necessary to exercise under the above
         license grant are also deemed granted under this license.
    
         This version of this YANG module is part of TR-383a7; see
         the TR itself for full legal notices.";
    
        revision "2023-12-15" {
          description
            "Amendment 7.
           * Approval Date:    2023-12-15.
           * Publication Date: 2023-12-15.";
          reference
            "TR-383a7: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-7.pdf>";
    
        }
    
        revision "2023-03-07" {
          description
            "Amendment 6.
           * Approval Date:    2023-03-07.
           * Publication Date: 2023-03-07.";
          reference
            "TR-383a6: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-6.pdf>";
    
        }
    
        revision "2022-03-01" {
          description
            "Amendment 5.
           * Approval Date:    2022-03-01.
           * Publication Date: 2022-03-01.";
          reference
            "TR-383a5: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-5.pdf>";
    
        }
    
        revision "2021-06-02" {
          description
            "Amendment 4.
           * Approval Date:    2021-06-02.
           * Publication Date: 2021-06-02.";
          reference
            "TR-383a4: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-4.pdf>";
    
        }
    
        revision "2020-10-13" {
          description
            "Amendment 3.
           * Approval Date:    2020-10-13.
           * Publication Date: 2020-10-13.";
          reference
            "TR-383a3: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-3.pdf>";
    
        }
    
        revision "2018-07-13" {
          description
            "Amendment 1.
           * Approval Date:    2018-06-04.
           * Publication Date: see revision date above.";
          reference
            "TR-383: Common YANG Modules
            	<https://www.broadband-forum.org/technical/download/
            		 TR-383_Amendment-1.pdf>";
    
        }
    
    
        feature single-rate-two-color-marker {
          description
            "Indicates support of the single rate two color policer, also
           called single bucket policer.";
        }
    
        feature single-rate-three-color-marker {
          description
            "Indicates support of the single rate three color policer.";
        }
    
        feature single-rate-three-color-marker-color-mode {
          if-feature single-rate-three-color-marker;
          description
            "Indicates support of the configuration of a color mode for the
           single rate three color policer.";
        }
    
        feature two-rate-three-color-marker {
          description
            "Indicates support of the two rate three color policer.";
        }
    
        feature two-rate-three-color-marker-color-mode {
          if-feature two-rate-three-color-marker;
          description
            "Indicates support of the configuration of a color mode for the
           two rate three color policer.";
        }
    
        feature two-rate-three-color-marker-mef {
          description
            "Indicates support of the two rate three color policer.";
          reference
            "MEF 10.2 Section 7.11.1";
    
        }
    
        feature two-rate-three-color-marker-color-promotion {
          description
            "Indicates support of the two rate three color policer with
           color promotion.";
        }
    
        feature interface-policing-management {
          if-feature bbf-qos-pol:interface-policy-management;
          description
            "Indicates support of managing policing per interface.";
        }
    
        feature policing-statistics {
          description
            "Indicates support of reporting statistics associated with
           policing.";
        }
    
        feature counts-per-ingress-and-egress-color {
          if-feature policing-statistics;
          description
            "Indicates support of reporting byte and frame counts per
           ingress color and egress color.";
        }
    
        feature policing-action-profiles {
          description
            "Indicates support of policing action profiles.";
        }
    
        feature policing-action-in-policer {
          description
            "Indicates support of policing actions inline in the policer
           profile.";
        }
    
        identity policing {
          base bbf-qos-cls:action-type;
          description
            "The action-type identity indicating policing.";
        }
    
        identity flow-color {
          base bbf-qos-cls:action-type;
          description
            "The action-type identity indicating a flow class. This is a
           classification that can be assigned to a frame and multiple
           QoS decisions can be coupled to this action type.";
        }
    
        identity bac-color {
          base bbf-qos-cls:action-type;
          description
            "The action-type identity indicating the color used in the
           buffer acceptance control (BAC) process.";
        }
    
        identity discard {
          base bbf-qos-cls:action-type;
          description
            "The action-type identity indicating the discard action.";
        }
    
        typedef qos-color {
          type bbf-qos-t:qos-color;
          status deprecated;
          description
            "Defines a frame color for QoS.";
        }
    
        grouping single-rate-two-color-marker {
          description
            "Single rate two color policer attributes.";
          container single-rate-two-color-marker {
            description
              "Single rate two color policer, also called single bucket
             policer.";
            leaf cir {
              type bbf-qos-plc-tp:information-rate;
              description
                "Committed Information Rate (CIR) is used to define the
               average rate of traffic that respect the guarantees of
               bandwidth. This traffic is defined as green traffic, and
               its transmission is guaranteed across the network.";
            }
    
            leaf cbs {
              type bbf-qos-plc-tp:burst-size;
              description
                "Committed Burst Size (CBS) defines the amount of traffic
               that can be admitted above the CIR and is considered
               green. Traffic beyond the configured CIR and CBS is
               defined as red.";
            }
          }  // container single-rate-two-color-marker
        }  // grouping single-rate-two-color-marker
    
        grouping single-rate-three-color-marker {
          description
            "Single rate three color policer attributes.";
          container single-rate-three-color-marker {
            description
              "Single rate three color policer.";
            reference
              "RFC 2697 Section 2";
    
            leaf cir {
              type bbf-qos-plc-tp:information-rate;
              description
                "Committed Information Rate (CIR) is used to define the
               average rate of traffic that respect the guarantees of
               bandwidth. This traffic is defined as green traffic, and
               its transmission is guaranteed across the network.";
            }
    
            leaf cbs {
              type bbf-qos-plc-tp:burst-size;
              description
                "Committed Burst Size (CBS) defines the amount of traffic
               that can be admitted above the CIR and is considered
               green.";
            }
    
            leaf ebs {
              type bbf-qos-plc-tp:burst-size;
              description
                "Excess Burst Size (EBS) defines the amount of excessive
               traffic that can be admitted above the CBS and is
               considered yellow.";
            }
    
            leaf color-mode {
              if-feature bbf-qos-plc:single-rate-three-color-marker-color-mode;
              type bbf-qos-plc-tp:color-mode;
              description
                "Configures the color mode of the policer. The color mode
               leaf indicates whether the color-aware or color-blind
               property is employed by the policer profile.
    
               The color mode applied in case the leaf is not configured
               is system dependent.";
            }
          }  // container single-rate-three-color-marker
        }  // grouping single-rate-three-color-marker
    
        grouping two-rate-three-color-marker {
          description
            "Two rate three color policer attributes.";
          container two-rate-three-color-marker {
            description
              "Two rate three color policer.";
            reference
              "RFC 2698 Section 2";
    
            leaf cir {
              type bbf-qos-plc-tp:information-rate;
              description
                "Committed Information Rate (CIR) is used to define the
               average rate of traffic that respect the guarantees of
               bandwidth. This traffic is defined as green traffic, and
               its transmission is guaranteed across the network.";
            }
    
            leaf cbs {
              type bbf-qos-plc-tp:burst-size;
              description
                "Committed Burst Size (CBS) defines the amount of traffic
               that can be admitted above the CIR and is considered
               green.";
            }
    
            leaf pir {
              type bbf-qos-plc-tp:information-rate;
              description
                "Peak Information Rate (PIR) is used to define the average
               rate of traffic that is admitted in the network with the
               assurance that it will not be discarded directly by the
               policer, the traffic in excess to the green one can be
               discarded in case of congestion and is considered yellow.";
            }
    
            leaf pbs {
              type bbf-qos-plc-tp:burst-size;
              description
                "Peak Burst Size (PBS) defines the amount of traffic that
               can be admitted above the PIR (burst) without being
               discarded directly by the policer (yellow).";
            }
    
            leaf color-mode {
              if-feature bbf-qos-plc:two-rate-three-color-marker-color-mode;
              type bbf-qos-plc-tp:color-mode;
              description
                "Configures the color mode of the policer. The color mode
               leaf indicates whether the color-aware or color-blind
               property is employed by the policer profile.
    
               The color mode applied in case the leaf is not configured
               is system dependent.";
            }
          }  // container two-rate-three-color-marker
        }  // grouping two-rate-three-color-marker
    
        grouping two-rate-three-color-marker-mef {
          description
            "Two rate three color policer MEF attributes.";
          container two-rate-three-color-marker-mef {
            description
              "MEF standard two rate three color policer.";
            reference
              "MEF 10.2 Section 7.11.1";
    
            leaf cir {
              type bbf-qos-plc-tp:information-rate;
              description
                "Committed Information Rate (CIR) is used to define the
               average rate of traffic that respect the guarantees of
               bandwidth. This traffic is defined as green traffic, and
               its transmission is guaranteed across the network.";
            }
    
            leaf cbs {
              type bbf-qos-plc-tp:burst-size;
              description
                "Committed Burst Size (CBS) defines the amount of traffic
               that can be admitted above the CIR and is considered
               green.";
            }
    
            leaf eir {
              type bbf-qos-plc-tp:information-rate;
              description
                "Excess Information Rate (EIR) is used to define how much
               traffic exceeding the CIR can be admitted in the network
               with the assurance that it will not be discarded directly
               by the policer, this traffic can be discarded in case of
               congestion and is considered yellow.";
            }
    
            leaf ebs {
              type bbf-qos-plc-tp:burst-size;
              description
                "Excess Burst Size (EBS) defines the amount of excessive
               traffic that can be admitted above the EIR without being
               discarded directly by the policer (yellow).";
            }
    
            leaf couple-flag {
              type bbf-qos-plc-tp:coupling-flag;
              description
                "The Coupling Flag CF controls the volume of the frames
               that are declared Yellow.
    
               When the CF is set to 0, the long term average rate of
               service frames that are declared yellow is bound by the
               Excess Information Rate (EIR) which is then the equivalent
               of the Peak Information Rate (PIR).
    
               When the CF is set to 1, the long term average rate of
               service frames that are declared yellow is bound by the sum
               of the Committed Information Rate (CIR) and Excess
               Information Rate (EIR), i.e., CIR+EIR, depending on the
               volume of offered service frames that are declared green.
    
               This sum is also the equivalent of the Peak Information
               Rate (PIR).";
            }
    
            leaf color-mode {
              type bbf-qos-plc-tp:color-mode;
              description
                "Configures the color mode of the policer. The color mode
               leaf indicates whether the color-aware or color-blind
               property is employed by the policer profile.
    
               The color mode applied in case the leaf is not configured
               is system dependent.";
            }
          }  // container two-rate-three-color-marker-mef
        }  // grouping two-rate-three-color-marker-mef
    
        grouping two-rate-three-color-marker-color-promotion {
          description
            "Two rate three color policer with color promotion.";
          container two-rate-three-color-marker-color-promotion {
            description
              "Two rate three color policer with color promotion. This
             policer behaves similar to the
             'two-rate-three-color-marker-mef' policer with 'color-mode'
             equal to 'color-aware' and 'couple-flag' set to 1 albeit with
             one exception.
    
             If the CIR is not fully utilized with green traffic, yellow
             traffic entering the policer may be promoted to green in
             order to satisfy a Service Level Agreement (SLA) which may
             guarantee a certain CIR.";
            leaf cir {
              type bbf-qos-plc-tp:information-rate;
              description
                "Committed Information Rate (CIR) is used to define the
               average rate of traffic that respect the guarantees of
               bandwidth. This traffic is defined as green traffic its
               transmission is guaranteed across the network.";
            }
    
            leaf cbs {
              type bbf-qos-plc-tp:burst-size;
              description
                "Committed Burst Size (CBS) defines the amount of traffic
               that can be admitted above the CIR and is considered
               green.";
            }
    
            leaf eir {
              type bbf-qos-plc-tp:information-rate;
              description
                "Excess Information Rate (EIR) is used to define how much
               traffic exceeding the CIR can be admitted in the network
               with the assurance that it will not be discarded directly
               by the policer, this traffic can be discarded in case of
               congestion and is considered yellow.";
            }
    
            leaf ebs {
              type bbf-qos-plc-tp:burst-size;
              description
                "Excess Burst Size (EBS) defines the amount of excessive
               traffic that can be admitted above the EIR without being
               discarded directly by the policer (yellow).";
            }
          }  // container two-rate-three-color-marker-color-promotion
        }  // grouping two-rate-three-color-marker-color-promotion
    
        grouping policing-statistics {
          description
            "Statistics associated with policing.";
          container statistics {
            if-feature bbf-qos-plc:policing-statistics;
            description
              "Statistics associated with policing.";
            container out-green {
              description
                "Statistics associated with frames that were marked green by
               this policer.";
              leaf total-octets {
                type yang:counter64;
                units "bytes";
                description
                  "The total number of bytes from frames that were marked
                 green.";
              }
    
              leaf total-frames {
                type yang:counter64;
                units "frames";
                description
                  "The total number of frames that were marked green.";
              }
    
              leaf in-green-octets {
                if-feature bbf-qos-plc:counts-per-ingress-and-egress-color;
                type yang:counter64;
                units "bytes";
                description
                  "The number of bytes from frames that ingressed the
                 policer marked green and egressed marked green.";
              }
    
              leaf in-green-frames {
                if-feature bbf-qos-plc:counts-per-ingress-and-egress-color;
                type yang:counter64;
                units "frames";
                description
                  "The number of frames that ingressed the policer marked
                 green and egressed marked green.";
              }
    
              leaf in-yellow-octets {
                if-feature bbf-qos-plc:counts-per-ingress-and-egress-color;
                type yang:counter64;
                units "bytes";
                description
                  "The number of bytes from frames that ingressed the
                 policer marked yellow and egressed marked green.";
              }
    
              leaf in-yellow-frames {
                if-feature bbf-qos-plc:counts-per-ingress-and-egress-color;
                type yang:counter64;
                units "frames";
                description
                  "The number of frames that ingressed the policer marked
                 yellow and egressed marked green.";
              }
            }  // container out-green
    
            container out-yellow {
              description
                "Statistics associated with frames that were marked yellow
               by this policer.";
              leaf total-octets {
                type yang:counter64;
                units "bytes";
                description
                  "The total number of bytes from frames that were marked
                 yellow.";
              }
    
              leaf total-frames {
                type yang:counter64;
                units "frames";
                description
                  "The total number of frames that were marked yellow.";
              }
    
              leaf in-green-octets {
                if-feature bbf-qos-plc:counts-per-ingress-and-egress-color;
                type yang:counter64;
                units "bytes";
                description
                  "The number of bytes from frames that ingressed the
                 policer marked green and egressed marked yellow.";
              }
    
              leaf in-green-frames {
                if-feature bbf-qos-plc:counts-per-ingress-and-egress-color;
                type yang:counter64;
                units "frames";
                description
                  "The number of frames that ingressed the policer marked
                 green and egressed marked yellow.";
              }
    
              leaf in-yellow-octets {
                if-feature bbf-qos-plc:counts-per-ingress-and-egress-color;
                type yang:counter64;
                units "bytes";
                description
                  "The number of bytes from frames that ingressed the
                 policer marked yellow and egressed marked yellow.";
              }
    
              leaf in-yellow-frames {
                if-feature bbf-qos-plc:counts-per-ingress-and-egress-color;
                type yang:counter64;
                units "frames";
                description
                  "The number of frames that ingressed the policer marked
                 yellow and egressed marked yellow.";
              }
            }  // container out-yellow
    
            container out-red {
              description
                "Statistics associated with frames that were marked red by
               this policer.";
              leaf total-octets {
                type yang:counter64;
                units "bytes";
                description
                  "The total number of bytes from frames that were marked
                 red.";
              }
    
              leaf total-frames {
                type yang:counter64;
                units "frames";
                description
                  "The total number of frames that were marked red.";
              }
    
              leaf in-green-octets {
                if-feature bbf-qos-plc:counts-per-ingress-and-egress-color;
                type yang:counter64;
                units "bytes";
                description
                  "The number of bytes from frames that ingressed the
                 policer marked green and egressed marked red.";
              }
    
              leaf in-green-frames {
                if-feature bbf-qos-plc:counts-per-ingress-and-egress-color;
                type yang:counter64;
                units "frames";
                description
                  "The number of frames that ingressed the policer marked
                 green and egressed marked red.";
              }
    
              leaf in-yellow-octets {
                if-feature bbf-qos-plc:counts-per-ingress-and-egress-color;
                type yang:counter64;
                units "bytes";
                description
                  "The number of bytes from frames that ingressed the
                 policer marked yellow and egressed marked red.";
              }
    
              leaf in-yellow-frames {
                if-feature bbf-qos-plc:counts-per-ingress-and-egress-color;
                type yang:counter64;
                units "frames";
                description
                  "The number of frames that ingressed the policer marked
                 yellow and egressed marked red.";
              }
    
              leaf in-red-octets {
                if-feature bbf-qos-plc:counts-per-ingress-and-egress-color;
                type yang:counter64;
                units "bytes";
                description
                  "The number of bytes from frames that ingressed the
                 policer marked red and egressed marked red.";
              }
    
              leaf in-red-frames {
                if-feature bbf-qos-plc:counts-per-ingress-and-egress-color;
                type yang:counter64;
                units "frames";
                description
                  "The number of frames that ingressed the policer marked
                 red and egressed marked red.";
              }
            }  // container out-red
          }  // container statistics
        }  // grouping policing-statistics
    
        grouping policing-profile-ref {
          description
            "A reference to a policing profile.";
          leaf policing-profile {
            type leafref {
              path "/bbf-qos-plc:policing-profiles/bbf-qos-plc:policing-profile/bbf-qos-plc:name";
            }
            description
              "The name of the referenced policing profile.";
          }
        }  // grouping policing-profile-ref
    
        grouping policing-action-profile-ref {
          description
            "A reference to a policing action profile.";
          leaf policing-action-profile {
            if-feature bbf-qos-plc:policing-action-profiles;
            type leafref {
              path
                "/bbf-qos-plc:policing-action-profiles/bbf-qos-plc:"
                  + "policing-action-profile/bbf-qos-plc:name";
            }
            description
              "The name of the referenced policing action profile.";
          }
        }  // grouping policing-action-profile-ref
    
        container policing-profiles {
          description
            "Configuration associated with policing profiles.";
          list policing-profile {
            key "name";
            description "A policing profile.";
            leaf name {
              type bbf-yang:string-ascii64;
              description
                "The name of the policing profile.";
            }
    
            leaf scope {
              type bbf-qos-cls:action-scope;
              description
                "Identifies the scope of the policer instance sharing is
               within Ethernet interface or VLAN sub-interface.";
            }
    
            choice policing-type {
              mandatory true;
              description
                "This defines the type of the policer.
    
               Note that a policer takes as input a stream of frames (the
               real frame possibly accompanied by meta data such as a
               color), then polices the stream according to the policer's
               configuration, and as a result assigns or modifies the
               color of the frames.
    
               The policer on its own does not take other actions on the
               frame. Taking further actions such as for example
               discarding the frame or assigning a DEI in the marking list
               is to be configured as another action.";
              case single-rate-two-color-marker-type {
                if-feature single-rate-two-color-marker;
                description
                  "This represents the policer type of single rate two color
                 marker.";
                uses single-rate-two-color-marker;
              }  // case single-rate-two-color-marker-type
    
              case single-rate-three-color-marker-type {
                if-feature single-rate-three-color-marker;
                description
                  "This represents the policer type of single rate three
                 color marker.";
                uses single-rate-three-color-marker;
              }  // case single-rate-three-color-marker-type
    
              case two-rate-three-color-marker-type {
                if-feature two-rate-three-color-marker;
                description
                  "This represents the policer type of two rate three color
                 marker.";
                uses two-rate-three-color-marker;
              }  // case two-rate-three-color-marker-type
    
              case two-rate-three-color-marker-mef-type {
                if-feature two-rate-three-color-marker-mef;
                description
                  "This represents the policer type of MEF standard.";
                uses two-rate-three-color-marker-mef;
              }  // case two-rate-three-color-marker-mef-type
    
              case two-rate-three-color-marker-color-promotion-type {
                if-feature two-rate-three-color-marker-color-promotion;
                description
                  "This represents the policer type of two rate three color
                 with color promotion.";
                uses two-rate-three-color-marker-color-promotion;
              }  // case two-rate-three-color-marker-color-promotion-type
            }  // choice policing-type
    
            uses policing-action-profile-ref {
              refine policing-action-profile {
                if-feature policing-action-in-policer;
              }
            }
    
            container hierarchical-policing {
              description
                "Hierarchical policing is the concept in which frames are
               evaluated against multiple policers. These multiple
               policers encompass one another. In other words, traffic
               processed in the scope of a first policer is also processed
               in the scope of a second policer.";
              uses policing-profile-ref;
            }  // container hierarchical-policing
          }  // list policing-profile
        }  // container policing-profiles
    
        container policing-action-profiles {
          if-feature bbf-qos-plc:policing-action-profiles;
          description
            "Provides data nodes to manage a set of actions together as a
           profile.
    
           All actions within the profile are independent of each other
           and are not overlapping.";
          list policing-action-profile {
            key "name";
            description
              "A policing action profile.";
            leaf name {
              type bbf-yang:string-ascii64;
              description
                "The name of a policing action profile.";
            }
    
            list action {
              key "flow-color";
              description
                "Configuration of actions per flow color.
    
               The absence of configuration for a particular color has a
               color dependent meaning:
               - green or yellow: the frame continues further processing,
                 without being subject to immediate actions,
               - red: the frame will be discarded.";
              leaf flow-color {
                type bbf-qos-t:qos-color;
                description
                  "The frames that have this flow color will be subject to
                 the actions configured in the referenced profile.";
              }
    
              choice action {
                description
                  "Choice of the set of actions.";
                case assign-metadata {
                  uses bbf-qos-cls:pbit-marking;
    
                  uses bbf-qos-cls:dei-marking;
    
                  leaf bac-color {
                    type bbf-qos-cls:write-bac-color;
                    description
                      "Defines the frame color for color aware BAC
                     queuing.";
                  }
                }  // case assign-metadata
                leaf discard {
                  type empty;
                  description
                    "Defines that the frame shall be discarded.";
                }
              }  // choice action
            }  // list action
          }  // list policing-action-profile
        }  // container policing-action-profiles
    
        augment /bbf-qos-cls:classifiers/bbf-qos-cls:classifier-entry/bbf-qos-cls:filter-method/bbf-qos-cls:inline/bbf-qos-cls:match-criteria {
          description
            "Flexible match on the p-bits or DEI or flow color for assigning
           frames to a flow.";
          list pbit-marking-list {
            key "index";
            status deprecated;
            description
              "Match on metadata created as the output of another
             classifier. This metadata consists of a value of the p-bits
             associated with a numeric index.";
            leaf index {
              type bbf-fpt:qos-pbit-marking-index;
              status deprecated;
              description
                "The index associated with a value of the p-bits.";
            }
    
            leaf pbit-value {
              type bbf-dot1qt:pbit;
              status deprecated;
              description
                "A value of the p-bits to be used as match criteria from the
               output of another classifier associated with the same QoS
               policy.";
            }
          }  // list pbit-marking-list
    
          list dei-marking-list {
            key "index";
            status deprecated;
            description
              "Match on metadata created as the output of another
             classifier. This metadata consists of a DEI value associated
             with a numeric index.";
            leaf index {
              type bbf-fpt:qos-dei-marking-index;
              status deprecated;
              description
                "The index associated with a DEI value.";
            }
    
            leaf dei-value {
              type bbf-dot1qt:dei;
              status deprecated;
              description
                "A DEI value to be used as match criteria from the output of
               another classifier associated with the same QoS policy.";
            }
          }  // list dei-marking-list
    
          leaf-list flow-color {
            type bbf-qos-t:qos-color;
            status deprecated;
            description
              "Defines the frame color as a classification criterion for
             assigning frames to a flow.";
          }
        }
    
        augment /bbf-qos-cls:classifiers/bbf-qos-cls:classifier-entry/bbf-qos-cls:classifier-action-entry-cfg/bbf-qos-cls:action-cfg-params {
          description
            "Choice of action types for frames matching a classification
           criterion.";
          leaf flow-color {
            when
              '../bbf-qos-cls:action-type="bbf-qos-plc:flow-color"' {
              description
                "Only applicable when the action-type is 'flow-color'.";
            }
            type bbf-qos-t:qos-color;
            description
              "Defines the frame color for when color-aware
               classification/actions is needed in a proceeding QoS
               policy.";
          }
          leaf bac-color {
            when
              '../bbf-qos-cls:action-type="bbf-qos-plc:bac-color"' {
              description
                "Only applicable when the action-type is 'bac-color'.";
            }
            type bbf-qos-cls:write-bac-color;
            description
              "Defines the frame color for color aware BAC queuing.";
          }
          leaf discard {
            when
              '../bbf-qos-cls:action-type="bbf-qos-plc:discard"' {
              description
                "Only applicable when the action-type is 'discard'.";
            }
            type empty;
            description
              "Defines the action discard frames for a flow.";
          }
          container policing {
            when
              '../bbf-qos-cls:action-type="bbf-qos-plc:policing"' {
              description
                "Only applicable when the action-type is 'policing'.";
            }
            description
              "Defines a policing function shall be applied to a flow.";
            uses policing-profile-ref;
          }  // container policing
        }
    
        augment /if:interfaces/if:interface/bbf-qos-pol:qos-policies {
          description
            "Augment the QoS policy management for interfaces to manage
           policing.";
          container policing {
            if-feature interface-policing-management;
            presence
              "The presence of this container indicates policing is managed
             on this interface.";
            description
              "Policing management per interface.";
            container statistics {
              if-feature policing-statistics;
              description
                "Management of data nodes associated with the reporting of
               policing statistics.";
              leaf enabled {
                type boolean;
                default "false";
                description
                  "If 'true', enables the accumulation and reporting of
                 statistics for all policers associated with this
                 interface.";
              }
    
              action reset {
                description
                  "Resets all policing statistics associated with this
                 interface.";
              }  // rpc reset
            }  // container statistics
          }  // container policing
        }
      }  // module bbf-qos-policing
    

© 2023 YumaWorks, Inc. All rights reserved.