summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2010-02-17 12:26:24 -0800
committerStig Thormodsrud <stig@vyatta.com>2010-02-17 12:26:24 -0800
commit69d1ba455f65ef0f111650cbcb2611f8792ed5d6 (patch)
treee6a74733f63d83a9136f5e8bd2dcf27068d3657c
parent2705ffbb4fd2a7ca796fa403b38ced66f9b942c5 (diff)
downloadvyatta-cfg-quagga-69d1ba455f65ef0f111650cbcb2611f8792ed5d6.tar.gz
vyatta-cfg-quagga-69d1ba455f65ef0f111650cbcb2611f8792ed5d6.zip
Fix 5347: committing unsuppress-map for bgp ipv6 neigbor failed
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def19
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def13
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/access-list/node.def4
-rw-r--r--templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/prefix-list/node.def4
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def45
5 files changed, 74 insertions, 11 deletions
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def
index ff20b450..f7a19aa4 100644
--- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def
+++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/access-list/node.def
@@ -1,15 +1,26 @@
type: u32
help: Set an IP access-list to match
-comp_help: \1 <1-99>\tIP standard access list number
- <100-199>\tIP extended access list number
- <1300-1999>\tIP standard access list number (expanded range)
- <2000-2699>\tIP extended access list number (expanded range)
+
+comp_help: possible completions:
+ <1-99> IP standard access list number
+ <100-199> IP extended access list number
+ <1300-1999> IP standard access list number (expanded range)
+ <2000-2699> IP extended access list number (expanded range)
+
+allowed: local -a params
+ params=( /opt/vyatta/config/active/policy/access-list/* )
+ echo -n ${params[@]##*/}
+
commit:expression: $VAR(../prefix-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip address access-list: you may only specify a prefix-list or access-list"
+
commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip address access-list: access-list $VAR(@) does not exist"
+
commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action"
+
update: vyatta-vtysh -c "configure terminal" \
-c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \
-c "match ip address $VAR(@) "
+
delete: vyatta-vtysh -c "configure terminal" \
-c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \
-c "no match ip address $VAR(@) "
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def
index 32566560..f305a8dd 100644
--- a/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def
+++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ip/address/prefix-list/node.def
@@ -1,12 +1,23 @@
type: txt
help: Set an IP prefix-list to match
-comp_help: \1 <txt>\t\tprefix-list name
+
+comp_help: possible completions:
+ <txt> prefix-list name
+
+allowed: local -a params
+ params=( /opt/vyatta/config/active/policy/prefix-list/* )
+ echo -n ${params[@]##*/}
+
commit:expression: $VAR(../access-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip address prefix-list: you may only specify a prefix-list or access-list"
+
commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip address prefix-list: prefix-list $VAR(@) does not exist"
+
commit:expression: $VAR(../../../../action/) != ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@): you must specify an action"
+
update: vyatta-vtysh -c "configure terminal" \
-c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \
-c "match ip address prefix-list $VAR(@)"
+
delete: vyatta-vtysh -c "configure terminal" \
-c "route-map $VAR(../../../../../@) $VAR(../../../../action/@) $VAR(../../../../@)" \
-c "no match ip address prefix-list $VAR(@)"
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/access-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/access-list/node.def
index 2f7526a0..a9208398 100644
--- a/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/access-list/node.def
+++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/access-list/node.def
@@ -1,6 +1,10 @@
type: txt
help: Set an IPv6 access-list6 to match
+allowed: local -a params
+ params=( /opt/vyatta/config/active/policy/access-list6/* )
+ echo -n ${params[@]##*/}
+
commit:expression: $VAR(../prefix-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ip address access-list: you may only specify a prefix-list or access-list"
commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list6 $VAR(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ipv6 address access-list: access-list6 $VAR(@) does not exist"
diff --git a/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/prefix-list/node.def b/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/prefix-list/node.def
index 5b544c6f..ac05daa3 100644
--- a/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/prefix-list/node.def
+++ b/templates/policy/route-map/node.tag/rule/node.tag/match/ipv6/address/prefix-list/node.def
@@ -1,6 +1,10 @@
type: txt
help: Set an IPv6 prefix-list to match
+allowed: local -a params
+ params=( /opt/vyatta/config/active/policy/prefix-list6/* )
+ echo -n ${params[@]##*/}
+
commit:expression: $VAR(../access-list/) == ""; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ipv6 address prefix-list: you may only specify a prefix-list or access-list"
commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\" "; "policy route-map $VAR(../../../../../@) rule $VAR(../../../../@) match ipv6 address prefix-list: prefix-list6 $VAR(@) does not exist"
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def
index 1457da75..e3582280 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def
@@ -1,17 +1,50 @@
type: txt
priority: 719
+
help: Set a route-map to selectively unsuppress suppressed routes
-comp_help: \1 <txt>\t\troute-map name
+
+comp_help: possible completions:
+ <txt> route-map name
+
+allowed: local -a params
+ params=( /opt/vyatta/config/active/policy/route-map/* )
+ echo -n ${params[@]##*/}
+
commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)"
+
commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set unsuppress-map for a neighbor in a peer-group"
+
commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../@) neighbor $VAR(../@): route-map $VAR(@) doesn't exist"
+
update: if [ -n "$VAR(../remote-as/@)" ]; then
peer="remote-as $VAR(../remote-as/@)";
else
peer="peer-group $VAR(../peer-group/@)";
fi;
- vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \
- -c "neighbor $VAR(../@) $peer" \
- -c "neighbor $VAR(../@) unsuppress-map $VAR(@)"
-delete: vyatta-vtysh --noerror -c "configure terminal" -c "router bgp $VAR(../../@)" \
- -c "no neighbor $VAR(../@) unsuppress-map $VAR(@)"
+ if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); then
+ vyatta-vtysh -c "configure terminal" \
+ -c "router bgp $VAR(../../@)" \
+ -c "address-family ipv6" \
+ -c "neighbor $VAR(../@) $peer" \
+ -c "address-family ipv6" \
+ -c "neighbor $VAR(../@) unsuppress-map $VAR(@)"
+ else
+ vyatta-vtysh -c "configure terminal" \
+ -c "router bgp $VAR(../../@)" \
+ -c "neighbor $VAR(../@) $peer" \
+ -c "neighbor $VAR(../@) unsuppress-map $VAR(@)"
+ fi;
+
+delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@); then
+ vyatta-vtysh --noerror \
+ -c "configure terminal" \
+ -c "address-family ipv6" \
+ -c "router bgp $VAR(../../@)" \
+ -c "address-family ipv6" \
+ -c "no neighbor $VAR(../@) unsuppress-map $VAR(@)"
+ else
+ vyatta-vtysh --noerror \
+ -c "configure terminal" \
+ -c "router bgp $VAR(../../@)" \
+ -c "no neighbor $VAR(../@) unsuppress-map $VAR(@)"
+ fi;