summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorerik <stipmonster@gmail.com>2020-07-05 16:09:54 +0200
committerChristian Poessinger <christian@poessinger.com>2020-07-07 18:09:41 +0200
commit10970b948889c278c0d2ec8721d2fc6f7886e8e6 (patch)
tree97f443788e53f6cdf44fb1c4702973d501f9f35d /templates
parentfb2a6370d82ccd68626f83b75defb2a844301d8a (diff)
downloadvyatta-cfg-quagga-10970b948889c278c0d2ec8721d2fc6f7886e8e6.tar.gz
vyatta-cfg-quagga-10970b948889c278c0d2ec8721d2fc6f7886e8e6.zip
frr: T2686: fixed large-community-list configuration generation
Co-authored-by: Erik Kooistra <me@erikkooistra.nl> (cherry picked from commit 65f89e8637b81e9f40c9ab0543df6c6aad39ce3e)
Diffstat (limited to 'templates')
-rw-r--r--templates/policy/large-community-list/node.def2
-rw-r--r--templates/policy/large-community-list/node.tag/rule/node.def16
-rw-r--r--templates/policy/large-community-list/node.tag/rule/node.tag/regex/node.def2
3 files changed, 5 insertions, 15 deletions
diff --git a/templates/policy/large-community-list/node.def b/templates/policy/large-community-list/node.def
index 61687d47..51b68ef1 100644
--- a/templates/policy/large-community-list/node.def
+++ b/templates/policy/large-community-list/node.def
@@ -2,3 +2,5 @@ tag:
priority: 470
type: txt
help: Border Gateway Protocol (BGP) large-community-list filter
+
+end: /opt/vyatta/sbin/vyatta-policy.pl --update-large-community-list $VAR(@) \ No newline at end of file
diff --git a/templates/policy/large-community-list/node.tag/rule/node.def b/templates/policy/large-community-list/node.tag/rule/node.def
index 6cb593b7..738dfb39 100644
--- a/templates/policy/large-community-list/node.tag/rule/node.def
+++ b/templates/policy/large-community-list/node.tag/rule/node.def
@@ -3,18 +3,4 @@ type: u32
help: create a rule for this BGP large-community list
val_help: u32:1-65535; large-community-list rule number
-syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "rule number must be between 1 and 65535"
-
-commit:expression: $VAR(./regex/) != ""; "You must specify a regex"
-commit:expression: $VAR(./action/) != ""; "You must specify an action"
-
-end:
- # If the rule exists in the running config
- if cli-shell-api existsActive policy large-community-list $VAR(../@) rule $VAR(@); then
- orig_action=$(cli-shell-api returnActiveValue policy large-community-list $VAR(../@) rule $VAR(@) action)
- orig_regex=$(cli-shell-api returnActiveValue policy large-community-list $VAR(../@) rule $VAR(@) regex)
- vtysh -c "configure terminal" -c "no bgp large-community-list expanded $VAR(../@) $orig_action $VAR(@) regex $orig_regex"
- fi
- if [[ ${COMMIT_ACTION} != 'DELETE' ]]; then
- vtysh -c "configure terminal" -c "bgp large-community-list expanded $VAR(../@) $VAR(./action/@) $VAR(@) regex $VAR(./regex/@)"
- fi
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "rule number must be between 1 and 65535" \ No newline at end of file
diff --git a/templates/policy/large-community-list/node.tag/rule/node.tag/regex/node.def b/templates/policy/large-community-list/node.tag/rule/node.tag/regex/node.def
index 2a820bc6..37272454 100644
--- a/templates/policy/large-community-list/node.tag/rule/node.tag/regex/node.def
+++ b/templates/policy/large-community-list/node.tag/rule/node.tag/regex/node.def
@@ -1,3 +1,5 @@
type: txt
help: Regular expression to match against a community list
val_help: Community list regular expression
+
+commit:expression: $VAR(../action/@) != ""; "You must specify an action" \ No newline at end of file