Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion mdd/python/translation/openconfig_xe/xe_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from translation.openconfig_xe.xe_routing_policy import xe_routing_policy_program_service
from translation.openconfig_xe.xe_system import xe_system_program_service
from translation.openconfig_xe.xe_stp import xe_stp_program_service

from translation.openconfig_xe.xe_qos import xe_qos_program_service

def check_xe_features(oc_self, nso_props) -> None:
"""
Expand Down Expand Up @@ -39,3 +39,7 @@ def check_xe_features(oc_self, nso_props) -> None:

# OpenConfig System
xe_system_program_service(oc_self, nso_props)

# OpenConfig QoS
if nso_props.service.oc_qos__qos:
xe_qos_program_service(oc_self, nso_props)
280 changes: 280 additions & 0 deletions mdd/python/translation/openconfig_xe/xe_qos.py

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion mdd/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ OC_MODELS = $(filter-out %aaa-tacacs.yang %aaa-radius.yang %grpc.yang, $(wildcar
$(filter-out %if-8021X.yang %if-ethernet-ext.yang %if-ip-ext.yang %if-sdn-ext.yang, $(wildcard yang/openconfig/interfaces/*.yang)) \
$(wildcard yang/openconfig/vlan/*.yang) \
$(wildcard yang/openconfig/stp/*.yang) \
$(wildcard yang/openconfig/multicast/*.yang) \
$(filter-out %openconfig-qos-interfaces.yang %openconfig-qos-elements.yang, $(wildcard yang/openconfig/qos/*.yang)) \
$(wildcard yang/openconfig/multicast/*.yang) \
$(filter-out %system-ext-sub-nat.yang, $(wildcard yang/extensions/*.yang))

# Not used
Expand Down
126 changes: 40 additions & 86 deletions mdd/src/yang/openconfig/qos/openconfig-qos-elements.yang
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ submodule openconfig-qos-elements {

contact
"OpenConfig working group
www.openconfig.net";
netopenconfig@googlegroups.com";

description
"This submodule defines configuration and operational state
Expand All @@ -36,44 +36,7 @@ submodule openconfig-qos-elements {
packets for transmission, including policer and shaper
functions";

oc-ext:openconfig-version "0.8.0";

revision "2023-02-17" {
description
"Add queue identifier.";
reference "0.8.0";
}

revision "2023-02-08" {
description
"Remove incorrect output placement of interface-ref";
reference "0.7.0";
}

revision "2023-01-28" {
description
"Split groupings in interfaces for better leaf reuse.";
reference "0.6.1";
}

revision "2022-09-13" {
description
"Add queue octet drop counter.";
reference "0.6.0";
}

revision "2021-08-28" {
description
"Revision updating memory management profile WRED and RED configuration.";
reference "0.5.0";
}

revision "2021-04-28" {
description
"Revision updating buffer management and queue management
configuration.";
reference "0.3.0";
}
oc-ext:openconfig-version "0.2.3";

revision "2019-11-28" {
description
Expand Down Expand Up @@ -372,33 +335,7 @@ submodule openconfig-qos-elements {
path "../../../../queues/queue/config/name";
}
description
"Output queue for packets in this forwarding group.
This leaf applies to both multicast and unicast
packets. Where a user or system requires separate
queueing for multicast and unicast the unicast-output-queue
and multicast-output-queue leaves should be specified.";
}

leaf unicast-output-queue {
type leafref {
path "../../../../queues/queue/config/name";
}
description
"Output queue for unicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.";
}

leaf multicast-output-queue {
type leafref {
path "../../../../queues/queue/config/name";
}
description
"Output queue for multicast packets within this
forwarding group. Where an operator or system does
not require separate queueing for multicast and
unicast this leaf is not specified.";
"Queue for packets in this forwarding group.";
}
}

Expand Down Expand Up @@ -456,7 +393,7 @@ submodule openconfig-qos-elements {

leaf enable-ecn {
type boolean;
default false;
//default false;
description
"When set to true, the device should mark packets that are
ECN-capable rather than dropping them. The receiver is
Expand Down Expand Up @@ -579,11 +516,13 @@ submodule openconfig-qos-elements {
description
"User-defined name of the queue";
}
leaf queue-id {
type uint8;

leaf queue-type {
type identityref {
base oc-qos-types:QOS_QUEUE_TYPE;
}
description
"An optional identifier which may be required by some hardware to map
the named queue to a hardware queue";
"Sets the type of the queue";
}
}

Expand Down Expand Up @@ -628,6 +567,21 @@ submodule openconfig-qos-elements {
uses qos-queue-config;
uses qos-queue-state;
}

uses qos-queue-red-top {
when "./config/queue-type = 'oc-qos-types:RED'" {
description
"RED configuration is valid when the queue-type
is set accordingly.";
}
}
uses qos-queue-wred-top {
when "./config/queue-type = 'oc-qos-types:WRED'" {
description
"WRED configuration is valid when the queue-type
is set accordingly.";
}
}
}
}
}
Expand Down Expand Up @@ -660,11 +614,6 @@ submodule openconfig-qos-elements {
}

leaf child-scheduler {
when "../output-type = 'SCHEDULER'" {
description
"The child-scheduler leaf is valid only when
the output type of the scheduler is a child scheduler";
}
// TODO: consider whether both child (output) and parent
// (input) references are needed; consider whether child
// reference should separate in-profile and out-of-profile
Expand All @@ -675,23 +624,28 @@ submodule openconfig-qos-elements {
path "../../../../../../../scheduler-policies/scheduler-policy/" +
"config/name";
}
when "../output-type = 'SCHEDULER'" {
description
"The child-scheduler leaf is valid only when
the output type of the scheduler is a child scheduler";
}
description
"When the scheduler output type is a child scheduler,
this leaf provides a reference to the downstream
scheduler.";
}

leaf output-fwd-group {
type leafref {
path "../../../../../../../forwarding-groups/forwarding-group" +
"/config/name";
}
when "../output-type = 'FWD_GROUP'" {
description
"The output-fwd-group leaf is valid only when
the output type of the scheduler is a forwarding group";
}
type leafref {
path "../../../../../../../forwarding-groups/forwarding-group" +
"/config/name";
}
description
description
"When the scheduler output type is a forwarding group,
this leaf provides a reference to the forwarding group.";
}
Expand Down Expand Up @@ -760,16 +714,16 @@ submodule openconfig-qos-elements {
}

leaf queue {
when "../input-type = 'QUEUE'" {
description
"The queue leaf is valid only when
the input type of the scheduler is a queue";
}
type leafref {
// current loc: /qos/scheduler-policies/scheduler-policy/schedulers/
// scheduler/inputs/input/config/queue
path "../../../../../../../../queues/queue/name";
}
when "../input-type = 'QUEUE'" {
description
"The queue leaf is valid only when
the input type of the scheduler is a queue";
}
description
"Reference to a queue that is an input source for the
scheduler";
Expand Down
Loading