diff options
Diffstat (limited to 'templates/policy')
3 files changed, 4 insertions, 20 deletions
diff --git a/templates/policy/community-list/node.def b/templates/policy/community-list/node.def index 5d4dc0bb..af96bbe0 100644 --- a/templates/policy/community-list/node.def +++ b/templates/policy/community-list/node.def @@ -1,14 +1,6 @@ tag: priority: 470 -type: u32 +type: txt help: Border Gateway Protocol (BGP) community-list filter -syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 500; " -community-list must be - <1-99>\tBGP community list (standard) - <100-500>\tBGP community list (expanded) " - -val_help: u32:1-99; BGP community list (standard) -val_help: u32:100-500; BGP community list (expanded) - end: /opt/vyatta/sbin/vyatta-policy.pl --update-community-list $VAR(@) diff --git a/templates/policy/community-list/node.tag/rule/node.tag/regex/node.def b/templates/policy/community-list/node.tag/rule/node.tag/regex/node.def index 8d903b33..48943dcd 100644 --- a/templates/policy/community-list/node.tag/rule/node.tag/regex/node.def +++ b/templates/policy/community-list/node.tag/rule/node.tag/regex/node.def @@ -1,13 +1,5 @@ type: txt help: Regular expression to match against a community list -val_help: Community list regular expression - -syntax:expression: exec " \ -if [ $VAR(../../@) -ge 1 ] && [ $VAR(../../@) -le 99 ]; then \ - if [ -n \"`echo $VAR(@) | sed 's/[0-9]*:[0-9]*//g' | sed -e 's/internet//g' -e 's/local-AS//g' -e 's/no-advertise//g' -e 's/no-export//g'`\" ]; then \ - echo regex $VAR(@) is invalid for a standard community list; \ - exit 1 ; \ - fi ; \ -fi ; " +val_help: Community list regular expression or one of: internet, local-AS, no-advertise, no-export commit:expression: $VAR(../action/@) != ""; "You must specify an action" 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 cdea7e30..6cb593b7 100644 --- a/templates/policy/large-community-list/node.tag/rule/node.def +++ b/templates/policy/large-community-list/node.tag/rule/node.def @@ -13,8 +13,8 @@ end: 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 ip large-community-list expanded $VAR(../@) $orig_action $VAR(@) regex $orig_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 "ip large-community-list expanded $VAR(../@) $VAR(./action/@) $VAR(@) regex $VAR(./regex/@)" + vtysh -c "configure terminal" -c "bgp large-community-list expanded $VAR(../@) $VAR(./action/@) $VAR(@) regex $VAR(./regex/@)" fi |