summaryrefslogtreecommitdiff
path: root/templates/protocols/bgp
diff options
context:
space:
mode:
authorBob Gilligan <gilligan@vyatta.com>2010-05-05 17:52:11 -0700
committerBob Gilligan <gilligan@vyatta.com>2010-05-05 17:52:11 -0700
commitff86f6558462efe53904c89d60eea4300b4d17ee (patch)
treedcfc20f58191d5700a550aca1149a7b072b34ba2 /templates/protocols/bgp
parentac02abf8e2a169b596f4406f21ee87653d2e27f9 (diff)
downloadvyatta-cfg-quagga-ff86f6558462efe53904c89d60eea4300b4d17ee.tar.gz
vyatta-cfg-quagga-ff86f6558462efe53904c89d60eea4300b4d17ee.zip
Bugfix 5584: Fix completion and checking for prefix-list parameters
This fixes the parameter validation of prefix-list parameters under "neighbor ADDR prefix-list" and under "neighbor ADDR address-family ipv6-unicast prefix-list". The former are validated against parameters configured under "policy prefix-list", while the latter are validated against parameters configured under "policy prefix-list6".
Diffstat (limited to 'templates/protocols/bgp')
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def13
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def15
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.def1
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/export/node.def11
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/import/node.def9
5 files changed, 35 insertions, 14 deletions
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def
index 905910f6..c98c20e9 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def
@@ -1,12 +1,17 @@
type: txt
+
help: Set a prefix-list to filter outgoing route updates to this neighbor
+
allowed: local -a params
- params=( /opt/vyatta/config/active/policy/prefix-list/*
- /opt/vyatta/config/active/policy/prefix-list6/*)
+ params=( /opt/vyatta/config/active/policy/prefix-list6/*)
echo -n ${params[@]##*/}
+
comp_help: possible completions:
<txt> prefix-list name
+
commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)"
-commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \
-"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) prefix-list import: prefix-list $VAR(@) doesn't exist"
+
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\" "; \
+"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) address-family ipv6-unicast prefix-list export: prefix-list $VAR(@) doesn't exist"
+
commit:expression: $VAR(../../distribute-list/export/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) prefix-list export: you can't set both a prefix-list and a distribute list"
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def
index ddb5f5d4..9ed5c7d9 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def
@@ -1,13 +1,18 @@
type: txt
+
help: Set a prefix-list to filter incoming route updates from this neighbor
+
allowed: local -a params
- params=( /opt/vyatta/config/active/policy/prefix-list/*
- /opt/vyatta/config/active/policy/prefix-list6/*)
+ params=( /opt/vyatta/config/active/policy/prefix-list6/* )
echo -n ${params[@]##*/}
+
comp_help: possible completions:
<txt> prefix-list name
+
commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)"
-commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \
-"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) prefix-list import: prefix-list $VAR(@) doesn't exist"
-commit:expression: $VAR(../../distribute-list/import/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) prefix-list import: you can't set both a prefix-list and a distribute list"
+
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\" "; \
+"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) address-family ipv6-unicast prefix-list import: prefix-list $VAR(@) doesn't exist"
+
+commit:expression: $VAR(../../distribute-list/import/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) address-family ipv6-unicast prefix-list import: you can't set both a prefix-list and a distribute list"
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.def
new file mode 100644
index 00000000..ed278b7f
--- /dev/null
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/node.def
@@ -0,0 +1 @@
+help: Set parameters relating to IPv4 or IPv6 routes
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/export/node.def
index c0844ab6..23fea874 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/export/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/export/node.def
@@ -1,12 +1,17 @@
type: txt
+
help: Set a prefix-list to filter outgoing route updates to this neighbor
+
allowed: local -a params
- params=( /opt/vyatta/config/active/policy/prefix-list/*
- /opt/vyatta/config/active/policy/prefix-list6/*)
+ params=( /opt/vyatta/config/active/policy/prefix-list/* )
echo -n ${params[@]##*/}
+
comp_help: possible completions:
<txt> prefix-list name
+
commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)"
+
commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \
-"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list import: prefix-list $VAR(@) doesn't exist"
+"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list export: prefix-list $VAR(@) doesn't exist"
+
commit:expression: $VAR(../../distribute-list/export/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list export: you can't set both a prefix-list and a distribute list"
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/import/node.def
index d4a1560e..46aea90e 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/import/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/import/node.def
@@ -1,13 +1,18 @@
type: txt
+
help: Set a prefix-list to filter incoming route updates from this neighbor
+
allowed: local -a params
- params=( /opt/vyatta/config/active/policy/prefix-list/*
- /opt/vyatta/config/active/policy/prefix-list6/*)
+ params=( /opt/vyatta/config/active/policy/prefix-list/* )
echo -n ${params[@]##*/}
+
comp_help: possible completions:
<txt> prefix-list name
+
commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)"
+
commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \
"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list import: prefix-list $VAR(@) doesn't exist"
+
commit:expression: $VAR(../../distribute-list/import/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list import: you can't set both a prefix-list and a distribute list"