junos-qfx-conf-class-of-service

Junos class-of-service configuration module

  • Version: 2019-01-01

    junos-qfx-conf-class-of-service@2019-01-01


    
      module junos-qfx-conf-class-of-service {
    
        yang-version 1;
    
        namespace
          "http://yang.juniper.net/junos-qfx/conf/class-of-service";
    
        prefix jc-class-of-service;
    
        import junos-common-ddl-extensions {
          prefix junos;
          revision-date "2019-01-01";
        }
        import junos-common-types {
          prefix jt;
          revision-date "2019-01-01";
        }
        import junos-qfx-conf-root {
          prefix jc;
          revision-date "2019-01-01";
        }
    
        organization "Juniper Networks, Inc.";
    
        contact "yang-support@juniper.net";
    
        description
          "Junos class-of-service configuration module";
    
        revision "2019-01-01" {
          description "Junos: 21.3R1.9";
        }
    
    
        augment /jc:configuration {
          uses class-of-service-group;
        }
    
        augment /jc:configuration/jc:groups {
          uses class-of-service-group;
        }
    
        grouping class-of-service-group {
          container class-of-service {
            description
              "Class-of-service configuration";
            uses juniper-class-of-service-options;
          }  // container class-of-service
        }  // grouping class-of-service-group
    
        grouping juniper-class-of-service-options {
          uses apply-advanced;
    
          container classifiers {
            description
              "Classify incoming packets based on code point value";
            uses apply-advanced;
    
            list dscp {
              key "name";
              ordered-by user;
              description
                "Differentiated Services code point classifier";
              leaf name {
                junos:must "((".. forwarding-class" || ".. import"))";
                junos:must-message "'At least one 'forwarding class' or 'import' classifier definition is required for classifier configuration";
                type string {
                  length "1 .. 64";
                }
                description "Classifier name";
              }
    
              uses apply-advanced;
    
              leaf import {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Include this classifier in this definition";
              }
    
              list forwarding-class {
                key "name";
                description
                  "Define a classification of code point aliases";
                leaf name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Forwarding class name";
                }
    
                uses apply-advanced;
    
                list loss-priority {
                  key "name";
                  description
                    "Classify code points to a loss priority";
                  leaf name {
                    type enumeration {
                      enum "low" {
                        value 0;
                        description
                          "Code points to classify to loss priority low";
                      }
                      enum "high" {
                        value 1;
                        description
                          "Code points to classify to loss priority high";
                      }
                      enum "medium-low" {
                        value 2;
                        description
                          "Code points to classify to loss priority medium-low";
                      }
                      enum "medium-high" {
                        value 3;
                        description
                          "Code points to classify to loss priority medium-high";
                      }
                    }
                  }
    
                  leaf-list code-points {
                    type string;
                    ordered-by user;
                    description
                      "List of code point aliases and/or bit strings";
                  }
                }  // list loss-priority
              }  // list forwarding-class
            }  // list dscp
    
            list dscp-ipv6 {
              key "name";
              ordered-by user;
              description
                "Differentiated Services code point classifier IPv6";
              leaf name {
                junos:must "((".. forwarding-class" || ".. import"))";
                junos:must-message "'At least one 'forwarding class' or 'import' classifier definition is required for classifier configuration";
                type string {
                  length "1 .. 64";
                }
                description "Classifier name";
              }
    
              uses apply-advanced;
    
              leaf import {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Include this classifier in this definition";
              }
    
              list forwarding-class {
                key "name";
                description
                  "Define a classification of code point aliases";
                leaf name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Forwarding class name";
                }
    
                uses apply-advanced;
    
                list loss-priority {
                  key "name";
                  description
                    "Classify code points to a loss priority";
                  leaf name {
                    type enumeration {
                      enum "low" {
                        value 0;
                        description
                          "Code points to classify to loss priority low";
                      }
                      enum "high" {
                        value 1;
                        description
                          "Code points to classify to loss priority high";
                      }
                      enum "medium-low" {
                        value 2;
                        description
                          "Code points to classify to loss priority medium-low";
                      }
                      enum "medium-high" {
                        value 3;
                        description
                          "Code points to classify to loss priority medium-high";
                      }
                    }
                  }
    
                  leaf-list code-points {
                    type string;
                    ordered-by user;
                    description
                      "List of code point aliases and/or bit strings";
                  }
                }  // list loss-priority
              }  // list forwarding-class
            }  // list dscp-ipv6
    
            list exp {
              key "name";
              ordered-by user;
              description "MPLS EXP classifier";
              leaf name {
                junos:must "((".. forwarding-class" || ".. import"))";
                junos:must-message "'At least one 'forwarding class' or 'import' classifier definition is required for classifier configuration";
                type string {
                  length "1 .. 64";
                }
                description "Classifier name";
              }
    
              uses apply-advanced;
    
              leaf import {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Include this classifier in this definition";
              }
    
              list forwarding-class {
                key "name";
                description
                  "Define a classification of code point aliases";
                leaf name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Forwarding class name";
                }
    
                uses apply-advanced;
    
                list loss-priority {
                  key "name";
                  description
                    "Classify code points to a loss priority";
                  leaf name {
                    type enumeration {
                      enum "low" {
                        value 0;
                        description
                          "Code points to classify to loss priority low";
                      }
                      enum "high" {
                        value 1;
                        description
                          "Code points to classify to loss priority high";
                      }
                      enum "medium-low" {
                        value 2;
                        description
                          "Code points to classify to loss priority medium-low";
                      }
                      enum "medium-high" {
                        value 3;
                        description
                          "Code points to classify to loss priority medium-high";
                      }
                    }
                  }
    
                  leaf-list code-points {
                    type string;
                    ordered-by user;
                    description
                      "List of code point aliases and/or bit strings";
                  }
                }  // list loss-priority
              }  // list forwarding-class
            }  // list exp
    
            list ieee-802.1 {
              key "name";
              ordered-by user;
              description
                "IEEE-802.1 classifier";
              leaf name {
                junos:must "((".. forwarding-class" || ".. import"))";
                junos:must-message "'At least one 'forwarding class' or 'import' classifier definition is required for classifier configuration";
                type string {
                  length "1 .. 64";
                }
                description "Classifier name";
              }
    
              uses apply-advanced;
    
              leaf import {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Include this classifier in this definition";
              }
    
              list forwarding-class {
                key "name";
                description
                  "Define a classification of code point aliases";
                leaf name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Forwarding class name";
                }
    
                uses apply-advanced;
    
                list loss-priority {
                  key "name";
                  description
                    "Classify code points to a loss priority";
                  leaf name {
                    type enumeration {
                      enum "low" {
                        value 0;
                        description
                          "Code points to classify to loss priority low";
                      }
                      enum "high" {
                        value 1;
                        description
                          "Code points to classify to loss priority high";
                      }
                      enum "medium-low" {
                        value 2;
                        description
                          "Code points to classify to loss priority medium-low";
                      }
                      enum "medium-high" {
                        value 3;
                        description
                          "Code points to classify to loss priority medium-high";
                      }
                    }
                  }
    
                  leaf-list code-points {
                    type string;
                    ordered-by user;
                    description
                      "List of code point aliases and/or bit strings";
                  }
                }  // list loss-priority
              }  // list forwarding-class
            }  // list ieee-802.1
    
            list inet-precedence {
              key "name";
              ordered-by user;
              description
                "IPv4 precedence classifier";
              leaf name {
                junos:must "((".. forwarding-class" || ".. import"))";
                junos:must-message "'At least one 'forwarding class' or 'import' classifier definition is required for classifier configuration";
                type string {
                  length "1 .. 64";
                }
                description "Classifier name";
              }
    
              uses apply-advanced;
    
              leaf import {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Include this classifier in this definition";
              }
    
              list forwarding-class {
                key "name";
                description
                  "Define a classification of code point aliases";
                leaf name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Forwarding class name";
                }
    
                uses apply-advanced;
    
                list loss-priority {
                  key "name";
                  description
                    "Classify code points to a loss priority";
                  leaf name {
                    type enumeration {
                      enum "low" {
                        value 0;
                        description
                          "Code points to classify to loss priority low";
                      }
                      enum "high" {
                        value 1;
                        description
                          "Code points to classify to loss priority high";
                      }
                      enum "medium-low" {
                        value 2;
                        description
                          "Code points to classify to loss priority medium-low";
                      }
                      enum "medium-high" {
                        value 3;
                        description
                          "Code points to classify to loss priority medium-high";
                      }
                    }
                  }
    
                  leaf-list code-points {
                    type string;
                    ordered-by user;
                    description
                      "List of code point aliases and/or bit strings";
                  }
                }  // list loss-priority
              }  // list forwarding-class
            }  // list inet-precedence
    
            list ieee-802.1ad {
              key "name";
              ordered-by user;
              description
                "IEEE-802.1ad (DEI) classifier";
              leaf name {
                junos:must "((".. forwarding-class" || ".. import"))";
                junos:must-message "'At least one 'forwarding class' or 'import' classifier definition is required for classifier configuration";
                type string {
                  length "1 .. 64";
                }
                description "Classifier name";
              }
    
              uses apply-advanced;
    
              leaf import {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Include this classifier in this definition";
              }
    
              list forwarding-class {
                key "name";
                description
                  "Define a classification of code point aliases";
                leaf name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Forwarding class name";
                }
    
                uses apply-advanced;
    
                list loss-priority {
                  key "name";
                  description
                    "Classify code points to a loss priority";
                  leaf name {
                    type enumeration {
                      enum "low" {
                        value 0;
                        description
                          "Code points to classify to loss priority low";
                      }
                      enum "high" {
                        value 1;
                        description
                          "Code points to classify to loss priority high";
                      }
                      enum "medium-low" {
                        value 2;
                        description
                          "Code points to classify to loss priority medium-low";
                      }
                      enum "medium-high" {
                        value 3;
                        description
                          "Code points to classify to loss priority medium-high";
                      }
                    }
                  }
    
                  leaf-list code-points {
                    type string;
                    ordered-by user;
                    description
                      "List of code point aliases and/or bit strings";
                  }
                }  // list loss-priority
              }  // list forwarding-class
            }  // list ieee-802.1ad
          }  // container classifiers
    
          container traffic-class-map {
            description
              "Packet input priority map based on incoming packets code point";
            uses apply-advanced;
          }  // container traffic-class-map
    
          list policy-map {
            key "name";
            max-elements 65535;
            description
              "Policy-map describing the packet marking rule";
            leaf name {
              type string {
                length "1 .. 64";
              }
              description "Policy-map name";
            }
    
            uses apply-advanced;
          }  // list policy-map
    
          container loss-priority-maps {
            description
              "Map loss priority of incoming packets based on code point value";
            uses apply-advanced;
          }  // container loss-priority-maps
    
          container loss-priority-rewrites {
            description
              "Rewrite code point of outgoing packet based on loss priority";
            uses apply-advanced;
          }  // container loss-priority-rewrites
    
          container code-point-aliases {
            description
              "Mapping of code point aliases to bit strings";
            uses apply-advanced;
    
            list dscp {
              key "name";
              description
                "Differentiated Services code point aliases";
              leaf name {
                type string {
                  junos:posix-pattern "^([a-zA-Z].{0,63})$";
                  junos:pattern-message "Must be string of 64 characters or less beginning with letter";
                }
                description "DSCP alias name";
              }
    
              leaf bits {
                type string {
                  junos:posix-pattern "^([01]{6})$";
                  junos:pattern-message "Must be of form xxxxxx, where x is 1 or 0";
                }
                description "DSCP 6-bit pattern";
              }
            }  // list dscp
    
            list dscp-ipv6 {
              key "name";
              description
                "Differentiated Services code point aliases IPv6";
              leaf name {
                type string {
                  junos:posix-pattern "^([a-zA-Z].{0,63})$";
                  junos:pattern-message "Must be string of 64 characters or less beginning with letter";
                }
                description
                  "DSCP IPv6 alias name";
              }
    
              leaf bits {
                type string {
                  junos:posix-pattern "^([01]{6})$";
                  junos:pattern-message "Must be of form xxxxxx, where x is 1 or 0";
                }
                description "DSCP 6-bit pattern";
              }
            }  // list dscp-ipv6
    
            list exp {
              key "name";
              description
                "MPLS EXP code point aliases";
              leaf name {
                type string {
                  junos:posix-pattern "^([a-zA-Z].{0,63})$";
                  junos:pattern-message "Must be string of 64 characters or less beginning with letter";
                }
                description "EXP alias name";
              }
    
              leaf bits {
                type string {
                  junos:posix-pattern "^([01]{3})$";
                  junos:pattern-message "Must be of form xxx, where x is 0 or 1";
                }
                description "EXP 3-bit pattern";
              }
            }  // list exp
    
            list ieee-802.1 {
              key "name";
              description
                "IEEE-802.1 code point aliases";
              leaf name {
                type string {
                  junos:posix-pattern "^([a-zA-Z].{0,63})$";
                  junos:pattern-message "Must be string of 64 characters or less beginning with letter";
                }
                description
                  "IEEE-802.1 alias name";
              }
    
              leaf bits {
                type string {
                  junos:posix-pattern "^([01]{3})$";
                  junos:pattern-message "Must be of form xxx, where x is 0 or 1";
                }
                description
                  "IEEE-802.1 3-bit pattern";
              }
            }  // list ieee-802.1
    
            list inet-precedence {
              key "name";
              description
                "IPv4 precedence code point aliases";
              leaf name {
                type string {
                  junos:posix-pattern "^([a-zA-Z].{0,63})$";
                  junos:pattern-message "Must be string of 64 characters or less beginning with letter";
                }
                description
                  "IPv4 precedence alias name";
              }
    
              leaf bits {
                type string {
                  junos:posix-pattern "^([01]{3})$";
                  junos:pattern-message "Must be of form xxx, where x is 0 or 1";
                }
                description
                  "IPv4 precedence 3-bit pattern";
              }
            }  // list inet-precedence
    
            list ieee-802.1ad {
              key "name";
              description
                "IEEE-802.1ad (DEI) code point aliases";
              leaf name {
                type string {
                  junos:posix-pattern "^([a-zA-Z].{0,63})$";
                  junos:pattern-message "Must be string of 64 characters or less beginning with letter";
                }
                description
                  "IEEE-802.1ad (DEI) alias name";
              }
    
              leaf bits {
                type string {
                  junos:posix-pattern "^([01]{4})$";
                  junos:pattern-message "Must be of form xxxx, where x is 0 or 1";
                }
                description
                  "IEEE-802.1ad (DEI) 4-bit pattern";
              }
            }  // list ieee-802.1ad
          }  // container code-point-aliases
    
          container translation-table {
            description "Translation table";
            uses apply-advanced;
          }  // container translation-table
    
          container host-outbound-traffic {
            description
              "Classify and mark host traffic to forwarding engine";
            uses apply-advanced;
    
            leaf forwarding-class {
              type string {
                length "1 .. 64";
              }
              description
                "Classification of host traffic to forwarding engine";
            }
    
            leaf dscp-code-point {
              type string {
                junos:posix-pattern "^(([01]{6})|([a-zA-Z].{0,63}))$";
                junos:pattern-message "Not 6-bit pattern or code point alias";
              }
              description
                "Static DSCP code point of egress host traffic";
            }
    
            leaf override-firewall {
              type empty;
              description
                "Override firewall filter actions for RE generated traffic";
            }
    
            container tcp {
              presence "enable tcp";
              description
                "Settings for host outbound TCP packets";
              uses apply-advanced;
    
              leaf raise-internet-control-priority {
                type empty;
                description
                  "Place packets with IP Precedence set to Internet control into Q3 (network-control)";
              }
            }  // container tcp
    
            container ieee-802.1 {
              presence "enable ieee-802.1";
              description
                "Mark IEEE 802.1p for host output traffic";
              uses apply-advanced;
    
              leaf rewrite-rules {
                type empty;
                description
                  "Mark IEEE 802.1p for host outbound traffic using rewrite-rules";
              }
    
              leaf default {
                type string {
                  junos:posix-pattern "^(([01]{3})|([a-zA-Z].{0,63}))$";
                  junos:pattern-message "Not 3-bit pattern or code point alias";
                }
                description
                  "Mark IEEE 802.1p for host outbound traffic default value";
              }
            }  // container ieee-802.1
    
            container protocol {
              description
                "Settings for specific host outbound protocol packets";
              uses apply-advanced;
    
              container isis-over-gre {
                description
                  "Settings for ISIS over GRE packets";
                uses apply-advanced;
    
                leaf dscp-code-point {
                  type string {
                    junos:posix-pattern "^(([01]{6})|([a-zA-Z].{0,63}))$";
                    junos:pattern-message "Not 6-bit pattern or code point alias";
                  }
                  description
                    "Static DSCP code point of egress host traffic";
                }
              }  // container isis-over-gre
            }  // container protocol
          }  // container host-outbound-traffic
    
          container queue-drop-fairness {
            presence
              "enable queue-drop-fairness";
            description
              "Egress Fair Queuing behaviour on VOQ based systems";
            uses apply-advanced;
    
            choice fairness-val {
              leaf off {
                type empty;
                description
                  "Disable Egress Fair Queuing behaviour on VOQ based systems";
              }
              leaf on {
                type empty;
                description
                  "Enable Egress Fair Queuing behaviour on VOQ based systems";
              }
            }  // choice fairness-val
          }  // container queue-drop-fairness
    
          list drop-profiles {
            key "name";
            description
              "Random Early Drop (RED) data point map";
            leaf name {
              type string {
                length "1 .. 64";
              }
              description "Drop profile name";
            }
    
            uses apply-advanced;
    
            list fill-level {
              key "name";
              description
                "Fill-level value of data point";
              leaf name {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 100";
                  }
                }
                description
                  "Percentage the queue is full";
              }
    
              leaf drop-probability {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 100";
                  }
                }
                description
                  "Probability packet will be dropped";
              }
            }  // list fill-level
    
            container interpolate {
              description
                "Data points interpolated";
              uses apply-advanced;
    
              leaf-list fill-level {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 100";
                  }
                }
                ordered-by user;
                description
                  "Data points for queue full percentage";
              }
    
              leaf-list drop-probability {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 100";
                  }
                }
                ordered-by user;
                description
                  "Data points for packet drop probability";
              }
            }  // container interpolate
          }  // list drop-profiles
    
          leaf tri-color {
            type empty;
            description
              "Enable tricolor marking";
          }
    
          container shared-buffer {
            description
              "Shared buffer configuration";
            uses apply-advanced;
    
            leaf percent {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "5 .. 100";
                }
              }
              description
                "Percentage of shared buffer to be used";
            }
    
            container ingress {
              description
                "Shared buffer configuration at ingress";
              uses apply-advanced;
    
              leaf percent {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 100";
                  }
                }
                description
                  "Percentage of shared buffer to be used at ingress";
              }
    
              list buffer-partition {
                key "name";
                description "Buffer-partition";
                leaf name {
                  type string {
                    junos:posix-pattern "^.{1,64}$";
                    junos:pattern-message "Must be string of 64 characters or less";
                  }
                  description
                    "Buffer-partition name";
                }
    
                uses apply-advanced;
    
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 100";
                    }
                  }
                  description
                    "Percentage of ingress shared buffer to be used";
                }
    
                leaf dynamic-threshold {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 10";
                    }
                  }
                  description
                    "Threshold for maximum buffer share for a queue at ingress buffer-partition";
                }
              }  // list buffer-partition
            }  // container ingress
    
            container egress {
              description
                "Shared buffer configuration at egress";
              uses apply-advanced;
    
              leaf percent {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 100";
                  }
                }
                description
                  "Percentage of shared buffer to be used at egress";
              }
    
              list buffer-partition {
                key "name";
                description "Buffer-partition";
                leaf name {
                  type string {
                    junos:posix-pattern "^.{1,64}$";
                    junos:pattern-message "Must be string of 64 characters or less";
                  }
                  description
                    "Buffer-partition name";
                }
    
                uses apply-advanced;
    
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 100";
                    }
                  }
                  description
                    "Percentage of egress shared buffer to be used";
                }
    
                leaf dynamic-threshold {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 10";
                    }
                  }
                  description
                    "Threshold for maximum buffer share for a queue at egress buffer-partition";
                }
              }  // list buffer-partition
            }  // container egress
          }  // container shared-buffer
    
          container forwarding-classes {
            description
              "One or more mappings of forwarding class to queue number";
            uses apply-advanced;
    
            list class {
              junos:must "(!(".. queue"))";
              junos:must-message "'queue' and 'class' cannot coexist";
              key "name";
              max-elements 16;
              description
                "Forwarding class to map to queue number";
              leaf name {
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of forwarding class";
              }
    
              leaf queue-num {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32;
                }
                description "Queue number";
              }
    
              leaf priority {
                type enumeration {
                  enum "low" {
                    value 0;
                    description
                      "Low fabric priority";
                  }
                  enum "high" {
                    value 1;
                    description
                      "High fabric priority";
                  }
                }
                description "Fabric priority";
              }
    
              leaf no-loss {
                type empty;
                description
                  "This is no traffic loss class";
              }
    
              leaf pfc-priority {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 7";
                  }
                }
                description
                  "PFC priority (FC id's)";
              }
            }  // list class
    
            list queue {
              key "name";
              description
                "Queue number to map to forwarding class";
              leaf name {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32;
                }
                description "Queue number";
              }
    
              leaf class-name {
                type string {
                  length "1 .. 64";
                }
                description
                  "Forwarding class name";
              }
    
              leaf priority {
                type enumeration {
                  enum "low" {
                    value 0;
                    description
                      "Fabric priority low";
                  }
                  enum "high" {
                    value 1;
                    description
                      "Fabric priority high";
                  }
                }
                description "Fabric priority";
              }
            }  // list queue
          }  // container forwarding-classes
    
          list traffic-control-profiles {
            key "name";
            description
              "Traffic shaping and scheduling profiles";
            leaf name {
              type string {
                length "1 .. 64";
              }
              description
                "Traffic control profile name";
            }
    
            uses apply-advanced;
    
            leaf scheduler-map {
              type string {
                length "1 .. 64";
              }
              description
                "Mapping of forwarding classes to packet schedulers";
            }
    
            leaf strict-priority-scheduler {
              type empty;
              description
                "Enable strict priority scheduler.";
            }
    
            leaf atm-service {
              type enumeration {
                enum "cbr" {
                  value 0;
                  description
                    "Constant bit rate";
                }
                enum "rtvbr" {
                  value 1;
                  description
                    "Real-time variable bit rate";
                }
                enum "nrtvbr" {
                  value 2;
                  description
                    "Non-real-time variable bit rate";
                }
              }
              description "ATM service category";
            }
    
            leaf peak-rate {
              type string;
              units "cps";
              description
                "ATM Peak Cell Rate (PCR)";
            }
    
            leaf sustained-rate {
              type string;
              units "cps";
              description
                "ATM Sustained Cell Rate (SCR)";
            }
    
            leaf max-burst-size {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint64 {
                  range "1 .. 4000";
                }
              }
              units "cells";
              description
                "ATM Maximum Burst Size (MBS)";
            }
    
            container shaping-rate {
              description "Shaping rate";
              choice shaping_rate_choice {
                leaf rate {
                  junos:must "(!("interfaces ${interface} aggregated-ether-options link-speed mixed"))";
                  junos:must-message "Scheduler shaping-rate in bits per second is incompatible with link-speed mixed";
                  type string;
                  units "bits per second";
                  description
                    "Shaping rate as an absolute rate";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Shaping rate as a percentage";
                }
              }  // choice shaping_rate_choice
            }  // container shaping-rate
    
            container overhead-accounting {
              description "Overhead accounting";
              leaf mode {
                type string {
                  length "1 .. 64";
                }
              }
    
              leaf bytes {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type int32 {
                    range "-120 .. 124";
                  }
                }
                description "Byte adjust value";
              }
    
              leaf frame-mode-bytes {
                junos:must "(!(".. bytes"))";
                junos:must-message "cannot specify both bytes and frame-mode-bytes";
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type int32 {
                    range "-120 .. 124";
                  }
                }
                description
                  "Overhead bytes when in frame-mode";
              }
    
              leaf cell-mode-bytes {
                junos:must "(!(".. bytes"))";
                junos:must-message "cannot specify both bytes and cell-mode-bytes";
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type int32 {
                    range "-120 .. 124";
                  }
                }
                description
                  "Overhead bytes when in cell-mode";
              }
            }  // container overhead-accounting
    
            container shaping-rate-priority-strict-high {
              description
                "Shaping rate for strict high priority traffic";
              choice shaping_rate_choice {
                leaf rate {
                  type string;
                  units "bits per second";
                  description
                    "Shaping rate in bits per second";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Shaping rate as a percentage";
                }
              }  // choice shaping_rate_choice
    
              leaf burst-size {
                type string;
                units "bytes";
                description
                  "Shaping rate burst size";
              }
            }  // container shaping-rate-priority-strict-high
    
            container shaping-rate-priority-high {
              description
                "Shaping rate for high priority traffic";
              choice shaping_rate_choice {
                leaf rate {
                  type string;
                  units "bits per second";
                  description
                    "Shaping rate in bits per second";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Shaping rate as a percentage";
                }
              }  // choice shaping_rate_choice
    
              leaf burst-size {
                type string;
                units "bytes";
                description
                  "Shaping rate burst size";
              }
            }  // container shaping-rate-priority-high
    
            container shaping-rate-priority-medium {
              description
                "Shaping rate for medium priority traffic";
              choice shaping_rate_choice {
                leaf rate {
                  type string;
                  units "bits per second";
                  description
                    "Shaping rate in bits per second";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Shaping rate as a percentage";
                }
              }  // choice shaping_rate_choice
    
              leaf burst-size {
                type string;
                units "bytes";
                description
                  "Shaping rate burst size";
              }
            }  // container shaping-rate-priority-medium
    
            container shaping-rate-priority-medium-low {
              description
                "Shaping rate for medium low priority traffic";
              choice shaping_rate_choice {
                leaf rate {
                  type string;
                  units "bits per second";
                  description
                    "Shaping rate in bits per second";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Shaping rate as a percentage";
                }
              }  // choice shaping_rate_choice
    
              leaf burst-size {
                type string;
                units "bytes";
                description
                  "Shaping rate burst size";
              }
            }  // container shaping-rate-priority-medium-low
    
            container shaping-rate-priority-low {
              description
                "Shaping rate for low priority traffic";
              choice shaping_rate_choice {
                leaf rate {
                  type string;
                  units "bits per second";
                  description
                    "Shaping rate in bits per second";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Shaping rate as a percentage";
                }
              }  // choice shaping_rate_choice
    
              leaf burst-size {
                type string;
                units "bytes";
                description
                  "Shaping rate burst size";
              }
            }  // container shaping-rate-priority-low
    
            container shaping-rate-excess-high {
              description
                "Shaping rate for excess high traffic";
              choice shaping_rate_choice {
                leaf rate {
                  type string;
                  units "bits per second";
                  description
                    "Shaping rate in bits per second";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Shaping rate as a percentage";
                }
              }  // choice shaping_rate_choice
    
              leaf burst-size {
                type string;
                units "bytes";
                description
                  "Shaping rate burst size";
              }
            }  // container shaping-rate-excess-high
    
            container shaping-rate-excess-low {
              description
                "Shaping rate for excess low traffic";
              choice shaping_rate_choice {
                leaf rate {
                  type string;
                  units "bits per second";
                  description
                    "Shaping rate in bits per second";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Shaping rate as a percentage";
                }
              }  // choice shaping_rate_choice
    
              leaf burst-size {
                type string;
                units "bytes";
                description
                  "Shaping rate burst size";
              }
            }  // container shaping-rate-excess-low
    
            container shaping-rate-excess-medium-high {
              description
                "Shaping rate for excess medium-high traffic";
              choice shaping_rate_choice {
                leaf rate {
                  type string;
                  units "bits per second";
                  description
                    "Shaping rate in bits per second";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Shaping rate as a percentage";
                }
              }  // choice shaping_rate_choice
    
              leaf burst-size {
                type string;
                units "bytes";
                description
                  "Shaping rate burst size";
              }
            }  // container shaping-rate-excess-medium-high
    
            container shaping-rate-excess-medium-low {
              description
                "Shaping rate for excess medium-low traffic";
              choice shaping_rate_choice {
                leaf rate {
                  type string;
                  units "bits per second";
                  description
                    "Shaping rate in bits per second";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Shaping rate as a percentage";
                }
              }  // choice shaping_rate_choice
    
              leaf burst-size {
                type string;
                units "bytes";
                description
                  "Shaping rate burst size";
              }
            }  // container shaping-rate-excess-medium-low
    
            container guaranteed-rate {
              description "Guaranteed rate";
              choice guaranteed_rate_choice {
                leaf rate {
                  type string;
                  units "bits per second";
                  description
                    "Guaranteed rate as an absolute rate";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Guaranteed rate as a percentage";
                }
              }  // choice guaranteed_rate_choice
            }  // container guaranteed-rate
    
            container excess-rate {
              junos:must "(!((".. excess-rate-high" || (".. excess-rate-low" || (".. excess-rate-medium-high" || ".. excess-rate-medium-low")))))";
              junos:must-message "cannot specify both excess-rate and excess-rate-high or excess-rate-low or excess-rate-medium-high or excess-rate-medium-low";
              description
                "Excess bandwidth sharing proportion";
              choice excess_rate_choice {
                leaf proportion {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 1000";
                    }
                  }
                  description
                    "Excess rate as a proportion";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Excess rate as a percentage";
                }
              }  // choice excess_rate_choice
            }  // container excess-rate
    
            container excess-rate-high {
              junos:must "(!(".. excess-rate"))";
              junos:must-message "cannot specify both excess-rate and excess-rate-high";
              description
                "Excess bandwidth sharing for excess-high priority";
              choice excess_rate_choice {
                leaf proportion {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 1000";
                    }
                  }
                  description
                    "Excess rate as a proportion";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Excess rate as a percentage";
                }
              }  // choice excess_rate_choice
            }  // container excess-rate-high
    
            container excess-rate-medium-high {
              junos:must "(!(".. excess-rate"))";
              junos:must-message "cannot specify both excess-rate and excess-rate-medium-high";
              description
                "Excess bandwidth sharing for excess-medium-high priority";
              choice excess_rate_choice {
                leaf proportion {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 1000";
                    }
                  }
                  description
                    "Excess rate as a proportion";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Excess rate as a percentage";
                }
              }  // choice excess_rate_choice
            }  // container excess-rate-medium-high
    
            container excess-rate-low {
              junos:must "(!(".. excess-rate"))";
              junos:must-message "cannot specify both excess-rate and excess-rate-low";
              description
                "Excess bandwidth sharing for excess-low priority";
              choice excess_rate_choice {
                leaf proportion {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 1000";
                    }
                  }
                  description
                    "Excess rate as a proportion";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Excess rate as a percentage";
                }
              }  // choice excess_rate_choice
            }  // container excess-rate-low
    
            container excess-rate-medium-low {
              junos:must "(!(".. excess-rate"))";
              junos:must-message "cannot specify both excess-rate and excess-rate-medium-low";
              description
                "Excess bandwidth sharing for excess-medium-low priority";
              choice excess_rate_choice {
                leaf proportion {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 1000";
                    }
                  }
                  description
                    "Excess rate as a proportion";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Excess rate as a percentage";
                }
              }  // choice excess_rate_choice
            }  // container excess-rate-medium-low
    
            choice delay_buffer_sizing {
              container delay-buffer-rate {
                description "Delay buffer rate";
                choice delay_buffer_rate_choice {
                  leaf rate {
                    type string;
                    units "bits per second";
                    description
                      "Delay buffer rate as an absolute rate";
                  }
                  leaf percent {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "1 .. 100";
                      }
                    }
                    description
                      "Delay buffer rate as a percentage";
                  }
                  leaf cps {
                    type string;
                    units "cells per second";
                    description
                      "Delay buffer rate as an absolute cells per second rate";
                  }
                }  // choice delay_buffer_rate_choice
              }  // container delay-buffer-rate
            }  // choice delay_buffer_sizing
          }  // list traffic-control-profiles
    
          list forwarding-class-sets {
            key "name";
            description "Forwarding class sets";
            leaf name {
              type string {
                length "1 .. 64";
              }
              description "Forwarding class set";
            }
    
            uses apply-advanced;
    
            list class {
              key "name";
              description "Forwarding class";
              leaf name {
                type string {
                  length "1 .. 64";
                }
                description "Class name";
              }
    
              uses apply-advanced;
            }  // list class
          }  // list forwarding-class-sets
    
          list congestion-notification-profile {
            key "name";
            description
              "Congestion notification profile";
            leaf name {
              type string {
                length "1 .. 64";
              }
              description
                "Congestion notification name";
            }
    
            uses apply-advanced;
    
            container pfc-watchdog {
              junos:must "(".. output")";
              junos:must-message "pfc-watchdog configurations mandate output config";
              presence "enable pfc-watchdog";
              description
                "Configure pfc-watchdog parameters";
              uses apply-advanced;
    
              leaf poll-interval {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint16 {
                    range "100 .. 1000";
                  }
                }
                units "milliseconds";
                description
                  "Pfc watchdog poll interval timings";
              }
    
              leaf detection {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "2 .. 10";
                  }
                }
                description
                  "Pfc Number of poll periods";
              }
    
              leaf recovery {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint16 {
                    range "200 .. 1000";
                  }
                }
                units "milliseconds";
                description
                  "Pfc watchdog recovery time interval";
              }
    
              leaf watchdog-action {
                type enumeration {
                  enum "drop" {
                    value 0;
                    description
                      "Pfc watchdog action drop";
                  }
                }
                description
                  "Configure pfc-wathdog action";
              }
            }  // container pfc-watchdog
    
            container input {
              description
                "Input congestion notification components";
              uses apply-advanced;
    
              leaf cable-length {
                type string;
                units "metre";
                description
                  "Length of cable in metre";
              }
    
              container ieee-802.1 {
                description
                  "IEEE 802.1 code point";
                uses apply-advanced;
    
                list code-point {
                  key "name";
                  max-elements 8;
                  description
                    "IEEE 802.1 code point";
                  leaf name {
                    type string {
                      junos:posix-pattern "^([01]{3})$";
                      junos:pattern-message "Must be of form xxx, where x is 0 or 1";
                    }
                    description
                      "IEEE 802.1 code point";
                  }
    
                  uses apply-advanced;
    
                  leaf pfc {
                    type empty;
                    description "PFC";
                  }
    
                  leaf mru {
                    junos:must "(".. pfc")";
                    junos:must-message "MRU not allowed without PFC";
                    type string;
                    units "bytes";
                    description
                      "Max Receive Size of packet for this code point";
                  }
    
                  choice qfc-control {
                    leaf qfc {
                      type empty;
                      description "QFC";
                    }
                    container qcn {
                      presence "enable qcn";
                      description "QCN";
                      uses apply-advanced;
    
                      container defense-mode-edge {
                        description
                          "Choose the defense mode edge";
                        uses apply-advanced;
    
                        container alternate-priority {
                          description
                            "Choose the alternate priority for defense mode edge";
                          uses apply-advanced;
    
                          leaf bits {
                            type string {
                              junos:posix-pattern "^([01]{3})$";
                              junos:pattern-message "Must be of form xxx, where x is 0 or 1";
                            }
                            description
                              "IEEE 802.1 code point";
                          }
                        }  // container alternate-priority
                      }  // container defense-mode-edge
                    }  // container qcn
                  }  // choice qfc-control
                }  // list code-point
              }  // container ieee-802.1
    
              container dscp {
                description "DSCP code point";
                uses apply-advanced;
    
                list code-point {
                  key "name";
                  max-elements 64;
                  description "DSCP code point";
                  leaf name {
                    type string {
                      junos:posix-pattern "^([01]{6})$";
                      junos:pattern-message "Must be of form xxxxxx, where x is 0 or 1";
                    }
                    description
                      "DSCP code point";
                  }
    
                  uses apply-advanced;
    
                  leaf pfc {
                    type empty;
                    description "PFC";
                  }
    
                  leaf mru {
                    junos:must "(".. pfc")";
                    junos:must-message "MRU not allowed without PFC";
                    type string;
                    units "bytes";
                    description
                      "Max Receive Size of packet for this code point";
                  }
                }  // list code-point
              }  // container dscp
            }  // container input
    
            container output {
              description
                "Output congestion notification components";
              uses apply-advanced;
    
              list class {
                key "name";
                max-elements 16;
                description "Forwarding class";
                leaf name {
                  type string {
                    length "1 .. 64";
                  }
                  description "Class name";
                }
    
                uses apply-advanced;
    
                leaf remove-cntag {
                  type empty;
                  description
                    "Remove cntag for this forwarding class";
                }
    
                leaf qcn {
                  type empty;
                  description
                    "Enabling Quantized Congestion Notification for this forwarding class";
                }
              }  // list class
    
              container ieee-802.1 {
                description
                  "IEEE 802.1 code point";
                uses apply-advanced;
    
                list code-point {
                  key "name";
                  max-elements 8;
                  description
                    "IEEE 802.1 code point";
                  leaf name {
                    type string {
                      junos:posix-pattern "^([01]{3})$";
                      junos:pattern-message "Must be of form xxx, where x is 0 or 1";
                    }
                    description
                      "IEEE 802.1 code point";
                  }
    
                  uses apply-advanced;
    
                  leaf-list flow-control-queue {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "0 .. 7";
                      }
                    }
                    ordered-by user;
                    description
                      "Flow control queue( set of queues)";
                  }
                }  // list code-point
              }  // container ieee-802.1
            }  // container output
          }  // list congestion-notification-profile
    
          list scheduler-map-forwarding-class-sets {
            key "name";
            description
              "Mapping of forwarding class sets to packet schedulers";
            leaf name {
              type string {
                length "1 .. 64";
              }
              description
                "Scheduler map forwarding class set name";
            }
    
            uses apply-advanced;
    
            list forwarding-class-set {
              key "name";
              description
                "Forwarding class set name to map to scheduler";
              leaf name {
                type string {
                  length "1 .. 64";
                }
                description
                  "Forwarding class set name";
              }
    
              leaf scheduler {
                type string {
                  length "1 .. 64";
                }
                description "Scheduler name";
              }
            }  // list forwarding-class-set
          }  // list scheduler-map-forwarding-class-sets
    
          container system-defaults {
            description "System defaults";
            uses apply-advanced;
    
            container classifiers {
              description
                "System wide Classifiers applied to incoming packets";
              uses apply-advanced;
    
              container exp {
                description "EXP classifier";
                leaf classifier-name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of classifier to be applied";
                }
              }  // container exp
            }  // container classifiers
    
            container traffic-control-profiles {
              description
                "Default traffic control profiles";
              uses apply-advanced;
    
              container interface-set-input {
                description
                  "Default input traffic control profile for dynamic interface-set";
                leaf profile-name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Name of traffic control profile";
                }
              }  // container interface-set-input
    
              container interface-set-output {
                description
                  "Default output traffic control profile for dynamic interface-set";
                leaf profile-name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Name of traffic control profile";
                }
              }  // container interface-set-output
            }  // container traffic-control-profiles
          }  // container system-defaults
    
          container interfaces {
            description
              "Apply class-of-service options to interfaces";
            uses apply-advanced;
    
            list interface {
              key "name";
              uses cos_interfaces_type;
            }  // list interface
          }  // container interfaces
    
          list routing-instances {
            key "name";
            description
              "Apply CoS options to routing instances with VRF table label";
            leaf name {
              junos:must "((!(".. classifiers") || (!("routing-instances $$") || ("routing-instances $$ vrf-table-label" || ("routing-instances $$ protocols vpls no-tunnel-services" || "routing-instances $$ routing-options localize")))))";
              junos:must-message "'vrf-table-label' or 'no-tunnel-services' or 'routing-options localize' for this routing instance is required for classifier configuration";
              type string {
                junos:posix-pattern "!^(([*]{1,})|(__.*__)|(.{129,}))$";
                junos:pattern-message "Must be a non-reserved string of 128 characters or less";
              }
              description
                "Routing instance name (or wildcard)";
            }
    
            uses apply-advanced;
    
            container classifiers {
              description
                "Classifiers applied to incoming packets";
              uses apply-advanced;
    
              container exp {
                description "EXP classifier";
                leaf classifier-name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of classifier to be applied";
                }
              }  // container exp
    
              container dscp {
                description
                  "Differentiated Services code point classifier";
                leaf classifier-name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of classifier to be applied";
                }
              }  // container dscp
    
              container dscp-ipv6 {
                description
                  "Differentiated Services code point classifier IPv6";
                leaf classifier-name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of classifier to be applied";
                }
              }  // container dscp-ipv6
            }  // container classifiers
          }  // list routing-instances
    
          container rewrite-rules {
            description
              "Write code point value of outgoing packets";
            uses apply-advanced;
    
            list dscp {
              key "name";
              ordered-by user;
              description
                "Differentiated Services code point rewrite rule";
              leaf name {
                junos:must "((".. forwarding-class" || ".. import"))";
                junos:must-message "'At least one 'forwarding class' or 'import' rewrite definition is required for rewrite configuration";
                type string {
                  length "1 .. 64";
                }
                description "Rewrite rule name";
              }
    
              uses apply-advanced;
    
              leaf import {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Include this rewrite rule in this definition";
              }
    
              list forwarding-class {
                key "name";
                description
                  "Markings for named forwarding class";
                leaf name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Forwarding class name";
                }
    
                uses apply-advanced;
    
                list loss-priority {
                  key "name";
                  description
                    "Code point marking based on loss priority";
                  leaf name {
                    type enumeration {
                      enum "low" {
                        value 0;
                        description
                          "Marking when loss priority is low";
                      }
                      enum "high" {
                        value 1;
                        description
                          "Marking when loss priority is high";
                      }
                      enum "medium-low" {
                        value 2;
                        description
                          "Marking when loss priority is medium-low";
                      }
                      enum "medium-high" {
                        value 3;
                        description
                          "Marking when loss priority is medium-high";
                      }
                    }
                  }
    
                  leaf code-point {
                    type string {
                      junos:posix-pattern "^(([01]{6})|([a-zA-Z].{0,63}))$";
                      junos:pattern-message "Not 6-bit pattern or code point alias";
                    }
                    description
                      "Code point aliases or bit string";
                  }
                }  // list loss-priority
              }  // list forwarding-class
            }  // list dscp
    
            list dscp-ipv6 {
              key "name";
              ordered-by user;
              description
                "Differentiated Services code point rewrite rule IPv6";
              leaf name {
                junos:must "((".. forwarding-class" || ".. import"))";
                junos:must-message "'At least one 'forwarding class' or 'import' rewrite definition is required for rewrite configuration";
                type string {
                  length "1 .. 64";
                }
                description "Rewrite rule name";
              }
    
              uses apply-advanced;
    
              leaf import {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Include this rewrite rule in this definition";
              }
    
              list forwarding-class {
                key "name";
                description
                  "Markings for named forwarding class";
                leaf name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Forwarding class name";
                }
    
                uses apply-advanced;
    
                list loss-priority {
                  key "name";
                  description
                    "Code point marking based on loss priority";
                  leaf name {
                    type enumeration {
                      enum "low" {
                        value 0;
                        description
                          "Marking when loss priority is low";
                      }
                      enum "high" {
                        value 1;
                        description
                          "Marking when loss priority is high";
                      }
                      enum "medium-low" {
                        value 2;
                        description
                          "Marking when loss priority is medium-low";
                      }
                      enum "medium-high" {
                        value 3;
                        description
                          "Marking when loss priority is medium-high";
                      }
                    }
                  }
    
                  leaf code-point {
                    type string {
                      junos:posix-pattern "^(([01]{6})|([a-zA-Z].{0,63}))$";
                      junos:pattern-message "Not 6-bit pattern or code point alias";
                    }
                    description
                      "Code point aliases or bit string";
                  }
                }  // list loss-priority
              }  // list forwarding-class
            }  // list dscp-ipv6
    
            list exp {
              key "name";
              ordered-by user;
              description
                "MPLS EXP rewrite rule";
              leaf name {
                junos:must "((".. forwarding-class" || ".. import"))";
                junos:must-message "'At least one 'forwarding class' or 'import' rewrite definition is required for rewrite configuration";
                type string {
                  length "1 .. 64";
                }
                description "Rewrite rule name";
              }
    
              uses apply-advanced;
    
              leaf import {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Include this rewrite rule in this definition";
              }
    
              list forwarding-class {
                key "name";
                description
                  "Markings for named forwarding class";
                leaf name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Forwarding class name";
                }
    
                uses apply-advanced;
    
                list loss-priority {
                  key "name";
                  description
                    "Code point marking based on loss priority";
                  leaf name {
                    type enumeration {
                      enum "low" {
                        value 0;
                        description
                          "Marking when loss priority is low";
                      }
                      enum "high" {
                        value 1;
                        description
                          "Marking when loss priority is high";
                      }
                      enum "medium-low" {
                        value 2;
                        description
                          "Marking when loss priority is medium-low";
                      }
                      enum "medium-high" {
                        value 3;
                        description
                          "Marking when loss priority is medium-high";
                      }
                    }
                  }
    
                  leaf code-point {
                    type string {
                      junos:posix-pattern "^(([01]{3})|([a-zA-Z].{0,63}))$";
                      junos:pattern-message "Not 3-bit pattern or code point alias";
                    }
                    description
                      "Code point aliases or bit string";
                  }
                }  // list loss-priority
              }  // list forwarding-class
            }  // list exp
    
            list ieee-802.1 {
              key "name";
              ordered-by user;
              description
                "IEEE-802.1 rewrite rule";
              leaf name {
                junos:must "((".. forwarding-class" || ".. import"))";
                junos:must-message "'At least one 'forwarding class' or 'import' rewrite definition is required for rewrite configuration";
                type string {
                  length "1 .. 64";
                }
                description "Rewrite rule name";
              }
    
              uses apply-advanced;
    
              leaf import {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Include this rewrite rule in this definition";
              }
    
              list forwarding-class {
                key "name";
                description
                  "Markings for named forwarding class";
                leaf name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Forwarding class name";
                }
    
                uses apply-advanced;
    
                list loss-priority {
                  key "name";
                  description
                    "Code point marking based on loss priority";
                  leaf name {
                    type enumeration {
                      enum "low" {
                        value 0;
                        description
                          "Marking when loss priority is low";
                      }
                      enum "high" {
                        value 1;
                        description
                          "Marking when loss priority is high";
                      }
                      enum "medium-low" {
                        value 2;
                        description
                          "Marking when loss priority is medium-low";
                      }
                      enum "medium-high" {
                        value 3;
                        description
                          "Marking when loss priority is medium-high";
                      }
                    }
                  }
    
                  leaf code-point {
                    type string {
                      junos:posix-pattern "^(([01]{3})|([a-zA-Z].{0,63}))$";
                      junos:pattern-message "Not 3-bit pattern or code point alias";
                    }
                    description
                      "Code point aliases or bit string";
                  }
                }  // list loss-priority
              }  // list forwarding-class
            }  // list ieee-802.1
    
            list inet-precedence {
              key "name";
              ordered-by user;
              description
                "IPv4 precedence rewrite rule";
              leaf name {
                junos:must "((".. forwarding-class" || ".. import"))";
                junos:must-message "'At least one 'forwarding class' or 'import' rewrite definition is required for rewrite configuration";
                type string {
                  length "1 .. 64";
                }
                description "Rewrite rule name";
              }
    
              uses apply-advanced;
    
              leaf import {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Include this rewrite rule in this definition";
              }
    
              list forwarding-class {
                key "name";
                description
                  "Markings for named forwarding class";
                leaf name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Forwarding class name";
                }
    
                uses apply-advanced;
    
                list loss-priority {
                  key "name";
                  description
                    "Code point marking based on loss priority";
                  leaf name {
                    type enumeration {
                      enum "low" {
                        value 0;
                        description
                          "Marking when loss priority is low";
                      }
                      enum "high" {
                        value 1;
                        description
                          "Marking when loss priority is high";
                      }
                      enum "medium-low" {
                        value 2;
                        description
                          "Marking when loss priority is medium-low";
                      }
                      enum "medium-high" {
                        value 3;
                        description
                          "Marking when loss priority is medium-high";
                      }
                    }
                  }
    
                  leaf code-point {
                    type string {
                      junos:posix-pattern "^(([01]{3})|([a-zA-Z].{0,63}))$";
                      junos:pattern-message "Not 3-bit pattern or code point alias";
                    }
                    description
                      "Code point aliases or bit string";
                  }
                }  // list loss-priority
              }  // list forwarding-class
            }  // list inet-precedence
    
            list ieee-802.1ad {
              key "name";
              ordered-by user;
              description
                "IEEE-802.1ad (DEI) rewrite rule";
              leaf name {
                junos:must "((".. forwarding-class" || ".. import"))";
                junos:must-message "'At least one 'forwarding class' or 'import' rewrite definition is required for rewrite configuration";
                type string {
                  length "1 .. 64";
                }
                description "Rewrite rule name";
              }
    
              uses apply-advanced;
    
              leaf import {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Include this rewrite rule in this definition";
              }
    
              list forwarding-class {
                key "name";
                description
                  "Markings for named forwarding class";
                leaf name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Forwarding class name";
                }
    
                uses apply-advanced;
    
                list loss-priority {
                  key "name";
                  description
                    "Code point marking based on loss priority";
                  leaf name {
                    type enumeration {
                      enum "low" {
                        value 0;
                        description
                          "Marking when loss priority is low";
                      }
                      enum "high" {
                        value 1;
                        description
                          "Marking when loss priority is high";
                      }
                      enum "medium-low" {
                        value 2;
                        description
                          "Marking when loss priority is medium-low";
                      }
                      enum "medium-high" {
                        value 3;
                        description
                          "Marking when loss priority is medium-high";
                      }
                    }
                  }
    
                  leaf code-point {
                    type string {
                      junos:posix-pattern "^(([01]{4})|([a-zA-Z].{0,63}))$";
                      junos:pattern-message "Not 4-bit pattern or code point alias";
                    }
                    description
                      "Code point aliases or bit string";
                  }
                }  // list loss-priority
              }  // list forwarding-class
            }  // list ieee-802.1ad
          }  // container rewrite-rules
    
          container fabric {
            description
              "Define CoS parameters of switch fabric";
            uses apply-advanced;
    
            container scheduler-map {
              description
                "Mapping of fabric traffic to packet schedulers";
              uses apply-advanced;
    
              list priority {
                key "name";
                description
                  "Fabric traffic priority";
                leaf name {
                  type enumeration {
                    enum "low" {
                      value 0;
                      description
                        "Low priority fabric traffic";
                    }
                    enum "high" {
                      value 1;
                      description
                        "High priority fabric traffic";
                    }
                  }
                }
    
                leaf scheduler {
                  type string {
                    length "1 .. 64";
                  }
                  description "Scheduler name";
                }
              }  // list priority
            }  // container scheduler-map
          }  // container fabric
    
          list scheduler-maps {
            key "name";
            description
              "Mapping of forwarding classes to packet schedulers";
            leaf name {
              type string {
                length "1 .. 64";
              }
              description "Scheduler map name";
            }
    
            uses apply-advanced;
    
            list forwarding-class {
              key "name";
              description
                "Forwarding class name to map to scheduler";
              leaf name {
                type string {
                  length "1 .. 64";
                }
                description
                  "Forwarding class name";
              }
    
              leaf scheduler {
                type string {
                  length "1 .. 64";
                }
                description "Scheduler name";
              }
            }  // list forwarding-class
          }  // list scheduler-maps
    
          list fragmentation-maps {
            key "name";
            description
              "Mapping of forwarding class to fragmentation options";
            leaf name {
              type string {
                length "1 .. 64";
              }
              description
                "Fragmentation map name";
            }
    
            uses apply-advanced;
    
            list forwarding-class {
              key "name";
              description
                "Forwarding class name to map to fragmentation options";
              leaf name {
                type string {
                  length "1 .. 64";
                }
                description
                  "Forwarding class name";
              }
    
              uses apply-advanced;
    
              choice fragmentation-control {
                leaf fragment-threshold {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint16 {
                      range "64 .. 9192";
                    }
                  }
                  units "bytes";
                  description
                    "Fragmentation threshold";
                }
                leaf no-fragmentation {
                  type empty;
                  description
                    "Don't allow fragmentation";
                }
              }  // choice fragmentation-control
    
              leaf multilink-class {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint16 {
                    range "0 .. 7";
                  }
                }
                description
                  "Multilink-Class assigned to the forwarding class";
              }
    
              leaf drop-timeout {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint16 {
                    range "0 .. 2000";
                  }
                }
                units "milliseconds";
                description "Drop timeout";
              }
            }  // list forwarding-class
          }  // list fragmentation-maps
    
          list schedulers {
            key "name";
            description "Packet schedulers";
            leaf name {
              type string {
                length "1 .. 64";
              }
              description "Scheduler name";
            }
    
            uses apply-advanced;
    
            container transmit-rate {
              description "Transmit rate";
              uses apply-advanced;
    
              choice transmit_rate_choice {
                leaf rate {
                  junos:must "(!("interfaces ${interface} aggregated-ether-options link-speed mixed"))";
                  junos:must-message "Scheduler transmit-rate in bits per second is incompatible with link-speed mixed";
                  type string;
                  units "bits per second";
                  description
                    "Transmit rate as rate";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Transmit rate as percentage";
                }
                container remainder {
                  presence "enable remainder";
                  description
                    "Remainder available";
                  uses apply-advanced;
    
                  leaf percent {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "0 .. 100";
                      }
                    }
                    default "0";
                  }
                }  // container remainder
              }  // choice transmit_rate_choice
    
              choice rate_limit_choice {
                leaf exact {
                  type empty;
                  description
                    "Enforce exact transmit rate";
                }
                leaf rate-limit {
                  type empty;
                  description
                    "Enforce rate limit that uses policer";
                }
              }  // choice rate_limit_choice
            }  // container transmit-rate
    
            container excess-rate {
              junos:must "((!((".. transmit-rate exact" && ".. excess-rate")) && (!((".. transmit-rate rate-limit" && ".. excess-rate")) && !((".. priority $$={strict-high}" && ".. excess-rate")))))";
              junos:must-message "Cannot specify excess-rate with transmit-rate exact/rate-limit or strict-high priority";
              description
                "Excess bandwidth sharing proportion";
              choice excess_rate_choice {
                leaf proportion {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 1000";
                    }
                  }
                  description
                    "Excess rate as a proportion";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Excess rate as a percentage";
                }
              }  // choice excess_rate_choice
            }  // container excess-rate
    
            container shaping-rate {
              junos:must "(!((".. transmit-rate rate-limit" && ".. shaping-rate")))";
              junos:must-message "only one option (shaping-rate or transmit-rate rate-limit) can be configured at a time";
              junos:must "(!((".. transmit-rate exact" && ".. shaping-rate")))";
              junos:must-message "only one option (shaping-rate or transmit-rate exact) can be configured at a time";
              description "Shaping rate";
              choice shaping_rate_choice {
                leaf rate {
                  junos:must "(!("interfaces ${interface} aggregated-ether-options link-speed mixed"))";
                  junos:must-message "Scheduler shaping-rate in bits per second is incompatible with link-speed mixed";
                  type string;
                  units "bits per second";
                  description
                    "Shaping rate as an absolute rate";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "1 .. 100";
                    }
                  }
                  description
                    "Shaping rate as a percentage";
                }
              }  // choice shaping_rate_choice
            }  // container shaping-rate
    
            container buffer-size {
              description
                "Queue transmission buffer size";
              uses apply-advanced;
    
              choice buffer_size_choice {
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 100";
                    }
                  }
                  description
                    "Buffer size as a percentage";
                }
                container remainder {
                  presence "enable remainder";
                  description
                    "Remainder of buffer size available";
                  uses apply-advanced;
    
                  leaf percent {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "0 .. 100";
                      }
                    }
                    default "0";
                  }
                }  // container remainder
                leaf shared {
                  type empty;
                  description
                    "Shared buffer allocation";
                }
                leaf temporal {
                  type string;
                  units "microseconds";
                  description
                    "Buffer size as temporal value";
                }
              }  // choice buffer_size_choice
    
              choice buffer_limit {
                leaf exact {
                  type empty;
                  description
                    "Enforce exact buffer size";
                }
              }  // choice buffer_limit
    
              container buffer-partition {
                presence
                  "enable buffer-partition";
                description
                  "Partition buffer size among multicast and unicast";
                uses apply-advanced;
    
                container multicast {
                  presence "enable multicast";
                  description
                    "Specify multicast fraction of reserved buffer";
                  uses apply-advanced;
    
                  leaf percent {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "0 .. 100";
                      }
                    }
                    default "50";
                  }
                }  // container multicast
              }  // container buffer-partition
            }  // container buffer-size
    
            container shared-buffer {
              description
                "Queue transmission shared-buffer";
              uses apply-advanced;
    
              container maximum {
                presence "enable maximum";
                description
                  "Control the amount of shared buffer a given queue can consume";
                uses apply-advanced;
    
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 100";
                    }
                  }
                  default "0";
                  description
                    "Maximum shared buffer size as a percentage";
                }
    
                container multicast {
                  presence "enable multicast";
                  description
                    "Control the amount of shared buffer mcast pkts consume";
                  uses apply-advanced;
    
                  leaf percent {
                    type union {
                      type string {
                        pattern "<.*>|$.*";
                      }
                      type uint32 {
                        range "0 .. 100";
                      }
                    }
                    default "0";
                    description
                      "Maximum shared buffer size as a percentage";
                  }
                }  // container multicast
              }  // container maximum
            }  // container shared-buffer
    
            leaf priority {
              type string {
                length "1 .. 64";
              }
              description "Scheduling priority";
            }
    
            leaf excess-priority {
              junos:must "((!((".. transmit-rate exact" && (".. excess-priority $$={high}" || (".. excess-priority $$={low}" || (".. excess-priority $$={medium-high}" || ".. excess-priority $$={medium-low}"))))) && (!((".. transmit-rate rate-limit" && (".. excess-priority $$={high}" || (".. excess-priority $$={low}" || (".. excess-priority $$={medium-high}" || ".. excess-priority $$={medium-low}"))))) && !((".. priority $$={strict-high}" && (".. excess-priority $$={high}" || (".. excess-priority $$={low}" || (".. excess-priority $$={medium-high}" || ".. excess-priority $$={medium-low}"))))))))";
              junos:must-message "Cannot specify excess-priority with transmit-rate exact/rate-limit or strict-high priority";
              type string {
                length "1 .. 64";
              }
              description
                "Priority in the excess region";
            }
    
            list drop-profile-map {
              key "loss-priority protocol";
              description
                "Assign drop profile to a loss priority and protocol";
              leaf loss-priority {
                type enumeration {
                  enum "low" {
                    value 0;
                    description
                      "Loss priority low";
                  }
                  enum "high" {
                    value 1;
                    description
                      "Loss priority high";
                  }
                  enum "medium-low" {
                    value 2;
                    description
                      "Loss priority medium-low";
                  }
                  enum "medium-high" {
                    value 3;
                    description
                      "Loss priority medium-high";
                  }
                  enum "any" {
                    value 4;
                    description
                      "Ignore loss priority when assigning drop profile";
                  }
                }
                description
                  "Loss priority value";
              }
    
              leaf protocol {
                type enumeration {
                  enum "tcp" {
                    value 0;
                    description
                      "TCP protocol only";
                  }
                  enum "non-tcp" {
                    value 1;
                    description
                      "Non-TCP protocols only";
                  }
                  enum "any" {
                    value 2;
                    description
                      "Ignore protocol type when assigning drop profile";
                  }
                }
                description "Protocol type";
              }
    
              leaf drop-profile {
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of drop profile to apply";
              }
            }  // list drop-profile-map
    
            leaf explicit-congestion-notification {
              type empty;
              description
                "Enable or Disable Explicit Congestion Notification";
            }
    
            container drop-profile-map-set {
              presence
                "enable drop-profile-map-set";
              description "System drop profile";
              uses apply-advanced;
    
              leaf profile-name {
                type string {
                  junos:posix-pattern "default";
                  junos:pattern-message "Only default is supported";
                  length "1 .. 64";
                }
                description "Drop Profile Name";
              }
    
              leaf profile-type {
                type enumeration {
                  enum "drop" {
                    value 0;
                    description "Set drop type";
                  }
                  enum "mark" {
                    value 1;
                    description
                      "Set ECN marking";
                  }
                }
              }
            }  // container drop-profile-map-set
    
            leaf queue-monitoring {
              type empty;
              description
                "Enable queue depth monitoring";
            }
          }  // list schedulers
    
          container traceoptions {
            description
              "Trace options for class-of-service process";
            uses apply-advanced;
    
            leaf no-remote-trace {
              junos:must "("system tracing")";
              junos:must-message "'no-remote-trace' is valid only when [system tracing] is configured";
              type empty;
              description
                "Disable remote tracing";
            }
    
            container file {
              description
                "Trace file information";
              leaf filename {
                type string {
                  junos:posix-pattern "![/ %]";
                  junos:pattern-message "Must not contain '/', % or a space";
                  length "1 .. 1024";
                }
                description
                  "Name of file in which to write trace information";
              }
    
              leaf size {
                type string;
                description
                  "Maximum trace file size";
              }
    
              leaf files {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "2 .. 1000";
                  }
                }
                default "3";
                description
                  "Maximum number of trace files";
              }
    
              choice world-readable-choice {
                leaf world-readable {
                  type empty;
                  description
                    "Allow any user to read the log file";
                }
                leaf no-world-readable {
                  type empty;
                  description
                    "Don't allow any user to read the log file";
                }
              }  // choice world-readable-choice
    
              leaf match {
                type jt:regular-expression;
                description
                  "Regular expression for lines to be logged";
              }
            }  // container file
    
            list flag {
              key "name";
              description "Tracing parameters";
              leaf name {
                type enumeration {
                  enum "init" {
                    value 0;
                    description
                      "Trace initialization events";
                  }
                  enum "show" {
                    value 1;
                    description
                      "Trace show command servicing";
                  }
                  enum "route-socket" {
                    value 2;
                    description
                      "Trace route-socket events";
                  }
                  enum "parse" {
                    value 3;
                    description
                      "Trace parser processing";
                  }
                  enum "process" {
                    value 4;
                    description
                      "Trace configuration processing";
                  }
                  enum "util" {
                    value 5;
                    description
                      "Trace utilities";
                  }
                  enum "restart" {
                    value 6;
                    description
                      "Trace restart processing";
                  }
                  enum "snmp" {
                    value 7;
                    description
                      "Trace SNMP-related processing";
                  }
                  enum "hardware-database" {
                    value 8;
                    description
                      "Trace chassis hardware database related processing";
                  }
                  enum "asynch" {
                    value 9;
                    description
                      "Trace asynchronous configuration processing";
                  }
                  enum "dynamic" {
                    value 10;
                    description
                      "Trace dynamic CoS functions";
                  }
                  enum "cos-adjustment" {
                    value 11;
                    description
                      "Trace CoS rate adjustments";
                  }
                  enum "performance-monitor" {
                    value 12;
                    description
                      "Trace performance monitor counters";
                  }
                  enum "chassis-scheduler" {
                    value 13;
                    description
                      "Trace chassis stream scheduler processing";
                  }
                  enum "cn-util" {
                    value 14;
                    description
                      "Trace utilities for congestion-notification";
                  }
                  enum "snmp-timeouts" {
                    value 15;
                    description
                      "Trace SNMP COSD kernel timeouts";
                  }
                  enum "all" {
                    value 16;
                    description
                      "Trace everything";
                  }
                  enum "feature-capability" {
                    value 17;
                    description
                      "Trace feature capability";
                  }
                  enum "application" {
                    value 18;
                    description
                      "Trace Junos application programming";
                  }
                  enum "jvision" {
                    value 19;
                    description
                      "Cos Junos Jvision traces";
                  }
                }
              }
            }  // list flag
          }  // container traceoptions
    
          container multi-destination {
            description
              "Multicast class of service";
            uses apply-advanced;
    
            leaf scheduler-map {
              type string {
                length "1 .. 64";
              }
              description
                "Scheduler map for multi destination";
            }
    
            container family {
              description
                "Family Inet/Inet6/Ethernet";
              uses apply-advanced;
    
              container ethernet {
                description
                  "Ethernet switching options";
                uses apply-advanced;
    
                leaf broadcast {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Forwarding class to be applied to broadcast";
                }
              }  // container ethernet
    
              container inet {
                description "IP Multicast";
                uses apply-advanced;
    
                container classifier {
                  description
                    "Classifier applied to ip-multicast";
                  uses apply-advanced;
    
                  container dscp {
                    description
                      "Differentiated Services code point classifier";
                    leaf classifier-name {
                      type string {
                        length "1 .. 64";
                      }
                      description
                        "Name of classifier to be applied";
                    }
                  }  // container dscp
    
                  container inet-precedence {
                    description
                      "IPv4 precedence classifier";
                    leaf classifier-name {
                      type string {
                        length "1 .. 64";
                      }
                      description
                        "Name of classifier to be applied";
                    }
                  }  // container inet-precedence
                }  // container classifier
              }  // container inet
    
              container inet6 {
                description "IPv6 Multicast";
                uses apply-advanced;
    
                container classifier {
                  description
                    "Classifier applied to ipv6-multicast";
                  uses apply-advanced;
    
                  container dscp-ipv6 {
                    description
                      "Differentiated Services code point classifier";
                    leaf classifier-name {
                      type string {
                        length "1 .. 64";
                      }
                      description
                        "Name of classifier to be applied";
                    }
                  }  // container dscp-ipv6
                }  // container classifier
              }  // container inet6
            }  // container family
    
            container classifiers {
              junos:must "(!(".. forwarding-class"))";
              junos:must-message "Either Forwarding-class or Classifiers can be configured";
              description
                "Classifier applied to multicast traffic";
              uses apply-advanced;
    
              container ieee-802.1 {
                description
                  "IEEE-802.1 classifier";
                leaf classifier-name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Name of classifier to be applied";
                }
              }  // container ieee-802.1
    
              container dscp {
                junos:must "(!(".. inet-precedence"))";
                junos:must-message "Either DSCP or Inet-Precedence can be configured";
                description
                  "Differentiated services code point classifier";
                leaf classifier-name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Name of classifier to be applied";
                }
              }  // container dscp
    
              container dscp-ipv6 {
                description
                  "Differentiated services code point classifier IPv6";
                leaf classifier-name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Name of classifier to be applied";
                }
              }  // container dscp-ipv6
    
              container inet-precedence {
                description
                  "IPv4 precedence classifier";
                leaf classifier-name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Name of classifier to be applied";
                }
              }  // container inet-precedence
            }  // container classifiers
    
            leaf forwarding-class {
              type string {
                junos:posix-pattern "^.{1,64}$";
                junos:pattern-message "Must be string of 64 characters or less";
              }
              description
                "Forwarding class assigned to incoming Multi-destination packets";
            }
          }  // container multi-destination
    
          container application-traffic-control {
            presence
              "enable application-traffic-control";
            description
              "Application classifier configuration";
            uses apply-advanced;
    
            container traceoptions {
              description
                "Trace options for application classifier";
              uses appqos-traceoptions-type;
            }  // container traceoptions
    
            list rate-limiters {
              key "name";
              ordered-by user;
              description
                "Configure application-traffic-control rate limiters";
              leaf name {
                type string {
                  length "1 .. 63";
                }
                description
                  "Application classifier rate-limiter name";
              }
    
              uses apply-advanced;
    
              leaf bandwidth-limit {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "64 .. 10485760";
                  }
                }
                units "kbps";
                description "Bandwidth limit";
              }
    
              leaf burst-size-limit {
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "1 .. 1342177280";
                  }
                }
                units "bytes";
                description
                  "Burst size limit (default with bandwidth-limit and no larger than 6400 * bandwidth)";
              }
            }  // list rate-limiters
    
            list rule-sets {
              key "name";
              ordered-by user;
              description
                "Configure application-traffic-control rule-sets";
              leaf name {
                type string {
                  length "1 .. 63";
                }
                description
                  "Application classifier rule-set name";
              }
    
              uses apply-advanced;
    
              list rule {
                key "name";
                ordered-by user;
                description "Rule";
                uses appqos_rule_type;
              }  // list rule
            }  // list rule-sets
          }  // container application-traffic-control
    
          container forwarding-policy {
            description
              "Class-of-service forwarding policy";
            uses apply-advanced;
    
            list next-hop-map {
              key "name";
              ordered-by user;
              description
                "Class-of-service next-hop map";
              leaf name {
                type string {
                  junos:posix-pattern "^.{1,64}$";
                  junos:pattern-message "Must be string of 64 characters or less";
                }
                description
                  "Name to identify next-hop map";
              }
    
              uses apply-advanced;
    
              list forwarding-class {
                key "name";
                ordered-by user;
                description
                  "Forwarding class from which to map";
                leaf name {
                  type string {
                    junos:posix-pattern "^.{1,64}$";
                    junos:pattern-message "Must be string of 64 characters or less";
                  }
                  description "Forwarding class";
                }
    
                uses apply-advanced;
    
                leaf-list next-hop {
                  type union {
                    type jt:ipaddr-or-interface;
                    type string {
                      pattern "<.*>|$.*";
                    }
                  }
                  ordered-by user;
                  description
                    "Next-hop identifier to which to map";
                }
    
                leaf-list lsp-next-hop {
                  type string;
                  ordered-by user;
                  description
                    "Regular expression for LSP next hop";
                }
    
                leaf non-lsp-next-hop {
                  type empty;
                  description
                    "Any non-RSVP LSP next hop";
                }
    
                leaf non-labelled-next-hop {
                  type empty;
                  description
                    "Any non-labelled next hop";
                }
    
                leaf discard {
                  type empty;
                  description "Discard next hop";
                }
              }  // list forwarding-class
    
              container forwarding-class-default {
                description
                  "Next Hop For traffic which does not meet any FC in the next-hop-map";
                uses apply-advanced;
    
                leaf-list next-hop {
                  type union {
                    type jt:ipaddr-or-interface;
                    type string {
                      pattern "<.*>|$.*";
                    }
                  }
                  ordered-by user;
                  description
                    "Next-hop identifier to which to map";
                }
    
                leaf-list lsp-next-hop {
                  type string;
                  ordered-by user;
                  description
                    "Regular expression for LSP next hop";
                }
    
                leaf non-lsp-next-hop {
                  type empty;
                  description
                    "Any non-RSVP LSP next hop";
                }
    
                leaf non-labelled-next-hop {
                  type empty;
                  description
                    "Any non-labelled next hop";
                }
    
                leaf discard {
                  type empty;
                  description "Discard next hop";
                }
              }  // container forwarding-class-default
            }  // list next-hop-map
    
            list class {
              key "name";
              ordered-by user;
              description
                "Class-of-service description";
              leaf name {
                type string {
                  junos:posix-pattern "^.{1,64}$";
                  junos:pattern-message "Must be string of 64 characters or less";
                }
                description
                  "Name to identify class of service";
              }
    
              uses apply-advanced;
    
              container classification-override {
                description
                  "Define classification overrides";
                uses apply-advanced;
    
                leaf forwarding-class {
                  type string {
                    junos:posix-pattern "^.{1,64}$";
                    junos:pattern-message "Must be string of 64 characters or less";
                  }
                  description
                    "Forwarding class name";
                }
              }  // container classification-override
            }  // list class
          }  // container forwarding-policy
        }  // grouping juniper-class-of-service-options
    
        grouping apply-advanced {
          description
            "Apply advanced configuration logic";
          leaf-list apply-groups {
            type string;
            ordered-by user;
            description
              "Groups from which to inherit configuration data";
          }
    
          leaf-list apply-groups-except {
            type string;
            ordered-by user;
            description
              "Don't inherit configuration data from these groups";
          }
    
          list apply-macro {
            key "name";
            ordered-by user;
            description
              "Macro and parameters for commit script expansion";
            uses apply-macro-type;
          }  // list apply-macro
        }  // grouping apply-advanced
    
        grouping apply-macro-type {
          description
            "Macro data for commit-script expansion";
          leaf name {
            type string;
            description
              "Name of the macro to be expanded";
          }
    
          list data {
            key "name";
            uses macro-data-type;
          }  // list data
        }  // grouping apply-macro-type
    
        grouping appqos-traceoptions-type {
          description
            "Trace options for application classifier";
          uses apply-advanced;
    
          leaf no-remote-trace {
            junos:must "("system tracing")";
            junos:must-message "'no-remote-trace' is valid only when [system tracing] is configured";
            type empty;
            description "Disable remote tracing";
          }
    
          container file {
            description "Trace file information";
            leaf filename {
              type string {
                junos:posix-pattern "![/ %]";
                junos:pattern-message "Must not contain '/', % or a space";
                length "1 .. 1024";
              }
              description
                "Name of file in which to write trace information";
            }
    
            leaf size {
              type string;
              description
                "Maximum trace file size";
            }
    
            leaf files {
              type union {
                type string {
                  pattern "<.*>|$.*";
                }
                type uint32 {
                  range "2 .. 1000";
                }
              }
              default "3";
              description
                "Maximum number of trace files";
            }
    
            choice world-readable-choice {
              leaf world-readable {
                type empty;
                description
                  "Allow any user to read the log file";
              }
              leaf no-world-readable {
                type empty;
                description
                  "Don't allow any user to read the log file";
              }
            }  // choice world-readable-choice
    
            leaf match {
              type jt:regular-expression;
              description
                "Regular expression for lines to be logged";
            }
          }  // container file
    
          list flag {
            key "name";
            ordered-by user;
            description
              "Events and other information to include in trace output";
            leaf name {
              type enumeration {
                enum "all" {
                  value 0;
                  description "All events";
                }
              }
              description
                "Flag name to include in trace output";
            }
          }  // list flag
    
          leaf level {
            type enumeration {
              enum "error" {
                value 0;
                description
                  "Match error conditions";
              }
              enum "warning" {
                value 1;
                description
                  "Match warning messages";
              }
              enum "notice" {
                value 2;
                description
                  "Match conditions that should be handled specially";
              }
              enum "info" {
                value 3;
                description
                  "Match informational messages";
              }
              enum "verbose" {
                value 4;
                description
                  "Match verbose messages";
              }
              enum "all" {
                value 5;
                description "Match all levels";
              }
            }
            default "error";
            description
              "Level of debugging output";
          }
        }  // grouping appqos-traceoptions-type
    
        grouping appqos_rule_type {
          leaf name {
            type string {
              length "1 .. 63";
            }
            description "Rule name";
          }
    
          uses apply-advanced;
    
          container match {
            description
              "Specify application traffic control rule match-criteria";
            uses apply-advanced;
    
            leaf application-any {
              type empty;
              description "Any applications";
            }
    
            leaf application-unknown {
              type empty;
              status deprecated;
              description "Uknown applcations";
            }
    
            leaf application-known {
              type empty;
              description
                "Identifiable applications";
            }
    
            leaf-list application {
              type string {
                length "1 .. 63";
              }
              ordered-by user;
              description
                "Specify application name to match";
            }
    
            leaf-list application-group {
              type string {
                length "1 .. 63";
              }
              ordered-by user;
              description
                "Specify application group name to match";
            }
          }  // container match
    
          container then {
            description
              "Specify rule action to take when packet match criteria";
            uses apply-advanced;
    
            leaf forwarding-class {
              type string {
                junos:posix-pattern "^.{1,64}$";
                junos:pattern-message "Must be string of 64 characters or less";
              }
              description
                "Forwarding class for outgoing packets";
            }
    
            leaf dscp-code-point {
              type string {
                junos:posix-pattern "^(([01]{6})|([a-zA-Z].{0,63}))$";
                junos:pattern-message "Not 6-bit pattern or code point alias";
              }
              description
                "DSCP code point bitmap or alias";
            }
    
            leaf loss-priority {
              type enumeration {
                enum "low" {
                  value 0;
                  description
                    "Low loss priority";
                }
                enum "medium-low" {
                  value 1;
                  description
                    "Medium-low loss priority";
                }
                enum "medium-high" {
                  value 2;
                  description
                    "Medium-high loss priority";
                }
                enum "high" {
                  value 3;
                  description
                    "High loss priority";
                }
              }
              description "Packet loss priority";
            }
    
            container rate-limit {
              description "Apply rate limiters";
              uses apply-advanced;
    
              leaf client-to-server {
                junos:must "("class-of-service application-traffic-control rate-limiters $$")";
                junos:must-message "Rate limiter must be defined";
                type string;
                description
                  "Client-to-server rate limiter";
              }
    
              leaf server-to-client {
                junos:must "("class-of-service application-traffic-control rate-limiters $$")";
                junos:must-message "Rate limiter must be defined";
                type string;
                description
                  "Server-to-client rate limiter";
              }
    
              leaf loss-priority-high {
                type empty;
                description
                  "Set Rate limiter's action Loss-Priority to high";
              }
            }  // container rate-limit
    
            leaf log {
              type empty;
              description "Log the action";
            }
          }  // container then
        }  // grouping appqos_rule_type
    
        grouping cos_interfaces_type {
          description "Physical interface";
          leaf name {
            junos:must "((!(".. classifiers") || !(".. forwarding-class")))";
            junos:must-message "Forwarding-class and BA Classifiers not allowed on the same physical interface together";
            junos:must "((!((any ".. unit <*> rewrite-rules dscp-ipv6" || any ".. unit <*> rewrite-rules inet6-precedence <*> protocol $$={mpls}")) || !(".. output-forwarding-class-map")))";
            junos:must-message "DSCP-IPv6 rewrite or IPv6 Precedence for MPLS traffic and forwarding class map not allowed on same interface";
            junos:must "((!((any ".. unit <*> rewrite-rules dscp" || any ".. unit <*> rewrite-rules inet-precedence <*> protocol $$={mpls}")) || !(".. output-forwarding-class-map")))";
            junos:must-message "DSCP rewrite or IP Precedence rewrite for MPLS traffic and forwarding class map not allowed on same interface";
            junos:must "((!(any ".. unit <*> output-forwarding-class-map") || !(".. output-forwarding-class-map")))";
            junos:must-message "Cannot configure forwarding-class-map statement on both physical and logical interface";
            junos:must "((!((any ".. unit <*> scheduler-map" || (any ".. unit <*> input-scheduler-map" || (any ".. unit <*> output-traffic-control-profile" || any ".. unit <*> input-traffic-control-profile")))) || !((".. scheduler-map" || ".. input-scheduler-map"))))";
            junos:must-message "Cannot configure scheduler-map or traffic-control-profile statement on both physical and logical interface";
            junos:must "((!((".. scheduler-map" || ".. input-scheduler-map")) || (!("interfaces $$") || !(("interfaces $$ per-unit-scheduler" || ("interfaces $$ shared-scheduler" || "interfaces $$ hierarchical-scheduler"))))))";
            junos:must-message "'per-unit-scheduler', 'hierarchical-scheduler', or 'shared scheduler' is not compatible with scheduler map/input scheduler map on an interface";
            junos:must "((!(any ".. unit <*> input-traffic-control-profile") || (!("interfaces $$") || ("interfaces $$ per-unit-scheduler" || ("interfaces $$ shared-scheduler" || ("interfaces $$ hierarchical-scheduler" || any "interfaces $$ unit <*> pppoe-options"))))))";
            junos:must-message "'per-unit-scheduler', 'hierarchical-scheduler',or 'shared scheduler' for this interface is required for input-traffic-control-profile configuration on interface unit";
            junos:must "((!(any ".. unit <*> output-traffic-control-profile") || (!("interfaces $$") || ("interfaces $$ per-unit-scheduler" || ("interfaces $$ shared-scheduler" || ("interfaces $$ hierarchical-scheduler" || ("interfaces $$ cascade-port" || (any "interfaces $$ unit <*> pppoe-options" || (any "interfaces <ps*>" || any "interfaces $$ unit <*> demux-options")))))))))";
            junos:must-message "'per-unit-scheduler', 'hierarchical-scheduler', or 'shared scheduler' for this interface is required for output-traffic-control-profile configuration on interface unit";
            junos:must "((!(any ".. unit <*> shaping-rate") || (!("interfaces $$") || ("interfaces $$ per-unit-scheduler" || ("interfaces $$ shared-scheduler" || ("interfaces $$ hierarchical-scheduler" || (any "interfaces $$ unit <*> pppoe-options" || any "interfaces $$ unit <*> demux-options")))))))";
            junos:must-message "'per-unit-scheduler', 'hierarchical-scheduler', or 'shared scheduler' for this interface is required for bandwidth configuration on interface unit";
            junos:must "((!(any ".. unit <*> virtual-channel-group") || (!("interfaces $$") || "interfaces $$ per-unit-scheduler")))";
            junos:must-message "'per-unit-scheduler' for this interface is required for virtual-channel-group on interface unit";
            junos:must "((!((any ".. unit <*> scheduler-map" || any ".. unit <*> input-scheduler-map")) || (!("interfaces $$") || ("interfaces $$ per-unit-scheduler" || ("interfaces $$ shared-scheduler" || ("interfaces $$ hierarchical-scheduler" || ("interfaces $$ cascade-port" || (any "interfaces $$ unit <*> pppoe-options" || any "interfaces $$ unit <*> demux-options"))))))))";
            junos:must-message "'per-unit-scheduler', 'hierarchical-scheduler', or 'shared-scheduler' for this interface is required for scheduler map on interface unit";
            type union {
              type jt:interface-device-wildcard;
              type string {
                pattern "<.*>|$.*";
              }
            }
            description
              "Interface name (or wildcard)";
          }
    
          uses apply-advanced;
    
          list forwarding-class-set {
            junos:must "(!(".. scheduler-map"))";
            junos:must-message "Scheduler-map and forwarding-class-set not allowed on same interface together ";
            key "name";
            max-elements 4;
            description
              "Map forwarding class sets to output traffic control profile";
            leaf name {
              type string {
                length "1 .. 64";
              }
              description
                "Forwarding class sets name";
            }
    
            uses apply-advanced;
    
            container output-traffic-control-profile {
              description
                "Output traffic control profile for the interface";
              leaf profile-name {
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of the output traffic control profile associated with the interface";
              }
            }  // container output-traffic-control-profile
          }  // list forwarding-class-set
    
          leaf congestion-notification-profile {
            type string {
              length "1 .. 64";
            }
            description
              "Congestion notification profile for the interface";
          }
    
          container rewrite-value {
            description
              "FC interface rewrite value";
            uses apply-advanced;
    
            container input {
              description "Input direction";
              uses apply-advanced;
    
              container ieee-802.1 {
                description
                  "IEEE 802.1 code point";
                uses apply-advanced;
    
                container code-point {
                  description
                    "IEEE 802.1 code point";
                  uses apply-advanced;
    
                  leaf bits {
                    type string {
                      junos:posix-pattern "^([01]{3})$";
                      junos:pattern-message "Must be of form xxx, where x is 0 or 1";
                    }
                    description
                      "IEEE 802.1 code point";
                  }
                }  // container code-point
              }  // container ieee-802.1
            }  // container input
          }  // container rewrite-value
    
          leaf scheduler-map-forwarding-class-set {
            type string {
              junos:posix-pattern "^.{1,64}$";
              junos:pattern-message "Must be string of 64 characters or less";
            }
            description
              "Output scheduler map forwarding-class-set  ";
          }
    
          leaf scheduler-map {
            type string {
              length "1 .. 64";
            }
            description "Output scheduler map";
          }
    
          leaf input-scheduler-map {
            type string {
              length "1 .. 64";
            }
            description "Input scheduler map";
          }
    
          leaf scheduler-map-chassis {
            type union {
              type string {
                pattern "derived";
              }
              type string {
                length "1 .. 64";
              }
            }
            description
              "Scheduler map applied to chassis queues (not PIC queues)";
          }
    
          container shaping-rate {
            junos:must "(!("interfaces ${interface} aggregated-ether-options link-speed mixed"))";
            junos:must-message "CoS features are incompatible with link-speed mixed";
            description "Output shaping rate";
            leaf rate {
              type string;
              units "bits per second";
              description
                "Shaping rate as an absolute rate";
            }
          }  // container shaping-rate
    
          container input-shaping-rate {
            junos:must "(!("interfaces ${interface} aggregated-ether-options link-speed mixed"))";
            junos:must-message "CoS features are incompatible with link-speed mixed";
            description "Input shaping rate";
            leaf rate {
              type string;
              units "bits per second";
              description
                "Input shaping rate as an absolute rate";
            }
          }  // container input-shaping-rate
    
          container input-traffic-control-profile {
            junos:must "(!(("..  input-scheduler-map" || ".. input-shaping-rate")))";
            junos:must-message "input-traffic-control-profile cannot be configured if any of the following are configured: input-scheduler-map, input-shaping-rate";
            description
              "Input traffic control profile";
            leaf profile-name {
              type string {
                length "1 .. 64";
              }
              description
                "Name of the traffic control profile";
            }
          }  // container input-traffic-control-profile
    
          container input-traffic-control-profile-remaining {
            junos:must "(!(("..  scheduler-map" || ".. shaping-rate")))";
            junos:must-message "input-traffic-control-profile cannot be configured if any of the following are configured: scheduler-map, shaping-rate";
            description
              "Input traffic control profile for remaining traffic on the ifd";
            leaf profile-name {
              type string {
                length "1 .. 64";
              }
              description
                "Name of the traffic control profile";
            }
          }  // container input-traffic-control-profile-remaining
    
          container output-traffic-control-profile {
            junos:must "(!(("..  scheduler-map" || ".. shaping-rate")))";
            junos:must-message "output-traffic-control-profile cannot be configured if any of the following are configured: scheduler-map, shaping-rate";
            description
              "Output traffic control profile";
            leaf profile-name {
              type string {
                length "1 .. 64";
              }
              description
                "Name of the traffic control profile";
            }
          }  // container output-traffic-control-profile
    
          container output-traffic-control-profile-remaining {
            junos:must "(!(("..  scheduler-map" || ".. shaping-rate")))";
            junos:must-message "output-traffic-control-profile cannot be configured if any of the following are configured: scheduler-map, shaping-rate";
            description
              "Output traffic control profile for remaining traffic on the ifd";
            leaf profile-name {
              type string {
                length "1 .. 64";
              }
              description
                "Name of the traffic control profile";
            }
          }  // container output-traffic-control-profile-remaining
    
          container member-link-scheduler {
            junos:must "(!("interfaces ${interface} aggregated-ether-options link-speed mixed"))";
            junos:must-message "CoS features are incompatible with link-speed mixed";
            description
              "Scheduler parameter model for member link";
            choice model {
              leaf scale {
                type empty;
                description
                  "Scale scheduler parameters on aggregate interface";
              }
              leaf replicate {
                type empty;
                description
                  "Copy scheduler parameters from aggregate interface";
              }
            }  // choice model
          }  // container member-link-scheduler
    
          container exclude-queue-overhead-bytes {
            presence
              "enable exclude-queue-overhead-bytes";
            description
              "Exclude the overhead bytes from the queue statistics";
            uses apply-advanced;
    
            leaf include-hierarchy {
              type empty;
              description
                "Perform overhead adjustment on IFD and all children";
            }
          }  // container exclude-queue-overhead-bytes
    
          container logical-interface-aggregate-statistics {
            presence
              "enable logical-interface-aggregate-statistics";
            description
              "Logical interface aggregate queue statistics";
          }  // container logical-interface-aggregate-statistics
    
          list unit {
            key "name";
            description
              "Logical interface unit (or wildcard)";
            leaf name {
              type union {
                type string {
                  pattern "\*";
                }
                type union {
                  type string {
                    pattern "<.*>|$.*";
                  }
                  type uint32 {
                    range "0 .. 1073741823";
                  }
                }
              }
              description "Logical unit number";
            }
    
            uses apply-advanced;
    
            leaf forwarding-class {
              type string {
                length "1 .. 64";
              }
              description
                "Forwarding class assigned to incoming packets";
            }
    
            leaf scheduler-map {
              junos:must "(!("interfaces ${interface} hierarchical-scheduler"))";
              junos:must-message "scheduler-map cannot be configured on a logical interface when the hierarchical-scheduler is configured: use a traffic-control-profile which references the scheduler-map";
              type string {
                length "1 .. 64";
              }
              description "Output scheduler map";
            }
    
            leaf input-scheduler-map {
              junos:must "(!("interfaces ${interface} hierarchical-scheduler"))";
              junos:must-message "input-scheduler-map cannot be configured on a logical interface when the hierarchical-scheduler is configured";
              type string {
                length "1 .. 64";
              }
              description "Input scheduler map";
            }
    
            leaf fragmentation-map {
              type string {
                length "1 .. 64";
              }
              description
                "Fragmentation map applied to this logical interface";
            }
    
            container shaping-rate {
              junos:must "(!("interfaces ${interface} hierarchical-scheduler"))";
              junos:must-message "shaping-rate cannot be configured on a logical interface when the hierarchical-scheduler is configured: use a traffic-control-profile which specifies the shaping-rate";
              presence "enable shaping-rate";
              description "Output shaping rate";
              choice shaping_rate_choice {
                leaf rate {
                  junos:must "(!("interfaces ${interface} aggregated-ether-options link-speed mixed"))";
                  junos:must-message "Scheduler shaping-rate in bits per second is incompatible with link-speed mixed";
                  type string;
                  units "bits per second";
                  description
                    "Shaping rate as an absolute rate";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 100";
                    }
                  }
                  description
                    "Shaping rate as a percentage";
                }
              }  // choice shaping_rate_choice
            }  // container shaping-rate
    
            container input-shaping-rate {
              junos:must "(!("interfaces ${interface} hierarchical-scheduler"))";
              junos:must-message "input-shaping-rate cannot be configured on a logical interface when the hierarchical-scheduler is configured";
              description "Input shaping rate";
              choice shaping_rate_choice {
                leaf rate {
                  type string;
                  units "bits per second";
                  description
                    "Shaping rate as an absolute rate";
                }
                leaf percent {
                  type union {
                    type string {
                      pattern "<.*>|$.*";
                    }
                    type uint32 {
                      range "0 .. 100";
                    }
                  }
                  description
                    "Shaping rate as a percentage";
                }
              }  // choice shaping_rate_choice
            }  // container input-shaping-rate
    
            container input-traffic-control-profile {
              junos:must "(!(("..  input-scheduler-map" || (".. input-shaping-rate" || (".. adaptive-shaper" || ".. virtual-channel-group")))))";
              junos:must-message "input-traffic-control-profile cannot be configured if any of the following are configured under logical interface: input-scheduler-map, input-shaping-rate, adaptive-shaper, virtual-channel-group";
              description
                "Input traffic control profile";
              leaf profile-name {
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of traffic control profile";
              }
    
              leaf shared-instance {
                junos:must "("interfaces ${interface} shared-scheduler")";
                junos:must-message "Requires [edit interface <interface name> shared-scheduler]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of the shared instance";
              }
            }  // container input-traffic-control-profile
    
            container output-traffic-control-profile {
              junos:must "(!(("..  scheduler-map" || (".. shaping-rate" || (".. adaptive-shaper" || "..  virtual-channel-group")))))";
              junos:must-message "output-traffic-control-profile cannot be configured if any of the following are configured under logical interface: scheduler-map, shaping-rate, adaptive-shaper, virtual-channel-group";
              description
                "Output traffic control profile";
              leaf profile-name {
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of the traffic control profile";
              }
    
              leaf shared-instance {
                junos:must "("interfaces ${interface} shared-scheduler")";
                junos:must-message "Requires [edit interface <interface name> shared-scheduler]";
                type string {
                  length "1 .. 64";
                }
                description
                  "Name of the shared instance";
              }
            }  // container output-traffic-control-profile
    
            container output-traffic-control-profile-remaining {
              junos:must "(!(("..  scheduler-map" || ".. shaping-rate")))";
              junos:must-message "output-traffic-control-profile-remaining cannot be configured if any of the following are configured: scheduler-map, shaping-rate";
              description
                "Output traffic control profile for remaining traffic on the ifl";
              leaf profile-name {
                type string {
                  junos:posix-pattern "^.{1,64}$";
                  junos:pattern-message "Must be string of 64 characters or less";
                }
                description
                  "Name of the traffic control profile";
              }
            }  // container output-traffic-control-profile-remaining
    
            container report-ingress-shaping-rate {
              description
                "Report ingress shaping rate";
              choice report_ingress_shaping_rate_choice {
                leaf rate {
                  type string;
                  units "bits per second";
                  description
                    "Ingress shaping rate as an absolute value";
                }
              }  // choice report_ingress_shaping_rate_choice
            }  // container report-ingress-shaping-rate
    
            container classifiers {
              description
                "Classifiers applied to incoming packets";
              uses apply-advanced;
    
              list dscp {
                key "name";
                description
                  "Differentiated Services code point classifier";
                leaf name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of classifier to be applied";
                }
    
                uses apply-advanced;
    
                leaf-list family {
                  type string;
                  ordered-by user;
                  description
                    "Family for DSCP classifier";
                }
              }  // list dscp
    
              list dscp-ipv6 {
                key "name";
                description
                  "Differentiated Services code point classifier IPv6";
                leaf name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of classifier to be applied";
                }
    
                uses apply-advanced;
    
                leaf-list family {
                  type string;
                  ordered-by user;
                  description
                    "Family for DSCP Ipv6 classifier";
                }
              }  // list dscp-ipv6
    
              container exp {
                description "EXP classifier";
                leaf classifier-name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of classifier to be applied";
                }
              }  // container exp
    
              container ieee-802.1 {
                description
                  "IEEE-802.1 classifier";
                leaf classifier-name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of classifier to be applied";
                }
    
                leaf vlan-tag {
                  type enumeration {
                    enum "outer" {
                      value 0;
                      description
                        "Classification based on outer VLAN tag";
                    }
                    enum "inner" {
                      value 1;
                      description
                        "Classification based on inner VLAN tag";
                    }
                    enum "transparent" {
                      value 2;
                      description
                        "Classification based on hidden VLAN tag";
                    }
                  }
                  description
                    "VLAN tag used for classification";
                }
              }  // container ieee-802.1
    
              container inet-precedence {
                description
                  "IPv4 precedence classifier";
                leaf classifier-name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of classifier to be applied";
                }
              }  // container inet-precedence
    
              container ieee-802.1ad {
                junos:must "(!(".. ieee-802.1"))";
                junos:must-message "ieee-802.1ad and ieee-802.1 not allowed on same unit";
                description
                  "IEEE-802.1ad (DEI) classifier";
                leaf classifier-name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of classifier to be applied";
                }
              }  // container ieee-802.1ad
            }  // container classifiers
    
            container rewrite-rules {
              description
                "Rewrite rules applied to outgoing packets";
              uses apply-advanced;
    
              list dscp {
                junos:must "(!(".. inet-precedence"))";
                junos:must-message "DSCP and inet-precedence not allowed on same unit";
                key "name";
                description
                  "Differentiated Services code point rewrite rule";
                leaf name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of rewrite rule to be applied";
                }
    
                leaf-list protocol {
                  type enumeration {
                    enum "mpls" {
                      value 0;
                      description
                        "Apply to IPv4 packets entering MPLS tunnel";
                    }
                    enum "gtp-inet-outer" {
                      value 1;
                      description
                        "Apply to outer IP header";
                    }
                    enum "gtp-inet-both" {
                      value 2;
                      description
                        "Apply to both IP header";
                    }
                    enum "inet-outer" {
                      value 3;
                      description
                        "Apply to outer IP header";
                    }
                    enum "inet-both" {
                      value 4;
                      description
                        "Apply to both IP header";
                    }
                  }
                  ordered-by user;
                  description
                    "Specify protocol matching criteria";
                }
              }  // list dscp
    
              list dscp-ipv6 {
                junos:must "(!(".. inet6-precedence"))";
                junos:must-message "IPv6 DSCP and inet6-precedence not allowed on same unit";
                key "name";
                description
                  "Differentiated Services code point rewrite rule IPv6";
                leaf name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of rewrite rule to be applied";
                }
    
                leaf-list protocol {
                  type enumeration {
                    enum "mpls" {
                      value 0;
                      description
                        "Apply to IPv6 packets entering MPLS tunnel";
                    }
                    enum "gtp-inet-outer" {
                      value 1;
                      description
                        "Apply to outer IP header";
                    }
                    enum "gtp-inet-both" {
                      value 2;
                      description
                        "Apply to both IP header";
                    }
                  }
                  ordered-by user;
                  description
                    "Specify protocol matching criteria";
                }
              }  // list dscp-ipv6
    
              list exp {
                key "name";
                description "EXP rewrite rule";
                leaf name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of rewrite rule to be applied";
                }
    
                leaf-list protocol {
                  type enumeration {
                    enum "mpls-any" {
                      value 0;
                      description
                        "Apply to MPLS packets, write MPLS header only";
                    }
                    enum "mpls-inet-both" {
                      value 1;
                      description
                        "Apply to IPv4 MPLS packets, write MPLS and IPv4 header";
                    }
                    enum
                      "mpls-inet-both-non-vpn" {
                      value 2;
                      description
                        "Apply to IPv4 MPLS packets, write MPLS and IPv4 header for only non VPN traffic";
                    }
                  }
                  ordered-by user;
                  description
                    "Specify protocol matching criteria";
                }
              }  // list exp
    
              container ieee-802.1 {
                description
                  "IEEE-802.1 rewrite rule";
                leaf rewrite-rule-name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of rewrite rule to be applied";
                }
    
                leaf vlan-tag {
                  type enumeration {
                    enum "outer" {
                      value 0;
                      description
                        "Rewrite rule applies to outer VLAN tag";
                    }
                    enum "outer-and-inner" {
                      value 1;
                      description
                        "Rewrite rule applies to both outer and inner VLAN tags";
                    }
                  }
                  description
                    "One or more VLAN tags to which rewrite rule applies";
                }
              }  // container ieee-802.1
    
              list inet-precedence {
                key "name";
                description
                  "IPv4 precedence rewrite rule";
                leaf name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of rewrite rule to be applied";
                }
    
                leaf-list protocol {
                  type enumeration {
                    enum "mpls" {
                      value 0;
                      description
                        "Apply to IPv4 packets entering MPLS tunnel";
                    }
                    enum "gtp-inet-outer" {
                      value 1;
                      description
                        "Apply to outer IP header";
                    }
                    enum "gtp-inet-both" {
                      value 2;
                      description
                        "Apply to both IP header";
                    }
                    enum "inet-outer" {
                      value 3;
                      description
                        "Apply to outer IP header";
                    }
                    enum "inet-both" {
                      value 4;
                      description
                        "Apply to both IP header";
                    }
                  }
                  ordered-by user;
                  description
                    "Specify protocol matching criteria";
                }
              }  // list inet-precedence
    
              container ieee-802.1ad {
                junos:must "(!(".. ieee-802.1"))";
                junos:must-message "ieee-802.1ad and ieee-802.1 not allowed on same unit";
                description
                  "IEEE-802.1ad (DEI) rewrite rule";
                uses apply-advanced;
    
                leaf rewrite-rule-name {
                  type union {
                    type string {
                      pattern "default";
                    }
                    type string {
                      length "1 .. 64";
                    }
                  }
                  description
                    "Name of rewrite rule to be applied";
                }
    
                leaf vlan-tag {
                  type enumeration {
                    enum "outer" {
                      value 0;
                      description
                        "Rewrite rule applies to outer VLAN tag";
                    }
                    enum "outer-and-inner" {
                      value 1;
                      description
                        "Rewrite rule applies to both outer and inner VLAN tags";
                    }
                  }
                  description
                    "One or more VLAN tags to which rewrite rule applies";
                }
              }  // container ieee-802.1ad
            }  // container rewrite-rules
          }  // list unit
    
          container classifiers {
            description
              "Classifiers applied to incoming packets";
            uses apply-advanced;
    
            list dscp {
              key "name";
              description
                "Differentiated Services code point classifier";
              leaf name {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Name of classifier to be applied";
              }
    
              uses apply-advanced;
            }  // list dscp
    
            list dscp-ipv6 {
              key "name";
              description
                "Differentiated Services code point classifier IPv6";
              leaf name {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Name of classifier to be applied";
              }
    
              uses apply-advanced;
            }  // list dscp-ipv6
    
            container ieee-802.1 {
              description
                "IEEE-802.1 classifier";
              leaf classifier-name {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Name of classifier to be applied";
              }
    
              leaf vlan-tag {
                type enumeration {
                  enum "outer" {
                    value 0;
                    description
                      "Classification based on outer VLAN tag";
                  }
                  enum "inner" {
                    value 1;
                    description
                      "Classification based on inner VLAN tag";
                  }
                }
                description
                  "VLAN tag used for classification";
              }
            }  // container ieee-802.1
    
            container ieee-802.1ad {
              description
                "IEEE-802.1ad (DEI) classifier";
              leaf classifier-name {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Name of classifier to be applied";
              }
    
              leaf vlan-tag {
                type enumeration {
                  enum "outer" {
                    value 0;
                    description
                      "Classification based on outer VLAN tag";
                  }
                  enum "inner" {
                    value 1;
                    description
                      "Classification based on inner VLAN tag";
                  }
                }
                description
                  "VLAN tag used for classification";
              }
            }  // container ieee-802.1ad
    
            container inet-precedence {
              description
                "IPv4 precedence classifier";
              leaf classifier-name {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Name of classifier to be applied";
              }
            }  // container inet-precedence
          }  // container classifiers
    
          leaf forwarding-class {
            type string {
              junos:posix-pattern "^.{1,64}$";
              junos:pattern-message "Must be string of 64 characters or less";
            }
            description
              "Forwarding class assigned to incoming packets";
          }
    
          container rewrite-rules {
            description
              "Rewrite rules applied to outgoing packets";
            uses apply-advanced;
    
            list dscp {
              junos:must "(!(".. inet-precedence"))";
              junos:must-message "DSCP and inet-precedence not allowed on same unit";
              key "name";
              description
                "Differentiated Services code point rewrite rule";
              leaf name {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Name of rewrite rule to be applied";
              }
            }  // list dscp
    
            list dscp-ipv6 {
              junos:must "(!(".. inet6-precedence"))";
              junos:must-message "IPv6 DSCP and inet6-precedence not allowed on same unit";
              key "name";
              description
                "Differentiated Services code point rewrite rule IPv6";
              leaf name {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Name of rewrite rule to be applied";
              }
            }  // list dscp-ipv6
    
            container ieee-802.1 {
              description
                "IEEE-802.1 rewrite rule";
              leaf rewrite-rule-name {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Name of rewrite rule to be applied";
              }
            }  // container ieee-802.1
    
            container ieee-802.1ad {
              description
                "IEEE-802.1ad (DEI) rewrite rule";
              uses apply-advanced;
    
              leaf rewrite-rule-name {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Name of rewrite rule to be applied";
              }
    
              leaf vlan-tag {
                type enumeration {
                  enum "outer" {
                    value 0;
                    description
                      "Rewrite rule applies to outer VLAN tag";
                  }
                }
                description
                  "One or more VLAN tags to which rewrite rule applies";
              }
            }  // container ieee-802.1ad
    
            list inet-precedence {
              key "name";
              description
                "IPv4 precedence rewrite rule";
              leaf name {
                type union {
                  type string {
                    pattern "default";
                  }
                  type string {
                    length "1 .. 64";
                  }
                }
                description
                  "Name of rewrite rule to be applied";
              }
            }  // list inet-precedence
          }  // container rewrite-rules
    
          container multi-destination {
            description
              "Multi-destination class of service";
            uses apply-advanced;
    
            container classifiers {
              junos:must "(!(".. forwarding-class"))";
              junos:must-message "Either Forwarding-class or Classifiers can be configured";
              description
                "Classifier applied to multi-destination traffic";
              uses apply-advanced;
    
              container ieee-802.1 {
                description
                  "IEEE-802.1P classifier";
                leaf classifier-name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Name of classifier to be applied";
                }
              }  // container ieee-802.1
    
              container dscp {
                junos:must "(!(".. inet-precedence"))";
                junos:must-message "Either DSCP or Inet-Precedence can be configured";
                description
                  "Differentiated services code point classifier";
                leaf classifier-name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Name of classifier to be applied";
                }
              }  // container dscp
    
              container dscp-ipv6 {
                description
                  "Differentiated services code point classifier IPv6";
                leaf classifier-name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Name of classifier to be applied";
                }
              }  // container dscp-ipv6
    
              container inet-precedence {
                description
                  "IPv4 precedence classifier";
                leaf classifier-name {
                  type string {
                    length "1 .. 64";
                  }
                  description
                    "Name of classifier to be applied";
                }
              }  // container inet-precedence
            }  // container classifiers
    
            leaf forwarding-class {
              type string {
                junos:posix-pattern "^.{1,64}$";
                junos:pattern-message "Must be string of 64 characters or less";
              }
              description
                "Forwarding class assigned to incoming Multi-destination packets";
            }
          }  // container multi-destination
        }  // grouping cos_interfaces_type
    
        grouping macro-data-type {
          leaf name {
            type string;
            description
              "Keyword part of the keyword-value pair";
          }
    
          leaf value {
            type string;
            description
              "Value part of the keyword-value pair";
          }
        }  // grouping macro-data-type
      }  // module junos-qfx-conf-class-of-service
    

© 2023 YumaWorks, Inc. All rights reserved.