summaryrefslogtreecommitdiff
path: root/python/vyos/configdict.py
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2019-09-21 09:53:35 +0200
committerGitHub <noreply@github.com>2019-09-21 09:53:35 +0200
commitf6838cb7a625dfb78af50357492a3569eba1e235 (patch)
tree3af230de22ec72e4db0e68fe8c5be0583ef2cb10 /python/vyos/configdict.py
parentdb43a81c06d1fc8c06c4e5bae753a8854bf00d2c (diff)
parentb27482c0201a433762168abe2d369ea43a599f1c (diff)
downloadvyos-1x-f6838cb7a625dfb78af50357492a3569eba1e235.tar.gz
vyos-1x-f6838cb7a625dfb78af50357492a3569eba1e235.zip
Merge pull request #134 from c-po/t1637-ethernet
T1637 - Rewrite ethernet interface in new style XML syntax
Diffstat (limited to 'python/vyos/configdict.py')
-rw-r--r--python/vyos/configdict.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/python/vyos/configdict.py b/python/vyos/configdict.py
index 4bc8863bb..1c9cf6897 100644
--- a/python/vyos/configdict.py
+++ b/python/vyos/configdict.py
@@ -116,6 +116,10 @@ def vlan_to_dict(conf):
'dhcpv6_temporary': False,
'disable': False,
'disable_link_detect': 1,
+ 'egress_qos': '',
+ 'egress_qos_changed': False,
+ 'ingress_qos': '',
+ 'ingress_qos_changed': False,
'mac': '',
'mtu': 1500
}
@@ -153,7 +157,7 @@ def vlan_to_dict(conf):
if conf.exists('disable-link-detect'):
vlan['disable_link_detect'] = 2
- # disable bond interface
+ # disable VLAN interface
if conf.exists('disable'):
vlan['disable'] = True
@@ -165,6 +169,22 @@ def vlan_to_dict(conf):
if conf.exists('mtu'):
vlan['mtu'] = int(conf.return_value('mtu'))
+ # VLAN egress QoS
+ if conf.exists('egress-qos'):
+ vlan['egress_qos'] = conf.return_value('egress-qos')
+
+ # egress changes QoS require VLAN interface recreation
+ if vlan['egress_qos'] != conf.return_effective_value('egress-qos'):
+ vlan['egress_qos_changed'] = True
+
+ # VLAN ingress QoS
+ if conf.exists('ingress-qos'):
+ vlan['ingress_qos'] = conf.return_value('ingress-qos')
+
+ # ingress changes QoS require VLAN interface recreation
+ if vlan['ingress_qos'] != conf.return_effective_value('ingress-qos'):
+ vlan['ingress_qos_changed'] = True
+
# ethertype is mandatory on vif-s nodes and only exists here!
# check if this is a vif-s node at all:
if conf.get_level().split()[-2] == 'vif-s':