diff options
Diffstat (limited to 'src/plugins/yang/openconfig/openconfig-qos-interfaces.yang')
-rw-r--r-- | src/plugins/yang/openconfig/openconfig-qos-interfaces.yang | 660 |
1 files changed, 660 insertions, 0 deletions
diff --git a/src/plugins/yang/openconfig/openconfig-qos-interfaces.yang b/src/plugins/yang/openconfig/openconfig-qos-interfaces.yang new file mode 100644 index 0000000..ae356a9 --- /dev/null +++ b/src/plugins/yang/openconfig/openconfig-qos-interfaces.yang @@ -0,0 +1,660 @@ +submodule openconfig-qos-interfaces { + + belongs-to openconfig-qos { + prefix "oc-qos"; + } + + // import openconfig-qos-elements { 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; + + // meta + 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."; + + oc-ext:openconfig-version "0.2.0"; + + 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"; + } + + grouping qos-interface-classifier-match-config { + description + "Configuration data for match terms in the classifier + associated with an interface"; + + leaf id { + type leafref { + // Current location: + // /qos/interfaces/interface/input/classifers/classifier/ + // terms/term/config/id + path "../../../../../../../../../classifiers/" + + "classifier[name=current()/../../../../config/name]/" + + "terms/term/config/id"; + + } + description + "Reference to match terms in the classifier"; + } + } + + 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-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 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; + } + } + } + } + + 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 state { + config false; + description + "Operational state parameters for the list of classifiers."; + uses qos-interface-classifers-config; + } + + uses qos-interface-classifier-match-top; + } + } + } + + grouping qos-interface-classifers-config { + description + "Configuration parameters for the list of classifiers"; + + leaf name { + type leafref { + // current loc: /qos/interfaces/interface/input/classifiers/ + // classifier/config/name + 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 { + description + "Classifier matches IPv4 packets."; + value 4; + } + enum IPV6 { + description + "Classifier matches IPv6 packets."; + value 6; + } + enum MPLS { + description + "Classifier matches MPLS packets."; + } + } + description + "Type of packets matched by the classifier."; + } + } + + grouping qos-interface-queue-config { + description + "Configuration data for the queue associated with the + interface"; + + leaf name { + // TODO(robjs): Previously we proposed that the queue name here is + // only a queue that has been configured. However, in some cases we + // may want to have queues that have not been configured exist. + //type leafref { + // path "../../../../../../queues/queue/config/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-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-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 state { + config false; + description + "Operational state data for the queue associated with the + interface"; + + uses qos-interface-queue-config; + uses qos-interface-queue-state; + } + } + } + } + + 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 state { + config false; + description + "Operational state parameters relating to the interface + for which the VOQs are instantiated."; + uses qos-voqs-config; + } + + uses qos-interface-queue-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-interface-scheduler-policy-config { + description + "Configuration data for schedulers associated with + the interface"; + + leaf name { + type leafref { + // current loc: + // /qos/interfaces/interface/input/schedulers/scheduler/config/name + path "../../../../../../scheduler-policies/scheduler-policy/" + + "config/name"; + } + description + "The scheduler policy to be applied to traffic on this interface."; + } + } + + grouping qos-interface-scheduler-state { + description + "Operational state data for a scheduler within + a scheduler group applied to an interface."; + + leaf sequence { + type leafref { + // current loc: /qos/interfaces/interface/input/scheduler-policy/ + // schedulers/scheduler/state/sequence + 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-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-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 state { + config false; + description + "Operational state parameters relating to a scheduler policy + on an interface."; + uses qos-interface-scheduler-policy-config; + } + + 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; + } + } + } + } + } + + 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-state { + description + "Operational state data for interfaces referenced in the QoS + model"; + + // definitions per-interface counters for QoS + } + + grouping qos-interface-input-config { + description + "Configuration data for QoS on ingress interface"; + } + + grouping qos-interface-input-state { + description + "Operational state data for QoS on ingress interface"; + } + + 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 state { + config false; + description + "Operational state data for QoS on ingress interface"; + + uses qos-interface-input-config; + uses qos-interface-input-state; + } + + uses qos-interface-classifier-top; + uses qos-interface-queue-top; + uses qos-interface-scheduler-top; + uses qos-interface-voqs-top; + } + } + + grouping qos-interface-output-config { + description + "Configuration data for QoS on the egress interface"; + } + + grouping qos-interface-output-state { + description + "Operational state data for QoS on the egress interface"; + } + + 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 state { + config false; + description + "Operational state data for QoS on the egress interface"; + + uses qos-interface-output-config; + uses qos-interface-output-state; + } + + uses oc-if:interface-ref; + uses qos-interface-classifier-top; + uses qos-interface-queue-top; + uses qos-interface-scheduler-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 state { + config false; + description + "Operational state data "; + + uses qos-interfaces-config; + uses qos-interfaces-state; + } + + uses oc-if:interface-ref; + uses qos-interface-input-top; + uses qos-interface-output-top; + + } + } + } + +} |