Cisco-IOS-XR-infra-policymgr-cfg

This module contains a collection of YANG definitions for Cisco IOS-XR ASR9k policy manager configuration. Copyright (c) 2013, ...

  • Version: 2021-02-15

    Cisco-IOS-XR-infra-policymgr-cfg@2021-02-15


    
      module Cisco-IOS-XR-infra-policymgr-cfg {
    
        yang-version 1;
    
        namespace
          "http://cisco.com/ns/yang/Cisco-IOS-XR-infra-policymgr-cfg";
    
        prefix infra-policymgr-cfg;
    
        import ietf-inet-types {
          prefix inet;
        }
        import ietf-yang-types {
          prefix ietf;
        }
        import cisco-semver {
          prefix semver;
        }
    
        organization "Cisco Systems, Inc.";
    
        contact
          "Cisco Systems, Inc.
         Customer Service
         
         Postal: 170 West Tasman Drive
         San Jose, CA 95134
         
         Tel: +1 800 553-NETS
         
         E-mail: cs-yang@cisco.com";
    
        description
          "This module contains a collection of YANG definitions
         for Cisco IOS-XR ASR9k policy manager configuration.
         
         Copyright (c) 2013, 2015-2021 by Cisco Systems, Inc.
         All rights reserved.";
    
        revision "2021-02-15" {
          description
            "IOS XR 7.3.2 revision.
           2021-01-06
             IOS XR 7.3.2 revision.";
        }
    
        revision "2020-06-05" {
          description
            "IOS XR 7.2.1 revision.
           2020-05-17
           IOS XR 7.2.1 revision.
           2020-04-29
           IOS XR 7.2.1 revision.
           2020-04-06
           IOS XR 7.2.1 revision.
           2020-01-30
           IOS XR 7.2.1 revision.
           2019-12-18
           IOS XR 7.2.1 revision.";
        }
    
        revision "2019-11-21" {
          description
            "IOS XR 7.1.1 revision.
           2019-11-03
           IOS XR 7.1.1 revision.
           2019-10-04
           IOS XR 7.1.1 revision.";
        }
    
        revision "2019-07-31" {
          description "IOS XR 7.0.1 revision.";
        }
    
        revision "2019-07-23" {
          description "IOS XR 7.0.1 revision.";
        }
    
        revision "2019-07-15" {
          description "IOS XR 7.0.1 revision.";
        }
    
        revision "2019-07-11" {
          description "IOS XR 7.0.1 revision.";
        }
    
        revision "2019-07-02" {
          description "IOS XR 7.1.1 revision.";
        }
    
        revision "2018-11-22" {
          description "IOS XR 7.0.1 revision.";
        }
    
        revision "2018-11-02" {
          description "IOS XR 7.1.1 revision.";
        }
    
        revision "2018-09-10" {
          description "IOS XR 7.0.1 revision.";
        }
    
        revision "2018-06-29" {
          description "IOS XR 7.0.1 revision.";
        }
    
        revision "2018-03-02" {
          description "IOS XR 6.5.1 revision.";
        }
    
        revision "2017-12-11" {
          description "IOS XR 6.4.1 revision.";
        }
    
        revision "2017-06-27" {
          description "IOS XR 6.4.1 revision.";
        }
    
        revision "2017-05-15" {
          description "IOS XR 6.3.1 revision.";
        }
    
        revision "2017-04-03" {
          description "IOS XR 6.3.1 revision.";
        }
    
        revision "2017-03-03" {
          description "IOS XR 6.3.1 revision.";
        }
    
        revision "2017-02-15" {
          description "IOS XR 6.2.1 revision.";
        }
    
        revision "2017-02-08" {
          description "IOS XR 6.2.1 revision.";
        }
    
        revision "2016-12-15" {
          description "IOS XR 6.2.1 revision.";
        }
    
        revision "2015-05-18" {
          description "IOS XR 5.3.2 revision.";
        }
    
        revision "2013-07-22" {
          description "Initial revision.";
        }
    
        semver:module-version "4.0.0";
        semver:module-version "3.0.0";
        semver:module-version "2.0.0";
    
        typedef Class-map-type {
          type enumeration {
            enum "qos" {
              value 1;
              description "QoS Classmap.";
            }
            enum "traffic" {
              value 3;
              description "TRAFFIC Classmap.";
            }
            enum "subscriber-control" {
              value 4;
              description
                "Control Subscriber Classmap.";
            }
          }
          description
            "Policy manager class-map type.";
        }
    
        typedef Alarm-severity {
          type string {
            pattern
              "(informational)|(notification)|(warning)|(error)|(critical)|(alert)|(emergency)";
          }
          description "Alaram severity types.";
        }
    
        typedef Policy-map-type {
          type enumeration {
            enum "qos" {
              value 1;
              description "QoS Policymap";
            }
            enum "pbr" {
              value 2;
              description "PBR Policymap";
            }
            enum "traffic" {
              value 3;
              description "TRAFFIC Policymap";
            }
            enum "subscriber-control" {
              value 4;
              description
                "SUBSCRIBER-CONTROL Policymap";
            }
            enum "accounting" {
              value 5;
              description "Accounting Policymap";
            }
            enum "redirect" {
              value 6;
              description "REDIRECT Policy map";
            }
            enum "flow-monitor" {
              value 7;
              description
                "FLOWMONITOR Policy map";
            }
          }
          description
            "Policy manager policy-map type.";
        }
    
        typedef Service-policy-type {
          type string {
            pattern
              "(PBR)|(QOS)|(REDIRECT)|(TRAFFIC)|(pbr)|(qos)|(redirect)|(traffic)";
          }
          description
            "Policy manager service-policy type.";
        }
    
        typedef Bandwidth-units {
          type string {
            pattern
              "(bps)|(kbps)|(mbps)|(gbps)|(percent)|(per-million)|(per-thousand)";
          }
          description
            "Supported units for bandwidth.
           bps          - units in Bits/Sec
           kbps         - units in KiloBits/Sec
           mbps         - units in MegaBits/Sec
           gbps         - units in GigaBits/Sec
           percent      - units in Percentage
           per-million  - parts per-million bandwidth value
           per-thousand - Parts per-thousand bandwidth value";
        }
    
        typedef Bandwidth-remaining-units {
          type string {
            pattern "(percent)|(ratio)";
          }
          description
            "Supported units for bandwidth remaining.
           percent      - units in Percentage
           ratio        - units in Ratio";
        }
    
        typedef Rate-units {
          type string {
            pattern
              "(bps)|(kbps)|(mbps)|(gbps)|(pps)|(percent)|(cellsps)";
          }
          description
            "Supported units for police rate or peak-rate.
           bps     - units in Bits/Sec
           kbps    - units in KiloBits/Sec
           mbps    - units in MegaBits/Sec
           gbps    - units in GigaBits/Sec
           pps     - units in Packets/Sec
           percent - units in Percentage
           cellsps - units in Cells/Sec";
        }
    
        typedef Police-Rate-units {
          type string {
            pattern
              "(bps)|(kbps)|(mbps)|(gbps)|(pps)|(percent)|(cellsps)|(per-thousand)|(per-million)";
          }
          description
            "Supported units for police rate or peak-rate.
           bps     - units in Bits/Sec
           kbps    - units in KiloBits/Sec
           mbps    - units in MegaBits/Sec
           gbps    - units in GigaBits/Sec
           pps     - units in Packets/Sec
           percent - units in Percentage
           cellsps - units in Cells/Sec
           per-million  - parts per-million bandwidth value
           per-thousand - Parts per-thousand bandwidth value";
        }
    
        typedef Cac-rate-units {
          type string {
            pattern
              "(bps)|(kbps)|(mbps)|(gbps)|(cellsps)";
          }
          description
            "Supported units for CAC rate or flow-rate.
           bps     - units in Bits/Sec
           kbps    - units in KiloBits/Sec
           mbps    - units in MegaBits/Sec
           gbps    - units in GigaBits/Sec
           cellsps - units in Cells/Sec";
        }
    
        typedef Queue-units {
          type string {
            pattern
              "(bytes)|(kbytes)|(mbytes)|(gbytes)|(us)|(ms)|(packets)|(cells)|(percent)";
          }
          description
            "Supported units for queue.
           bytes   - units in Bytes
           kbytes  - units in KiloBytes
           mbytes  - units in MegaBytes
           gbytes  - units in Gigabytes
           us      - units in Microseconds
           ms      - units in Milliseconds
           packets - units in Packets
           cells   - units in Cells
           percent - units in Percent";
        }
    
        typedef Threshold-units {
          type string {
            pattern
              "(bytes)|(kbytes)|(mbytes)|(gbytes)|(us)|(ms)|(packets)|(cells)";
          }
          description
            "Supported units for RED threshold.
           bytes   - units in Bytes
           kbytes  - units in KiloBytes
           mbytes  - units in MegaBytes
           gbytes  - units in GigaBytes
           us      - units in Microseconds
           ms      - units in Milliseconds
           packets - units in Packets
           cells   - units in Cells";
        }
    
        typedef Pfc-units {
          type string {
            pattern
              "(bytes)|(kbytes)|(mbytes)|(gbytes)|(us)|(ms)|(packets)|(cells)";
          }
          description
            "Supported units for pfc.
           bytes   - units in Bytes
           kbytes  - units in KiloBytes
           mbytes  - units in MegaBytes
           gbytes  - units in Gigabytes
           us      - units in Microseconds
           ms      - units in Milliseconds
           packets - units in Packets
           cells   - units in Cells";
        }
    
        typedef Float-str {
          type string {
            pattern "[0-9]+(\\.[0-9]+)?";
          }
          description
            "Floating point number string representation.";
        }
    
        typedef Dscp {
          type string {
            pattern
              "([0-9]|[1-5][0-9]|6[0-3])|(af11)|(af12)|(af13)|(af21)|(af22)|(af23)|(af31)|(af32)|(af33)|(af41)|(af42)|(af43)|(ef)|(default)|(cs1)|(cs2)|(cs3)|(cs4)|(cs5)|(cs6)|(cs7)";
          }
          description
            "DSCP value string representation.
           Should be single value 0..63 or predefined string.";
        }
    
        typedef Dscp-range {
          type string {
            pattern
              "([0-9]|[1-5][0-9]|6[0-3])|(([0-9]|[1-5][0-9]|6[0-3])-([0-9]|[1-5][0-9]|6[0-3]))|(af11)|(af12)|(af13)|(af21)|(af22)|(af23)|(af31)|(af32)|(af33)|(af41)|(af42)|(af43)|(ef)|(default)|(cs1)|(cs2)|(cs3)|(cs4)|(cs5)|(cs6)|(cs7)";
          }
          description
            "DSCP value or range string representation.
           Should be single value 0..63 or predefined string
           or range <min>-<max>.";
        }
    
        typedef Num-range {
          type string {
            pattern "(\\d+)|(\\d+\\-\\d+)";
          }
          description
            "Numeric value or range string representation.
           Should be single value or range <min>-<max>.";
        }
    
        typedef Protocol {
          type string {
            pattern
              "([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])|(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\-([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))|((ahp)|(dhcpv4)|(dhcpv6)|(eigrp)|(esp)|(gre)|(icmp)|(igmp)|(igrp)|(ipinip)|(ipv4)|(ipv6)|(ipv6icmp)|(mpls)|(nos)|(ospf)|(pcp)|(pim)|(ppp)|(sctp)|(tcp)|(udp))";
          }
          description
            "Numeric value or range or string representation.
           Should be single value or range 0..255.";
        }
    
        typedef Subs-Protocol {
          type string {
            pattern "(dhcpv4)|(dhcpv6)|(ppp)";
          }
          description
            "Should be one of the 3 values.";
        }
    
        typedef Ethertype {
          type string {
            pattern
              "((153[6-9]|15[4-9][0-9]|1[6-9][0-9][0-9]|[2-9][0-9][0-9][0-9])|([1-5][0-9][0-9][0-9][0-9]|6[0-4][0-9][0-9][0-9])|(65[0-4][0-9][0-9]|655[0-2][0-9]|6553[0-5]))|((arp)|(ipv4)|(ipv6))";
          }
          description
            "Numeric value or string representation.
           Should be single value 1536..65535 or predefined string.";
        }
    
        typedef shape-value {
          type union {
            type string {
              pattern
                "[$][a-zA-Z0-9][a-zA-Z0-9\\._@%+:\\-]{0,32}[ ][=][ ]\\d{1,10}";
            }
            type uint32 {
              range "1..4294967295";
            }
          }
          description
            "The shape can be either given as $var=<value> or
           <value>. The range is from 1..4294967295";
        }
    
        typedef Precedence {
          type union {
            type uint8 {
              range "0..7";
            }
            type string {
              pattern
                "(critical)|(flash)|(flash-override)|(immediate)|(internet)|(network)|(priority)|(routine)";
            }
          }
          description
            "Precedence value.
           critical        Critical precedence (5)
           flash           Flash precedence (3)
           flash-override  Flash override precedence (4)
           immediate       Immediate precedence (2)
           internet        Internetwork control precedence (6)
           network         Network control precedence (7)
           priority        Priority precedence (1)
           routine         Routine precedence (0)";
        }
    
        typedef Cos {
          type uint8 {
            range "0..7";
          }
          description "Cos value.";
        }
    
        typedef vrf-name-length {
          type string {
            length "1..32";
          }
          description "length of the vrf name.";
        }
    
        typedef Idle-timeout-number {
          type uint16 {
            range "10..2550";
          }
          units "seconds";
          description
            "String that idle-timeout can take.";
        }
    
        typedef Idle-timeout-string {
          type string {
            pattern "(None)|(none)";
          }
          description
            "This flow does not expire.";
        }
    
        typedef Idle-timeout {
          type union {
            type Idle-timeout-number;
            type Idle-timeout-string;
          }
          description
            "Idle timeout after which flow expires";
        }
    
        typedef Encap-Seq-number {
          type uint16 {
            range "1..15";
          }
          description "Encap seq number";
        }
    
        typedef Encap-Seq-string {
          type string {
            pattern "(None)|(none)";
          }
          description "No encap sequence.";
        }
    
        typedef Encap-sequence-type {
          type union {
            type Encap-Seq-number;
            type Encap-Seq-string;
          }
          description
            "Encap sequence for the policy-map";
        }
    
        typedef Event-type {
          type enumeration {
            enum "account-logoff" {
              value 0;
              description
                "Account logoff event.";
            }
            enum "account-logon" {
              value 1;
              description "Account logon event.";
            }
            enum "authentication-failure" {
              value 2;
              description
                "Denotes Authentication failure event.";
            }
            enum "authentication-no-response" {
              value 3;
              description
                "Denotes Authentication no response event.";
            }
            enum "authorization-failure" {
              value 4;
              description
                "Denotes Authorization failure event.";
            }
            enum "authorization-no-response" {
              value 5;
              description
                "Denotes Authorization no response event.";
            }
            enum "credit-exhausted" {
              value 6;
              description
                "Credit exhaustion event.";
            }
            enum "exception" {
              value 7;
              description "Exception event.";
            }
            enum "idle-timeout" {
              value 8;
              description "Idle timeout event.";
            }
            enum "quota-depleted" {
              value 9;
              description
                "Quota depletion event.";
            }
            enum "service-start" {
              value 10;
              description "Service start event.";
            }
            enum "service-stop" {
              value 11;
              description "Service stop event.";
            }
            enum "session-activate" {
              value 12;
              description
                "Session activate event.";
            }
            enum "session-start" {
              value 13;
              description "Session start event.";
            }
            enum "session-stop" {
              value 14;
              description "Session stop event.";
            }
            enum "timer-expiry" {
              value 15;
              description "Timer expiry event.";
            }
            enum "session-identity-change" {
              value 16;
              description
                "Session identity change event.";
            }
            enum "authorize-dhcp-renew" {
              value 17;
              description
                "Authorize dhcp renew packet event.";
            }
            enum "session-umi-report" {
              value 18;
              description
                "Session UMI report  event.";
            }
            enum "session-established" {
              value 19;
              description
                "Session established event.";
            }
            enum "prepaid-quota-rejected" {
              value 20;
              description
                "Prepaid quota rejected.";
            }
            enum "prepaid-start-failed" {
              value 21;
              description
                "prepaid start request failed for the session.";
            }
          }
          description
            "Service Policy Event type.";
        }
    
        typedef Execution-strategy {
          type enumeration {
            enum "do-all" {
              value 0;
              description "Do all actions.";
            }
            enum "do-until-failure" {
              value 1;
              description
                "Do all actions until failure.";
            }
            enum "do-until-success" {
              value 2;
              description
                "Do all actions until success.";
            }
          }
          description
            "Strategy to execute the Policy action.";
        }
    
        typedef Authorize-identifier {
          type enumeration {
            enum "circuit-id" {
              value 0;
              description
                "Authorize circuit ID.";
            }
            enum "dhcp-client-id" {
              value 1;
              description
                "Authorize dhcp client ID.";
            }
            enum "remote-id" {
              value 2;
              description "Authorize remote ID.";
            }
            enum "source-address-ipv4" {
              value 3;
              description
                "Authorize source IPv4 address.";
            }
            enum "source-address-ipv6" {
              value 4;
              description
                "Authorize source IPv6 address.";
            }
            enum "source-address-mac" {
              value 5;
              description
                "Authorize source MAC address.";
            }
            enum "username" {
              value 6;
              description "Authorize username.";
            }
          }
          description
            "Different parameters for Authorization";
        }
    
        typedef dhcp-client-id-options {
          type string {
            pattern "(none)|(ascii)|(hex)";
          }
          description
            "DHCP client Id Flag option.";
        }
    
        container policy-manager {
          description
            "Global Policy Manager configuration.";
          container class-maps {
            description
              "Class-maps configuration.";
            list class-map {
              key "type name";
              description
                "Class-map configuration.";
              leaf type {
                type Class-map-type;
                description "Type of class-map.";
              }
    
              leaf name {
                type string {
                  pattern
                    "[a-zA-Z0-9][a-zA-Z0-9\\._@$%+#:=<>\\-]{0,62}";
                }
                description "Name of class-map.";
              }
    
              choice class-map-mode-match {
                default
                  "class-map-mode-match-any";
                leaf class-map-mode-match-any {
                  type empty;
                  description
                    "Match any match criteria";
                }
                leaf class-map-mode-match-all {
                  type empty;
                  description
                    "Match all match criteria.";
                }
              }  // choice class-map-mode-match
    
              container match {
                description "Match rules.";
                leaf-list ipv4-dscp {
                  type Dscp-range;
                  ordered-by user;
                  description "Match IPv4 DSCP.";
                }
    
                leaf-list ipv6-dscp {
                  type Dscp-range;
                  ordered-by user;
                  description "Match IPv6 DSCP.";
                }
    
                leaf-list dscp {
                  type Dscp-range;
                  ordered-by user;
                  description "Match DSCP.";
                }
    
                leaf-list ipv4-precedence {
                  type Precedence;
                  ordered-by user;
                  description
                    "Match IPv4 precedence.";
                }
    
                leaf-list ipv6-precedence {
                  type Precedence;
                  ordered-by user;
                  description
                    "Match IPv6 precedence.";
                }
    
                leaf-list precedence {
                  type Precedence;
                  ordered-by user;
                  description
                    "Match precedence.";
                }
    
                leaf-list qos-group {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match QoS group.
    Should be value 0..512 or range.";
                }
    
                leaf-list traffic-class {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match Traffic Class.
    Should be value 0..63 or range.";
                }
    
                leaf-list cos {
                  type Cos;
                  ordered-by user;
                  description "Match CoS.";
                }
    
                leaf-list inner-cos {
                  type Cos;
                  ordered-by user;
                  description "Match inner CoS.";
                }
    
                leaf dei {
                  type uint8 {
                    range "0..1";
                  }
                  description "Match DEI bit.";
                }
    
                leaf dei-inner {
                  type uint8 {
                    range "0..1";
                  }
                  description
                    "Match DEI INNER  bit.";
                }
    
                leaf-list protocol {
                  type Protocol;
                  ordered-by user;
                  description "Match protocol.";
                }
    
                leaf-list subs-protocol {
                  type Subs-Protocol;
                  ordered-by user;
                  description
                    "Match subs protocol.";
                }
    
                leaf-list ipv4-acl {
                  type string {
                    length "1..64";
                  }
                  ordered-by user;
                  description "Match IPv4 ACL.";
                }
    
                leaf-list ipv6-acl {
                  type string {
                    length "1..64";
                  }
                  ordered-by user;
                  description "Match IPv6 ACL.";
                }
    
                leaf-list ethernet-services-acl {
                  type string {
                    length "1..64";
                  }
                  ordered-by user;
                  description
                    "Match Ethernet Services";
                }
    
                leaf-list mpls-experimental-topmost {
                  type Cos;
                  ordered-by user;
                  description
                    "Match MPLS experimental topmost label.";
                }
    
                leaf-list mpls-experimental-imposition {
                  type Cos;
                  ordered-by user;
                  description
                    "Match MPLS experimental imposition label.";
                }
    
                leaf-list discard-class {
                  type Cos;
                  ordered-by user;
                  description
                    "Match discard class.";
                }
    
                leaf-list ipv4-packet-length {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match IPv4 packet length.
    Should be value 0..65535 or range.";
                }
    
                leaf-list ipv6-packet-length {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match IPv6 packet length.
    Should be value 0..65535 or range.";
                }
    
                leaf-list packet-length {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match packet length.
    Should be value 0..65535 or range.";
                }
    
                leaf-list mpls-disposition-ipv4-access-list {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match MPLS Label Disposition IPv4 access list.";
                }
    
                leaf-list mpls-disposition-ipv6-access-list {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match MPLS Label Disposition IPv6 access list.";
                }
    
                leaf-list mpls-disp-class-map {
                  type string {
                    length "1..32";
                    pattern
                      "[a-zA-Z0-9][a-zA-Z0-9\\._@$%+#:=<>\\-]*";
                  }
                  ordered-by user;
                  description
                    "Match MPLS Label Disposition class-map";
                }
    
                leaf-list vlan {
                  type Num-range;
                  ordered-by user;
                  description "Match VLAN ID.";
                }
    
                leaf-list inner-vlan {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match inner VLAN ID.";
                }
    
                leaf-list flow-tag {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match flow-tag. Should be value 1..63 or range.";
                }
    
                leaf-list ethertype {
                  type Ethertype;
                  ordered-by user;
                  description "Match Ethertype.";
                }
    
                list destination-address-ipv4 {
                  key "address netmask";
                  description
                    "Match destination IPv4 address.";
                  leaf address {
                    type inet:ipv4-address-no-zone;
                    description "IPv4 address.";
                  }
    
                  leaf netmask {
                    type inet:ipv4-address-no-zone;
                    description "IPv4 netmask.";
                  }
                }  // list destination-address-ipv4
    
                list destination-address-ipv6 {
                  key "address prefix-length";
                  description
                    "Match destination IPv6 address.";
                  leaf address {
                    type inet:ipv6-address-no-zone;
                    description "IPv6 address.";
                  }
    
                  leaf prefix-length {
                    type uint8 {
                      range "0..128";
                    }
                    description
                      "Length of the IPv6 prefix";
                  }
                }  // list destination-address-ipv6
    
                leaf-list destination-port {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match destination port.
    Should be value 0..65535 or range.";
                }
    
                leaf-list fragment-type {
                  type string {
                    pattern
                      "(dont-fragment)|(first-fragment)|(is-fragment)|(last-fragment)";
                  }
                  max-elements 4;
                  ordered-by user;
                  description
                    "Match fragment type for a packet.";
                }
    
                leaf-list frame-relay-dlci {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match frame-relay DLCI value.
    Should be value 16..1007 or range.";
                }
    
                leaf-list fr-de {
                  type uint8 {
                    range "0..1";
                  }
                  description
                    "Match FrameRelay DE bit.";
                }
    
                leaf-list icmpv4-code {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match IPv4 ICMP code.
    Should be value 0..255 or range.";
                }
    
                leaf-list icmpv4-type {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match IPv4 ICMP type.
    Should be value 0..255 or range.";
                }
    
                leaf-list icmpv6-code {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match IPv6 ICMP code.
    Should be value 0..255 or range.";
                }
    
                leaf-list icmpv6-type {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match IPv6 ICMP type.
    Should be value 0..255 or range.";
                }
    
                list source-address-ipv4 {
                  key "address netmask";
                  description
                    "Match source IPv4 address.";
                  leaf address {
                    type inet:ipv4-address-no-zone;
                    description "IPv4 address.";
                  }
    
                  leaf netmask {
                    type inet:ipv4-address-no-zone;
                    description "IPv4 netmask.";
                  }
                }  // list source-address-ipv4
    
                list source-address-ipv6 {
                  key "address prefix-length";
                  description
                    "Match source IPv6 address.";
                  leaf address {
                    type inet:ipv6-address-no-zone;
                    description "IPv6 address.";
                  }
    
                  leaf prefix-length {
                    type uint8 {
                      range "0..128";
                    }
                    description
                      "Length of the IPv6 prefix";
                  }
                }  // list source-address-ipv6
    
                leaf-list source-port {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match source port.
    Should be value 0..65535 or range.";
                }
    
                leaf tcp-flag {
                  type uint16 {
                    range "0..4095";
                  }
                  description "Match TCP flags.";
                }
    
                leaf authen-status {
                  type string {
                    pattern
                      "(authenticated)|(unauthenticated)";
                  }
                  description
                    "Match authentication status.";
                }
    
                leaf-list circuit-id {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match Circuit ID.";
                }
    
                leaf-list circuit-id-regex {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match Circuit id regular expression";
                }
    
                list dhcp-client-id {
                  key "client-id flag";
                  description
                    "Match dhcp client ID.";
                  leaf client-id {
                    type string {
                      length "1..32";
                    }
                    description
                      "Dhcp client Id.";
                  }
    
                  leaf flag {
                    type dhcp-client-id-options;
                    description
                      "Dhcp client id Ascii/Hex";
                  }
                }  // list dhcp-client-id
    
                list dhcp-client-id-regex {
                  key "client-id flag";
                  description
                    "Match dhcp client id regular expression";
                  leaf client-id {
                    type string {
                      length "1..32";
                    }
                    description
                      "Dhcp client id regular expression.";
                  }
    
                  leaf flag {
                    type dhcp-client-id-options;
                    description
                      "Dhcp client Id regex Ascii/Hex.";
                  }
                }  // list dhcp-client-id-regex
    
                list domain-name {
                  key "name format";
                  description
                    "Match domain name.";
                  leaf name {
                    type string {
                      length "1..32";
                    }
                    description
                      "Domain name or regular expression.";
                  }
    
                  leaf format {
                    type string {
                      length "1..32";
                    }
                    description
                      "Domain-format name.";
                  }
                }  // list domain-name
    
                list domain-name-regex {
                  key "regex format";
                  description
                    "Match domain name.";
                  leaf regex {
                    type string {
                      length "1..32";
                    }
                    description
                      "Domain name or regular expression.";
                  }
    
                  leaf format {
                    type string {
                      length "1..32";
                    }
                    description
                      "Domain-format name.";
                  }
                }  // list domain-name-regex
    
                leaf-list remote-id {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description "Match remote ID.";
                }
    
                leaf-list remote-id-regex {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match remote id regular expression";
                }
    
                leaf-list service-name {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match servicve name.";
                }
    
                leaf-list service-name-regex {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match servicve name regular expression.";
                }
    
                leaf-list timer {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description "Match timer.";
                }
    
                leaf-list timer-regex {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match timer regular expression.";
                }
    
                leaf-list user-name {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description "Match user name.";
                }
    
                leaf-list user-name-regex {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match user name regular expression.";
                }
    
                leaf source-mac {
                  type ietf:mac-address;
                  description
                    "Match source MAC address. Format is e.g. ff:a6:8e:00:01:02.";
                }
    
                leaf destination-mac {
                  type ietf:mac-address;
                  description
                    "Match destination MAC address. Format is e.g. ff:a6:8e:00:01:02.";
                }
    
                leaf vpls-control {
                  type empty;
                  description
                    "Match VPLS control";
                }
    
                leaf vpls-broadcast {
                  type empty;
                  description
                    "Match VPLS Broadcast";
                }
    
                leaf vpls-multicast {
                  type empty;
                  description
                    "Match VPLS Multicast";
                }
    
                leaf vpls-known {
                  type empty;
                  description "Match VPLS Known";
                }
    
                leaf vpls-unknown {
                  type empty;
                  description
                    "Match VPLS Unknown";
                }
    
                leaf-list atm-clp {
                  type uint8 {
                    range "0..1";
                  }
                  ordered-by user;
                  description
                    "Match ATM CLP bit.";
                }
    
                leaf atm-oam {
                  type empty;
                  description "Match ATM OAM.";
                }
    
                leaf cac-admit {
                  type empty;
                  description
                    "Match CAC admitted.";
                }
    
                leaf cac-unadmit {
                  type empty;
                  description
                    "Match CAC unadmitted.";
                }
    
                container flow {
                  description "Match flow.";
                  leaf-list flow-key {
                    type string {
                      pattern
                        "(SourceIP)|(DestinationIP)|(5Tuple)";
                    }
                    ordered-by user;
                    description
                      "Configure the flow-key parameters.";
                  }
    
                  container flow-cache {
                    description
                      "Configure the flow-cache parameters";
                    leaf idle-timeout {
                      type Idle-timeout;
                      description
                        "Maximum time of inactivity for a flow.";
                    }
    
                    leaf max-count {
                      type uint16 {
                        range "1..65535";
                      }
                      description
                        "Configure the max-count for the flow-key";
                    }
                  }  // container flow-cache
                }  // container flow
              }  // container match
    
              container match-not {
                description "Match not rules.";
                leaf-list ipv4-dscp {
                  type Dscp-range;
                  ordered-by user;
                  description "Match IPv4 DSCP.";
                }
    
                leaf-list ipv6-dscp {
                  type Dscp-range;
                  ordered-by user;
                  description "Match IPv6 DSCP.";
                }
    
                leaf-list dscp {
                  type Dscp-range;
                  ordered-by user;
                  description "Match DSCP.";
                }
    
                leaf-list ipv4-precedence {
                  type Precedence;
                  ordered-by user;
                  description
                    "Match IPv4 precedence.";
                }
    
                leaf-list ipv6-precedence {
                  type Precedence;
                  ordered-by user;
                  description
                    "Match IPv6 precedence.";
                }
    
                leaf-list precedence {
                  type Precedence;
                  ordered-by user;
                  description
                    "Match precedence.";
                }
    
                leaf-list qos-group {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match QoS group.
    Should be value 0..512 or range.";
                }
    
                leaf-list traffic-class {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match Traffic Class.
    Should be value 0..63 or range.";
                }
    
                leaf-list cos {
                  type Cos;
                  ordered-by user;
                  description "Match CoS.";
                }
    
                leaf-list inner-cos {
                  type Cos;
                  ordered-by user;
                  description "Match inner CoS.";
                }
    
                leaf dei {
                  type uint8 {
                    range "0..1";
                  }
                  description "Match DEI bit.";
                }
    
                leaf dei-inner {
                  type uint8 {
                    range "0..1";
                  }
                  description
                    "Match DEI INNER  bit.";
                }
    
                leaf-list protocol {
                  type Protocol;
                  ordered-by user;
                  description "Match protocol.";
                }
    
                leaf-list subs-protocol {
                  type Subs-Protocol;
                  ordered-by user;
                  description
                    "Match subs protocol.";
                }
    
                leaf-list ipv4-acl {
                  type string {
                    length "1..64";
                  }
                  ordered-by user;
                  description "Match IPv4 ACL.";
                }
    
                leaf-list ipv6-acl {
                  type string {
                    length "1..64";
                  }
                  ordered-by user;
                  description "Match IPv6 ACL.";
                }
    
                leaf-list ethernet-services-acl {
                  type string {
                    length "1..64";
                  }
                  ordered-by user;
                  description
                    "Match Ethernet Services";
                }
    
                leaf-list mpls-experimental-topmost {
                  type Cos;
                  ordered-by user;
                  description
                    "Match MPLS experimental topmost label.";
                }
    
                leaf-list mpls-experimental-imposition {
                  type Cos;
                  ordered-by user;
                  description
                    "Match MPLS experimental imposition label.";
                }
    
                leaf-list discard-class {
                  type Cos;
                  ordered-by user;
                  description
                    "Match discard class.";
                }
    
                leaf-list ipv4-packet-length {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match IPv4 packet length.
    Should be value 0..65535 or range.";
                }
    
                leaf-list ipv6-packet-length {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match IPv6 packet length.
    Should be value 0..65535 or range.";
                }
    
                leaf-list packet-length {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match packet length.
    Should be value 0..65535 or range.";
                }
    
                leaf-list mpls-disposition-ipv4-access-list {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match MPLS Label Disposition IPv4 access list.";
                }
    
                leaf-list mpls-disposition-ipv6-access-list {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match MPLS Label Disposition IPv6 access list.";
                }
    
                leaf-list mpls-disp-class-map {
                  type string {
                    length "1..32";
                    pattern
                      "[a-zA-Z0-9][a-zA-Z0-9\\._@$%+#:=<>\\-]*";
                  }
                  ordered-by user;
                  description
                    "Match MPLS Label Disposition class-map";
                }
    
                leaf-list vlan {
                  type Num-range;
                  ordered-by user;
                  description "Match VLAN ID.";
                }
    
                leaf-list inner-vlan {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match inner VLAN ID.";
                }
    
                leaf-list flow-tag {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match flow-tag. Should be value 1..63 or range.";
                }
    
                leaf-list ethertype {
                  type Ethertype;
                  ordered-by user;
                  description "Match Ethertype.";
                }
    
                list destination-address-ipv4 {
                  key "address netmask";
                  description
                    "Match destination IPv4 address.";
                  leaf address {
                    type inet:ipv4-address-no-zone;
                    description "IPv4 address.";
                  }
    
                  leaf netmask {
                    type inet:ipv4-address-no-zone;
                    description "IPv4 netmask.";
                  }
                }  // list destination-address-ipv4
    
                list destination-address-ipv6 {
                  key "address prefix-length";
                  description
                    "Match destination IPv6 address.";
                  leaf address {
                    type inet:ipv6-address-no-zone;
                    description "IPv6 address.";
                  }
    
                  leaf prefix-length {
                    type uint8 {
                      range "0..128";
                    }
                    description
                      "Length of the IPv6 prefix";
                  }
                }  // list destination-address-ipv6
    
                leaf-list destination-port {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match destination port.
    Should be value 0..65535 or range.";
                }
    
                leaf-list fragment-type {
                  type string {
                    pattern
                      "(dont-fragment)|(first-fragment)|(is-fragment)|(last-fragment)";
                  }
                  max-elements 4;
                  ordered-by user;
                  description
                    "Match fragment type for a packet.";
                }
    
                leaf-list frame-relay-dlci {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match frame-relay DLCI value.
    Should be value 16..1007 or range.";
                }
    
                leaf-list fr-de {
                  type uint8 {
                    range "0..1";
                  }
                  description
                    "Match FrameRelay DE bit.";
                }
    
                leaf-list icmpv4-code {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match IPv4 ICMP code.
    Should be value 0..255 or range.";
                }
    
                leaf-list icmpv4-type {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match IPv4 ICMP type.
    Should be value 0..255 or range.";
                }
    
                leaf-list icmpv6-code {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match IPv6 ICMP code.
    Should be value 0..255 or range.";
                }
    
                leaf-list icmpv6-type {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match IPv6 ICMP type.
    Should be value 0..255 or range.";
                }
    
                list source-address-ipv4 {
                  key "address netmask";
                  description
                    "Match source IPv4 address.";
                  leaf address {
                    type inet:ipv4-address-no-zone;
                    description "IPv4 address.";
                  }
    
                  leaf netmask {
                    type inet:ipv4-address-no-zone;
                    description "IPv4 netmask.";
                  }
                }  // list source-address-ipv4
    
                list source-address-ipv6 {
                  key "address prefix-length";
                  description
                    "Match source IPv6 address.";
                  leaf address {
                    type inet:ipv6-address-no-zone;
                    description "IPv6 address.";
                  }
    
                  leaf prefix-length {
                    type uint8 {
                      range "0..128";
                    }
                    description
                      "Length of the IPv6 prefix";
                  }
                }  // list source-address-ipv6
    
                leaf-list source-port {
                  type Num-range;
                  ordered-by user;
                  description
                    "Match source port.
    Should be value 0..65535 or range.";
                }
    
                leaf tcp-flag {
                  type uint16 {
                    range "0..4095";
                  }
                  description "Match TCP flags.";
                }
    
                leaf authen-status {
                  type string {
                    pattern
                      "(authenticated)|(unauthenticated)";
                  }
                  description
                    "Match authentication status.";
                }
    
                leaf-list circuit-id {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match Circuit ID.";
                }
    
                leaf-list circuit-id-regex {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match Circuit id regular expression";
                }
    
                list dhcp-client-id {
                  key "client-id flag";
                  description
                    "Match dhcp client ID.";
                  leaf client-id {
                    type string {
                      length "1..32";
                    }
                    description
                      "Dhcp client Id.";
                  }
    
                  leaf flag {
                    type dhcp-client-id-options;
                    description
                      "Dhcp client id Ascii/Hex";
                  }
                }  // list dhcp-client-id
    
                list dhcp-client-id-regex {
                  key "client-id flag";
                  description
                    "Match dhcp client id regular expression";
                  leaf client-id {
                    type string {
                      length "1..32";
                    }
                    description
                      "Dhcp client id regular expression.";
                  }
    
                  leaf flag {
                    type dhcp-client-id-options;
                    description
                      "Dhcp client Id regex Ascii/Hex.";
                  }
                }  // list dhcp-client-id-regex
    
                list domain-name {
                  key "name format";
                  description
                    "Match domain name.";
                  leaf name {
                    type string {
                      length "1..32";
                    }
                    description
                      "Domain name or regular expression.";
                  }
    
                  leaf format {
                    type string {
                      length "1..32";
                    }
                    description
                      "Domain-format name.";
                  }
                }  // list domain-name
    
                list domain-name-regex {
                  key "regex format";
                  description
                    "Match domain name.";
                  leaf regex {
                    type string {
                      length "1..32";
                    }
                    description
                      "Domain name or regular expression.";
                  }
    
                  leaf format {
                    type string {
                      length "1..32";
                    }
                    description
                      "Domain-format name.";
                  }
                }  // list domain-name-regex
    
                leaf-list remote-id {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description "Match remote ID.";
                }
    
                leaf-list remote-id-regex {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match remote id regular expression";
                }
    
                leaf-list service-name {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match servicve name.";
                }
    
                leaf-list service-name-regex {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match servicve name regular expression.";
                }
    
                leaf-list timer {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description "Match timer.";
                }
    
                leaf-list timer-regex {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match timer regular expression.";
                }
    
                leaf-list user-name {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description "Match user name.";
                }
    
                leaf-list user-name-regex {
                  type string {
                    length "1..32";
                  }
                  ordered-by user;
                  description
                    "Match user name regular expression.";
                }
    
                leaf source-mac {
                  type ietf:mac-address;
                  description
                    "Match source MAC address. Format is e.g. ff:a6:8e:00:01:02.";
                }
    
                leaf destination-mac {
                  type ietf:mac-address;
                  description
                    "Match destination MAC address. Format is e.g. ff:a6:8e:00:01:02.";
                }
    
                leaf vpls-control {
                  type empty;
                  description
                    "Match VPLS control";
                }
    
                leaf vpls-broadcast {
                  type empty;
                  description
                    "Match VPLS Broadcast";
                }
    
                leaf vpls-multicast {
                  type empty;
                  description
                    "Match VPLS Multicast";
                }
    
                leaf vpls-known {
                  type empty;
                  description "Match VPLS Known";
                }
    
                leaf vpls-unknown {
                  type empty;
                  description
                    "Match VPLS Unknown";
                }
              }  // container match-not
    
              leaf description {
                type string;
                description
                  "Description for this policy-map.";
              }
            }  // list class-map
          }  // container class-maps
    
          container policy-maps {
            description
              "Policy-maps configuration.";
            list policy-map {
              key "type name";
              description
                "Policy-map configuration.";
              leaf type {
                type Policy-map-type;
                description
                  "Type of policy-map.";
              }
    
              leaf name {
                type string {
                  pattern
                    "[a-zA-Z0-9][a-zA-Z0-9\\._@$%+#:=<>\\-]{0,62}";
                }
                description
                  "Name of policy-map.";
              }
    
              list event {
                key "event-type";
                description "Policy event.";
                leaf event-type {
                  type Event-type;
                  description
                    "Service Policy Event type.";
                }
    
                leaf event-mode-match-all {
                  when
                    "count(../event-mode-match-first) = 0" {
                    description
                      "Event MUST have only one mode.";
                  }
                  type empty;
                  description
                    "Execute all the matched classes.";
                }
    
                leaf event-mode-match-first {
                  when
                    "count(../event-mode-match-all) = 0" {
                    description
                      "Event MUST have only one mode.";
                  }
                  type empty;
                  description
                    "Execute only the first matched class.";
                }
    
                list class {
                  key "class-name class-type";
                  description "Class-map rule.";
                  leaf class-name {
                    type string {
                      pattern
                        "[a-zA-Z0-9][a-zA-Z0-9\\._@$%+#:=<>\\-]{0,62}";
                    }
                    description "Name of class.";
                  }
    
                  leaf class-type {
                    type Class-map-type;
                    description "Type of class.";
                  }
    
                  leaf class-execution-strategy {
                    type Execution-strategy;
                    description
                      "Strategy to execute Class-map";
                  }
    
                  list action-rule {
                    key "action-sequence-number";
                    description
                      "Action rule parameters";
                    leaf action-sequence-number {
                      type uint16 {
                        range "1..65535";
                      }
                      description
                        "Sequence number for this action.";
                    }
    
                    container activate-dynamic-template {
                      presence
                        "This container is present only if actions is
    related to dynamic templates.";
                      description
                        "Activate dynamically created templates.";
                      leaf name {
                        type string;
                        mandatory true;
                        description
                          "Dynamic template name.";
                      }
    
                      leaf aaa-list {
                        type string;
                        description
                          "Name of the AAA method list.";
                      }
                    }  // container activate-dynamic-template
    
                    container authenticate {
                      description
                        "Authentication related configuration.";
                      leaf aaa-list {
                        type string;
                        description
                          "Name of the AAA method list.";
                      }
                    }  // container authenticate
    
                    container authorize {
                      must
                        "format or identifier" {
                        description
                          "format or identifier must be set.";
                      }
                      presence
                        "This container is present only if actions is
    related to authorization.";
                      description
                        "Authorize using format or identifier or password";
                      leaf aaa-list {
                        type string;
                        mandatory true;
                        description
                          "Name of the AAA method list.";
                      }
    
                      leaf format {
                        type string;
                        description
                          "Specify an Authorize format name.";
                      }
    
                      leaf identifier {
                        type Authorize-identifier;
                        description
                          "Specify an Authorize format name.";
                      }
    
                      leaf password {
                        type string;
                        mandatory true;
                        description
                          "Specify a password to be used for AAA
    request.";
                      }
                    }  // container authorize
    
                    container deactivate-dynamic-template {
                      presence
                        "This container is present only if actions is
    related to dynamic templates.";
                      description
                        "Deactivate dynamically created templates.";
                      leaf name {
                        type string;
                        mandatory true;
                        description
                          "Dynamic template name.";
                      }
    
                      leaf aaa-list {
                        type string;
                        description
                          "Name of the AAA method list.";
                      }
                    }  // container deactivate-dynamic-template
    
                    leaf disconnect {
                      type empty;
                      description
                        "Disconnect session.";
                    }
    
                    leaf monitor {
                      type empty;
                      description
                        "Monitor session.";
                    }
    
                    leaf service-deactivate {
                      type empty;
                      description
                        "deactivate service on prepaid start failure.";
                    }
    
                    container set-timer {
                      presence
                        "This container is present only if actions is
    related to timer.";
                      description
                        "Set a timer to execute a rule on its
    expiry";
                      leaf timer-name {
                        type string;
                        mandatory true;
                        description
                          "Name of the timer.";
                      }
    
                      leaf timer-value {
                        type uint32 {
                          range "1..4294967295";
                        }
                        units "minutes";
                        mandatory true;
                        description
                          "Timer value in minutes.";
                      }
                    }  // container set-timer
    
                    container stop-timer {
                      description
                        "Disable timer before it expires.";
                      leaf timer-name {
                        type string;
                        description
                          "Name of the timer.";
                      }
                    }  // container stop-timer
                  }  // list action-rule
                }  // list class
              }  // list event
    
              list policy-map-rule {
                key "class-name class-type";
                description "Class-map rule.";
                leaf class-name {
                  type string {
                    pattern
                      "[a-zA-Z0-9][a-zA-Z0-9\\._@$%+#:=<>\\-]{0,62}";
                  }
                  description
                    "Name of class-map.";
                }
    
                leaf class-type {
                  type Class-map-type;
                  description
                    "Type of class-map.";
                }
    
                container shape {
                  must "rate" {
                    description
                      "rate container must be present.";
                  }
                  description
                    "Policy action shape.";
                  container rate {
                    description
                      "Rate configuration.";
                    leaf value {
                      type shape-value;
                      must "../unit" {
                        description
                          "unit must be set.";
                      }
                      description
                        "Shape bandwidth value.";
                    }
    
                    leaf unit {
                      type Bandwidth-units;
                      description
                        "Shape bandwidth units.";
                    }
                  }  // container rate
    
                  container burst {
                    description
                      "Burst size configuration.";
                    leaf value {
                      type uint32 {
                        range "1..4294967295";
                      }
                      must "../units" {
                        description
                          "units must be set.";
                      }
                      description
                        "Burst size value.";
                    }
    
                    leaf units {
                      type Threshold-units;
                      description
                        "Burst size units.";
                    }
                  }  // container burst
                }  // container shape
    
                container min-bandwidth {
                  description
                    "Policy action minimum bandwidth queue.";
                  leaf value {
                    type uint32 {
                      range "1..4294967295";
                    }
                    must "../unit" {
                      description
                        "unit must be set.";
                    }
                    description
                      "Minimum bandwidth value.";
                  }
    
                  leaf unit {
                    type Bandwidth-units;
                    description
                      "Minimum bandwidth units.";
                  }
                }  // container min-bandwidth
    
                container bandwidth-remaining {
                  description
                    "Policy action bandwidth remaining queue.";
                  leaf value {
                    type uint32 {
                      range "0..4294967295";
                    }
                    must "../unit" {
                      description
                        "unit must be set.";
                    }
                    description
                      "Remaining bandwidth value.";
                  }
    
                  leaf unit {
                    type Bandwidth-remaining-units;
                    description
                      "Remaining bandwidth units.";
                  }
                }  // container bandwidth-remaining
    
                list queue-limit {
                  key "value unit";
                  description
                    "Policy action queue limit.";
                  leaf value {
                    type uint32 {
                      range "1..4294967295";
                    }
                    must "../unit" {
                      description
                        "unit must be set.";
                    }
                    description
                      "Remaining bandwidth value.";
                  }
    
                  leaf unit {
                    type Queue-units;
                    description
                      "Remaining bandwidth units.";
                  }
    
                  leaf-list discard-class {
                    type Cos;
                    description
                      "queue-limit discard-class value.";
                  }
                }  // list queue-limit
    
                container pfc {
                  description
                    "Policy action pfc.";
                  leaf pfc-pause-set {
                    type empty;
                    description
                      "Pfc Pause set value.";
                  }
    
                  container pfc-buffer-size {
                    description
                      "PFC Buffer Size.";
                    leaf value {
                      type uint32 {
                        range "1..4294967295";
                      }
                      must "../unit" {
                        description
                          "unit must be set.";
                      }
                      description
                        "Pfc buffer size value.";
                    }
    
                    leaf unit {
                      type Pfc-units;
                      description
                        "Pfc buffer size units.";
                    }
                  }  // container pfc-buffer-size
    
                  container pfc-pause-threshold {
                    description
                      "PFC Pause Threshold.";
                    leaf value {
                      type uint32 {
                        range "1..4294967295";
                      }
                      must "../unit" {
                        description
                          "unit must be set.";
                      }
                      description
                        "Pfc pause threshold value.";
                    }
    
                    leaf unit {
                      type Pfc-units;
                      description
                        "Pfc pause threshold units.";
                    }
                  }  // container pfc-pause-threshold
    
                  container pfc-resume-threshold {
                    description
                      "PFC Resume Threshold.";
                    leaf value {
                      type uint32 {
                        range "1..4294967295";
                      }
                      must "../unit" {
                        description
                          "unit must be set.";
                      }
                      description
                        "Pfc resume threshold value.";
                    }
    
                    leaf unit {
                      type Pfc-units;
                      description
                        "Pfc resume threshold units.";
                    }
                  }  // container pfc-resume-threshold
                }  // container pfc
    
                leaf priority-level {
                  type uint8 {
                    range "1..7";
                  }
                  description
                    "Priority level of the policy-map rule";
                }
    
                leaf default-red {
                  type empty;
                  description
                    "Default random early detection";
                }
    
                leaf ecn-red {
                  type empty;
                  description
                    "ECN based random early detection";
                }
    
                list random-detect {
                  key "threshold-min-value threshold-min-units threshold-max-value threshold-max-units";
                  description
                    "Random early detection.
    All RED profiles in a class must be based
    on the same field.";
                  leaf threshold-min-value {
                    type uint32 {
                      range "0..1073741823";
                    }
                    description
                      "Minimum RED threshold value.";
                  }
    
                  leaf threshold-min-units {
                    type Threshold-units;
                    description
                      "Minimum RED threshold units.";
                  }
    
                  leaf threshold-max-value {
                    type uint32 {
                      range "0..1073741823";
                    }
                    description
                      "Maximum RED threshold value.";
                  }
    
                  leaf threshold-max-units {
                    type Threshold-units;
                    description
                      "Maximum RED threshold units.";
                  }
    
                  leaf probability {
                    type uint32 {
                      range "0..4294967295";
                    }
                    description
                      "Drop Probability of RED";
                  }
    
                  leaf-list cos {
                    type Cos;
                    ordered-by user;
                    description
                      "WRED based on CoS.";
                  }
    
                  leaf-list discard-class {
                    type Cos;
                    ordered-by user;
                    description
                      "WRED based on discard class.";
                  }
    
                  leaf-list dscp {
                    type Dscp-range;
                    ordered-by user;
                    description
                      "WRED based on DSCP.";
                  }
    
                  leaf-list mpls-exp {
                    type Cos;
                    ordered-by user;
                    description
                      "MPLS Experimental value based WRED.";
                  }
    
                  leaf-list precedence {
                    type Precedence;
                    ordered-by user;
                    description
                      "WRED based on precedence.";
                  }
    
                  leaf-list dei {
                    type uint8 {
                      range "0..1";
                    }
                    ordered-by user;
                    description
                      "DEI based WRED.
    Should be value 0..1.";
                  }
                }  // list random-detect
    
                container set {
                  description
                    "Policy action packet marking.";
                  leaf dscp {
                    type Dscp;
                    description
                      "Marks a packet by setting the DSCP in the ToS byte.";
                  }
    
                  leaf qos-group {
                    type uint16 {
                      range "0..512";
                    }
                    description
                      "Sets the QoS group identifiers on IPv4 or MPLS packets.
    The set qos-group is supported only on an ingress policy.";
                  }
    
                  leaf traffic-class {
                    type uint8 {
                      range "0..63";
                    }
                    description
                      "Sets the Traffic class identifiers on IPv4 or MPLS packets.";
                  }
    
                  leaf discard-class {
                    type Cos;
                    description
                      "Sets the discard class on IPv4 or MPLS packets.
    The discard-class can be used only in service policies
    that are attached in the ingress policy.";
                  }
    
                  leaf forward-class {
                    type uint8 {
                      range "0..7";
                    }
                    description
                      "Sets the forward class.";
                  }
    
                  leaf df {
                    type uint8 {
                      range "0..1";
                    }
                    description "Set DF bit.";
                  }
    
                  leaf cos {
                    type Cos;
                    description
                      "Sets the specific IEEE 802.1Q Layer 2 CoS value of an
    outgoing packet.
    This command should be used by a router if a user wants
    to mark a packet that is being sent to a switch.
    Switches can leverage Layer 2 header information,
    including a CoS value marking. Packets entering an
    interface cannot be set with a CoS value.";
                  }
    
                  leaf inner-cos {
                    type Cos;
                    description "Set inner cos.";
                  }
    
                  leaf precedence {
                    type Precedence;
                    description
                      "Sets the precedence value in the IP header.";
                  }
    
                  leaf precedence-tunnel {
                    type Precedence;
                    description
                      "Sets the precedence tunnel value for ipsec.";
                  }
    
                  leaf mpls-experimental-top-most {
                    type uint8 {
                      range "0..7";
                    }
                    description
                      "Sets the experimental value of the MPLS packet top-most
    labels.";
                  }
    
                  leaf mpls-experimental-imposition {
                    type Cos;
                    description
                      "Sets the experimental value of the MPLS packet
    imposition labels.
    Imposition can be used only in service policies that
    are attached in the ingress policy";
                  }
    
                  leaf srp-priority {
                    type uint8 {
                      range "0..7";
                    }
                    description
                      "Sets the spatial reuse protocol priority value of an
    outgoing packet.";
                  }
    
                  leaf fr-de {
                    type uint8 {
                      range "0..1";
                    }
                    description
                      "Set FrameRelay DE bit.";
                  }
    
                  leaf dei {
                    type uint8 {
                      range "0..1";
                    }
                    description "Set DEI bit.";
                  }
    
                  leaf dei-imposition {
                    type uint8 {
                      range "0..1";
                    }
                    description
                      "Set DEI imposition bit.";
                  }
    
                  leaf source-address {
                    type inet:ipv4-address-no-zone;
                    description
                      "Set the Source IPv4 address.";
                  }
    
                  leaf destination-address {
                    type inet:ipv4-address-no-zone;
                    description
                      "Set the Destination IPv4 address.";
                  }
    
                  leaf atm-clp {
                    type empty;
                    description
                      "Set atm cell-loss-priority bit.";
                  }
    
                  leaf dscp-tunnel {
                    type Dscp;
                    description
                      "Marks a packet by setting DSCP in the tunnel header.
    This is specific to ipsec tunnels";
                  }
                }  // container set
    
                leaf encap-sequence {
                  type Encap-sequence-type;
                  description
                    "Configure encap sequence for the policy-map.";
                }
    
                container police {
                  description
                    "Configures traffic policing action.";
                  container bucket {
                    description
                      "Bucket related configuration.";
                    container shared {
                      description
                        "Shared bucket configuration.";
                      leaf name {
                        type string;
                        description
                          "Shared Bucket name.";
                      }
    
                      container rate {
                        description
                          "Rate configuration.";
                        leaf value {
                          type uint32 {
                            range
                              "1..4294967295";
                          }
                          must "../units" {
                            description
                              "units must be set.";
                          }
                          description
                            "Rate value.";
                        }
    
                        leaf units {
                          type Police-Rate-units;
                          description
                            "Rate units.";
                        }
                      }  // container rate
    
                      container peak-rate {
                        description
                          "Peak rate configuration.";
                        leaf value {
                          type uint32 {
                            range
                              "1..4294967295";
                          }
                          must "../units" {
                            description
                              "units must be set.";
                          }
                          description
                            "Peak rate value.";
                        }
    
                        leaf units {
                          type Rate-units;
                          description
                            "Peak rate units.";
                        }
                      }  // container peak-rate
    
                      container burst {
                        description
                          "Burst configuration.";
                        leaf value {
                          type uint32 {
                            range
                              "1..4294967295";
                          }
                          must "../units" {
                            description
                              "units must be set.";
                          }
                          description
                            "Burst value.";
                        }
    
                        leaf units {
                          type Threshold-units;
                          description
                            "Burst units.";
                        }
                      }  // container burst
    
                      container peak-burst {
                        description
                          "Peak burst configuration.";
                        leaf value {
                          type uint32;
                          must "../units" {
                            description
                              "units must be set.";
                          }
                          description
                            "Peak burst value.";
                        }
    
                        leaf units {
                          type Threshold-units;
                          description
                            "Peak burst units.";
                        }
                      }  // container peak-burst
                    }  // container shared
    
                    container referred {
                      description
                        "Referred bucket related configuration";
                      leaf name {
                        type string;
                        description
                          "Referred bucket name";
                      }
                    }  // container referred
                  }  // container bucket
    
                  container rate {
                    description
                      "Rate configuration.";
                    leaf value {
                      type uint32 {
                        range "1..4294967295";
                      }
                      must "../units" {
                        description
                          "units must be set.";
                      }
                      description "Rate value.";
                    }
    
                    leaf units {
                      type Police-Rate-units;
                      description "Rate units.";
                    }
                  }  // container rate
    
                  container peak-rate {
                    description
                      "Peak rate configuration.";
                    leaf value {
                      type uint32 {
                        range "1..4294967295";
                      }
                      must "../units" {
                        description
                          "units must be set.";
                      }
                      description
                        "Peak rate value.";
                    }
    
                    leaf units {
                      type Rate-units;
                      description
                        "Peak rate units.";
                    }
                  }  // container peak-rate
    
                  container burst {
                    description
                      "Burst configuration.";
                    leaf value {
                      type uint32 {
                        range "1..4294967295";
                      }
                      must "../units" {
                        description
                          "units must be set.";
                      }
                      description "Burst value.";
                    }
    
                    leaf units {
                      type Threshold-units;
                      description "Burst units.";
                    }
                  }  // container burst
    
                  container peak-burst {
                    description
                      "Peak burst configuration.";
                    leaf value {
                      type uint32 {
                        range "1..4294967295";
                      }
                      must "../units" {
                        description
                          "units must be set.";
                      }
                      description
                        "Peak burst value.";
                    }
    
                    leaf units {
                      type Threshold-units;
                      description
                        "Peak burst units.";
                    }
                  }  // container peak-burst
    
                  container conform-action {
                    description
                      "Configures the action to take on packets that conform
    to the rate limit.";
                    leaf Transmit {
                      type empty;
                      description
                        "Police action transmit.";
                    }
    
                    leaf drop {
                      type empty;
                      description
                        "Police action drop.";
                    }
    
                    container set {
                      description
                        "Police action packet marking.";
                      leaf dscp {
                        type Dscp;
                        description
                          "Marks a packet by setting the DSCP in the ToS byte.";
                      }
    
                      leaf qos-group {
                        type uint16 {
                          range "0..512";
                        }
                        description
                          "Sets the QoS group identifiers on IPv4 or MPLS packets.
    The set qos-group is supported only on an ingress policy.";
                      }
    
                      leaf traffic-class {
                        type uint8 {
                          range "0..63";
                        }
                        description
                          "Sets the Traffic class identifiers on IPv4 or MPLS packets.";
                      }
    
                      leaf discard-class {
                        type Cos;
                        description
                          "Sets the discard class on IPv4 or MPLS packets.
    The discard-class can be used only in service policies
    that are attached in the ingress policy.";
                      }
    
                      leaf forward-class {
                        type uint8 {
                          range "0..7";
                        }
                        description
                          "Sets the forward class.";
                      }
    
                      leaf df {
                        type uint8 {
                          range "0..1";
                        }
                        description
                          "Set DF bit.";
                      }
    
                      leaf cos {
                        type Cos;
                        description
                          "Sets the specific IEEE 802.1Q Layer 2 CoS value of an
    outgoing packet.
    This command should be used by a router if a user wants
    to mark a packet that is being sent to a switch.
    Switches can leverage Layer 2 header information,
    including a CoS value marking. Packets entering an
    interface cannot be set with a CoS value.";
                      }
    
                      leaf inner-cos {
                        type Cos;
                        description
                          "Set inner cos.";
                      }
    
                      leaf precedence {
                        type Precedence;
                        description
                          "Sets the precedence value in the IP header.";
                      }
    
                      leaf precedence-tunnel {
                        type Precedence;
                        description
                          "Sets the precedence tunnel value for ipsec.";
                      }
    
                      leaf mpls-experimental-top-most {
                        type uint8 {
                          range "0..7";
                        }
                        description
                          "Sets the experimental value of the MPLS packet top-most
    labels.";
                      }
    
                      leaf mpls-experimental-imposition {
                        type Cos;
                        description
                          "Sets the experimental value of the MPLS packet
    imposition labels.
    Imposition can be used only in service policies that
    are attached in the ingress policy";
                      }
    
                      leaf srp-priority {
                        type uint8 {
                          range "0..7";
                        }
                        description
                          "Sets the spatial reuse protocol priority value of an
    outgoing packet.";
                      }
    
                      leaf fr-de {
                        type uint8 {
                          range "0..1";
                        }
                        description
                          "Set FrameRelay DE bit.";
                      }
    
                      leaf dei {
                        type uint8 {
                          range "0..1";
                        }
                        description
                          "Set DEI bit.";
                      }
    
                      leaf dei-imposition {
                        type uint8 {
                          range "0..1";
                        }
                        description
                          "Set DEI imposition bit.";
                      }
    
                      leaf source-address {
                        type inet:ipv4-address-no-zone;
                        description
                          "Set the Source IPv4 address.";
                      }
    
                      leaf destination-address {
                        type inet:ipv4-address-no-zone;
                        description
                          "Set the Destination IPv4 address.";
                      }
    
                      leaf atm-clp {
                        type empty;
                        description
                          "Set atm cell-loss-priority bit.";
                      }
    
                      leaf dscp-tunnel {
                        type Dscp;
                        description
                          "Marks a packet by setting DSCP in the tunnel header.
    This is specific to ipsec tunnels";
                      }
                    }  // container set
                  }  // container conform-action
    
                  leaf conform-color {
                    type string;
                    description
                      "Configures the class that classifies the packets that conform";
                  }
    
                  leaf exceed-color {
                    type string;
                    description
                      "Configures the class that classifies the packets that conform";
                  }
    
                  container exceed-action {
                    description
                      "Configures the action to take on packets that exceed
    the rate limit.";
                    leaf Transmit {
                      type empty;
                      description
                        "Police action transmit.";
                    }
    
                    leaf drop {
                      type empty;
                      description
                        "Police action drop.";
                    }
    
                    container set {
                      description
                        "Police action packet marking.";
                      leaf dscp {
                        type Dscp;
                        description
                          "Marks a packet by setting the DSCP in the ToS byte.";
                      }
    
                      leaf qos-group {
                        type uint16 {
                          range "0..512";
                        }
                        description
                          "Sets the QoS group identifiers on IPv4 or MPLS packets.
    The set qos-group is supported only on an ingress policy.";
                      }
    
                      leaf traffic-class {
                        type uint8 {
                          range "0..63";
                        }
                        description
                          "Sets the Traffic class identifiers on IPv4 or MPLS packets.";
                      }
    
                      leaf discard-class {
                        type Cos;
                        description
                          "Sets the discard class on IPv4 or MPLS packets.
    The discard-class can be used only in service policies
    that are attached in the ingress policy.";
                      }
    
                      leaf forward-class {
                        type uint8 {
                          range "0..7";
                        }
                        description
                          "Sets the forward class.";
                      }
    
                      leaf df {
                        type uint8 {
                          range "0..1";
                        }
                        description
                          "Set DF bit.";
                      }
    
                      leaf cos {
                        type Cos;
                        description
                          "Sets the specific IEEE 802.1Q Layer 2 CoS value of an
    outgoing packet.
    This command should be used by a router if a user wants
    to mark a packet that is being sent to a switch.
    Switches can leverage Layer 2 header information,
    including a CoS value marking. Packets entering an
    interface cannot be set with a CoS value.";
                      }
    
                      leaf inner-cos {
                        type Cos;
                        description
                          "Set inner cos.";
                      }
    
                      leaf precedence {
                        type Precedence;
                        description
                          "Sets the precedence value in the IP header.";
                      }
    
                      leaf precedence-tunnel {
                        type Precedence;
                        description
                          "Sets the precedence tunnel value for ipsec.";
                      }
    
                      leaf mpls-experimental-top-most {
                        type uint8 {
                          range "0..7";
                        }
                        description
                          "Sets the experimental value of the MPLS packet top-most
    labels.";
                      }
    
                      leaf mpls-experimental-imposition {
                        type Cos;
                        description
                          "Sets the experimental value of the MPLS packet
    imposition labels.
    Imposition can be used only in service policies that
    are attached in the ingress policy";
                      }
    
                      leaf srp-priority {
                        type uint8 {
                          range "0..7";
                        }
                        description
                          "Sets the spatial reuse protocol priority value of an
    outgoing packet.";
                      }
    
                      leaf fr-de {
                        type uint8 {
                          range "0..1";
                        }
                        description
                          "Set FrameRelay DE bit.";
                      }
    
                      leaf dei {
                        type uint8 {
                          range "0..1";
                        }
                        description
                          "Set DEI bit.";
                      }
    
                      leaf dei-imposition {
                        type uint8 {
                          range "0..1";
                        }
                        description
                          "Set DEI imposition bit.";
                      }
    
                      leaf source-address {
                        type inet:ipv4-address-no-zone;
                        description
                          "Set the Source IPv4 address.";
                      }
    
                      leaf destination-address {
                        type inet:ipv4-address-no-zone;
                        description
                          "Set the Destination IPv4 address.";
                      }
    
                      leaf atm-clp {
                        type empty;
                        description
                          "Set atm cell-loss-priority bit.";
                      }
    
                      leaf dscp-tunnel {
                        type Dscp;
                        description
                          "Marks a packet by setting DSCP in the tunnel header.
    This is specific to ipsec tunnels";
                      }
                    }  // container set
                  }  // container exceed-action
    
                  container violate-action {
                    description
                      "Configures the action to take on packets that violate
    the rate limit.";
                    leaf Transmit {
                      type empty;
                      description
                        "Police action transmit.";
                    }
    
                    leaf drop {
                      type empty;
                      description
                        "Police action drop.";
                    }
    
                    container set {
                      description
                        "Police action packet marking.";
                      leaf dscp {
                        type Dscp;
                        description
                          "Marks a packet by setting the DSCP in the ToS byte.";
                      }
    
                      leaf qos-group {
                        type uint16 {
                          range "0..512";
                        }
                        description
                          "Sets the QoS group identifiers on IPv4 or MPLS packets.
    The set qos-group is supported only on an ingress policy.";
                      }
    
                      leaf traffic-class {
                        type uint8 {
                          range "0..63";
                        }
                        description
                          "Sets the Traffic class identifiers on IPv4 or MPLS packets.";
                      }
    
                      leaf discard-class {
                        type Cos;
                        description
                          "Sets the discard class on IPv4 or MPLS packets.
    The discard-class can be used only in service policies
    that are attached in the ingress policy.";
                      }
    
                      leaf forward-class {
                        type uint8 {
                          range "0..7";
                        }
                        description
                          "Sets the forward class.";
                      }
    
                      leaf df {
                        type uint8 {
                          range "0..1";
                        }
                        description
                          "Set DF bit.";
                      }
    
                      leaf cos {
                        type Cos;
                        description
                          "Sets the specific IEEE 802.1Q Layer 2 CoS value of an
    outgoing packet.
    This command should be used by a router if a user wants
    to mark a packet that is being sent to a switch.
    Switches can leverage Layer 2 header information,
    including a CoS value marking. Packets entering an
    interface cannot be set with a CoS value.";
                      }
    
                      leaf inner-cos {
                        type Cos;
                        description
                          "Set inner cos.";
                      }
    
                      leaf precedence {
                        type Precedence;
                        description
                          "Sets the precedence value in the IP header.";
                      }
    
                      leaf precedence-tunnel {
                        type Precedence;
                        description
                          "Sets the precedence tunnel value for ipsec.";
                      }
    
                      leaf mpls-experimental-top-most {
                        type uint8 {
                          range "0..7";
                        }
                        description
                          "Sets the experimental value of the MPLS packet top-most
    labels.";
                      }
    
                      leaf mpls-experimental-imposition {
                        type Cos;
                        description
                          "Sets the experimental value of the MPLS packet
    imposition labels.
    Imposition can be used only in service policies that
    are attached in the ingress policy";
                      }
    
                      leaf srp-priority {
                        type uint8 {
                          range "0..7";
                        }
                        description
                          "Sets the spatial reuse protocol priority value of an
    outgoing packet.";
                      }
    
                      leaf fr-de {
                        type uint8 {
                          range "0..1";
                        }
                        description
                          "Set FrameRelay DE bit.";
                      }
    
                      leaf dei {
                        type uint8 {
                          range "0..1";
                        }
                        description
                          "Set DEI bit.";
                      }
    
                      leaf dei-imposition {
                        type uint8 {
                          range "0..1";
                        }
                        description
                          "Set DEI imposition bit.";
                      }
    
                      leaf source-address {
                        type inet:ipv4-address-no-zone;
                        description
                          "Set the Source IPv4 address.";
                      }
    
                      leaf destination-address {
                        type inet:ipv4-address-no-zone;
                        description
                          "Set the Destination IPv4 address.";
                      }
    
                      leaf atm-clp {
                        type empty;
                        description
                          "Set atm cell-loss-priority bit.";
                      }
    
                      leaf dscp-tunnel {
                        type Dscp;
                        description
                          "Marks a packet by setting DSCP in the tunnel header.
    This is specific to ipsec tunnels";
                      }
                    }  // container set
                  }  // container violate-action
                }  // container police
    
                container compress {
                  description
                    "IP header compression";
                  container header {
                    container ip {
                      presence
                        "IP header compression";
                    }  // container ip
                  }  // container header
                }  // container compress
    
                container service-policy {
                  description
                    "Configure a child service policy.";
                  leaf policy-name {
                    type string {
                      pattern
                        "[a-zA-Z0-9][a-zA-Z0-9\\._@$%+#:=<>\\-]{0,62}";
                    }
                    description
                      "Name of service-policy.";
                  }
    
                  leaf type {
                    type Service-policy-type;
                    description
                      "Type of service-policy.";
                  }
                }  // container service-policy
    
                container cac-local {
                  description
                    "Policy action CAC.";
                  container rate {
                    description
                      "The rate allocated for all flows.";
                    leaf value {
                      type uint32 {
                        range "1..4294967295";
                      }
                      must "../units" {
                        description
                          "units must be set.";
                      }
                      description "Rate value.";
                    }
    
                    leaf units {
                      type Cac-rate-units;
                      description "Rate units.";
                    }
                  }  // container rate
    
                  container flow-rate {
                    description
                      "The rate allocated per flow.";
                    leaf value {
                      type uint32 {
                        range "1..4294967295";
                      }
                      must "../units" {
                        description
                          "units must be set.";
                      }
                      description "Rate value.";
                    }
    
                    leaf units {
                      type Cac-rate-units;
                      description "Rate units.";
                    }
                  }  // container flow-rate
    
                  leaf flow-idle-timeout {
                    type Idle-timeout;
                    description
                      "The interval after which a flow is removed,
    if there is no activity.
    If timeout is 0 this flow does not expire.";
                  }
                }  // container cac-local
    
                container flow-params {
                  description
                    "Policy flow monitoring action.";
                  leaf max-flow {
                    type uint16 {
                      range "0..4096";
                    }
                    description
                      "Max simultaneous flows monitored per policy class";
                  }
    
                  leaf interval-duration {
                    type uint32 {
                      range "10..600";
                    }
                    units "seconds";
                    description
                      "Monitored interval duration.";
                  }
    
                  leaf history {
                    type uint32 {
                      range "1..60";
                    }
                    description
                      "Keep stats/metrics on box for so many intervals.";
                  }
    
                  leaf timeout {
                    type uint32 {
                      range "2..60";
                    }
                    units "seconds";
                    description
                      "Declare a flow dead if no packets received in
    so much time";
                  }
                }  // container flow-params
    
                container metrics-ipcbr {
                  description
                    "Policy IP-CBR metric action.";
                  container rate {
                    description
                      "Nominal per-flow data rate.";
                    leaf layer3 {
                      type uint32;
                      units "bps";
                      description
                        "Nominal rate specified at the L3 (IP).";
                    }
    
                    leaf packet {
                      type uint32 {
                        range "1..4294967294";
                      }
                      units "pps";
                      description
                        "Nominal IP layer packet rate (in pps).";
                    }
    
                    leaf media {
                      type uint32 {
                        range "1..3000000000";
                      }
                      units "bps";
                      description
                        "Nominal data rate of the media flow (ip payload).";
                    }
                  }  // container rate
    
                  container media-packet {
                    description
                      "Media-packet structure.";
                    leaf size {
                      type uint16 {
                        range "1..65535";
                      }
                      units "bytes";
                      description
                        "Nominal size of the media-packet.";
                    }
    
                    leaf count-in-layer3 {
                      type uint8 {
                        range "1..64";
                      }
                      units "packets";
                      description
                        "Nominal number of media packets in an IP payload.";
                    }
                  }  // container media-packet
                }  // container metrics-ipcbr
    
                container react {
                  description
                    "Policy action react.";
                  leaf descrition {
                    type string;
                    description
                      "String describing the react statement.";
                  }
    
                  container action {
                    description
                      "Action on alert.";
                    leaf syslog {
                      type empty;
                      description "Syslog.";
                    }
    
                    leaf snmp {
                      type empty;
                      description "SNMP.";
                    }
                  }  // container action
    
                  container alarm {
                    description
                      "Alaram settings.";
                    container type {
                      description "Alarm type.";
                      leaf discrete {
                        type empty;
                        description
                          "Discrete alarm type.";
                      }
    
                      leaf group-count {
                        type uint16 {
                          range "1..65535";
                        }
                        units "number of flows";
                        description
                          "Number of flows to reach before
    triggering alarm";
                      }
    
                      leaf group-percent {
                        type uint16 {
                          range "1..100";
                        }
                        units "percentage";
                        description
                          "Percent to reach before triggering alarm";
                      }
                    }  // container type
    
                    leaf severity {
                      type Alarm-severity;
                      description
                        "Severity of the alarm.";
                    }
                  }  // container alarm
    
                  container threshold {
                    description
                      "Alarm threshold settings.";
                    container trigger-value {
                      description
                        "Alarm trigger value settings.";
                      leaf greater-than {
                        type string;
                        description
                          "trigger only if metric is Greater than given value";
                      }
    
                      leaf greater-than-equal {
                        type string;
                        description
                          "trigger only if metric is Greater than equal to given value";
                      }
    
                      leaf less-than {
                        type string;
                        description
                          "trigger only if metric is Less than given value";
                      }
    
                      leaf less-than-equal {
                        type string;
                        description
                          "trigger only if metric is Less than equal given value";
                      }
    
                      leaf range {
                        type string;
                        description "Range";
                      }
                    }  // container trigger-value
    
                    container trigger-type {
                      description
                        "Alarm trigger type settings.";
                      leaf immediate {
                        type empty;
                        description
                          "Immediate trigger.";
                      }
    
                      leaf average {
                        type uint32 {
                          range "1..60";
                        }
                        description
                          "Trigger averaged over N intervals.";
                      }
                    }  // container trigger-type
                  }  // container threshold
    
                  leaf criterion-delay-factor {
                    type empty;
                    description
                      "React criterion Delay factor of the policy-map action";
                  }
    
                  leaf criterion-media-stop {
                    type empty;
                    description
                      "React criterion media stop of policy-map action.";
                  }
    
                  leaf criterion-mrv {
                    type empty;
                    description
                      "React criterion mrv of policy-map action.";
                  }
    
                  leaf criterion-flow-count {
                    type empty;
                    description
                      "React criterion flow count of policy-map action.";
                  }
    
                  leaf criterion-packet-rate {
                    type empty;
                    description
                      "React criterion packet rate of policy-map action.";
                  }
                }  // container react
    
                leaf http-redirect {
                  type string;
                  description
                    "Policy action http redirect.
    Redirect to this url.";
                }
    
                leaf pbr-transmit {
                  type empty;
                  description
                    "Policy action PBR transmit.";
                }
    
                leaf drop {
                  type empty;
                  description
                    "Policy action drop.";
                }
    
                leaf decap-gre {
                  type empty;
                  description
                    "Policy action DECAP GRE.";
                }
    
                leaf decap-gue-v1 {
                  type empty;
                  description
                    "Policy action DECAP GRE.";
                }
    
                container pbr-redirect {
                  description
                    "Policy action redirect";
                  container ipv4 {
                    description
                      "Policy action redirect IPv4";
                    leaf ipv4-next-hop {
                      type inet:ipv4-address-no-zone;
                      description
                        "IPv4 address.";
                    }
    
                    leaf vrf {
                      type vrf-name-length;
                      description "IPv4 VRF.";
                    }
                  }  // container ipv4
    
                  container ipv6 {
                    description
                      "Policy action redirect IPv6";
                    leaf ipv6-next-hop {
                      type inet:ipv6-address-no-zone;
                      description
                        "IPv6 address.";
                    }
    
                    leaf vrf {
                      type vrf-name-length;
                      description "IPv6 VRF.";
                    }
                  }  // container ipv6
    
                  container next-hop {
                    description
                      "Next hop address.";
                    container route-target {
                      description
                        "Destination address of the route";
                      container ipv4-address {
                        description
                          "IPv4 address.";
                        leaf address {
                          type inet:ipv4-address-no-zone;
                          description
                            "IPv4 address.";
                        }
    
                        leaf netmask {
                          type inet:ipv4-address-no-zone;
                          description
                            "IPv4 netmask.";
                        }
                      }  // container ipv4-address
    
                      leaf as-number {
                        type uint32 {
                          range "1..4294967295";
                        }
                        description
                          "2-byte/4-byte AS number";
                      }
    
                      leaf index {
                        type uint32 {
                          range "0..4294967295";
                        }
                        description
                          "ASN2:index 2/4 byte (hex or decimal format)";
                      }
                    }  // container route-target
                  }  // container next-hop
                }  // container pbr-redirect
    
                container pbr-forward {
                  description
                    "Policy action PBR forward.";
                  leaf default {
                    type empty;
                    description
                      "Use system default routing table.";
                  }
    
                  container next-hop {
                    description
                      "Use specific next-hop.
    Here we present 5 different combination
    for the pbf next-hop.
     1. vrf with v6 address
     2. vrf with v4 address
     3. vrf
     4. v4 address
     5. v6 address";
                    leaf vrf {
                      type vrf-name-length;
                      description "VRF name.";
                    }
    
                    leaf ipv4-address {
                      type inet:ipv4-address;
                      description
                        "IPv4 address.";
                    }
    
                    leaf ipv6-address {
                      type inet:ipv6-address;
                      description
                        "IPv6 address.";
                    }
                  }  // container next-hop
                }  // container pbr-forward
    
                leaf service-fragment {
                  type string {
                    length "1..64";
                  }
                  description
                    "Policy action service fragment.
    Service fragment name";
                }
    
                leaf fragment {
                  type string {
                    length "1..64";
                  }
                  description
                    "Policy action fragment. Fragment name";
                }
    
                container service-function-path {
                  presence
                    "This container is present for service-
    function-path configuration";
                  description
                    "Policy action service function path.";
                  leaf path-id {
                    type uint32 {
                      range "1..16777215";
                    }
                    mandatory true;
                    description
                      "Service function path id.";
                  }
    
                  leaf index {
                    type uint8 {
                      range "1..255";
                    }
                    mandatory true;
                    description
                      "Service function path index.";
                  }
    
                  leaf metadata {
                    type string;
                    description
                      "Service function path metadata name.";
                  }
                }  // container service-function-path
    
                container http-enrichment {
                  description
                    "HTTP Enrichment action";
                  leaf subscribermac {
                    type empty;
                    description
                      "Subscriber Mac of the host";
                  }
    
                  leaf subscriberip {
                    type empty;
                    description "Subscriber IP";
                  }
    
                  leaf hostname {
                    type empty;
                    description
                      "Name of the host";
                  }
    
                  leaf bngidentifierinterface {
                    type empty;
                    description
                      "BNG Identifier Interface";
                  }
                }  // container http-enrichment
              }  // list policy-map-rule
    
              leaf description {
                type string;
                description
                  "Description for this policy-map.";
              }
            }  // list policy-map
          }  // container policy-maps
        }  // container policy-manager
      }  // module Cisco-IOS-XR-infra-policymgr-cfg
    

© 2023 YumaWorks, Inc. All rights reserved.