netconfcentral logo

openconfig-qos-interfaces@2016-12-16



  submodule openconfig-qos-interfaces {

    yang-version 1;

    belongs-to openconfig-qos {
        prefix oc-qos;
    }

    import openconfig-extensions {
      prefix oc-ext;
    }
    import openconfig-interfaces {
      prefix oc-if;
    }
    import openconfig-yang-types {
      prefix oc-yang;
    }

    include openconfig-qos-elements;

    organization "OpenConfig working group";

    contact
      "OpenConfig working group
    netopenconfig@googlegroups.com";

    description
      "This submodule defines data related to quality-of-service
    configuration and operational state associated with
    interfaces.";

    revision "2016-12-16" {
      description
        "Fix incorrect interface-ref placement";
      reference
        "0.2.0";

    }

    revision "2016-06-03" {
      description "Initial revision";
      reference
        "0.1.0";

    }

    oc-ext:openconfig-version "0.2.0";

    grouping qos-interface-classifier-match-config {
      description
        "Configuration data for match terms in the classifier
      associated with an interface";
      leaf id {
        type leafref {
          path
            "../../../../../../../../../classifiers/"
              + "classifier[name=current()/../../../../config/name]/"
              + "terms/term/config/id";
        }
        description
          "Reference to match terms in the classifier";
      }
    }  // grouping qos-interface-classifier-match-config

    grouping qos-interface-classifier-match-state {
      description
        "Operational state data for match terms in the classifier
      associated with an interface";
      leaf matched-packets {
        type oc-yang:counter64;
        description
          "Count of the number of packets matching this classifier
        match term on the interface.";
      }

      leaf matched-octets {
        type oc-yang:counter64;
        description
          "Count of the number of octets (bytes) matching this
        classifier match term on the interface.";
      }
    }  // grouping qos-interface-classifier-match-state

    grouping qos-interface-classifier-match-top {
      description
        "Top-level grouping for match terms in the classifier
      associated with an interface";
      container terms {
        description
          "Enclosing container for the list of match terms in the
        classifier";
        list term {
          key "id";
          description
            "List of match terms in the classifier associated with the
          interface";
          leaf id {
            type leafref {
              path "../config/id";
            }
            description
              "Reference to match term id list key";
          }

          container config {
            description
              "Configuration data for match terms in the classifier
            associated with an interface";
            uses qos-interface-classifier-match-config;
          }  // container config

          container state {
            config false;
            description
              "Operational state data for match terms in the classifier
            associated with an interface";
            uses qos-interface-classifier-match-config;

            uses qos-interface-classifier-match-state;
          }  // container state
        }  // list term
      }  // container terms
    }  // grouping qos-interface-classifier-match-top

    grouping qos-interface-classifier-top {
      description
        "Top-level grouping for a QoS classifier associated with an
      interface";
      container classifers {
        description
          "Classifiers to be applied to the interface.";
        list classifier {
          key "type";
          description
            "A list of classifiers that should be applied to the interface";
          leaf type {
            type leafref {
              path "../config/type";
            }
            description
              "Reference to the classifier name.";
          }

          container config {
            description
              "Configuration parameters for the list of classifiers.";
            uses qos-interface-classifers-config;
          }  // container config

          container state {
            config false;
            description
              "Operational state parameters for the list of classifiers.";
            uses qos-interface-classifers-config;
          }  // container state

          uses qos-interface-classifier-match-top;
        }  // list classifier
      }  // container classifers
    }  // grouping qos-interface-classifier-top

    grouping qos-interface-classifers-config {
      description
        "Configuration parameters for the list of classifiers";
      leaf name {
        type leafref {
          path
            "../../../../../../../classifiers/classifier/config/name";
        }
        description
          "Reference to the classifier to be applied to ingress traffic on
        the interface";
      }

      leaf type {
        type enumeration {
          enum "IPV4" {
            value 4;
            description
              "Classifier matches IPv4 packets.";
          }
          enum "IPV6" {
            value 6;
            description
              "Classifier matches IPv6 packets.";
          }
          enum "MPLS" {
            value 7;
            description
              "Classifier matches MPLS packets.";
          }
        }
        description
          "Type of packets matched by the classifier.";
      }
    }  // grouping qos-interface-classifers-config

    grouping qos-interface-queue-config {
      description
        "Configuration data for the queue associated with the
      interface";
      leaf name {
        type string;
        description
          "Reference to the queue associated with this interface.
        A queue may be explicitly configured, or implicitly created
        by the system based on default queues that are instantiated
        by a hardware component, or are assumed to be default on
        the system.";
      }
    }  // grouping qos-interface-queue-config

    grouping qos-interface-queue-state {
      description
        "Operational state data for the queue associated with the
      interface";
      leaf max-queue-len {
        type oc-yang:counter64;
        units "bytes";
        description
          "Maximum observed queue length";
      }

      leaf avg-queue-len {
        type oc-yang:counter64;
        units "bytes";
        description
          "Average observed queue length";
      }

      leaf transmit-pkts {
        type oc-yang:counter64;
        description
          "Number of packets transmitted by this queue";
      }

      leaf transmit-octets {
        type oc-yang:counter64;
        description
          "Number of octets trasmitted by this queue";
      }

      leaf dropped-pkts {
        type oc-yang:counter64;
        description
          "Number of packets dropped by the queue due to overrun";
      }
    }  // grouping qos-interface-queue-state

    grouping qos-interface-queue-top {
      description
        "Top-level grouping for the queue associated with the
      interface";
      container queues {
        description
          "Surrounding container for a list of queues that are
        instantiated on an interface.";
        list queue {
          key "name";
          description
            "Top-level container for the queue associated with this
          interface";
          leaf name {
            type leafref {
              path "../config/name";
            }
            description
              "Reference to the name of the queue
            instantiated on the interface.";
          }

          container config {
            description
              "Configuration data for the queue associated with the
            interface";
            uses qos-interface-queue-config;
          }  // container config

          container state {
            config false;
            description
              "Operational state data for the queue associated with the
            interface";
            uses qos-interface-queue-config;

            uses qos-interface-queue-state;
          }  // container state
        }  // list queue
      }  // container queues
    }  // grouping qos-interface-queue-top

    grouping qos-interface-voqs-top {
      description
        "Structural grouping of virtual-output-queue operational state
      for an interface.";
      container virtual-output-queues {
        description
          "Surrounding container for the list of egress interfaces
        for which virtual output queues are instantiated on this
        interface.";
        list voq-interface {
          key "name";
          description
            "List of egress interfaces for which a virtual output
          queue is instantiated at this interface.";
          leaf name {
            type leafref {
              path "../config/name";
            }
            description
              "Name used to refer to the egress interface.";
          }

          container config {
            description
              "Configuration parameters relating to the interface
            for which the VOQs are instantiated.";
            uses qos-voqs-config;
          }  // container config

          container state {
            config false;
            description
              "Operational state parameters relating to the interface
            for which the VOQs are instantiated.";
            uses qos-voqs-config;
          }  // container state

          uses qos-interface-queue-top;
        }  // list voq-interface
      }  // container virtual-output-queues
    }  // grouping qos-interface-voqs-top

    grouping qos-voqs-config {
      description
        "Configuration parameters relating to an egress interface for which
      VOQs are established on an interface.";
      leaf name {
        type string;
        description
          "Name used to refer to the egress interface.";
      }
    }  // grouping qos-voqs-config

    grouping qos-interface-scheduler-policy-config {
      description
        "Configuration data for schedulers associated with
      the interface";
      leaf name {
        type leafref {
          path
            "../../../../../../scheduler-policies/scheduler-policy/"
              + "config/name";
        }
        description
          "The scheduler policy to be applied to traffic on this interface.";
      }
    }  // grouping qos-interface-scheduler-policy-config

    grouping qos-interface-scheduler-state {
      description
        "Operational state data for a scheduler within
      a scheduler group applied to an interface.";
      leaf sequence {
        type leafref {
          path
            "../../../../../../../../scheduler-policies/"
              + "scheduler-policy[name=current()/../../../../config/name]"
              + "/schedulers/scheduler/config/sequence";
        }
        description
          "Reference to the sequence ID of the scheduler within
        the current scheduler policy.";
      }

      uses qos-scheduler-common-state;
    }  // grouping qos-interface-scheduler-state

    grouping qos-scheduler-common-state {
      description
        "Common definitions of counters used in schedulers.";
      leaf conforming-pkts {
        type oc-yang:counter64;
        description
          "The number of packets that were considered conforming by
        the scheduler.";
      }

      leaf conforming-octets {
        type oc-yang:counter64;
        description
          "The number of octets in packets that were considered
        conforming by the scheduler.";
      }

      leaf exceeding-pkts {
        type oc-yang:counter64;
        description
          "The number of packets that were considered exceeding by
        the scheduler.";
      }

      leaf exceeding-octets {
        type oc-yang:counter64;
        description
          "The number of octets in packets that were considered
        exceeding by the scheduler.";
      }

      leaf violating-pkts {
        type oc-yang:counter64;
        description
          "The number of packets that were considered violating by
        the policer.";
      }

      leaf violating-octets {
        type oc-yang:counter64;
        description
          "The number of octets in packets that were considered
        violating by the policer.";
      }
    }  // grouping qos-scheduler-common-state

    grouping qos-interface-scheduler-top {
      description "Top-level grouping ";
      container scheduler-policy {
        description
          "Scheduler policy associated with the interface.";
        container config {
          description
            "Configuration parameters relating to a scheduler policy on
          an interface.";
          uses qos-interface-scheduler-policy-config;
        }  // container config

        container state {
          config false;
          description
            "Operational state parameters relating to a scheduler policy
          on an interface.";
          uses qos-interface-scheduler-policy-config;
        }  // container state

        container schedulers {
          config false;
          description
            "Schedulers within the applied scheduler-policy.";
          list scheduler {
            key "sequence";
            description
              "List of the schedulers that are part of the scheduler-policy
            specified.";
            leaf sequence {
              type leafref {
                path "../state/sequence";
              }
              description
                "Reference to the sequence ID for the scheduler.";
            }

            container state {
              description
                "Operational state parameters relating to the scheduler
              policy.";
              uses qos-interface-scheduler-state;
            }  // container state
          }  // list scheduler
        }  // container schedulers
      }  // container scheduler-policy
    }  // grouping qos-interface-scheduler-top

    grouping qos-interfaces-config {
      description
        "Configuration data for interfaces referenced in the QoS
      model";
      leaf interface-id {
        type string;
        description
          "Identifier for the interface.";
      }
    }  // grouping qos-interfaces-config

    grouping qos-interfaces-state {
      description
        "Operational state data for interfaces referenced in the QoS
      model";
    }  // grouping qos-interfaces-state

    grouping qos-interface-input-config {
      description
        "Configuration data for QoS on ingress interface";
    }  // grouping qos-interface-input-config

    grouping qos-interface-input-state {
      description
        "Operational state data for QoS on ingress interface";
    }  // grouping qos-interface-input-state

    grouping qos-interface-input-top {
      description
        "Top-level grouping for QoS on ingress interface";
      container input {
        description
          "Top-level container for QoS data for the ingress
        interface";
        container config {
          description
            "Configuration data for QoS on ingress interface";
          uses qos-interface-input-config;
        }  // container config

        container state {
          config false;
          description
            "Operational state data for QoS on ingress interface";
          uses qos-interface-input-config;

          uses qos-interface-input-state;
        }  // container state

        uses qos-interface-classifier-top;

        uses qos-interface-queue-top;

        uses qos-interface-scheduler-top;

        uses qos-interface-voqs-top;
      }  // container input
    }  // grouping qos-interface-input-top

    grouping qos-interface-output-config {
      description
        "Configuration data for QoS on the egress interface";
    }  // grouping qos-interface-output-config

    grouping qos-interface-output-state {
      description
        "Operational state data for QoS on the egress interface";
    }  // grouping qos-interface-output-state

    grouping qos-interface-output-top {
      description
        "Top-level grouping for QoS on the egress interface";
      container output {
        description
          "Top-level container for QoS data related to the egress
        interface";
        container config {
          description
            "Configuration data for QoS on the egress interface";
          uses qos-interface-output-config;
        }  // container config

        container state {
          config false;
          description
            "Operational state data for QoS on the egress interface";
          uses qos-interface-output-config;

          uses qos-interface-output-state;
        }  // container state

        uses oc-if:interface-ref;

        uses qos-interface-classifier-top;

        uses qos-interface-queue-top;

        uses qos-interface-scheduler-top;
      }  // container output
    }  // grouping qos-interface-output-top

    grouping qos-interfaces-top {
      description
        "Top-level grouping for interfaces referenced in the QoS
      model";
      container interfaces {
        description
          "Enclosing container for the list of interface references";
        list interface {
          key "interface-id";
          description
            "List of interfaces referenced by QoS entities.";
          leaf interface-id {
            type leafref {
              path "../config/interface-id";
            }
            description
              "Reference to the interface-id list key";
          }

          container config {
            description
              "Configuration data ";
            uses qos-interfaces-config;
          }  // container config

          container state {
            config false;
            description
              "Operational state data ";
            uses qos-interfaces-config;

            uses qos-interfaces-state;
          }  // container state

          uses oc-if:interface-ref;

          uses qos-interface-input-top;

          uses qos-interface-output-top;
        }  // list interface
      }  // container interfaces
    }  // grouping qos-interfaces-top
  }  // submodule openconfig-qos-interfaces