diff options
author | kouak <kouak@kouak.org> | 2015-02-23 01:04:46 +0100 |
---|---|---|
committer | kouak <kouak@kouak.org> | 2015-02-23 18:25:26 +0100 |
commit | 6257dfa1464d460de74e258b6290d4890a885218 (patch) | |
tree | cc19bf1ab160ea835059d451a1c962b9fee11745 | |
parent | 4c2cafe4f33e9e7099339806651e2a9f7696a7a5 (diff) | |
download | vyatta-cfg-system-6257dfa1464d460de74e258b6290d4890a885218.tar.gz vyatta-cfg-system-6257dfa1464d460de74e258b6290d4890a885218.zip |
Add ingress-qos-mapping/egress-qos-mapping to VLAN configuration (#385)
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" |