diff options
author | Daniil Baturin <daniil@baturin.org> | 2015-02-23 23:08:53 +0500 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2015-02-23 23:08:53 +0500 |
commit | ca069d41f32a7825682c3fd56f164e0a3ad64f43 (patch) | |
tree | cc19bf1ab160ea835059d451a1c962b9fee11745 | |
parent | 4c2cafe4f33e9e7099339806651e2a9f7696a7a5 (diff) | |
parent | 6257dfa1464d460de74e258b6290d4890a885218 (diff) | |
download | vyatta-cfg-system-ca069d41f32a7825682c3fd56f164e0a3ad64f43.tar.gz vyatta-cfg-system-ca069d41f32a7825682c3fd56f164e0a3ad64f43.zip |
Merge pull request #42 from kouak/staged-to-vyos
Bug #385: import egress/ingress VLAN QoS CLI from EdgeOS.
3 files changed, 25 insertions, 1 deletions
diff --git a/templates/interfaces/ethernet/node.tag/vif/node.def b/templates/interfaces/ethernet/node.tag/vif/node.def index ab6da98e..a1bd652b 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.def @@ -5,7 +5,13 @@ help: Virtual Local Area Network (VLAN) ID syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 4094; "VLAN ID must be between 0 and 4094" val_help: u32:0-4094; VLAN ID -create: if ! ip link add link $VAR(../@) name "$VAR(../@).$VAR(@)" type vlan id $VAR(@) +create: if [ -n "$VAR(./egress-qos)" ]; then + opt-e=" egress-qos-map $VAR(./egress-qos/@) " + fi + if [ -n "$VAR(./ingress-qos)" ]; then + opt-in=" ingress-qos-map $VAR(./ingress-qos/@) " + fi + if ! ip link add link $VAR(../@) name "$VAR(../@).$VAR(@)" type vlan id $VAR(@) $opt-e $opt-in then echo "Error creating VLAN device $VAR(../@).$VAR(@)" exit 1 fi diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/egress-qos/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/egress-qos/node.def new file mode 100644 index 00000000..ea0b5c2a --- /dev/null +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/egress-qos/node.def @@ -0,0 +1,9 @@ +help: VLAN egress QoS +type: txt + +syntax:expression: pattern $VAR(@) "[:0-7 ]+$"; "QoS mapping should be in the format of \"0:7 2:3\" with numbers 0-9" + +create:expression: "true" +update:expression: "false" ; \ + "egress-qos can only be set at vlan creation for $VAR(../@)" +comp_help: Format for qos mapping "0:1 1:6 7:6" diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/ingress-qos/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/ingress-qos/node.def new file mode 100644 index 00000000..3f5d39fc --- /dev/null +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/ingress-qos/node.def @@ -0,0 +1,9 @@ +help: VLAN ingress QoS +type: txt + +syntax:expression: pattern $VAR(@) "[:0-7 ]+$"; "QoS mapping should be in the format of \"0:7 2:3\" with numbers 0-9" + +create:expression: "true" +update:expression: "false" ; \ + "ingress-qos can only be set at vlan creation for $VAR(../@)" +comp_help: Format for qos mapping "0:1 1:6 7:6" |