diff options
194 files changed, 1629 insertions, 1100 deletions
diff --git a/Makefile.am b/Makefile.am index 836a94ac..df92558e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,8 +3,6 @@ cfgdir = $(datadir)/vyatta-cfg/templates curverdir = $(sysconfdir)/config-migrate/current gentmpdir = generated-templates -bin_SCRIPTS = scripts/vyatta-show-protocols - sbin_SCRIPTS = scripts/bgp/vyatta-bgp.pl sbin_SCRIPTS += scripts/policy/vyatta-policy.pl sbin_SCRIPTS += scripts/vyatta_quagga_utils.pl diff --git a/debian/changelog b/debian/changelog index 78410e1b..b714d39f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,67 @@ +vyatta-cfg-quagga (0.18.81) unstable; urgency=low + + * fix for bug 5713 + + -- Robert Bays <rbays@roatan> Mon, 21 Jun 2010 10:58:55 -0700 + +vyatta-cfg-quagga (0.18.80) unstable; urgency=low + + [ Jon Andersson ] + * Added route-map support in ospfv3-redistribute + + [ Stig Thormodsrud ] + * Fix ospfv3 redistribute command. + + -- Stig Thormodsrud <stig@vyatta.com> Mon, 14 Jun 2010 15:35:36 -0700 + +vyatta-cfg-quagga (0.18.79) unstable; urgency=low + + * fix for bug 874: allow setting administrative distance + + -- Robert Bays <rbays@roatan> Tue, 08 Jun 2010 12:33:11 -0700 + +vyatta-cfg-quagga (0.18.78) unstable; urgency=low + + * fix aggregate-address command + + -- Robert Bays <rbays@roatan> Mon, 07 Jun 2010 15:56:21 -0700 + +vyatta-cfg-quagga (0.18.77) unstable; urgency=low + + * add missing help strings per bug 5642 + * clean up peer-group error and help messages + * optimization: move remote-as and peer-group check into transaction + to save on exec calls + * fix direct active dir access in node.defs + * clean up potential unitialized var reference + * fix stupid var def mistake + + -- Robert Bays <rbays@roatan> Fri, 04 Jun 2010 16:59:51 -0700 + +vyatta-cfg-quagga (0.18.76) unstable; urgency=low + + * fix for bug 5653 + + -- Robert Bays <rbays@roatan> Wed, 02 Jun 2010 17:15:41 -0700 + +vyatta-cfg-quagga (0.18.75) unstable; urgency=low + + * re-add the disable-send-comunity node to peer-groups + + -- Robert Bays <rbays@roatan> Tue, 25 May 2010 16:26:01 -0700 + +vyatta-cfg-quagga (0.18.74) unstable; urgency=low + + * silence the perl critic. + * change qcom struct to hash of hashes to make it easier for the + developer to read + * add functionality to skip nodes while in _setConfigTree + * add differential noerr. now it supports one of set, del, or both. + * change the system call in _sendQuaggaCommand(). with the selective + noerr fixed, + + -- Robert Bays <rbays@roatan> Sun, 23 May 2010 01:00:39 -0700 + vyatta-cfg-quagga (0.18.73) unstable; urgency=low * Add support for TTL security hops diff --git a/lib/Vyatta/Quagga/Config.pm b/lib/Vyatta/Quagga/Config.pm index a1e76f80..4eee2e8f 100644 --- a/lib/Vyatta/Quagga/Config.pm +++ b/lib/Vyatta/Quagga/Config.pm @@ -29,27 +29,23 @@ my $_DEBUG = 0; my %_vtysh; my %_vtyshdel; my $_qcomref = ''; -my $_qcomdelref = ''; my $_vtyshexe = '/usr/bin/vtysh'; ### Public methods - # Create the class. # input: $1 - level of the Vyatta config tree to start at -# $2 - hashref to Quagga add/change command templates -# $3 - hashref to Quagga delete command templates +# $2 - hash of hashes ref to Quagga set/delete command templates sub new { my $that = shift; my $class = ref ($that) || $that; my $self = { _level => shift, _qcref => shift, - _qcdref => shift, }; $_qcomref = $self->{_qcref}; - $_qcomdelref = $self->{_qcdref}; - if (! _qtree($self->{_level}, 'delete')) { return 0; } + if (! _qtree($self->{_level}, 'del')) { return 0; } if (! _qtree($self->{_level}, 'set')) { return 0; } bless $self, $class; @@ -74,24 +70,22 @@ sub _reInitialize { %_vtysh = (); %_vtyshdel = (); - _qtree($self->{_level}, 'delete'); + _qtree($self->{_level}, 'del'); _qtree($self->{_level}, 'set'); } # populate an array reference with Quagga commands sub returnQuaggaCommands { my ($self, $arrayref) = @_; - my $key; - my $string; - foreach $key (sort { $b cmp $a } keys %_vtyshdel) { - foreach $string (@{$_vtyshdel{$key}}) { + foreach my $key (sort { $b cmp $a } keys %_vtyshdel) { + foreach my $string (@{$_vtyshdel{$key}}) { push @{$arrayref}, "$string"; } } - foreach $key (sort keys %_vtysh) { - foreach $string (@{$_vtysh{$key}}) { + foreach my $key (sort keys %_vtysh) { + foreach my $string (@{$_vtysh{$key}}) { push @{$arrayref}, "$string"; } } @@ -101,26 +95,26 @@ sub returnQuaggaCommands { # methods to send the commands to Quagga sub setConfigTree { - my ($self, $level) = @_; - if (_setConfigTree($level, 0, 0)) { return 1; } + my ($self, $level, @skip_list) = @_; + if (_setConfigTree($level, 0, 0, @skip_list)) { return 1; } return 0; } sub setConfigTreeRecursive { - my ($self, $level) = @_; - if (_setConfigTree($level, 0, 1)) { return 1; } + my ($self, $level, @skip_list) = @_; + if (_setConfigTree($level, 0, 1, @skip_list)) { return 1; } return 0; } sub deleteConfigTree { - my ($self, $level) = @_; - if (_setConfigTree($level, 1, 0)) { return 1; } + my ($self, $level, @skip_list) = @_; + if (_setConfigTree($level, 1, 0, @skip_list)) { return 1; } return 0; } sub deleteConfigTreeRecursive { - my ($self, $level) = @_; - if (_setConfigTree($level, 1, 1)) { return 1; } + my ($self, $level, @skip_list) = @_; + if (_setConfigTree($level, 1, 1, @skip_list)) { return 1; } return 0; } @@ -135,9 +129,11 @@ sub deleteConfigTreeRecursive { # input: $1 - level of the tree to start at # $2 - delete bool # $3 - recursive bool +# $4 - arrays of strings to skip # output: none, return failure if needed sub _setConfigTree { - my ($level, $delete, $recurse) = @_; + my ($level, $delete, $recurse, @skip_list) = @_; + my $qcom = $_qcomref; if ((! defined $level) || (! defined $delete) || @@ -154,20 +150,42 @@ sub _setConfigTree { $sortfunc = \&cmpb; } - if ($_DEBUG >= 3) { print "DEBUG: _setConfigTree - enter - level: $level\tdelete: $delete\trecurse: $recurse\n"; } + if ($_DEBUG >= 3) { + print "DEBUG: _setConfigTree - enter - level: $level\tdelete: $delete\trecurse: $recurse\tskip: "; + foreach my $key (@skip_list) { print "$key "; } + print "\n"; + } - my $key; - my @keys; - foreach $key (sort $sortfunc keys %$vtyshref) { + # This loop walks the list of commands and sends to quagga if appropriate + foreach my $key (sort $sortfunc keys %$vtyshref) { if ($_DEBUG >= 3) { print "DEBUG: _setConfigTree - key $key\n"; } + # skip parameters in skip_list + my $found = 0; + if ((scalar @skip_list) > 0) { + foreach my $node (@skip_list) { + if ($key =~ /$node/) { + $found = 1; + if ($_DEBUG >= 3) { print "DEBUG: _setConfigTree - key $node in skip list\n"; } + } + } + } + if ($found) { next; } + + # should we run the vtysh command with noerr? + my $noerr = ''; + if ( (defined $qcom->{$key}->{'noerr'}) && ( + ($qcom->{$key}->{'noerr'} eq "both") || + (($qcom->{$key}->{'noerr'} eq "del") && ($delete)) || + (($qcom->{$key}->{'noerr'} eq "set") && (!$delete)))) { $noerr = 1; } + + # this conditional matches key to level exactly or if recurse, start of key to level if ((($recurse) && ($key =~ /^$level/)) || ((! $recurse) && ($key =~ /^$level$/))) { - my ($index, $cmd); - $index = 0; - foreach $cmd (@{$vtyshref->{$key}}) { + my $index = 0; + foreach my $cmd (@{$vtyshref->{$key}}) { if ($_DEBUG >= 2) { print "DEBUG: _setConfigTree - key: $key \t cmd: $cmd\n"; } - if (! _sendQuaggaCommand("$cmd")) { return 0; } + if (! _sendQuaggaCommand("$cmd", "$noerr")) { return 0; } # remove this command so we don't hit it again in another Recurse call delete ${$vtyshref->{$key}}[$index]; $index++; @@ -184,30 +202,24 @@ sub cmpb { $b cmp $a } # properly format a Quagga command for vtysh and send to Quagga # input: $1 - qVarReplaced Quagga Command string +# $2 - boolean: should we use noerr? # output: none, return failure if needed sub _sendQuaggaCommand { - my ($command) = @_; - my $section; - my $args = "$_vtyshexe --noerr -c 'configure terminal' "; + my ($command, $noerr) = @_; + + my @arg_array = ("$_vtyshexe"); + if ($noerr) { push (@arg_array, '--noerr'); } + if ($_DEBUG >= 2) { push (@arg_array, '-E'); } + push (@arg_array, '-c'); + push (@arg_array, 'configure terminal'); my @commands = split / ; /, $command; - foreach $section (@commands) { - $args .= "-c '$section' "; + foreach my $section (@commands) { + push (@arg_array, '-c'); + push (@arg_array, "$section"); } - if ($_DEBUG >= 2) { print "DEBUG: _sendQuaggaCommand - args prior to system call - $args\n"; } - # TODO: need to fix this system call. split into command and args. - system("$args"); - if ($? != 0) { - # TODO: note that DEBUG will never happen here with --noerr as an argument. - # need to fix --noerr. Also probably need to code a way to conditionally use --noerr. - if ($_DEBUG) { - print "DEBUG: _sendQuaggaCommand - vtysh failure $? - $args\n"; - print "\n"; - } - return 0; - } - + system(@arg_array) == 0 or die "_sendQuaggaCommand: @arg_array failed: $?"; return 1; } @@ -227,10 +239,9 @@ sub _qVarReplace { my @qcommands = split /\s/, $qcommand; my $result = ''; - my $token; # try to replace (#num, ?var) references foreach item in Quagga command template array # with their corresponding value in Vyatta command array at (#num) index - foreach $token (@qcommands) { + foreach my $token (@qcommands) { # is this a #var reference? if so translate and append to result if ($token =~ s/\#(\d+);*/$1/) { $token--; @@ -270,14 +281,15 @@ sub _qVarReplace { } # For given Vyatta config tree string, find a corresponding Quagga command template -# string as defined in correctly referenced %qcom. i.e. add or delete %qcom. +# string as defined in %qcom # input: $1 - Vyatta config tree string -# $2 - Quagga command template hash +# $2 - action (set|del) +# $3 - Quagga command template hash # output: %qcom hash key to corresponding Quagga command template string sub _qCommandFind { my $vyattaconfig = shift; + my $action = shift; my $qcom = shift; - my $token = ''; my $command = ''; my @nodes = split /\s+/, $vyattaconfig; @@ -286,15 +298,15 @@ sub _qCommandFind { # check if there is a corresponding hash in %qcom. if not, # do same check again replacing the end param with var to see # if this is a var replacement - foreach $token (@nodes) { - if (exists $qcom->{$token}) { $command = $token; } - elsif (exists $qcom->{"$command $token"}) { $command = "$command $token"; } - elsif (exists $qcom->{"$command var"}) { $command = "$command var"; } + foreach my $token (@nodes) { + if (exists $qcom->{$token}->{$action}) { $command = $token; } + elsif (exists $qcom->{"$command $token"}->{$action}) { $command = "$command $token"; } + elsif (exists $qcom->{"$command var"}->{$action}) { $command = "$command var"; } else { return undef; } } # return hash key if Quagga command template string is found - if (defined $qcom->{$command}) { return $command; } + if (defined $qcom->{$command}->{$action}) { return $command; } else { return undef; } } @@ -308,6 +320,7 @@ sub _qtree { my @nodes; my ($qcom, $vtysh); + $qcom = $_qcomref; # It's ugly that I have to create a new Vyatta config object every time, # but something gets messed up on the stack if I don't. not sure @@ -317,15 +330,11 @@ sub _qtree { # setup references for set or delete action if ($action eq 'set') { - $qcom = $_qcomref; $vtysh = \%_vtysh; - @nodes = $config->listNodes(); } else { - $qcom = $_qcomdelref; $vtysh = \%_vtyshdel; - @nodes = $config->listDeleted(); } @@ -333,16 +342,15 @@ sub _qtree { # traverse the Vyatta config tree and translate to Quagga commands where apropos if (@nodes > 0) { - my $node; - foreach $node (@nodes) { + foreach my $node (@nodes) { if ($_DEBUG >= 2) { print "DEBUG: _qtree - foreach node loop - node $node\n"; } # for set action, need to check that the node was actually changed. Otherwise # we end up re-writing every node to Quagga every commit, which is bad. Mmm' ok? - if (($action eq 'delete') || ($config->isChanged("$node"))) { + if (($action eq 'del') || ($config->isChanged("$node"))) { # is there a Quagga command template? # TODO: need to add function reference support to qcom hash for complicated nodes - my $qcommand = _qCommandFind("$level $node", $qcom); + my $qcommand = _qCommandFind("$level $node", $action, $qcom); # if I found a Quagga command template, then replace any vars if ($qcommand) { @@ -353,14 +361,14 @@ sub _qtree { # is this a leaf node? if ($val) { - my $var = _qVarReplace("$level $node $val", $qcom->{$qcommand}); + my $var = _qVarReplace("$level $node $val", $qcom->{$qcommand}->{$action}); push @{$vtysh->{"$qcommand"}}, $var; if ($_DEBUG) { print "DEBUG: _qtree leaf node command: set $level $action $node $val \n\t\t\t\t\t$var\n"; } } else { - my $var = _qVarReplace("$level $node", $qcom->{$qcommand}); + my $var = _qVarReplace("$level $node", $qcom->{$qcommand}->{$action}); push @{$vtysh->{"$qcommand"}}, $var; if ($_DEBUG) { print "DEBUG: _qtree node command: set $level $action $node \n\t\t\t\t$var\n"; @@ -369,7 +377,7 @@ sub _qtree { } } # recurse to next level in tree - _qtree("$level $node", 'delete'); + _qtree("$level $node", 'del'); _qtree("$level $node", 'set'); } } diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl index bdb31f56..b2119dbc 100755 --- a/scripts/bgp/vyatta-bgp.pl +++ b/scripts/bgp/vyatta-bgp.pl @@ -38,531 +38,1061 @@ use Vyatta::Config; use Vyatta::Quagga::Config; use Vyatta::Misc; -my %qcom = ( - "protocols" => undef, - "protocols bgp" => undef, - "protocols bgp var" => "router bgp #3", - "protocols bgp var aggregate-address" => undef, - "protocols bgp var aggregate-address var" => "router bgp #3 ; no aggregate-address #5 ; aggregate-address #5 ?as-set ?summary-only", - "protocols bgp var address-family" => undef, - "protocols bgp var address-family ipv6-unicast" => undef, - "protocols bgp var address-family ipv6-unicast aggregate-address" => undef, - "protocols bgp var address-family ipv6-unicast aggregate-address var" => "router bgp #3 ; no ipv6 bgp aggregate-address #7 ; ipv6 bgp aggregate-address #7 ?summary-only", - "protocols bgp var address-family ipv6-unicast network" => "router bgp #3 ; no ipv6 bgp network #7 ; ipv6 bgp network #7", - "protocols bgp var address-family ipv6-unicast redistribute" => undef, - "protocols bgp var address-family ipv6-unicast redistribute connected" => "router bgp #3 ; address-family ipv6 ; redistribute connected", - "protocols bgp var address-family ipv6-unicast redistribute connected metric" => "router bgp #3 ; address-family ipv6 ; redistribute connected metric #9", - "protocols bgp var address-family ipv6-unicast redistribute connected route-map" => "router bgp #3 ; address-family ipv6 ; redistribute connected route-map #9", - "protocols bgp var address-family ipv6-unicast redistribute kernel" => "router bgp #3 ; address-family ipv6 ; redistribute kernel", - "protocols bgp var address-family ipv6-unicast redistribute kernel metric" => "router bgp #3 ; address-family ipv6 ; redistribute kernel metric #9", - "protocols bgp var address-family ipv6-unicast redistribute kernel route-map" => "router bgp #3 ; address-family ipv6 ; redistribute kernel route-map #9", - "protocols bgp var address-family ipv6-unicast redistribute ospfv3" => "router bgp #3 ; address-family ipv6 ; redistribute ospfv3", - "protocols bgp var address-family ipv6-unicast redistribute ospfv3 metric" => "router bgp #3 ; address-family ipv6 ; redistribute ospfv3 metric #9", - "protocols bgp var address-family ipv6-unicast redistribute ospfv3 route-map" => "router bgp #3 ; address-family ipv6 ; redistribute ospfv3 route-map #9", - "protocols bgp var address-family ipv6-unicast redistribute ripng" => "router bgp #3 ; address-family ipv6 ; redistribute ripng", - "protocols bgp var address-family ipv6-unicast redistribute ripng metric" => "router bgp #3 ; address-family ipv6 ; redistribute ripng metric #9", - "protocols bgp var address-family ipv6-unicast redistribute ripng route-map" => "router bgp #3 ; address-family ipv6 ; redistribute ripng route-map #9", - "protocols bgp var address-family ipv6-unicast redistribute static" => "router bgp #3 ; address-family ipv6 ; redistribute static", - "protocols bgp var address-family ipv6-unicast redistribute static metric" => "router bgp #3 ; address-family ipv6 ; redistribute static metric #9", - "protocols bgp var address-family ipv6-unicast redistribute static route-map" => "router bgp #3 ; address-family ipv6 ; redistribute static route-map #9", - "protocols bgp var neighbor" => undef, - "protocols bgp var neighbor var" => "router bgp #3 ; neighbor #5", - "protocols bgp var neighbor var address-family" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast" => "router bgp #3 ; address-family ipv6 ; neighbor #5 activate",, - "protocols bgp var neighbor var address-family ipv6-unicast allowas-in" => "router bgp #3 ; address-family ipv6 ; neighbor #5 allowas-in", - "protocols bgp var neighbor var address-family ipv6-unicast attribute-unchanged" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 attribute-unchanged ; neighbor #5 attribute-unchanged ?as-path ?med ?next-hop", - "protocols bgp var neighbor var address-family ipv6-unicast capability" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast capability dynamic" => "router bgp #3 ; address-family ipv6 ; neighbor #5 capability dynamic", - "protocols bgp var neighbor var address-family ipv6-unicast capability orf" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast capability orf prefix-list" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast capability orf prefix-list receive" => "router bgp #3 ; address-family ipv6 ; neighbor #5 capability orf prefix-list receive", - "protocols bgp var neighbor var address-family ipv6-unicast capability orf prefix-list send" => "router bgp #3 ; address-family ipv6 ; neighbor #5 capability orf prefix-list send", - "protocols bgp var neighbor var address-family ipv6-unicast default-originate" => "router bgp #3 ; address-family ipv6 ; neighbor #5 default-originate", - "protocols bgp var neighbor var address-family ipv6-unicast default-originate route-map" => "router bgp #3 ; address-family ipv6 ; neighbor #5 default-originate route-map #10", - "protocols bgp var neighbor var address-family ipv6-unicast disable-send-community" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast disable-send-community extended" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 send-community extended", - "protocols bgp var neighbor var address-family ipv6-unicast disable-send-community standard" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 send-community standard", - "protocols bgp var neighbor var address-family ipv6-unicast distribute-list" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast distribute-list export" => "router bgp #3 ; address-family ipv6 ; neighbor #5 distribute-list #10 out", - "protocols bgp var neighbor var address-family ipv6-unicast distribute-list import" => "router bgp #3 ; address-family ipv6 ; neighbor #5 distribute-list #10 in", - "protocols bgp var neighbor var address-family ipv6-unicast filter-list" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast filter-list export" => "router bgp #3 ; address-family ipv6 ; neighbor #5 filter-list #10 out", - "protocols bgp var neighbor var address-family ipv6-unicast filter-list import" => "router bgp #3 ; address-family ipv6 ; neighbor #5 filter-list #10 in", - "protocols bgp var neighbor var address-family ipv6-unicast maximum-prefix" => "router bgp #3 ; address-family ipv6 ; neighbor #5 maximum-prefix #9", - "protocols bgp var neighbor var address-family ipv6-unicast nexthop-local" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast nexthop-local" => "router bgp #3 ; address-family ipv6 ; neighbor #5 nexthop-local unchanged", - "protocols bgp var neighbor var address-family ipv6-unicast nexthop-self" => "router bgp #3 ; address-family ipv6 ; neighbor #5 next-hop-self", - "protocols bgp var neighbor var address-family ipv6-unicast prefix-list" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast prefix-list export" => "router bgp #3 ; address-family ipv6 ; neighbor #5 prefix-list #10 out", - "protocols bgp var neighbor var address-family ipv6-unicast prefix-list import" => "router bgp #3 ; address-family ipv6 ; neighbor #5 prefix-list #10 in", - "protocols bgp var neighbor var address-family ipv6-unicast remove-private-as" => "router bgp #3 ; address-family ipv6 ; neighbor #5 remove-private-AS", - "protocols bgp var neighbor var address-family ipv6-unicast route-map" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast route-map export" => "router bgp #3 ; address-family ipv6 ; neighbor #5 route-map #10 out", - "protocols bgp var neighbor var address-family ipv6-unicast route-map import" => "router bgp #3 ; address-family ipv6 ; neighbor #5 route-map #10 in", - "protocols bgp var neighbor var address-family ipv6-unicast route-reflector-client" => "router bgp #3 ; address-family ipv6 ; neighbor #5 route-reflector-client", - "protocols bgp var neighbor var address-family ipv6-unicast route-server-client" => "router bgp #3 ; address-family ipv6 ; neighbor #5 route-server-client", - "protocols bgp var neighbor var address-family ipv6-unicast soft-reconfiguration" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast soft-reconfiguration inbound" => "router bgp #3 ; address-family ipv6 ; neighbor #5 soft-reconfiguration inbound", - "protocols bgp var neighbor var address-family ipv6-unicast unsuppress-map" => "router bgp #3 ; address-family ipv6 ; neighbor #5 unsuppress-map #9", - "protocols bgp var neighbor var advertisement-interval" => "router bgp #3 ; neighbor #5 advertisement-interval #7", - # allowas-in as a standalone means any number of times. append number and you will only accept local-as N number of times in as-path - "protocols bgp var neighbor var allowas-in" => "router bgp #3 ; neighbor #5 allowas-in", - # default is 3, default won't be shown in quagga - "protocols bgp var neighbor var allowas-in number" => "router bgp #3 ; neighbor #5 allowas-in #8", - # it looks like "attribute-unchanged" as a standalone is really "attribute-unchanged as-path med next-hop" - "protocols bgp var neighbor var attribute-unchanged" => "router bgp #3 ; no neighbor #5 attribute-unchanged ; neighbor #5 attribute-unchanged ?as-path ?med ?next-hop", - "protocols bgp var neighbor var capability" => undef, - "protocols bgp var neighbor var capability dynamic" => "router bgp #3 ; neighbor #5 capability dynamic", - "protocols bgp var neighbor var capability orf" => undef, - "protocols bgp var neighbor var capability orf prefix-list" => undef, - # if both send and receive are sent then this gets translated to both in Quagga config. Doesn't mess up the delete though. - "protocols bgp var neighbor var capability orf prefix-list receive" => "router bgp #3 ; neighbor #5 capability orf prefix-list receive", - "protocols bgp var neighbor var capability orf prefix-list send" => "router bgp #3 ; neighbor #5 capability orf prefix-list send", - "protocols bgp var neighbor var default-originate" => "router bgp #3 ; neighbor #5 default-originate", - "protocols bgp var neighbor var default-originate route-map" => "router bgp #3 ; neighbor #5 default-originate route-map #8", - "protocols bgp var neighbor var disable-capability-negotiation" => "router bgp #3 ; neighbor #5 dont-capability-negotiate", - "protocols bgp var neighbor var disable-connected-check" => "router bgp #3 ; neighbor #5 disable-connected-check", - "protocols bgp var neighbor var disable-send-community" => undef, - "protocols bgp var neighbor var disable-send-community extended" => "router bgp #3 ; no neighbor #5 send-community extended", - "protocols bgp var neighbor var disable-send-community standard" => "router bgp #3 ; no neighbor #5 send-community standard", - "protocols bgp var neighbor var distribute-list" => undef, - "protocols bgp var neighbor var distribute-list export" => "router bgp #3 ; neighbor #5 distribute-list #8 out", - "protocols bgp var neighbor var distribute-list import" => "router bgp #3 ; neighbor #5 distribute-list #8 in", - "protocols bgp var neighbor var ebgp-multihop" => "router bgp #3 ; neighbor #5 ebgp-multihop #7", - "protocols bgp var neighbor var ttl-security" => undef, - "protocols bgp var neighbor var ttl-security hops" => "router bgp #3 ; neighbor #5 ttl-security hops #8", - "protocols bgp var neighbor var filter-list" => undef, - "protocols bgp var neighbor var filter-list export" => "router bgp #3 ; neighbor #5 filter-list #8 out", - "protocols bgp var neighbor var filter-list import" => "router bgp #3 ; neighbor #5 filter-list #8 in", - "protocols bgp var neighbor var local-as" => undef, - "protocols bgp var neighbor var local-as var" => "router bgp #3 ; no neighbor #5 local-as #7 ; neighbor #5 local-as #7", - "protocols bgp var neighbor var local-as var no-prepend" => "router bgp #3 ; no neighbor #5 local-as #7 ; neighbor #5 local-as #7 no-prepend", - "protocols bgp var neighbor var maximum-prefix" => "router bgp #3 ; neighbor #5 maximum-prefix #7", - "protocols bgp var neighbor var nexthop-self" => "router bgp #3 ; neighbor #5 next-hop-self", - "protocols bgp var neighbor var override-capability" => "router bgp #3 ; neighbor #5 override-capability", - "protocols bgp var neighbor var passive" => "router bgp #3 ; neighbor #5 passive", - "protocols bgp var neighbor var password" => "router bgp #3 ; neighbor #5 password #7", - "protocols bgp var neighbor var peer-group" => "router bgp #3 ; neighbor #5 peer-group #7", - "protocols bgp var neighbor var port" => "router bgp #3 ; neighbor #5 port #7", - "protocols bgp var neighbor var prefix-list" => undef, - "protocols bgp var neighbor var prefix-list export" => "router bgp #3 ; neighbor #5 prefix-list #8 out", - "protocols bgp var neighbor var prefix-list import" => "router bgp #3 ; neighbor #5 prefix-list #8 in", - "protocols bgp var neighbor var remote-as" => "router bgp #3 ; neighbor #5 remote-as #7", - "protocols bgp var neighbor var remove-private-as" => "router bgp #3 ; neighbor #5 remove-private-AS", - "protocols bgp var neighbor var route-map" => undef, - "protocols bgp var neighbor var route-map export" => "router bgp #3 ; neighbor #5 route-map #8 out", - "protocols bgp var neighbor var route-map import" => "router bgp #3 ; neighbor #5 route-map #8 in", - "protocols bgp var neighbor var route-reflector-client" => "router bgp #3 ; neighbor #5 route-reflector-client", - "protocols bgp var neighbor var route-server-client" => "router bgp #3 ; neighbor #5 route-server-client", - "protocols bgp var neighbor var shutdown" => "router bgp #3 ; neighbor #5 shutdown", - "protocols bgp var neighbor var soft-reconfiguration" => undef, - "protocols bgp var neighbor var soft-reconfiguration inbound" => "router bgp #3 ; neighbor #5 soft-reconfiguration inbound", - "protocols bgp var neighbor var strict-capability-match" => "router bgp #3 ; neighbor #5 strict-capability-match", - "protocols bgp var neighbor var timers" => 'router bgp #3 ; neighbor #5 timers @keepalive @holdtime', - "protocols bgp var neighbor var timers connect" => "router bgp #3 ; neighbor #5 timers connect #8", - "protocols bgp var neighbor var unsuppress-map" => "router bgp #3 ; neighbor #5 unsuppress-map #7", - "protocols bgp var neighbor var update-source" => "router bgp #3 ; neighbor #5 update-source #7", - "protocols bgp var neighbor var weight" => "router bgp #3 ; neighbor #5 weight #7", - "protocols bgp var network" => undef, - "protocols bgp var network var" => "router bgp #3 ; network #5 ?backdoor", - "protocols bgp var network var route-map" => "router bgp #3 ; network #5 route-map #7", - "protocols bgp var parameters" => undef, - "protocols bgp var parameters always-compare-med" => "router bgp #3 ; bgp always-compare-med", - "protocols bgp var parameters bestpath" => undef, - "protocols bgp var parameters bestpath as-path" => undef, - "protocols bgp var parameters bestpath as-path confed" => "router bgp #3 ; bgp bestpath as-path confed", - "protocols bgp var parameters bestpath as-path ignore" => "router bgp #3 ; bgp bestpath as-path ignore", - "protocols bgp var parameters bestpath compare-routerid" => "router bgp #3 ; bgp bestpath compare-routerid", - "protocols bgp var parameters bestpath med" => undef, - "protocols bgp var parameters bestpath med confed" => "router bgp #3 ; bgp bestpath med confed", - "protocols bgp var parameters bestpath med missing-as-worst" => "router bgp #3 ; bgp bestpath med missing-as-worst", - "protocols bgp var parameters cluster-id" => "router bgp #3 ; bgp cluster-id #6", - "protocols bgp var parameters confederation" => undef, - "protocols bgp var parameters confederation identifier" => "router bgp #3 ; bgp confederation identifier #7", - "protocols bgp var parameters confederation peers" => "router bgp #3 ; bgp confederation peers #7", - "protocols bgp var parameters dampening" => 'router bgp #3 ; no bgp dampening ; bgp dampening @half-life @re-use @start-suppress-time @max-suppress-time', - "protocols bgp var parameters default" => undef, - "protocols bgp var parameters default local-pref" => "router bgp #3 ; bgp default local-preference #7", - "protocols bgp var parameters default no-ipv4-unicast" => "router bgp #3 ; no bgp default ipv4-unicast", - "protocols bgp var parameters deterministic-med" => "router bgp #3 ; bgp deterministic-med", - "protocols bgp var parameters disable-network-import-check" => "router bgp #3 ; no bgp network import-check", - "protocols bgp var parameters enforce-first-as" => "router bgp #3 ; bgp enforce-first-as", - "protocols bgp var parameters graceful-restart" => undef, - "protocols bgp var parameters graceful-restart stalepath-time" => "router bgp #3 ; bgp graceful-restart stalepath-time #7", - "protocols bgp var parameters log-neighbor-changes" => "router bgp #3 ; bgp log-neighbor-changes", - "protocols bgp var parameters no-client-to-client-reflection" => "router bgp #3 ; no bgp client-to-client reflection", - "protocols bgp var parameters no-fast-external-failover" => "router bgp #3 ; no bgp fast-external-failover", - "protocols bgp var parameters router-id" => "router bgp #3 ; bgp router-id #6", - "protocols bgp var parameters scan-time" => "router bgp #3 ; bgp scan-time #6", - "protocols bgp var peer-group" => undef, - "protocols bgp var peer-group var" => "router bgp #3 ; neighbor #5 peer-group", - "protocols bgp var peer-group var address-family" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast" => "router bgp #3 ; address-family ipv6 ; neighbor #5 activate", - "protocols bgp var peer-group var address-family ipv6-unicast allowas-in" => "router bgp #3 ; address-family ipv6 ; neighbor #5 allowas-in", - "protocols bgp var peer-group var address-family ipv6-unicast attribute-unchanged" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 attribute-unchanged ; neighbor #5 attribute-unchanged ?as-path ?med ?next-hop", - "protocols bgp var peer-group var address-family ipv6-unicast capability" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast capability dynamic" => "router bgp #3 ; address-family ipv6 ; neighbor #5 capability dynamic", - "protocols bgp var peer-group var address-family ipv6-unicast capability orf" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast capability orf prefix-list" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast capability orf prefix-list receive" => "router bgp #3 ; address-family ipv6 ; neighbor #5 capability orf prefix-list receive", - "protocols bgp var peer-group var address-family ipv6-unicast capability orf prefix-list send" => "router bgp #3 ; address-family ipv6 ; neighbor #5 capability orf prefix-list send", - "protocols bgp var peer-group var address-family ipv6-unicast default-originate" => "router bgp #3 ; address-family ipv6 ; neighbor #5 default-originate", - "protocols bgp var peer-group var address-family ipv6-unicast default-originate route-map" => "router bgp #3 ; address-family ipv6 ; neighbor #5 default-originate route-map #10", - "protocols bgp var peer-group var address-family ipv6-unicast disable-send-community" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast disable-send-community extended" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 send-community extended", - "protocols bgp var peer-group var address-family ipv6-unicast disable-send-community standard" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 send-community standard", - "protocols bgp var peer-group var address-family ipv6-unicast distribute-list" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast distribute-list export" => "router bgp #3 ; address-family ipv6 ; neighbor #5 distribute-list #10 out", - "protocols bgp var peer-group var address-family ipv6-unicast distribute-list import" => "router bgp #3 ; address-family ipv6 ; neighbor #5 distribute-list #10 in", - "protocols bgp var peer-group var address-family ipv6-unicast filter-list" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast filter-list export" => "router bgp #3 ; address-family ipv6 ; neighbor #5 filter-list #10 out", - "protocols bgp var peer-group var address-family ipv6-unicast filter-list import" => "router bgp #3 ; address-family ipv6 ; neighbor #5 filter-list #10 in", - "protocols bgp var peer-group var address-family ipv6-unicast maximum-prefix" => "router bgp #3 ; address-family ipv6 ; neighbor #5 maximum-prefix #9", - "protocols bgp var peer-group var address-family ipv6-unicast nexthop-local" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast nexthop-local" => "router bgp #3 ; address-family ipv6 ; neighbor #5 nexthop-local unchanged", - "protocols bgp var peer-group var address-family ipv6-unicast nexthop-self" => "router bgp #3 ; address-family ipv6 ; neighbor #5 next-hop-self", - "protocols bgp var peer-group var address-family ipv6-unicast prefix-list" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast prefix-list export" => "router bgp #3 ; address-family ipv6 ; neighbor #5 prefix-list #10 out", - "protocols bgp var peer-group var address-family ipv6-unicast prefix-list import" => "router bgp #3 ; address-family ipv6 ; neighbor #5 prefix-list #10 in", - "protocols bgp var peer-group var address-family ipv6-unicast remove-private-as" => "router bgp #3 ; address-family ipv6 ; neighbor #5 remove-private-AS", - "protocols bgp var peer-group var address-family ipv6-unicast route-map" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast route-map export" => "router bgp #3 ; address-family ipv6 ; neighbor #5 route-map #10 out", - "protocols bgp var peer-group var address-family ipv6-unicast route-map import" => "router bgp #3 ; address-family ipv6 ; neighbor #5 route-map #10 in", - "protocols bgp var peer-group var address-family ipv6-unicast route-reflector-client" => "router bgp #3 ; address-family ipv6 ; neighbor #5 route-reflector-client", - "protocols bgp var peer-group var address-family ipv6-unicast route-server-client" => "router bgp #3 ; address-family ipv6 ; neighbor #5 route-server-client", - "protocols bgp var peer-group var address-family ipv6-unicast soft-reconfiguration" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast soft-reconfiguration inbound" => "router bgp #3 ; address-family ipv6 ; neighbor #5 soft-reconfiguration inbound", - "protocols bgp var peer-group var address-family ipv6-unicast unsuppress-map" => "router bgp #3 ; address-family ipv6 ; neighbor #5 unsuppress-map #9", - "protocols bgp var peer-group var allowas-in" => "router bgp #3 ; neighbor #5 allowas-in", - "protocols bgp var peer-group var allowas-in number" => "router bgp #3 ; neighbor #5 allowas-in #8", - "protocols bgp var peer-group var attribute-unchanged" => "router bgp #3 ; no neighbor #5 attribute-unchanged ; neighbor #5 attribute-unchanged ?as-path ?med ?next-hop", - "protocols bgp var peer-group var capability" => undef, - "protocols bgp var peer-group var capability dynamic" => "router bgp #3 ; neighbor #5 capability dynamic", - "protocols bgp var peer-group var capability orf" => undef, - "protocols bgp var peer-group var capability orf prefix-list" => undef, - "protocols bgp var peer-group var capability orf prefix-list receive" => "router bgp #3 ; neighbor #5 capability orf prefix-list receive", - "protocols bgp var peer-group var capability orf prefix-list send" => "router bgp #3 ; neighbor #5 capability orf prefix-list send", - "protocols bgp var peer-group var default-originate" => "router bgp #3 ; neighbor #5 default-originate", - "protocols bgp var peer-group var default-originate route-map" => "router bgp #3 ; neighbor #5 default-originate route-map #8", - "protocols bgp var peer-group var disable-capability-negotiation" => "router bgp #3 ; neighbor #5 dont-capability-negotiate", - "protocols bgp var peer-group var disable-connected-check" => "router bgp #3 ; neighbor #5 disable-connected-check", - "protocols bgp var peer-group var disable-send-community" => undef, - "protocols bgp var peer-group var disable-send-community extended" => "router bgp #3 ; no neighbor #5 send-community extended", - "protocols bgp var peer-group var disable-send-community standard" => "router bgp #3 ; no neighbor #5 send-community standard", - "protocols bgp var peer-group var distribute-list" => undef, - "protocols bgp var peer-group var distribute-list export" => "router bgp #3 ; neighbor #5 distribute-list #8 out", - "protocols bgp var peer-group var distribute-list import" => "router bgp #3 ; neighbor #5 distribute-list #8 in", - "protocols bgp var peer-group var ebgp-multihop" => "router bgp #3 ; neighbor #5 ebgp-multihop #7", - "protocols bgp var peer-group var filter-list" => undef, - "protocols bgp var peer-group var filter-list export" => "router bgp #3 ; neighbor #5 filter-list #8 out", - "protocols bgp var peer-group var filter-list import" => "router bgp #3 ; neighbor #5 filter-list #8 in", - "protocols bgp var peer-group var local-as" => undef, - "protocols bgp var peer-group var local-as var" => "router bgp #3 ; no neighbor #5 local-as #7 ; neighbor #5 local-as #7", - "protocols bgp var peer-group var local-as var no-prepend" => "router bgp #3 ; no neighbor #5 local-as #7 ; neighbor #5 local-as #7 no-prepend", - "protocols bgp var peer-group var maximum-prefix" => "router bgp #3 ; neighbor #5 maximum-prefix #7", - "protocols bgp var peer-group var nexthop-self" => "router bgp #3 ; neighbor #5 next-hop-self", - "protocols bgp var peer-group var override-capability" => "router bgp #3 ; neighbor #5 override-capability", - "protocols bgp var peer-group var passive" => "router bgp #3 ; neighbor #5 passive", - "protocols bgp var peer-group var password" => "router bgp #3 ; neighbor #5 password #7", - "protocols bgp var peer-group var port" => "router bgp #3 ; neighbor #5 port #7", - "protocols bgp var peer-group var prefix-list" => undef, - "protocols bgp var peer-group var prefix-list export" => "router bgp #3 ; neighbor #5 prefix-list #8 out", - "protocols bgp var peer-group var prefix-list import" => "router bgp #3 ; neighbor #5 prefix-list #8 in", - "protocols bgp var peer-group var remote-as" => "router bgp #3 ; neighbor #5 peer-group ; neighbor #5 remote-as #7", - "protocols bgp var peer-group var remove-private-as" => "router bgp #3 ; neighbor #5 remove-private-AS", - "protocols bgp var peer-group var route-map" => undef, - "protocols bgp var peer-group var route-map export" => "router bgp #3 ; neighbor #5 route-map #8 out", - "protocols bgp var peer-group var route-map import" => "router bgp #3 ; neighbor #5 route-map #8 in", - "protocols bgp var peer-group var route-reflector-client" => "router bgp #3 ; neighbor #5 route-reflector-client", - "protocols bgp var peer-group var route-server-client" => "router bgp #3 ; neighbor #5 route-server-client", - "protocols bgp var peer-group var shutdown" => "router bgp #3 ; neighbor #5 shutdown", - "protocols bgp var peer-group var soft-reconfiguration" => undef, - "protocols bgp var peer-group var soft-reconfiguration inbound" => "router bgp #3 ; neighbor #5 soft-reconfiguration inbound", - "protocols bgp var peer-group var timers" => 'router bgp #3 ; neighbor #5 timers @keepalive @holdtime', - "protocols bgp var peer-group var timers connect" => "router bgp #3 ; neighbor #5 timers connect #8", - "protocols bgp var peer-group var unsuppress-map" => "router bgp #3 ; neighbor #5 unsuppress-map #7", - "protocols bgp var peer-group var update-source" => "router bgp #3 ; neighbor #5 update-source #7", - "protocols bgp var peer-group var weight" => "router bgp #3 ; neighbor #5 weight #7", - "protocols bgp var redistribute" => undef, - "protocols bgp var redistribute connected" => "router bgp #3 ; redistribute connected", - "protocols bgp var redistribute connected metric" => "router bgp #3 ; redistribute connected metric #7", - "protocols bgp var redistribute connected route-map" => "router bgp #3 ; redistribute connected route-map #7", - "protocols bgp var redistribute kernel" => "router bgp #3 ; redistribute kernel", - "protocols bgp var redistribute kernel metric" => "router bgp #3 ; redistribute kernel metric #7", - "protocols bgp var redistribute kernel route-map" => "router bgp #3 ; redistribute kernel route-map #7", - "protocols bgp var redistribute ospf" => "router bgp #3 ; redistribute ospf", - "protocols bgp var redistribute ospf metric" => "router bgp #3 ; redistribute ospf metric #7", - "protocols bgp var redistribute ospf route-map" => "router bgp #3 ; redistribute ospf route-map #7", - "protocols bgp var redistribute rip" => "router bgp #3 ; redistribute rip", - "protocols bgp var redistribute rip metric" => "router bgp #3 ; redistribute rip metric #7", - "protocols bgp var redistribute rip route-map" => "router bgp #3 ; redistribute rip route-map #7", - "protocols bgp var redistribute static" => "router bgp #3 ; redistribute static", - "protocols bgp var redistribute static metric" => "router bgp #3 ; redistribute static metric #7", - "protocols bgp var redistribute static route-map" => "router bgp #3 ; redistribute static route-map #7", - "protocols bgp var timers" => 'router bgp #3 ; timers bgp @keepalive @holdtime', -); - -my %qcomdel = ( - "protocols" => undef, - "protocols bgp" => undef, - "protocols bgp var" => "no router bgp #3", - "protocols bgp var aggregate-address" => undef, - "protocols bgp var aggregate-address var" => "router bgp #3 ; no aggregate-address #5 ?as-set ?summary-only", - "protocols bgp var address-family" => undef, - "protocols bgp var address-family ipv6-unicast" => undef, - "protocols bgp var address-family ipv6-unicast aggregate-address" => undef, - "protocols bgp var address-family ipv6-unicast aggregate-address var" => "router bgp #3 ; no ipv6 bgp aggregate-address #7", - "protocols bgp var address-family ipv6-unicast network" => "router bgp #3 ; no ipv6 bgp network #7 ; no ipv6 bgp network #7", - "protocols bgp var address-family ipv6-unicast redistribute" => undef, - "protocols bgp var address-family ipv6-unicast redistribute connected" => "router bgp #3 ; address-family ipv6 ; no redistribute connected", - "protocols bgp var address-family ipv6-unicast redistribute connected metric" => "router bgp #3 ; address-family ipv6 ; no redistribute connected metric #9", - "protocols bgp var address-family ipv6-unicast redistribute connected route-map" => "router bgp #3 ; address-family ipv6 ; no redistribute connected route-map #9", - "protocols bgp var address-family ipv6-unicast redistribute kernel" => "router bgp #3 ; address-family ipv6 ; no redistribute kernel", - "protocols bgp var address-family ipv6-unicast redistribute kernel metric" => "router bgp #3 ; address-family ipv6 ; no redistribute kernel metric #9", - "protocols bgp var address-family ipv6-unicast redistribute kernel route-map" => "router bgp #3 ; address-family ipv6 ; no redistribute kernel route-map #9", - "protocols bgp var address-family ipv6-unicast redistribute ospfv3" => "router bgp #3 ; address-family ipv6 ; no redistribute ospfv3", - "protocols bgp var address-family ipv6-unicast redistribute ospfv3 metric" => "router bgp #3 ; address-family ipv6 ; no redistribute ospfv3 metric #9", - "protocols bgp var address-family ipv6-unicast redistribute ospfv3 route-map" => "router bgp #3 ; address-family ipv6 ; no redistribute ospfv3 route-map #9", - "protocols bgp var address-family ipv6-unicast redistribute ripng" => "router bgp #3 ; address-family ipv6 ; no redistribute ripng", - "protocols bgp var address-family ipv6-unicast redistribute ripng metric" => "router bgp #3 ; address-family ipv6 ; no redistribute ripng metric #9", - "protocols bgp var address-family ipv6-unicast redistribute ripng route-map" => "router bgp #3 ; address-family ipv6 ; no redistribute ripng route-map #9", - "protocols bgp var address-family ipv6-unicast redistribute static" => "router bgp #3 ; address-family ipv6 ; no redistribute static", - "protocols bgp var address-family ipv6-unicast redistribute static metric" => "router bgp #3 ; address-family ipv6 ; no redistribute static metric #9", - "protocols bgp var address-family ipv6-unicast redistribute static route-map" => "router bgp #3 ; address-family ipv6 ; no redistribute static route-map #9", - "protocols bgp var neighbor" => undef, - "protocols bgp var neighbor var" => "router bgp #3 ; no neighbor #5", - "protocols bgp var neighbor var address-family" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 activate", - "protocols bgp var neighbor var address-family ipv6-unicast allowas-in" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 allowas-in", - "protocols bgp var neighbor var address-family ipv6-unicast attribute-unchanged" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 attribute-unchanged", - "protocols bgp var neighbor var address-family ipv6-unicast capability" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast capability dynamic" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 capability dynamic", - "protocols bgp var neighbor var address-family ipv6-unicast capability orf" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast capability orf prefix-list" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast capability orf prefix-list receive" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 capability orf prefix-list receive", - "protocols bgp var neighbor var address-family ipv6-unicast capability orf prefix-list send" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 capability orf prefix-list send", - "protocols bgp var neighbor var address-family ipv6-unicast default-originate" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 default-originate", - "protocols bgp var neighbor var address-family ipv6-unicast default-originate route-map" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 default-originate route-map #10", - "protocols bgp var neighbor var address-family ipv6-unicast disable-send-community" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast disable-send-community extended" => "router bgp #3 ; address-family ipv6 ; neighbor #5 send-community extended", - "protocols bgp var neighbor var address-family ipv6-unicast disable-send-community standard" => "router bgp #3 ; address-family ipv6 ; neighbor #5 send-community standard", - "protocols bgp var neighbor var address-family ipv6-unicast distribute-list" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast distribute-list export" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 distribute-list #10 out", - "protocols bgp var neighbor var address-family ipv6-unicast distribute-list import" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 distribute-list #10 in", - "protocols bgp var neighbor var address-family ipv6-unicast filter-list" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast filter-list export" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 filter-list #10 out", - "protocols bgp var neighbor var address-family ipv6-unicast filter-list import" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 filter-list #10 in", - "protocols bgp var neighbor var address-family ipv6-unicast maximum-prefix" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 maximum-prefix #9", - "protocols bgp var neighbor var address-family ipv6-unicast nexthop-local" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast nexthop-local" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 nexthop-local unchanged", - "protocols bgp var neighbor var address-family ipv6-unicast nexthop-self" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 next-hop-self", - "protocols bgp var neighbor var address-family ipv6-unicast prefix-list" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast prefix-list export" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 prefix-list #10 out", - "protocols bgp var neighbor var address-family ipv6-unicast prefix-list import" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 prefix-list #10 in", - "protocols bgp var neighbor var address-family ipv6-unicast remove-private-as" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 remove-private-AS", - "protocols bgp var neighbor var address-family ipv6-unicast route-map" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast route-map export" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 route-map #10 out", - "protocols bgp var neighbor var address-family ipv6-unicast route-map import" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 route-map #10 in", - "protocols bgp var neighbor var address-family ipv6-unicast route-reflector-client" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 route-reflector-client", - "protocols bgp var neighbor var address-family ipv6-unicast route-server-client" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 route-server-client", - "protocols bgp var neighbor var address-family ipv6-unicast soft-reconfiguration" => undef, - "protocols bgp var neighbor var address-family ipv6-unicast soft-reconfiguration inbound" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 soft-reconfiguration inbound", - "protocols bgp var neighbor var address-family ipv6-unicast unsuppress-map" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 unsuppress-map #9", - "protocols bgp var neighbor var advertisement-interval" => "router bgp #3 ; no neighbor #5 advertisement-interval", - "protocols bgp var neighbor var allowas-in" => "router bgp #3 ; no neighbor #5 allowas-in", - "protocols bgp var neighbor var allowas-in number" => "router bgp #3 ; no neighbor #5 allowas-in #8 ; neighbor #5 allowas-in", - "protocols bgp var neighbor var attribute-unchanged" => "router bgp #3 ; no neighbor #5 attribute-unchanged ?as-path ?med ?next-hop", - "protocols bgp var neighbor var capability" => undef, - "protocols bgp var neighbor var capability dynamic" => "router bgp #3 ; no neighbor #5 capability dynamic", - "protocols bgp var neighbor var capability orf" => undef, - "protocols bgp var neighbor var capability orf prefix-list" => undef, - "protocols bgp var neighbor var capability orf prefix-list receive" => "router bgp #3 ; no neighbor #5 capability orf prefix-list receive", - "protocols bgp var neighbor var capability orf prefix-list send" => "router bgp #3 ; no neighbor #5 capability orf prefix-list send", - "protocols bgp var neighbor var default-originate" => "router bgp #3 ; no neighbor #5 default-originate", - "protocols bgp var neighbor var default-originate route-map" => "router bgp #3 ; no neighbor #5 default-originate route-map #8", - "protocols bgp var neighbor var disable-capability-negotiation" => "router bgp #3 ; no neighbor #5 dont-capability-negotiate", - "protocols bgp var neighbor var disable-connected-check" => "router bgp #3 ; no neighbor #5 disable-connected-check", - "protocols bgp var neighbor var disable-send-community" => undef, - "protocols bgp var neighbor var disable-send-community extended" => "router bgp #3 ; neighbor #5 send-community extended", - "protocols bgp var neighbor var disable-send-community standard" => "router bgp #3 ; neighbor #5 send-community standard", - "protocols bgp var neighbor var distribute-list" => undef, - "protocols bgp var neighbor var distribute-list export" => "router bgp #3 ; no neighbor #5 distribute-list #8 out", - "protocols bgp var neighbor var distribute-list import" => "router bgp #3 ; no neighbor #5 distribute-list #8 in", - "protocols bgp var neighbor var ebgp-multihop" => "router bgp #3 ; no neighbor #5 ebgp-multihop", - "protocols bgp var neighbor var ttl-security" => undef, - "protocols bgp var neighbor var ttl-security hops" => "router bgp #3 ; no neighbor #5 ttl-security hops", - "protocols bgp var neighbor var filter-list" => undef, - "protocols bgp var neighbor var filter-list export" => "router bgp #3 ; no neighbor #5 filter-list #8 out", - "protocols bgp var neighbor var filter-list import" => "router bgp #3 ; no neighbor #5 filter-list #8 in", - "protocols bgp var neighbor var local-as" => "router bgp #3 ; no neighbor #5 local-as", - "protocols bgp var neighbor var local-as no-prepend" => "router bgp #3 ; no neighbor #5 local-as #7 no-prepend ; neighbor #5 local-as #7", - "protocols bgp var neighbor var maximum-prefix" => "router bgp #3 ; no neighbor #5 maximum-prefix", - "protocols bgp var neighbor var nexthop-self" => "router bgp #3 ; no neighbor #5 next-hop-self", - "protocols bgp var neighbor var override-capability" => "router bgp #3 ; no neighbor #5 override-capability", - "protocols bgp var neighbor var passive" => "router bgp #3 ; no neighbor #5 passive", - "protocols bgp var neighbor var password" => "router bgp #3 ; no neighbor #5 password", - "protocols bgp var neighbor var peer-group" => "router bgp #3 ; no neighbor #5 peer-group #7", - "protocols bgp var neighbor var port" => "router bgp #3 ; no neighbor #5 port", - "protocols bgp var neighbor var prefix-list" => undef, - "protocols bgp var neighbor var prefix-list export" => "router bgp #3 ; no neighbor #5 prefix-list #8 out", - "protocols bgp var neighbor var prefix-list import" => "router bgp #3 ; no neighbor #5 prefix-list #8 in", - "protocols bgp var neighbor var remote-as" => "router bgp #3 ; no neighbor #5 remote-as #7", - "protocols bgp var neighbor var remove-private-as" => "router bgp #3 ; no neighbor #5 remove-private-AS", - "protocols bgp var neighbor var route-map" => undef, - "protocols bgp var neighbor var route-map export" => "router bgp #3 ; no neighbor #5 route-map #8 out", - "protocols bgp var neighbor var route-map import" => "router bgp #3 ; no neighbor #5 route-map #8 in", - "protocols bgp var neighbor var route-reflector-client" => "router bgp #3 ; no neighbor #5 route-reflector-client", - "protocols bgp var neighbor var route-server-client" => "router bgp #3 ; no neighbor #5 route-server-client", - "protocols bgp var neighbor var shutdown" => "router bgp #3 ; no neighbor #5 shutdown", - "protocols bgp var neighbor var soft-reconfiguration" => undef, - "protocols bgp var neighbor var soft-reconfiguration inbound" => "router bgp #3 ; no neighbor #5 soft-reconfiguration inbound", - "protocols bgp var neighbor var strict-capability-match" => "router bgp #3 ; no neighbor #5 strict-capability-match", - "protocols bgp var neighbor var timers" => 'router bgp #3 ; no neighbor #5 timers', - "protocols bgp var neighbor var timers connect" => "router bgp #3 ; no neighbor #5 timers connect", - "protocols bgp var neighbor var unsuppress-map" => "router bgp #3 ; no neighbor #5 unsuppress-map #7", - "protocols bgp var neighbor var update-source" => "router bgp #3 ; no neighbor #5 update-source", - "protocols bgp var neighbor var weight" => "router bgp #3 ; no neighbor #5 weight", - "protocols bgp var network" => undef, - "protocols bgp var network var" => "router bgp #3 ; no network #5", - "protocols bgp var network var route-map" => "router bgp #3 ; no network #5 route-map #7", - "protocols bgp var parameters" => undef, - "protocols bgp var parameters always-compare-med" => "router bgp #3 ; no bgp always-compare-med", - "protocols bgp var parameters bestpath" => undef, - "protocols bgp var parameters bestpath as-path" => undef, - "protocols bgp var parameters bestpath as-path confed" => "router bgp #3 ; no bgp bestpath as-path confed", - "protocols bgp var parameters bestpath as-path ignore" => "router bgp #3 ; no bgp bestpath as-path ignore", - "protocols bgp var parameters bestpath compare-routerid" => "router bgp #3 ; no bgp bestpath compare-routerid", - "protocols bgp var parameters bestpath med" => undef, - "protocols bgp var parameters bestpath med confed" => "router bgp #3 ; no bgp bestpath med confed", - "protocols bgp var parameters bestpath med missing-as-worst" => "router bgp #3 ; no bgp bestpath med missing-as-worst", - "protocols bgp var parameters cluster-id" => "router bgp #3 ; no bgp cluster-id #6", - "protocols bgp var parameters confederation" => undef, - "protocols bgp var parameters confederation identifier" => "router bgp #3 ; no bgp confederation identifier #7", - "protocols bgp var parameters confederation peers" => "router bgp #3 ; no bgp confederation peers #7", - "protocols bgp var parameters dampening" => "router bgp #3 ; no bgp dampening", - "protocols bgp var parameters default" => undef, - "protocols bgp var parameters default local-pref" => "router bgp #3 ; no bgp default local-preference #7", - "protocols bgp var parameters default no-ipv4-unicast" => "router bgp #3 ; bgp default ipv4-unicast", - "protocols bgp var parameters deterministic-med" => "router bgp #3 ; no bgp deterministic-med", - "protocols bgp var parameters disable-network-import-check" => "router bgp #3 ; bgp network import-check", - "protocols bgp var parameters enforce-first-as" => "router bgp #3 ; no bgp enforce-first-as", - "protocols bgp var parameters graceful-restart" => undef, - "protocols bgp var parameters graceful-restart stalepath-time" => "router bgp #3 ; no bgp graceful-restart stalepath-time #7", - "protocols bgp var parameters log-neighbor-changes" => "router bgp #3 ; no bgp log-neighbor-changes", - "protocols bgp var parameters no-client-to-client-reflection" => "router bgp #3 ; bgp client-to-client reflection", - "protocols bgp var parameters no-fast-external-failover" => "router bgp #3 ; bgp fast-external-failover", - "protocols bgp var parameters router-id" => "router bgp #3 ; no bgp router-id #6", - "protocols bgp var parameters scan-time" => "router bgp #3 ; no bgp scan-time #6", - "protocols bgp var peer-group" => undef, - "protocols bgp var peer-group var" => "router bgp #3 ; no neighbor #5 peer-group", - "protocols bgp var peer-group var address-family" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 activate", - "protocols bgp var peer-group var address-family ipv6-unicast allowas-in" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 allowas-in", - "protocols bgp var peer-group var address-family ipv6-unicast attribute-unchanged" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 attribute-unchanged", - "protocols bgp var peer-group var address-family ipv6-unicast capability" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast capability dynamic" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 capability dynamic", - "protocols bgp var peer-group var address-family ipv6-unicast capability orf" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast capability orf prefix-list" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast capability orf prefix-list receive" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 capability orf prefix-list receive", - "protocols bgp var peer-group var address-family ipv6-unicast capability orf prefix-list send" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 capability orf prefix-list send", - "protocols bgp var peer-group var address-family ipv6-unicast default-originate" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 default-originate", - "protocols bgp var peer-group var address-family ipv6-unicast default-originate route-map" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 default-originate route-map #10", - "protocols bgp var peer-group var address-family ipv6-unicast disable-send-community" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast disable-send-community extended" => "router bgp #3 ; address-family ipv6 ; neighbor #5 send-community extended", - "protocols bgp var peer-group var address-family ipv6-unicast disable-send-community standard" => "router bgp #3 ; address-family ipv6 ; neighbor #5 send-community standard", - "protocols bgp var peer-group var address-family ipv6-unicast distribute-list" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast distribute-list export" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 distribute-list #10 out", - "protocols bgp var peer-group var address-family ipv6-unicast distribute-list import" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 distribute-list #10 in", - "protocols bgp var peer-group var address-family ipv6-unicast filter-list" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast filter-list export" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 filter-list #10 out", - "protocols bgp var peer-group var address-family ipv6-unicast filter-list import" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 filter-list #10 in", - "protocols bgp var peer-group var address-family ipv6-unicast maximum-prefix" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 maximum-prefix #9", - "protocols bgp var peer-group var address-family ipv6-unicast nexthop-local" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast nexthop-local" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 nexthop-local unchanged", - "protocols bgp var peer-group var address-family ipv6-unicast nexthop-self" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 next-hop-self", - "protocols bgp var peer-group var address-family ipv6-unicast prefix-list" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast prefix-list export" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 prefix-list #10 out", - "protocols bgp var peer-group var address-family ipv6-unicast prefix-list import" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 prefix-list #10 in", - "protocols bgp var peer-group var address-family ipv6-unicast remove-private-as" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 remove-private-AS", - "protocols bgp var peer-group var address-family ipv6-unicast route-map" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast route-map export" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 route-map #10 out", - "protocols bgp var peer-group var address-family ipv6-unicast route-map import" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 route-map #10 in", - "protocols bgp var peer-group var address-family ipv6-unicast route-reflector-client" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 route-reflector-client", - "protocols bgp var peer-group var address-family ipv6-unicast route-server-client" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 route-server-client", - "protocols bgp var peer-group var address-family ipv6-unicast soft-reconfiguration" => undef, - "protocols bgp var peer-group var address-family ipv6-unicast soft-reconfiguration inbound" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 soft-reconfiguration inbound", - "protocols bgp var peer-group var address-family ipv6-unicast unsuppress-map" => "router bgp #3 ; address-family ipv6 ; no neighbor #5 unsuppress-map #9", - "protocols bgp var peer-group var allowas-in" => "router bgp #3 ; no neighbor #5 allowas-in", - "protocols bgp var peer-group var allowas-in number" => "router bgp #3 ; no neighbor #5 allowas-in #8 ; neighbor #5 allowas-in", - "protocols bgp var peer-group var attribute-unchanged" => "router bgp #3 ; no neighbor #5 attribute-unchanged ?as-path ?med ?next-hop", - "protocols bgp var peer-group var capability" => undef, - "protocols bgp var peer-group var capability dynamic" => "router bgp #3 ; no neighbor #5 capability dynamic", - "protocols bgp var peer-group var capability orf" => undef, - "protocols bgp var peer-group var capability orf prefix-list" => undef, - "protocols bgp var peer-group var capability orf prefix-list receive" => "router bgp #3 ; no neighbor #5 capability orf prefix-list receive", - "protocols bgp var peer-group var capability orf prefix-list send" => "router bgp #3 ; no neighbor #5 capability orf prefix-list send", - "protocols bgp var peer-group var default-originate" => "router bgp #3 ; no neighbor #5 default-originate", - "protocols bgp var peer-group var default-originate route-map" => "router bgp #3 ; no neighbor #5 default-originate route-map #8", - "protocols bgp var peer-group var disable-capability-negotiation" => "router bgp #3 ; no neighbor #5 dont-capability-negotiate", - "protocols bgp var peer-group var disable-connected-check" => "router bgp #3 ; no neighbor #5 disable-connected-check", - "protocols bgp var peer-group var disable-send-community" => undef, - "protocols bgp var peer-group var disable-send-community extended" => "router bgp #3 ; neighbor #5 send-community extended", - "protocols bgp var peer-group var disable-send-community standard" => "router bgp #3 ; neighbor #5 send-community standard", - "protocols bgp var peer-group var distribute-list" => undef, - "protocols bgp var peer-group var distribute-list export" => "router bgp #3 ; no neighbor #5 distribute-list #8 out", - "protocols bgp var peer-group var distribute-list import" => "router bgp #3 ; no neighbor #5 distribute-list #8 in", - "protocols bgp var peer-group var ebgp-multihop" => "router bgp #3 ; no neighbor #5 ebgp-multihop #7", - "protocols bgp var peer-group var filter-list" => undef, - "protocols bgp var peer-group var filter-list export" => "router bgp #3 ; no neighbor #5 filter-list #8 out", - "protocols bgp var peer-group var filter-list import" => "router bgp #3 ; no neighbor #5 filter-list #8 in", - "protocols bgp var peer-group var local-as" => undef, - "protocols bgp var peer-group var local-as var" => "router bgp #3 ; no neighbor #5 local-as #7", - "protocols bgp var peer-group var local-as var no-prepend" => "router bgp #3 ; no neighbor #5 local-as #7 ; neighbor #5 local-as", - "protocols bgp var peer-group var maximum-prefix" => "router bgp #3 ; no neighbor #5 maximum-prefix #7", - "protocols bgp var peer-group var nexthop-self" => "router bgp #3 ; no neighbor #5 next-hop-self", - "protocols bgp var peer-group var override-capability" => "router bgp #3 ; no neighbor #5 override-capability", - "protocols bgp var peer-group var passive" => "router bgp #3 ; no neighbor #5 passive", - "protocols bgp var peer-group var password" => "router bgp #3 ; no neighbor #5 password #7", - "protocols bgp var peer-group var port" => "router bgp #3 ; no neighbor #5 port #7", - "protocols bgp var peer-group var prefix-list" => undef, - "protocols bgp var peer-group var prefix-list export" => "router bgp #3 ; no neighbor #5 prefix-list #8 out", - "protocols bgp var peer-group var prefix-list import" => "router bgp #3 ; no neighbor #5 prefix-list #8 in", - "protocols bgp var peer-group var remote-as" => "router bgp #3 ; no neighbor #5", - "protocols bgp var peer-group var remove-private-as" => "router bgp #3 ; no neighbor #5 remove-private-AS", - "protocols bgp var peer-group var route-map" => undef, - "protocols bgp var peer-group var route-map export" => "router bgp #3 ; no neighbor #5 route-map #8 out", - "protocols bgp var peer-group var route-map import" => "router bgp #3 ; no neighbor #5 route-map #8 in", - "protocols bgp var peer-group var route-reflector-client" => "router bgp #3 ; no neighbor #5 route-reflector-client", - "protocols bgp var peer-group var route-server-client" => "router bgp #3 ; no neighbor #5 route-server-client", - "protocols bgp var peer-group var shutdown" => "router bgp #3 ; no neighbor #5 shutdown", - "protocols bgp var peer-group var soft-reconfiguration" => undef, - "protocols bgp var peer-group var soft-reconfiguration inbound" => "router bgp #3 ; no neighbor #5 soft-reconfiguration inbound", - "protocols bgp var peer-group var timers" => "router bgp #3 ; no neighbor #5", - "protocols bgp var peer-group var timers connect" => "router bgp #3 ; no neighbor #5 timers connect #8", - "protocols bgp var peer-group var unsuppress-map" => "router bgp #3 ; no neighbor #5 unsuppress-map #7", - "protocols bgp var peer-group var update-source" => "router bgp #3 ; no neighbor #5 update-source #7", - "protocols bgp var peer-group var weight" => "router bgp #3 ; no neighbor #5 weight #7", - "protocols bgp var redistribute" => undef, - "protocols bgp var redistribute connected" => "router bgp #3 ; no redistribute connected", - "protocols bgp var redistribute connected metric" => "router bgp #3 ; no redistribute connected metric #7", - "protocols bgp var redistribute connected route-map" => "router bgp #3 ; no redistribute connected route-map #7", - "protocols bgp var redistribute kernel" => "router bgp #3 ; no redistribute kernel", - "protocols bgp var redistribute kernel metric" => "router bgp #3 ; no redistribute kernel metric #7", - "protocols bgp var redistribute kernel route-map" => "router bgp #3 ; no redistribute kernel route-map #7", - "protocols bgp var redistribute ospf" => "router bgp #3 ; no redistribute ospf", - "protocols bgp var redistribute ospf metric" => "router bgp #3 ; no redistribute ospf metric #7", - "protocols bgp var redistribute ospf route-map" => "router bgp #3 ; no redistribute ospf route-map #7", - "protocols bgp var redistribute rip" => "router bgp #3 ; no redistribute rip", - "protocols bgp var redistribute rip metric" => "router bgp #3 ; no redistribute rip metric #7", - "protocols bgp var redistribute rip route-map" => "router bgp #3 ; no redistribute rip route-map #7", - "protocols bgp var redistribute static" => "router bgp #3 ; no redistribute static", - "protocols bgp var redistribute static metric" => "router bgp #3 ; no redistribute static metric #7", - "protocols bgp var redistribute static route-map" => "router bgp #3 ; no redistribute static route-map #7", - "protocols bgp var timers" => "router bgp #3 ; no timers bgp", +my %qcom = ( + 'protocols' => { + set => undef, + del => undef, + }, + 'protocols bgp' => { + set => undef, + del => undef, + }, + 'protocols bgp var' => { + set => 'router bgp #3', + del => 'no router bgp #3', + }, + 'protocols bgp var address-family' => { + set => undef, + del => undef, + }, + 'protocols bgp var address-family ipv6-unicast' => { + set => undef, + del => undef, + }, + 'protocols bgp var address-family ipv6-unicast aggregate-address' => { + set => undef, + del => undef, + }, + 'protocols bgp var address-family ipv6-unicast aggregate-address var' => { + set => 'router bgp #3 ; ipv6 bgp aggregate-address #7 ?summary-only', + del => 'router bgp #3 ; no ipv6 bgp aggregate-address #7', + }, + 'protocols bgp var address-family ipv6-unicast network' => { + set => 'router bgp #3 ; no ipv6 bgp network #7 ; ipv6 bgp network #7', + del => 'router bgp #3 ; no ipv6 bgp network #7', + }, + 'protocols bgp var address-family ipv6-unicast redistribute' => { + set => undef, + del => undef, + }, + 'protocols bgp var address-family ipv6-unicast redistribute connected' => { + set => 'router bgp #3 ; address-family ipv6 ; redistribute connected', + del => 'router bgp #3 ; address-family ipv6 ; no redistribute connected', + }, + 'protocols bgp var address-family ipv6-unicast redistribute connected metric' => { + set => 'router bgp #3 ; address-family ipv6 ; redistribute connected metric #9', + del => 'router bgp #3 ; address-family ipv6 ; no redistribute connected metric #9', + }, + 'protocols bgp var address-family ipv6-unicast redistribute connected route-map' => { + set => 'router bgp #3 ; address-family ipv6 ; redistribute connected route-map #9', + del => 'router bgp #3 ; address-family ipv6 ; no redistribute connected route-map #9', + }, + 'protocols bgp var address-family ipv6-unicast redistribute kernel' => { + set => 'router bgp #3 ; address-family ipv6 ; redistribute kernel', + del => 'router bgp #3 ; address-family ipv6 ; no redistribute kernel', + }, + 'protocols bgp var address-family ipv6-unicast redistribute kernel metric' => { + set => 'router bgp #3 ; address-family ipv6 ; redistribute kernel metric #9', + del => 'router bgp #3 ; address-family ipv6 ; no redistribute kernel metric #9', + }, + 'protocols bgp var address-family ipv6-unicast redistribute kernel route-map' => { + set => 'router bgp #3 ; address-family ipv6 ; redistribute kernel route-map #9', + del => 'router bgp #3 ; address-family ipv6 ; no redistribute kernel route-map #9', + }, + 'protocols bgp var address-family ipv6-unicast redistribute ospfv3' => { + set => 'router bgp #3 ; address-family ipv6 ; redistribute ospfv3', + del => 'router bgp #3 ; address-family ipv6 ; no redistribute ospfv3', + }, + 'protocols bgp var address-family ipv6-unicast redistribute ospfv3 metric' => { + set => 'router bgp #3 ; address-family ipv6 ; redistribute ospfv3 metric #9', + del => 'router bgp #3 ; address-family ipv6 ; no redistribute ospfv3 metric #9', + }, + 'protocols bgp var address-family ipv6-unicast redistribute ospfv3 route-map' => { + set => 'router bgp #3 ; address-family ipv6 ; redistribute ospfv3 route-map #9', + del => 'router bgp #3 ; address-family ipv6 ; no redistribute ospfv3 route-map #9', + }, + 'protocols bgp var address-family ipv6-unicast redistribute ripng' => { + set => 'router bgp #3 ; address-family ipv6 ; redistribute ripng', + del => 'router bgp #3 ; address-family ipv6 ; no redistribute ripng', + }, + 'protocols bgp var address-family ipv6-unicast redistribute ripng metric' => { + set => 'router bgp #3 ; address-family ipv6 ; redistribute ripng metric #9', + del => 'router bgp #3 ; address-family ipv6 ; no redistribute ripng metric #9', + }, + 'protocols bgp var address-family ipv6-unicast redistribute ripng route-map' => { + set => 'router bgp #3 ; address-family ipv6 ; redistribute ripng route-map #9', + del => 'router bgp #3 ; address-family ipv6 ; no redistribute ripng route-map #9', + }, + 'protocols bgp var address-family ipv6-unicast redistribute static' => { + set => 'router bgp #3 ; address-family ipv6 ; redistribute static', + del => 'router bgp #3 ; address-family ipv6 ; no redistribute static', + }, + 'protocols bgp var address-family ipv6-unicast redistribute static metric' => { + set => 'router bgp #3 ; address-family ipv6 ; redistribute static metric #9', + del => 'router bgp #3 ; address-family ipv6 ; no redistribute static metric #9', + }, + 'protocols bgp var address-family ipv6-unicast redistribute static route-map' => { + set => 'router bgp #3 ; address-family ipv6 ; redistribute static route-map #9', + del => 'router bgp #3 ; address-family ipv6 ; no redistribute static route-map #9', + }, + 'protocols bgp var aggregate-address' => { + set => undef, + del => undef, + }, + 'protocols bgp var aggregate-address var' => { + set => 'router bgp #3 ; aggregate-address #5 ?as-set ?summary-only', + del => 'router bgp #3 ; no aggregate-address #5 ?as-set ?summary-only', + }, + 'protocols bgp var neighbor' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var' => { + set => undef, + del => 'router bgp #3 ; no neighbor #5', + }, + 'protocols bgp var neighbor var address-family' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var address-family ipv6-unicast' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 activate', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 activate', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast allowas-in' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 allowas-in', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 allowas-in', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast allowas-in number' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 allowas-in #10', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 allowas-in ; neighbor #5 allowas-in', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast attribute-unchanged' => { + set => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 attribute-unchanged ; neighbor #5 attribute-unchanged ?as-path ?med ?next-hop', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 attribute-unchanged', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast capability' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var address-family ipv6-unicast capability dynamic' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 capability dynamic', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 capability dynamic', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast capability orf' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var address-family ipv6-unicast capability orf prefix-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var address-family ipv6-unicast capability orf prefix-list receive' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 capability orf prefix-list receive', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 capability orf prefix-list receive', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast capability orf prefix-list send' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 capability orf prefix-list send', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 capability orf prefix-list send', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast default-originate' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 default-originate', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 default-originate', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast default-originate route-map' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 default-originate route-map #10', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 default-originate route-map #10', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast disable-send-community' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var address-family ipv6-unicast disable-send-community extended' => { + set => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 send-community extended', + del => 'router bgp #3 ; address-family ipv6 ; neighbor #5 send-community extended', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast disable-send-community standard' => { + set => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 send-community standard', + del => 'router bgp #3 ; address-family ipv6 ; neighbor #5 send-community standard', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast distribute-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var address-family ipv6-unicast distribute-list export' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 distribute-list #10 out', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 distribute-list #10 out', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast distribute-list import' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 distribute-list #10 in', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 distribute-list #10 in', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast filter-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var address-family ipv6-unicast filter-list export' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 filter-list #10 out', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 filter-list #10 out', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast filter-list import' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 filter-list #10 in', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 filter-list #10 in', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast maximum-prefix' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 maximum-prefix #9', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 maximum-prefix #9', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast nexthop-local' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 nexthop-local unchanged', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 nexthop-local unchanged', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast nexthop-self' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 next-hop-self', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 next-hop-self', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast prefix-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var address-family ipv6-unicast prefix-list export' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 prefix-list #10 out', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 prefix-list #10 out', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast prefix-list import' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 prefix-list #10 in', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 prefix-list #10 in', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast remove-private-as' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 remove-private-AS', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 remove-private-AS', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast route-map' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var address-family ipv6-unicast route-map export' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 route-map #10 out', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 route-map #10 out', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast route-map import' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 route-map #10 in', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 route-map #10 in', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast route-reflector-client' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 route-reflector-client', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 route-reflector-client', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast route-server-client' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 route-server-client', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 route-server-client', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast soft-reconfiguration' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var address-family ipv6-unicast soft-reconfiguration inbound' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 soft-reconfiguration inbound', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 soft-reconfiguration inbound', + }, + 'protocols bgp var neighbor var address-family ipv6-unicast unsuppress-map' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 unsuppress-map #9', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 unsuppress-map #9', + }, + 'protocols bgp var neighbor var advertisement-interval' => { + set => 'router bgp #3 ; neighbor #5 advertisement-interval #7', + del => 'router bgp #3 ; no neighbor #5 advertisement-interval', + }, + 'protocols bgp var neighbor var allowas-in' => { + set => 'router bgp #3 ; neighbor #5 allowas-in', + del => 'router bgp #3 ; no neighbor #5 allowas-in', + }, + 'protocols bgp var neighbor var allowas-in number' => { + set => 'router bgp #3 ; neighbor #5 allowas-in #8', + del => 'router bgp #3 ; no neighbor #5 allowas-in ; neighbor #5 allowas-in', + }, + 'protocols bgp var neighbor var attribute-unchanged' => { + set => 'router bgp #3 ; no neighbor #5 attribute-unchanged ; neighbor #5 attribute-unchanged ?as-path ?med ?next-hop', + del => 'router bgp #3 ; no neighbor #5 attribute-unchanged ?as-path ?med ?next-hop', + }, + 'protocols bgp var neighbor var capability' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var capability dynamic' => { + set => 'router bgp #3 ; neighbor #5 capability dynamic', + del => 'router bgp #3 ; no neighbor #5 capability dynamic', + }, + 'protocols bgp var neighbor var capability orf' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var capability orf prefix-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var capability orf prefix-list receive' => { + set => 'router bgp #3 ; neighbor #5 capability orf prefix-list receive', + del => 'router bgp #3 ; no neighbor #5 capability orf prefix-list receive', + }, + 'protocols bgp var neighbor var capability orf prefix-list send' => { + set => 'router bgp #3 ; neighbor #5 capability orf prefix-list send', + del => 'router bgp #3 ; no neighbor #5 capability orf prefix-list send', + }, + 'protocols bgp var neighbor var default-originate' => { + set => 'router bgp #3 ; neighbor #5 default-originate', + del => 'router bgp #3 ; no neighbor #5 default-originate', + }, + 'protocols bgp var neighbor var default-originate route-map' => { + set => 'router bgp #3 ; neighbor #5 default-originate route-map #8', + del => 'router bgp #3 ; no neighbor #5 default-originate route-map #8', + }, + 'protocols bgp var neighbor var disable-capability-negotiation' => { + set => 'router bgp #3 ; neighbor #5 dont-capability-negotiate', + del => 'router bgp #3 ; no neighbor #5 dont-capability-negotiate', + }, + 'protocols bgp var neighbor var disable-connected-check' => { + set => 'router bgp #3 ; neighbor #5 disable-connected-check', + del => 'router bgp #3 ; no neighbor #5 disable-connected-check', + }, + 'protocols bgp var neighbor var disable-send-community' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var disable-send-community extended' => { + set => 'router bgp #3 ; no neighbor #5 send-community extended', + del => 'router bgp #3 ; neighbor #5 send-community extended', + }, + 'protocols bgp var neighbor var disable-send-community standard' => { + set => 'router bgp #3 ; no neighbor #5 send-community standard', + del => 'router bgp #3 ; neighbor #5 send-community standard', + }, + 'protocols bgp var neighbor var distribute-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var distribute-list export' => { + set => 'router bgp #3 ; neighbor #5 distribute-list #8 out', + del => 'router bgp #3 ; no neighbor #5 distribute-list #8 out', + }, + 'protocols bgp var neighbor var distribute-list import' => { + set => 'router bgp #3 ; neighbor #5 distribute-list #8 in', + del => 'router bgp #3 ; no neighbor #5 distribute-list #8 in', + }, + 'protocols bgp var neighbor var ebgp-multihop' => { + set => 'router bgp #3 ; neighbor #5 ebgp-multihop #7', + del => 'router bgp #3 ; no neighbor #5 ebgp-multihop', + }, + 'protocols bgp var neighbor var filter-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var filter-list export' => { + set => 'router bgp #3 ; neighbor #5 filter-list #8 out', + del => 'router bgp #3 ; no neighbor #5 filter-list #8 out', + }, + 'protocols bgp var neighbor var filter-list import' => { + set => 'router bgp #3 ; neighbor #5 filter-list #8 in', + del => 'router bgp #3 ; no neighbor #5 filter-list #8 in', + }, + 'protocols bgp var neighbor var local-as' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var local-as var' => { + set => 'router bgp #3 ; no neighbor #5 local-as #7 ; neighbor #5 local-as #7', + del => 'router bgp #3 ; no neighbor #5 local-as', + }, + 'protocols bgp var neighbor var local-as var no-prepend' => { + set => 'router bgp #3 ; no neighbor #5 local-as #7 ; neighbor #5 local-as #7 no-prepend', + del => 'router bgp #3 ; no neighbor #5 local-as #7 no-prepend; neighbor #5 local-as #7', + }, + 'protocols bgp var neighbor var maximum-prefix' => { + set => 'router bgp #3 ; neighbor #5 maximum-prefix #7', + del => 'router bgp #3 ; no neighbor #5 maximum-prefix', + }, + 'protocols bgp var neighbor var nexthop-self' => { + set => 'router bgp #3 ; neighbor #5 next-hop-self', + del => 'router bgp #3 ; no neighbor #5 next-hop-self', + }, + 'protocols bgp var neighbor var override-capability' => { + set => 'router bgp #3 ; neighbor #5 override-capability', + del => 'router bgp #3 ; no neighbor #5 override-capability', + }, + 'protocols bgp var neighbor var passive' => { + set => 'router bgp #3 ; neighbor #5 passive', + del => 'router bgp #3 ; no neighbor #5 passive', + }, + 'protocols bgp var neighbor var password' => { + set => 'router bgp #3 ; neighbor #5 password #7', + del => 'router bgp #3 ; no neighbor #5 password', + }, + 'protocols bgp var neighbor var peer-group' => { + set => 'router bgp #3 ; neighbor #5 peer-group #7', + del => 'router bgp #3 ; no neighbor #5 peer-group #7', + }, + 'protocols bgp var neighbor var port' => { + set => 'router bgp #3 ; neighbor #5 port #7', + del => 'router bgp #3 ; no neighbor #5 port', + }, + 'protocols bgp var neighbor var prefix-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var prefix-list export' => { + set => 'router bgp #3 ; neighbor #5 prefix-list #8 out', + del => 'router bgp #3 ; no neighbor #5 prefix-list #8 out', + }, + 'protocols bgp var neighbor var prefix-list import' => { + set => 'router bgp #3 ; neighbor #5 prefix-list #8 in', + del => 'router bgp #3 ; no neighbor #5 prefix-list #8 in', + }, + 'protocols bgp var neighbor var remote-as' => { + set => 'router bgp #3 ; neighbor #5 remote-as #7', + del => 'router bgp #3 ; no neighbor #5 remote-as #7', + }, + 'protocols bgp var neighbor var remove-private-as' => { + set => 'router bgp #3 ; neighbor #5 remove-private-AS', + del => 'router bgp #3 ; no neighbor #5 remove-private-AS', + }, + 'protocols bgp var neighbor var route-map' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var route-map export' => { + set => 'router bgp #3 ; neighbor #5 route-map #8 out', + del => 'router bgp #3 ; no neighbor #5 route-map #8 out', + }, + 'protocols bgp var neighbor var route-map import' => { + set => 'router bgp #3 ; neighbor #5 route-map #8 in', + del => 'router bgp #3 ; no neighbor #5 route-map #8 in', + }, + 'protocols bgp var neighbor var route-reflector-client' => { + set => 'router bgp #3 ; neighbor #5 route-reflector-client', + del => 'router bgp #3 ; no neighbor #5 route-reflector-client', + }, + 'protocols bgp var neighbor var route-server-client' => { + set => 'router bgp #3 ; neighbor #5 route-server-client', + del => 'router bgp #3 ; no neighbor #5 route-server-client', + }, + 'protocols bgp var neighbor var shutdown' => { + set => 'router bgp #3 ; neighbor #5 shutdown', + del => 'router bgp #3 ; no neighbor #5 shutdown', + }, + 'protocols bgp var neighbor var soft-reconfiguration' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var soft-reconfiguration inbound' => { + set => 'router bgp #3 ; neighbor #5 soft-reconfiguration inbound', + del => 'router bgp #3 ; no neighbor #5 soft-reconfiguration inbound', + }, + 'protocols bgp var neighbor var strict-capability-match' => { + set => 'router bgp #3 ; neighbor #5 strict-capability-match', + del => 'router bgp #3 ; no neighbor #5 strict-capability-match', + }, + 'protocols bgp var neighbor var timers' => { + set => 'router bgp #3 ; neighbor #5 timers @keepalive @holdtime', + del => 'router bgp #3 ; no neighbor #5 timers', + }, + 'protocols bgp var neighbor var timers connect' => { + set => 'router bgp #3 ; neighbor #5 timers connect #8', + del => 'router bgp #3 ; no neighbor #5 timers connect', + }, + 'protocols bgp var neighbor var ttl-security' => { + set => undef, + del => undef, + }, + 'protocols bgp var neighbor var ttl-security hops' => { + set => 'router bgp #3 ; neighbor #5 ttl-security hops #8', + del => 'router bgp #3 ; no neighbor #5 ttl-security hops #8', + }, + 'protocols bgp var neighbor var unsuppress-map' => { + set => 'router bgp #3 ; neighbor #5 unsuppress-map #7', + del => 'router bgp #3 ; no neighbor #5 unsuppress-map #7', + }, + 'protocols bgp var neighbor var update-source' => { + set => 'router bgp #3 ; neighbor #5 update-source #7', + del => 'router bgp #3 ; no neighbor #5 update-source', + }, + 'protocols bgp var neighbor var weight' => { + set => 'router bgp #3 ; neighbor #5 weight #7', + del => 'router bgp #3 ; no neighbor #5 weight', + }, + 'protocols bgp var network' => { + set => undef, + del => undef, + }, + 'protocols bgp var network var' => { + set => 'router bgp #3 ; network #5 ?backdoor', + del => 'router bgp #3 ; no network #5', + }, + 'protocols bgp var network var route-map' => { + set => 'router bgp #3 ; network #5 route-map #7', + del => 'router bgp #3 ; no network #5 route-map #7 ; network #5', + }, + 'protocols bgp var parameters' => { + set => undef, + del => undef, + }, + 'protocols bgp var parameters always-compare-med' => { + set => 'router bgp #3 ; bgp always-compare-med', + del => 'router bgp #3 ; no bgp always-compare-med', + }, + 'protocols bgp var parameters bestpath' => { + set => undef, + del => undef, + }, + 'protocols bgp var parameters bestpath as-path' => { + set => undef, + del => undef, + }, + 'protocols bgp var parameters bestpath as-path confed' => { + set => 'router bgp #3 ; bgp bestpath as-path confed', + del => 'router bgp #3 ; no bgp bestpath as-path confed', + }, + 'protocols bgp var parameters bestpath as-path ignore' => { + set => 'router bgp #3 ; bgp bestpath as-path ignore', + del => 'router bgp #3 ; no bgp bestpath as-path ignore', + }, + 'protocols bgp var parameters bestpath compare-routerid' => { + set => 'router bgp #3 ; bgp bestpath compare-routerid', + del => 'router bgp #3 ; no bgp bestpath compare-routerid', + }, + 'protocols bgp var parameters bestpath med' => { + set => undef, + del => undef, + }, + 'protocols bgp var parameters bestpath med confed' => { + set => 'router bgp #3 ; bgp bestpath med confed', + del => 'router bgp #3 ; no bgp bestpath med confed', + }, + 'protocols bgp var parameters bestpath med missing-as-worst' => { + set => 'router bgp #3 ; bgp bestpath med missing-as-worst', + del => 'router bgp #3 ; no bgp bestpath med missing-as-worst', + }, + 'protocols bgp var parameters cluster-id' => { + set => 'router bgp #3 ; bgp cluster-id #6', + del => 'router bgp #3 ; no bgp cluster-id #6', + }, + 'protocols bgp var parameters confederation' => { + set => undef, + del => undef, + }, + 'protocols bgp var parameters confederation identifier' => { + set => 'router bgp #3 ; bgp confederation identifier #7', + del => 'router bgp #3 ; no bgp confederation identifier #7', + }, + 'protocols bgp var parameters confederation peers' => { + set => 'router bgp #3 ; bgp confederation peers #7', + del => 'router bgp #3 ; no bgp confederation peers #7', + }, + 'protocols bgp var parameters dampening' => { + set => 'router bgp #3 ; no bgp dampening ; bgp dampening @half-life @re-use @start-suppress-time @max-suppress-time', + del => 'router bgp #3 ; no bgp dampening', + }, + 'protocols bgp var parameters default' => { + set => undef, + del => undef, + }, + 'protocols bgp var parameters default local-pref' => { + set => 'router bgp #3 ; bgp default local-preference #7', + del => 'router bgp #3 ; no bgp default local-preference #7', + }, + 'protocols bgp var parameters default no-ipv4-unicast' => { + set => 'router bgp #3 ; no bgp default ipv4-unicast', + del => 'router bgp #3 ; bgp default ipv4-unicast', + }, + 'protocols bgp var parameters deterministic-med' => { + set => 'router bgp #3 ; bgp deterministic-med', + del => 'router bgp #3 ; no bgp deterministic-med', + }, + 'protocols bgp var parameters disable-network-import-check' => { + set => 'router bgp #3 ; no bgp network import-check', + del => 'router bgp #3 ; bgp network import-check', + }, + 'protocols bgp var parameters distance' => { + set => undef, + del => undef, + }, + 'protocols bgp var parameters distance global' => { + set => 'router bgp #3 ; distance bgp @external @internal @local', + del => 'router bgp #3 ; no distance bgp', + }, + 'protocols bgp var parameters distance prefix' => { + set => undef, + del => undef, + }, + 'protocols bgp var parameters distance prefix var' => { + set => undef, + del => undef, + }, + 'protocols bgp var parameters distance prefix var distance' => { + set => 'router bgp #3 ; distance #9 #7 ', + del => 'router bgp #3 ; no distance #9 #7', + }, + 'protocols bgp var parameters enforce-first-as' => { + set => 'router bgp #3 ; bgp enforce-first-as', + del => 'router bgp #3 ; no bgp enforce-first-as', + }, + 'protocols bgp var parameters graceful-restart' => { + set => undef, + del => undef, + }, + 'protocols bgp var parameters graceful-restart stalepath-time' => { + set => 'router bgp #3 ; bgp graceful-restart stalepath-time #7', + del => 'router bgp #3 ; no bgp graceful-restart stalepath-time #7', + }, + 'protocols bgp var parameters log-neighbor-changes' => { + set => 'router bgp #3 ; bgp log-neighbor-changes', + del => 'router bgp #3 ; no bgp log-neighbor-changes', + }, + 'protocols bgp var parameters no-client-to-client-reflection' => { + set => 'router bgp #3 ; no bgp client-to-client reflection', + del => 'router bgp #3 ; bgp client-to-client reflection', + }, + 'protocols bgp var parameters no-fast-external-failover' => { + set => 'router bgp #3 ; no bgp fast-external-failover', + del => 'router bgp #3 ; bgp fast-external-failover', + }, + 'protocols bgp var parameters router-id' => { + set => 'router bgp #3 ; bgp router-id #6', + del => 'router bgp #3 ; no bgp router-id #6', + }, + 'protocols bgp var parameters scan-time' => { + set => 'router bgp #3 ; bgp scan-time #6', + del => 'router bgp #3 ; no bgp scan-time #6', + }, + 'protocols bgp var peer-group' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var' => { + set => 'router bgp #3 ; neighbor #5 peer-group', + del => 'router bgp #3 ; no neighbor #5 peer-group', + noerr => 'set', + }, + 'protocols bgp var peer-group var address-family' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var address-family ipv6-unicast' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 activate', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 activate', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast allowas-in' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 allowas-in', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 allowas-in', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast allowas-in number' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 allowas-in #10', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 allowas-in ; neighbor #5 allowas-in', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast attribute-unchanged' => { + set => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 attribute-unchanged ; neighbor #5 attribute-unchanged ?as-path ?med ?next-hop', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 attribute-unchanged', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast capability' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var address-family ipv6-unicast capability dynamic' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 capability dynamic', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 capability dynamic', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast capability orf' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var address-family ipv6-unicast capability orf prefix-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var address-family ipv6-unicast capability orf prefix-list receive' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 capability orf prefix-list receive', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 capability orf prefix-list receive', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast capability orf prefix-list send' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 capability orf prefix-list send', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 capability orf prefix-list send', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast default-originate' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 default-originate', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 default-originate', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast default-originate route-map' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 default-originate route-map #10', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 default-originate route-map #10', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast disable-send-community' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var address-family ipv6-unicast disable-send-community extended' => { + set => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 send-community extended', + del => 'router bgp #3 ; address-family ipv6 ; neighbor #5 send-community extended', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast disable-send-community standard' => { + set => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 send-community standard', + del => 'router bgp #3 ; address-family ipv6 ; neighbor #5 send-community standard', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast distribute-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var address-family ipv6-unicast distribute-list export' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 distribute-list #10 out', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 distribute-list #10 out', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast distribute-list import' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 distribute-list #10 in', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 distribute-list #10 in', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast filter-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var address-family ipv6-unicast filter-list export' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 filter-list #10 out', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 filter-list #10 out', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast filter-list import' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 filter-list #10 in', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 filter-list #10 in', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast maximum-prefix' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 maximum-prefix #9', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 maximum-prefix #9', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast nexthop-local' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 nexthop-local unchanged', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 nexthop-local unchanged', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast nexthop-self' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 next-hop-self', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 next-hop-self', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast prefix-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var address-family ipv6-unicast prefix-list export' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 prefix-list #10 out', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 prefix-list #10 out', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast prefix-list import' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 prefix-list #10 in', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 prefix-list #10 in', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast remove-private-as' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 remove-private-AS', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 remove-private-AS', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast route-map' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var address-family ipv6-unicast route-map export' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 route-map #10 out', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 route-map #10 out', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast route-map import' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 route-map #10 in', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 route-map #10 in', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast route-reflector-client' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 route-reflector-client', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 route-reflector-client', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast route-server-client' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 route-server-client', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 route-server-client', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast soft-reconfiguration' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var address-family ipv6-unicast soft-reconfiguration inbound' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 soft-reconfiguration inbound', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 soft-reconfiguration inbound', + }, + 'protocols bgp var peer-group var address-family ipv6-unicast unsuppress-map' => { + set => 'router bgp #3 ; address-family ipv6 ; neighbor #5 unsuppress-map #9', + del => 'router bgp #3 ; address-family ipv6 ; no neighbor #5 unsuppress-map #9', + }, + 'protocols bgp var peer-group var allowas-in' => { + set => 'router bgp #3 ; neighbor #5 allowas-in', + del => 'router bgp #3 ; no neighbor #5 allowas-in', + }, + 'protocols bgp var peer-group var allowas-in number' => { + set => 'router bgp #3 ; neighbor #5 allowas-in #8', + del => 'router bgp #3 ; no neighbor #5 allowas-in ; neighbor #5 allowas-in', + }, + 'protocols bgp var peer-group var attribute-unchanged' => { + set => 'router bgp #3 ; no neighbor #5 attribute-unchanged ; neighbor #5 attribute-unchanged ?as-path ?med ?next-hop', + del => 'router bgp #3 ; no neighbor #5 attribute-unchanged ?as-path ?med ?next-hop', + }, + 'protocols bgp var peer-group var capability' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var capability dynamic' => { + set => 'router bgp #3 ; neighbor #5 capability dynamic', + del => 'router bgp #3 ; no neighbor #5 capability dynamic', + }, + 'protocols bgp var peer-group var capability orf' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var capability orf prefix-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var capability orf prefix-list receive' => { + set => 'router bgp #3 ; neighbor #5 capability orf prefix-list receive', + del => 'router bgp #3 ; no neighbor #5 capability orf prefix-list receive', + }, + 'protocols bgp var peer-group var capability orf prefix-list send' => { + set => 'router bgp #3 ; neighbor #5 capability orf prefix-list send', + del => 'router bgp #3 ; no neighbor #5 capability orf prefix-list send', + }, + 'protocols bgp var peer-group var default-originate' => { + set => 'router bgp #3 ; neighbor #5 default-originate', + del => 'router bgp #3 ; no neighbor #5 default-originate', + }, + 'protocols bgp var peer-group var default-originate route-map' => { + set => 'router bgp #3 ; neighbor #5 default-originate route-map #8', + del => 'router bgp #3 ; no neighbor #5 default-originate route-map #8', + }, + 'protocols bgp var peer-group var disable-capability-negotiation' => { + set => 'router bgp #3 ; neighbor #5 dont-capability-negotiate', + del => 'router bgp #3 ; no neighbor #5 dont-capability-negotiate', + }, + 'protocols bgp var peer-group var disable-connected-check' => { + set => 'router bgp #3 ; neighbor #5 disable-connected-check', + del => 'router bgp #3 ; no neighbor #5 disable-connected-check', + }, + 'protocols bgp var peer-group var disable-send-community' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var disable-send-community extended' => { + set => 'router bgp #3 ; no neighbor #5 send-community extended', + del => 'router bgp #3 ; neighbor #5 send-community extended', + }, + 'protocols bgp var peer-group var disable-send-community standard' => { + set => 'router bgp #3 ; no neighbor #5 send-community standard', + del => 'router bgp #3 ; neighbor #5 send-community standard', + }, + 'protocols bgp var peer-group var distribute-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var distribute-list export' => { + set => 'router bgp #3 ; neighbor #5 distribute-list #8 out', + del => 'router bgp #3 ; no neighbor #5 distribute-list #8 out', + }, + 'protocols bgp var peer-group var distribute-list import' => { + set => 'router bgp #3 ; neighbor #5 distribute-list #8 in', + del => 'router bgp #3 ; no neighbor #5 distribute-list #8 in', + }, + 'protocols bgp var peer-group var ebgp-multihop' => { + set => 'router bgp #3 ; neighbor #5 ebgp-multihop #7', + del => 'router bgp #3 ; no neighbor #5 ebgp-multihop #7', + }, + 'protocols bgp var peer-group var filter-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var filter-list export' => { + set => 'router bgp #3 ; neighbor #5 filter-list #8 out', + del => 'router bgp #3 ; no neighbor #5 filter-list #8 out', + }, + 'protocols bgp var peer-group var filter-list import' => { + set => 'router bgp #3 ; neighbor #5 filter-list #8 in', + del => 'router bgp #3 ; no neighbor #5 filter-list #8 in', + }, + 'protocols bgp var peer-group var local-as' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var local-as var' => { + set => 'router bgp #3 ; no neighbor #5 local-as ; neighbor #5 local-as #7', + del => 'router bgp #3 ; no neighbor #5 local-as #7', + }, + 'protocols bgp var peer-group var local-as var no-prepend' => { + set => 'router bgp #3 ; no neighbor #5 local-as #7 ; neighbor #5 local-as #7i no-prepend', + del => 'router bgp #3 ; no neighbor #5 local-as #7 no-prepend ; neighbor #5 local-as #7', + }, + 'protocols bgp var peer-group var maximum-prefix' => { + set => 'router bgp #3 ; neighbor #5 maximum-prefix #7', + del => 'router bgp #3 ; no neighbor #5 maximum-prefix #7', + }, + 'protocols bgp var peer-group var nexthop-self' => { + set => 'router bgp #3 ; neighbor #5 next-hop-self', + del => 'router bgp #3 ; no neighbor #5 next-hop-self', + }, + 'protocols bgp var peer-group var override-capability' => { + set => 'router bgp #3 ; neighbor #5 override-capability', + del => 'router bgp #3 ; no neighbor #5 override-capability', + }, + 'protocols bgp var peer-group var passive' => { + set => 'router bgp #3 ; neighbor #5 passive', + del => 'router bgp #3 ; no neighbor #5 passive', + }, + 'protocols bgp var peer-group var password' => { + set => 'router bgp #3 ; neighbor #5 password #7', + del => 'router bgp #3 ; no neighbor #5 password #7', + }, + 'protocols bgp var peer-group var port' => { + set => 'router bgp #3 ; neighbor #5 port #7', + del => 'router bgp #3 ; no neighbor #5 port #7', + }, + 'protocols bgp var peer-group var prefix-list' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var prefix-list export' => { + set => 'router bgp #3 ; neighbor #5 prefix-list #8 out', + del => 'router bgp #3 ; no neighbor #5 prefix-list #8 out', + }, + 'protocols bgp var peer-group var prefix-list import' => { + set => 'router bgp #3 ; neighbor #5 prefix-list #8 in', + del => 'router bgp #3 ; no neighbor #5 prefix-list #8 in', + }, + 'protocols bgp var peer-group var remote-as' => { + set => 'router bgp #3 ; neighbor #5 peer-group ; neighbor #5 remote-as #7', + del => 'router bgp #3 ; no neighbor #5 remote-as #7', + noerr => 'set', + }, + 'protocols bgp var peer-group var remove-private-as' => { + set => 'router bgp #3 ; neighbor #5 remove-private-AS', + del => 'router bgp #3 ; no neighbor #5 remove-private-AS', + }, + 'protocols bgp var peer-group var route-map' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var route-map export' => { + set => 'router bgp #3 ; neighbor #5 route-map #8 out', + del => 'router bgp #3 ; no neighbor #5 route-map #8 out', + }, + 'protocols bgp var peer-group var route-map import' => { + set => 'router bgp #3 ; neighbor #5 route-map #8 in', + del => 'router bgp #3 ; no neighbor #5 route-map #8 in', + }, + 'protocols bgp var peer-group var route-reflector-client' => { + set => 'router bgp #3 ; neighbor #5 route-reflector-client', + del => 'router bgp #3 ; no neighbor #5 route-reflector-client', + }, + 'protocols bgp var peer-group var route-server-client' => { + set => 'router bgp #3 ; neighbor #5 route-server-client', + del => 'router bgp #3 ; no neighbor #5 route-server-client', + }, + 'protocols bgp var peer-group var shutdown' => { + set => 'router bgp #3 ; neighbor #5 shutdown', + del => 'router bgp #3 ; no neighbor #5 shutdown', + }, + 'protocols bgp var peer-group var soft-reconfiguration' => { + set => undef, + del => undef, + }, + 'protocols bgp var peer-group var soft-reconfiguration inbound' => { + set => 'router bgp #3 ; neighbor #5 soft-reconfiguration inbound', + del => 'router bgp #3 ; no neighbor #5 soft-reconfiguration inbound', + }, + 'protocols bgp var peer-group var timers' => { + set => 'router bgp #3 ; neighbor #5 timers @keepalive @holdtime', + del => 'router bgp #3 ; no neighbor #5', + }, + 'protocols bgp var peer-group var timers connect' => { + set => 'router bgp #3 ; neighbor #5 timers connect #8', + del => 'router bgp #3 ; no neighbor #5 timers connect #8', + }, + 'protocols bgp var peer-group var unsuppress-map' => { + set => 'router bgp #3 ; neighbor #5 unsuppress-map #7', + del => 'router bgp #3 ; no neighbor #5 unsuppress-map #7', + }, + 'protocols bgp var peer-group var update-source' => { + set => 'router bgp #3 ; neighbor #5 update-source #7', + del => 'router bgp #3 ; no neighbor #5 update-source #7', + }, + 'protocols bgp var peer-group var weight' => { + set => 'router bgp #3 ; neighbor #5 weight #7', + del => 'router bgp #3 ; no neighbor #5 weight #7', + }, + 'protocols bgp var redistribute' => { + set => undef, + del => undef, + }, + 'protocols bgp var redistribute connected' => { + set => 'router bgp #3 ; redistribute connected', + del => 'router bgp #3 ; no redistribute connected', + }, + 'protocols bgp var redistribute connected metric' => { + set => 'router bgp #3 ; redistribute connected metric #7', + del => 'router bgp #3 ; no redistribute connected metric #7', + }, + 'protocols bgp var redistribute connected route-map' => { + set => 'router bgp #3 ; redistribute connected route-map #7', + del => 'router bgp #3 ; no redistribute connected route-map #7', + }, + 'protocols bgp var redistribute kernel' => { + set => 'router bgp #3 ; redistribute kernel', + del => 'router bgp #3 ; no redistribute kernel', + }, + 'protocols bgp var redistribute kernel metric' => { + set => 'router bgp #3 ; redistribute kernel metric #7', + del => 'router bgp #3 ; no redistribute kernel metric #7', + }, + 'protocols bgp var redistribute kernel route-map' => { + set => 'router bgp #3 ; redistribute kernel route-map #7', + del => 'router bgp #3 ; no redistribute kernel route-map #7', + }, + 'protocols bgp var redistribute ospf' => { + set => 'router bgp #3 ; redistribute ospf', + del => 'router bgp #3 ; no redistribute ospf', + }, + 'protocols bgp var redistribute ospf metric' => { + set => 'router bgp #3 ; redistribute ospf metric #7', + del => 'router bgp #3 ; no redistribute ospf metric #7', + }, + 'protocols bgp var redistribute ospf route-map' => { + set => 'router bgp #3 ; redistribute ospf route-map #7', + del => 'router bgp #3 ; no redistribute ospf route-map #7', + }, + 'protocols bgp var redistribute rip' => { + set => 'router bgp #3 ; redistribute rip', + del => 'router bgp #3 ; no redistribute rip', + }, + 'protocols bgp var redistribute rip metric' => { + set => 'router bgp #3 ; redistribute rip metric #7', + del => 'router bgp #3 ; no redistribute rip metric #7', + }, + 'protocols bgp var redistribute rip route-map' => { + set => 'router bgp #3 ; redistribute rip route-map #7', + del => 'router bgp #3 ; no redistribute rip route-map #7', + }, + 'protocols bgp var redistribute static' => { + set => 'router bgp #3 ; redistribute static', + del => 'router bgp #3 ; no redistribute static', + }, + 'protocols bgp var redistribute static metric' => { + set => 'router bgp #3 ; redistribute static metric #7', + del => 'router bgp #3 ; no redistribute static metric #7', + }, + 'protocols bgp var redistribute static route-map' => { + set => 'router bgp #3 ; redistribute static route-map #7', + del => 'router bgp #3 ; no redistribute static route-map #7', + }, + 'protocols bgp var timers' => { + set => 'router bgp #3 ; timers bgp @keepalive @holdtime', + del => 'router bgp #3 ; no timers bgp', + }, ); my ( $pg, $as, $neighbor ); -my ( $main, $checkas, $peername, $isneighbor, $checkpeergroupas, $checkpeergroups, $checksource ); +my ( $main, $peername, $isneighbor, $checkpeergroups, $checksource ); GetOptions( "peergroup=s" => \$pg, @@ -570,8 +1100,6 @@ GetOptions( "neighbor=s" => \$neighbor, "check-peergroup-name=s" => \$peername, "check-neighbor-ip" => \$isneighbor, - "check-as" => \$checkas, - "check-peergroup-as" => \$checkpeergroupas, "check-peer-groups" => \$checkpeergroups, "check-source=s" => \$checksource, "main" => \$main, @@ -581,8 +1109,6 @@ main() if ($main); check_peergroup_name($peername) if ($peername); check_neighbor_ip($neighbor) if ($isneighbor); check_for_peer_groups( $pg, $as ) if ($checkpeergroups); -check_neighbor_as( $neighbor, $as) if ($checkas); -check_peergroup_as( $neighbor, $as) if ($checkpeergroupas); check_source($checksource) if ($checksource); exit 0; @@ -628,7 +1154,7 @@ sub check_for_peer_groups { foreach my $node (@neighbors) { my $peergroup = $config->returnValue("$node peer-group"); - if ( $peergroup eq $pg ) { push @peers, $node; } + if ((defined $peergroup) && ($peergroup eq $pg)) { push @peers, $node; } } # if we found peers in the previous statements @@ -642,52 +1168,30 @@ sub check_for_peer_groups { } } -# make sure nodes are either in a peer group or have -# a remote AS assigned to them. -sub check_neighbor_as { - my ($neighbor, $as) = @_; - - die "neighbor not defined\n" unless $neighbor; - die "AS not defined\n" unless $as; - +# check that changed neighbors have a remote-as or peer-group defined +sub check_remote_as { my $config = new Vyatta::Config; - $config->setLevel("protocols bgp $as neighbor $neighbor"); - my $remoteas = $config->returnValue("remote-as"); - my $ttlsecurity = $config->returnValue("ttl-security hops"); + $config->setLevel('protocols bgp'); - if ($remoteas) { - my $ebgp = $config->returnValue("ebgp-multihops"); - die "protocols bgp $as neighbor $neighbor: cannot configure both ttl-security hops and ebgp-multihop\n" - if (defined($ttlsecurity) && defined($ebgp)); - return; + my @asns = $config->listNodes(); + foreach my $as (@asns) { + my @neighbors = $config->listNodes("$as neighbor"); + foreach my $neighbor (@neighbors) { + if ($config->isChanged("$as neighbor $neighbor")) { + my $remoteas = $config->returnValue("$as neighbor $neighbor remote-as"); + if ($remoteas) { + return; + } + my $peergroup = $config->returnValue("$as neighbor $neighbor peer-group"); + die "protocols bgp $as neighbor $neighbor: must define a remote-as or peer-group\n" + unless $peergroup; + + my $peergroupas = $config->returnValue("$as peer-group $peergroup remote-as"); + die "protocols bgp $as neighbor $neighbor: must define a remote-as in neighbor or peer-group $peergroup\n" + unless $peergroupas; + } + } } - - my $peergroup = $config->returnValue("peer-group"); - die "protocols bgp $as neighbor $neighbor: must define a remote-as or peer-group\n" - unless $peergroup; - - my $peergroupas = $config->returnValue(" .. .. peer-group $peergroup remote-as"); - die "protocols bgp $as neighbor $neighbor: must define a remote-as in neighbor or peer-group $peergroup\n" - unless $peergroupas; - - my $peerebgp = $config->returnValue(".. .. peer-group $peergroup ebgp-multihop"); - - die "protocols bgp $as neighbor $neighbor: cannot configure both ttl-security hops and ebgp-multihop (peer $peergroup)\n" - if (defined($ttlsecurity) && defined($peerebgp)) -} - -# make sure peer-group has a remote-as -sub check_peergroup_as { - my ($neighbor, $as) = @_; - - die "neighbor not defined\n" unless $neighbor; - die "AS not defined\n" unless $as; - - my $config = new Vyatta::Config; - $config->setLevel("protocols bgp $as peer-group $neighbor"); - my $remoteas = $config->returnValue("remote-as"); - return if defined $remoteas; - die "protocols bgp $as peer-group $neighbor: must define a remote-as\n"; } # check that value is either an IPV4 address on system or an interface @@ -707,20 +1211,39 @@ sub check_source { sub main { # initialize the Quagga Config object with data from Vyatta config tree - my $qconfig = new Vyatta::Quagga::Config('protocols', \%qcom, \%qcomdel); + my $qconfig = new Vyatta::Quagga::Config('protocols', \%qcom); + # debug routines #$qconfig->setDebugLevel('3'); #$qconfig->_reInitialize(); + # check that all changed neighbors have a proper remote-as or peer-group defined + check_remote_as(); + # deletes with priority + # delete everything in neighbor except for the important nodes + my @skip_array = ('remote-as', 'route-map', 'filter-list', 'prefix-list', 'distribute-list', 'unsuppress-map'); + # notice the extra space in the level string. keeps the parent from being deleted. + $qconfig->deleteConfigTreeRecursive('protocols bgp var neighbor var ', @skip_array) || die "exiting $?\n"; + # now delete everything in neighbor except remote-as + @skip_array = ('remote-as'); + $qconfig->deleteConfigTreeRecursive('protocols bgp var neighbor var ', @skip_array) || die "exiting $?\n"; + # now finish off neighbor + $qconfig->deleteConfigTreeRecursive('protocols bgp var neighbor var') || die "exiting $?\n"; + # now delete everything in peer-group except remote-as + @skip_array = ('remote-as'); + $qconfig->deleteConfigTreeRecursive('protocols bgp var peer-group var ', @skip_array) || die "exiting $?\n"; + # now finish off peer-group + $qconfig->deleteConfigTreeRecursive('protocols bgp var peer-group var ') || die "exiting $?\n"; + # now delete everything else in the tree $qconfig->deleteConfigTreeRecursive('protocols bgp') || die "exiting $?\n"; - # would be cool if I could add a recursive delete such as everything but (protocols bgp var neigh var remote-as) # sets with priority $qconfig->setConfigTreeRecursive('protocols bgp var parameters') || die "exiting $?\n"; $qconfig->setConfigTree('protocols bgp var peer-group var remote-as') || die "exiting $?\n"; $qconfig->setConfigTreeRecursive('protocols bgp var peer-group') || die "exiting $?\n"; $qconfig->setConfigTree('protocols bgp var neighbor var remote-as') || die "exiting $?\n"; + $qconfig->setConfigTree('protocols bgp var neighbor var peer-group') || die "exiting $?\n"; $qconfig->setConfigTree('protocols bgp var neighbor var shutdown') || die "exiting $?\n"; $qconfig->setConfigTreeRecursive('protocols bgp var neighbor var route-map') || die "exiting $?\n"; $qconfig->setConfigTreeRecursive('protocols bgp var neighbor var filter-list') || die "exiting $?\n"; @@ -730,6 +1253,7 @@ sub main { $qconfig->setConfigTreeRecursive('protocols bgp var neighbor') || die "exiting $?\n"; $qconfig->setConfigTreeRecursive('protocols bgp') || die "exiting $?\n"; + # old priorities we are emulating with the above sets #705 protocols bgp var neighbhor shutdown #715 protocols bgp var neighbhor route-map #716 protocols bgp var neighbhor filter-list @@ -739,4 +1263,3 @@ sub main { #720 protocols bgp var neighbhor #730 protocols bgp var } - diff --git a/scripts/policy/vyatta-policy.pl b/scripts/policy/vyatta-policy.pl index 08dc3b93..b4439bec 100755 --- a/scripts/policy/vyatta-policy.pl +++ b/scripts/policy/vyatta-policy.pl @@ -8,7 +8,7 @@ use Getopt::Long; my $VTYSH = '/usr/bin/vtysh'; my ( $accesslist, $accesslist6, $aspathlist, $communitylist, $peer ); -my ( $routemap, $deleteroutemap ); +my ( $routemap, $deleteroutemap, $listpolicy ); GetOptions( "update-access-list=s" => \$accesslist, @@ -18,6 +18,7 @@ GetOptions( "check-peer-syntax=s" => \$peer, "check-routemap-action=s" => \$routemap, "check-delete-routemap-action=s" => \$deleteroutemap, + "list-policy=s" => \$listpolicy, ) or exit 1; update_access_list($accesslist) if ($accesslist); @@ -27,6 +28,7 @@ update_community_list($communitylist) if ($communitylist); check_peer_syntax($peer) if ($peer); check_routemap_action($routemap) if ($routemap); check_delete_routemap_action($deleteroutemap) if ($deleteroutemap); +list_policy($listpolicy) if ($listpolicy); exit 0; @@ -309,3 +311,14 @@ sub check_delete_routemap_action { exit(@nodes) ? 1 : 0; } + +## list available policies +sub list_policy { + my $policy = shift; + my $config = new Vyatta::Config; + + $config->setLevel("policy $policy"); + my @nodes = $config->listNodes(); + foreach my $node (@nodes) { print "$node "; } + return; +} diff --git a/scripts/vyatta-show-protocols b/scripts/vyatta-show-protocols deleted file mode 100755 index 51450632..00000000 --- a/scripts/vyatta-show-protocols +++ /dev/null @@ -1,59 +0,0 @@ -#! /usr/bin/perl -# Author: Stephen Hemminger -# Date: 2009 -# Description: Helper script to display configured protocols - -# **** License **** -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 2 as -# published by the Free Software Foundation. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# This code was originally developed by Vyatta, Inc. -# Portions created by Vyatta are Copyright (C) 2006, 2007, 2008 Vyatta, Inc. -# All Rights Reserved. -# **** End License **** - -use lib "/opt/vyatta/share/perl5"; -use Vyatta::Config; -use strict; -use warnings; - -# Map from command line to config->XXX() function -my %actions = ( - 'original' => 'existsOrig', - 'exists' => 'exists', - 'added' => 'isAdded', - 'changed' => 'isChanged', - 'deleted' => 'isDeleted', - 'modified' => 'isChangedOrDeleted', -); - -my %daemons = ( - 'bgp' => 'bgpd', - 'ospf' => 'ospfd', - 'ospfv3' => 'ospf6d', - 'rip' => 'ripd', - 'ripng' => 'ripngd', - 'isis' => 'isisd', -); - -sub usage { - die "Usage: $0 {",join('|',keys %actions),"}\n" -} - -usage if ($#ARGV == -1); -my $match = $actions{$ARGV[0]}; -usage unless $match; - -my $config = new Vyatta::Config; -$config->setLevel('protocols'); - -# Should have avoided the urge to do Perl golf here... -my @found = grep { $config->$match($_) } keys %daemons; -print join(' ', map { $daemons{$_} } @found),"\n"; - diff --git a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/aggregate-address/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/aggregate-address/node.def index 594d8782..cac0be3e 100644 --- a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/aggregate-address/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/aggregate-address/node.def @@ -3,5 +3,4 @@ type: ipv6net help: Set a BGP IPv6 aggregate network comp_help: <h:h:h:h:h:h:h:h/x> IPv6 aggregate network - syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)" diff --git a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/network/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/network/node.def index 14034a79..bd7e5909 100644 --- a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/network/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/network/node.def @@ -3,5 +3,4 @@ type: ipv6net help: Set a BGP IPv6 network comp_help: <h:h:h:h:h:h:h:h/x> IPv6 network - syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)" diff --git a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/connected/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/connected/route-map/node.def index 94f0b513..f122376d 100644 --- a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/connected/route-map/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/connected/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) ipv6 redistribute connected: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/kernel/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/kernel/route-map/node.def index 9e8181d8..e9099fe7 100644 --- a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/kernel/route-map/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/kernel/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) ipv6 redistribute kernel: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ospfv3/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ospfv3/route-map/node.def index a2cd8040..c822e491 100644 --- a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ospfv3/route-map/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ospfv3/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) ipv6 redistribute ospfv3: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ripng/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ripng/route-map/node.def index 97a43975..40876949 100644 --- a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ripng/route-map/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/ripng/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) ipv6 redistribute ripng: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/static/route-map/node.def b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/static/route-map/node.def index 67b64a9b..6af666d7 100644 --- a/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/static/route-map/node.def +++ b/templates/protocols/bgp/node.tag/address-family/ipv6-unicast/redistribute/static/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) ipv6 redistribute static: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/address-family/node.def b/templates/protocols/bgp/node.tag/address-family/node.def new file mode 100644 index 00000000..1b67a4a0 --- /dev/null +++ b/templates/protocols/bgp/node.tag/address-family/node.def @@ -0,0 +1 @@ +help: Set BGP address-family parameters diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/node.def index 1d8c1946..b6747e41 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/node.def @@ -1,2 +1 @@ help: Set to accept a route that contains the local-AS in the as-path -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def index 5775dd0a..2450edd5 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def @@ -2,4 +2,3 @@ type: u32 help: Set number of occurrences of AS number comp_help: \1 <1-10>\tnumber of times AS is allowed in path syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 10; "allowas-in number must be between 1 and 10" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def index 53ac8694..547a1c0b 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def @@ -1,3 +1,2 @@ help: Set whether BGP attributes are sent unchanged -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 attribute-unchanged for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def index c05adfbe..a03cc588 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def @@ -1,2 +1 @@ help: Set to advertise dynamic capability to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def index f58079cc..2019178e 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def @@ -1,4 +1,3 @@ help: Set capability to receive the ORF -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 capability orf prefix-list send for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def index 5d87e250..c50c2834 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def @@ -1,3 +1,2 @@ help: Set capability to send the ORF -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 capability orf prefix-list send for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/node.def index 235f049d..ca2c59d9 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/node.def @@ -1,3 +1,2 @@ help: Set to send default route to this neighbor -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 default-originate for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def index 035d6c4a..bd0e0235 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def @@ -1,7 +1,9 @@ type: txt help: Set the route-map to specify criteria of the default +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$(/opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map) echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" " ; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) default-originate: route-map $VAR(@) doesn't exist" commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set default-originate route-map for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def index 557e0325..19496fb9 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def @@ -1,3 +1,2 @@ help: Set to not send extended community attributes to this neighbor -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 disable-send-community extended for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def index d86b1030..ee0fa5b6 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def @@ -1,3 +1,2 @@ help: Set to not send standard community attributes to this neighbor -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 disable-send-community standard for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def index 883743c1..d24af594 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def @@ -4,11 +4,9 @@ comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name allowed: local -a params - params=( /opt/vyatta/config/active/policy/access-list/* - /opt/vyatta/config/active/policy/access-list6/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list; + /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 ) echo -n ${params[@]##*/} -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 access-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) export: access-list $VAR(@) doesn't exist" commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) distribute-list export: you can't set both a prefix-list and a distribute list" -commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set distribute-list export for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def index c1d01abe..dccb1b14 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def @@ -3,8 +3,10 @@ help: Set an access-list to filter incoming route updates from this neighbor comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list; + /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";\ "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) import: access-list $VAR(@) doesn't exist" commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) distribute-list import: you can't set both a prefix-list and a distribute list" -commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set distribute-list import for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/export/node.def index 74a91681..523a6153 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/export/node.def @@ -1,10 +1,8 @@ type: txt help: Set an as-path-list to filter outgoing route updates to this neighbor +comp_help: possible completions: + <txt> as-path-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) echo -n ${params[@]##*/} -comp_help: possible completions: - <txt> as-path-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 as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) filter-list export: as-path-list $VAR(@) doesn't exist" -commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set filter-list export for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/import/node.def index 6d6b8d65..b2b88266 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/import/node.def @@ -1,10 +1,8 @@ type: txt help: Set an as-path-list to filter incoming route updates from this neighbor -allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) - echo -n ${params[@]##*/} comp_help: possible completions: <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) filter-list import: as-path-list $VAR(@) doesn't exist" -commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set filter-list import for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def index baff6c76..de6ecf41 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def @@ -2,4 +2,3 @@ type: u32 help: Set the maximum number of prefixes to accept from this neighbor comp_help: possible completions: <1-4294967295> prefix limit -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def index 33ca0243..01f4361a 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def @@ -1,2 +1 @@ help: Leave link-local nexthop unchanged for this peer -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-self/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-self/node.def index b86137b1..95262bf2 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-self/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-self/node.def @@ -1,3 +1,2 @@ help: Set nexthop for routes sent to this neighbor to be the local router -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 nexthop-self for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/node.def new file mode 100644 index 00000000..20c0a335 --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/node.def @@ -0,0 +1 @@ +help: Set BGP neighbor IPv6 parameters 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 c98c20e9..241363e1 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,17 +1,10 @@ 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-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(../../../../@)" - +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy prefix-list6 ) + echo -n ${params[@]##*/} 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 9ed5c7d9..26664bb8 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,18 +1,11 @@ type: txt - help: Set a prefix-list to filter incoming route updates from this neighbor - +comp_help: possible completions: + <txt> prefix-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/prefix-list6/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-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-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/ipv6-unicast/remove-private-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/remove-private-as/node.def index c25e42d2..9d8f8646 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/remove-private-as/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/remove-private-as/node.def @@ -1,3 +1,2 @@ help: Set to remove private AS numbers from AS path in outbound route updates -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 remove-private-as for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/export/node.def index 0a366a1b..cd6423b1 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/export/node.def @@ -1,9 +1,8 @@ type: txt help: Set a route-map to filter outgoing route updates to this neighbor +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) echo -n ${params[@]##*/} -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 route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) export: route-map $VAR(@) doesn't exist" -comp_help: possible completions: - <txt> route-map name diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/import/node.def index 3e5920c7..02c348e2 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-map/import/node.def @@ -1,9 +1,8 @@ type: txt help: Set a route-map to filter incoming route updates from this neighbor +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) echo -n ${params[@]##*/} -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 route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) import: route-map $VAR(@) doesn't exist" -comp_help: possible completions: - <txt> route-map name diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def index cb87b992..2c99f906 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def @@ -1,4 +1,3 @@ help: Set neighbor as a route reflector client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" commit:expression: $VAR(@) == $VAR(../../../remote-as/@); "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) route-reflector-client: remote-as must equal local-as" commit:expression: $VAR(../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set route-reflector-client for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-server-client/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-server-client/node.def index 2476a080..bc733823 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-server-client/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-server-client/node.def @@ -1,3 +1,2 @@ help: Set neighbor as route server client -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 route-server-client for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def index b8bd724c..e3174775 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def @@ -1,3 +1 @@ help: Set inbound soft reconfiguration for this neighbor [REQUIRED] -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as \ - --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def index 2053b747..aea9c773 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def @@ -3,8 +3,7 @@ help: Set a route-map to selectively unsuppress suppressed routes comp_help: possible completions: <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) echo -n ${params[@]##*/} -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 route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): route-map $VAR(@) doesn't exist" commit:expression: $VAR(../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set unsuppress-map for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/advertisement-interval/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/advertisement-interval/node.def index 0e1b633b..0e6fb907 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/advertisement-interval/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/advertisement-interval/node.def @@ -3,4 +3,3 @@ help: Set the minimum interval for sending routing updates comp_help: possible completions: <0-600> advertisement interval in seconds syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 600; "must be between 0 and 600" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/node.def index 67b47667..b6747e41 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/node.def @@ -1,2 +1 @@ help: Set to accept a route that contains the local-AS in the as-path -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/number/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/number/node.def index 59bbf053..2450edd5 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/number/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/allowas-in/number/node.def @@ -2,4 +2,3 @@ type: u32 help: Set number of occurrences of AS number comp_help: \1 <1-10>\tnumber of times AS is allowed in path syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 10; "allowas-in number must be between 1 and 10" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/node.def index a23f4502..15e7eaf5 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/attribute-unchanged/node.def @@ -1,3 +1,2 @@ help: Set whether BGP attributes are sent unchanged -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 attribute-unchanged for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/dynamic/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/dynamic/node.def index 1ad03793..a03cc588 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/dynamic/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/dynamic/node.def @@ -1,2 +1 @@ help: Set to advertise dynamic capability to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/receive/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/receive/node.def index f228a5c3..4fcc6d3a 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/receive/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/receive/node.def @@ -1,3 +1,2 @@ help: Set capability to receive the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: $VAR(../../../../peer-group/) == ""; "You can't set orf capability receive for neighbor $VAR(../../../../@) in peer-group $VAR(../../../../peer-group/@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def index aff136ca..27247e17 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/capability/orf/prefix-list/send/node.def @@ -1,3 +1,2 @@ help: Set capability to send the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: $VAR(../../../../peer-group/) == ""; "You can't set capability orf send for neighbor $VAR(../../../../@) in peer-group $VAR(../../../../peer-group/@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/node.def index 675adffd..0680df95 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/node.def @@ -1,3 +1,2 @@ help: Set to send default route to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../peer-group/) == ""; "protocold bgp $VAR(../../@) neighbor $VAR(../@): you can't set default-originate for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/route-map/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/route-map/node.def index f2209d3f..09d7a25c 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/route-map/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/default-originate/route-map/node.def @@ -1,7 +1,9 @@ type: txt help: Set the route-map to specify criteria of the default +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$(/opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map) echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" " ; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) default-originate: route-map $VAR(@) doesn't exist" commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set default-originate for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-capability-negotiation/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-capability-negotiation/node.def index f476e35e..04099bd2 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-capability-negotiation/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-capability-negotiation/node.def @@ -1,2 +1 @@ help: Set to not perform capability negotiation with this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-connected-check/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-connected-check/node.def index 98e3fb46..5f4fe431 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-connected-check/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-connected-check/node.def @@ -1,2 +1 @@ help: Disable check to see if EBGP peer's address is a connected route -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/extended/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/extended/node.def index 452e2792..53ed069a 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/extended/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/extended/node.def @@ -1,3 +1,2 @@ help: Set to not send extended community attributes to this neighbor -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 disable-send-community for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/standard/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/standard/node.def index 6591deac..555abb9b 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/standard/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/standard/node.def @@ -1,3 +1,2 @@ help: Set to not send standard community attributes to this neighbor -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 disable-send-community for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/export/node.def index cdce28d4..bd51c71d 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/export/node.def @@ -7,7 +7,6 @@ allowed: local -a params params=( /opt/vyatta/config/active/policy/access-list/* /opt/vyatta/config/active/policy/access-list6/* ) echo -n ${params[@]##*/} -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 access-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) export: access-list $VAR(@) doesn't exist" commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) distribute-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/distribute-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/import/node.def index ad3944ac..9c88fd5e 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/import/node.def @@ -3,7 +3,10 @@ help: Set an access-list to filter incoming route updates from this neighbor comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list; + /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";\ "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) import: access-list $VAR(@) doesn't exist" commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) distribute-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/ebgp-multihop/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/ebgp-multihop/node.def index d35d050e..2cfa6fe6 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/ebgp-multihop/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/ebgp-multihop/node.def @@ -2,5 +2,5 @@ type: u32 help: Allow this EBGP neighbor to not be on a directly connected network comp_help: possible completions: <1-255> number of hops -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" syntax:expression: $VAR(@) >=1 && $VAR(@) <= 255; "ebgp-multihop must be between 1 and 255" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --not-exists \"protocols bgp $VAR(../../@) neighbor $VAR(../@) ttl-security\" "; "protocols bgp $VAR(../../@) neighbor $VAR(../@) ebgp-multihop: you can't set both ebgp-multihop and ttl-security" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/export/node.def index 47b1db77..c482a8a0 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/export/node.def @@ -1,9 +1,8 @@ type: txt help: Set an as-path-list to filter outgoing route updates to this neighbor +comp_help: possible completions: + <txt> as-path-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) echo -n ${params[@]##*/} -comp_help: possible completions: - <txt> as-path-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 as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) filter-list export: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/import/node.def index 23d1a8a9..270cbc83 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/import/node.def @@ -1,9 +1,8 @@ type: txt help: Set an as-path-list to filter incoming route updates from this neighbor -allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) - echo -n ${params[@]##*/} comp_help: possible completions: <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) filter-list import: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.def index a7de0ea8..54826976 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.def @@ -5,4 +5,3 @@ comp_help: possible completions: <1-4294967294> local AS number syntax:expression: $VAR(@) >=1 && $VAR(@) <= 4294967294; "local-as must be between 1 and 4294967294" commit:expression: $VAR(@) != $VAR(../../@); "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set local-as the same as the router AS" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/maximum-prefix/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/maximum-prefix/node.def index 98a1129f..de6ecf41 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/maximum-prefix/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/maximum-prefix/node.def @@ -2,4 +2,3 @@ type: u32 help: Set the maximum number of prefixes to accept from this neighbor comp_help: possible completions: <1-4294967295> prefix limit -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/nexthop-self/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/nexthop-self/node.def index ccbc5471..72a8ea1c 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/nexthop-self/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/nexthop-self/node.def @@ -1,3 +1,2 @@ help: Set nexthop for routes sent to this neighbor to be the local router -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(../@) next-hop-self: you can't set next-hop-self for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/override-capability/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/override-capability/node.def index 5eec1b35..f86c2b4f 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/override-capability/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/override-capability/node.def @@ -1,3 +1,2 @@ help: Set to ignore capability negotiation with specified neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../strict-capability/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@) override-capability: you can't set both strict-capability and override-capability" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/passive/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/passive/node.def index 46e8fc40..d73320bd 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/passive/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/passive/node.def @@ -1,2 +1 @@ help: Set to not try initiating a session with this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/peer-group/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/peer-group/node.def index 1a5570ba..62d51de3 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/peer-group/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/peer-group/node.def @@ -1,3 +1,2 @@ type: txt help: Set a peer group for this peer -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/port/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/port/node.def index 0cb689b5..2f29d67d 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/port/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/port/node.def @@ -3,4 +3,3 @@ help: Set the neighbor's BGP port comp_help: \1 <1-65535>\tport number syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; \ "port must be between 1 and 65535" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" 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 23fea874..be2e5b69 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,17 +1,10 @@ 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/* ) - 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(../../@)" - +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy prefix-list ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \ "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 46aea90e..12e0eb8e 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,18 +1,11 @@ type: txt - help: Set a prefix-list to filter incoming route updates from this neighbor - +comp_help: possible completions: + <txt> prefix-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/prefix-list/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-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" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/remove-private-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/remove-private-as/node.def index c234d2fc..067de3f2 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/remove-private-as/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/remove-private-as/node.def @@ -1,3 +1,2 @@ help: Set to remove private AS numbers from AS path in outbound route updates -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 remove-private-as for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/export/node.def index 59565211..5e99b260 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/export/node.def @@ -1,9 +1,8 @@ type: txt help: Set a route-map to filter outgoing route updates to this neighbor +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) echo -n ${params[@]##*/} -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 route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) export: route-map $VAR(@) doesn't exist" -comp_help: possible completions: - <txt> route-map name diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/import/node.def index 30dcc8ca..ac3bc025 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/import/node.def @@ -1,9 +1,8 @@ type: txt help: Set a route-map to filter incoming route updates from this neighbor +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) echo -n ${params[@]##*/} -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 route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) import: route-map $VAR(@) doesn't exist" -comp_help: possible completions: - <txt> route-map name diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-reflector-client/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-reflector-client/node.def index 2fce607f..954e3938 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-reflector-client/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-reflector-client/node.def @@ -1,4 +1,3 @@ help: Set neighbor as a route reflector client -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 route-reflector-client for a neighbor in a peer-group" commit:expression: $VAR(../../@) == $VAR(../remote-as/@); "protocols bgp $VAR(../../@) neighbor $VAR(../@) route-reflector-client: remote-as must equal local-as" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-server-client/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-server-client/node.def index b1cb9e39..80041d4e 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-server-client/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-server-client/node.def @@ -1,3 +1,2 @@ help: Set neighbor as route server client -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 route-server-client for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/shutdown/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/shutdown/node.def index 21863355..e3d75ed4 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/shutdown/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/shutdown/node.def @@ -1,2 +1 @@ help: Set to administratively shut down neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/inbound/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/inbound/node.def index b52799a6..e3174775 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/inbound/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/inbound/node.def @@ -1,3 +1 @@ help: Set inbound soft reconfiguration for this neighbor [REQUIRED] -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as \ - --as $VAR(../../../@) --neighbor $VAR(../../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/strict-capability-match/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/strict-capability-match/node.def index f2eb3e24..0aa6af83 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/strict-capability-match/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/strict-capability-match/node.def @@ -1,3 +1,2 @@ help: Enable strict capability negotiation -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../override-capability/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@) strict-capability-match: you can't set both strict-capability and override-capability" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/node.def index 6fde9bd3..9e806ecf 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/timers/node.def @@ -1,5 +1,4 @@ help: Set neighbor timers -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" # TODO: fix this. Can set connect &&|| (keepalive && holdtime) commit:expression: $VAR(./keepalive/) != ""; "protocols bgp $VAR(../../@) timers: you must set a keepalive interval" commit:expression: $VAR(./holdtime/) != ""; "protocols bgp $VAR(../../@) timers: you must set a holdtime interval" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/ttl-security/hops/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/ttl-security/hops/node.def index 468ebbb1..c5950865 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/ttl-security/hops/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/ttl-security/hops/node.def @@ -2,5 +2,4 @@ type: u32 help: Set number of the maximum number of hops to the BGP peer comp_help: possible completions: <1-254> number of hops -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" syntax:expression: $VAR(@) >=1 && $VAR(@) <= 254; "ttl-security hops must be between 1 and 254" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/ttl-security/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/ttl-security/node.def new file mode 100644 index 00000000..05be9f5b --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/ttl-security/node.def @@ -0,0 +1,2 @@ +help: Set ttl security mechanism for this BGP peer +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --not-exists \"protocols bgp $VAR(../../@) neighbor $VAR(../@) ebgp-multihop\" "; "protocols bgp $VAR(../../@) neighbor $VAR(../@) ttl-security: you can't set both ebgp-multihop and ttl-security" 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 104a9509..65e37dd5 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 @@ -3,8 +3,7 @@ help: Set a route-map to selectively unsuppress suppressed routes comp_help: possible completions: <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-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" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/update-source/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/update-source/node.def index 63fc633c..ebfe8ee9 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/update-source/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/update-source/node.def @@ -4,4 +4,3 @@ comp_help: <x.x.x.x> Set IP address of route source <interface> Set interface as route source commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-source $VAR(@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/weight/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/weight/node.def index e5da2d21..b758c97d 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/weight/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/weight/node.def @@ -2,4 +2,3 @@ type: u32 help: Set default weight for routes from this neighbor comp_help: \1 <1-65535>\tweight for routes from this neighbor syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "weight must be between 1 and 65535" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/network/node.tag/route-map/node.def b/templates/protocols/bgp/node.tag/network/node.tag/route-map/node.def index 97091ab3..740bf97b 100644 --- a/templates/protocols/bgp/node.tag/network/node.tag/route-map/node.def +++ b/templates/protocols/bgp/node.tag/network/node.tag/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route-map to modify route attributes -comp_help: \1 <text>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../@) network $VAR(../@): route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/parameters/distance/global/external/node.def b/templates/protocols/bgp/node.tag/parameters/distance/global/external/node.def new file mode 100644 index 00000000..49039a49 --- /dev/null +++ b/templates/protocols/bgp/node.tag/parameters/distance/global/external/node.def @@ -0,0 +1,5 @@ +type: u32 +help: Set an administrative distance for external BGP routes +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255" +comp_help: possible completions: + <1-255> Set administrative distance for external BGP routes diff --git a/templates/protocols/bgp/node.tag/parameters/distance/global/internal/node.def b/templates/protocols/bgp/node.tag/parameters/distance/global/internal/node.def new file mode 100644 index 00000000..a7d68e2b --- /dev/null +++ b/templates/protocols/bgp/node.tag/parameters/distance/global/internal/node.def @@ -0,0 +1,5 @@ +type: u32 +help: Set an administrative distance for internal BGP routes +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255" +comp_help: possible completions: + <1-255> Set administrative distance for internal BGP routes diff --git a/templates/protocols/bgp/node.tag/parameters/distance/global/local/node.def b/templates/protocols/bgp/node.tag/parameters/distance/global/local/node.def new file mode 100644 index 00000000..ab98b327 --- /dev/null +++ b/templates/protocols/bgp/node.tag/parameters/distance/global/local/node.def @@ -0,0 +1,5 @@ +type: u32 +help: Set an administrative distance for local BGP routes +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255" +comp_help: possible completions: + <1-255> Set administrative distance for local BGP routes diff --git a/templates/protocols/bgp/node.tag/parameters/distance/global/node.def b/templates/protocols/bgp/node.tag/parameters/distance/global/node.def new file mode 100644 index 00000000..ea7a99ef --- /dev/null +++ b/templates/protocols/bgp/node.tag/parameters/distance/global/node.def @@ -0,0 +1,4 @@ +help: Set global administratives distances for BGP routes +commit:expression: $VAR(./external/) != ""; "protocols bgp $VAR(../../../@) parameters distance global: you must set an external route distance" +commit:expression: $VAR(./internal/) != ""; "protocols bgp $VAR(../../../@) parameters distance global: you must set an internal route distance" +commit:expression: $VAR(./local/) != ""; "protocols bgp $VAR(../../../@) parameters distance global: you must set a local route distance" diff --git a/templates/protocols/bgp/node.tag/parameters/distance/node.def b/templates/protocols/bgp/node.tag/parameters/distance/node.def new file mode 100644 index 00000000..ef0704e2 --- /dev/null +++ b/templates/protocols/bgp/node.tag/parameters/distance/node.def @@ -0,0 +1 @@ +help: Set administratives distances for BGP routes diff --git a/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.def b/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.def new file mode 100644 index 00000000..a8b0823c --- /dev/null +++ b/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.def @@ -0,0 +1,6 @@ +tag: +type: ipv4net +help: Set an administrative distance for a specific BGP prefix +comp_help: \1 <x.x.x.x/x>\tprefix +syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)" +commit:expression: $VAR(./distance/) != ""; "protocols bgp $VAR(../../../@) parameters distance prefix $VAR(@): you must set a route distance for this prefix" diff --git a/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.tag/distance/node.def b/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.tag/distance/node.def new file mode 100644 index 00000000..37f9f625 --- /dev/null +++ b/templates/protocols/bgp/node.tag/parameters/distance/prefix/node.tag/distance/node.def @@ -0,0 +1,5 @@ +type: u32 +help: Set an administrative distance for prefix +syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between 1-255" +comp_help: possible completions: + <1-255> Set administrative distance for external BGP routes diff --git a/templates/protocols/bgp/node.tag/peer-group/node.def b/templates/protocols/bgp/node.tag/peer-group/node.def index c773f6f0..74a0e5eb 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.def @@ -3,9 +3,7 @@ type: txt help: Set a BGP peer-group comp_help: <name> BGP peer-group name - syntax:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl \ --check-peergroup-name $VAR(@)" -commit:expression: $VAR(./remote-as/) != ""; "protocols bgp $VAR(../@) peer-group $VAR(@): you must define a remote-as" delete:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl \ --check-peer-groups --peergroup $VAR(@) --as $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/node.def index 664b70a9..b6747e41 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/node.def @@ -1,2 +1 @@ help: Set to accept a route that contains the local-AS in the as-path -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def index 4ca8b60f..2450edd5 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def @@ -2,4 +2,3 @@ type: u32 help: Set number of occurrences of AS number comp_help: \1 <1-10>\tnumber of times AS is allowed in path syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 10; "allowas-in number must be between 1 and 10" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def index cb660bfc..719c0fd8 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def @@ -1,3 +1 @@ help: Set whether BGP attributes are sent unchanged -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" -commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set attribute-unchanged for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def index c78c812c..653555ed 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def @@ -1,2 +1 @@ -help: Set to advertise dynamic capability to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +help: Set to advertise dynamic capability to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/node.def index f83cac18..2452fc2b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/node.def @@ -1 +1 @@ -help: Set to advertise capabilities to this neighbor +help: Set to advertise capabilities to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/node.def index a0058566..ac420788 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/node.def @@ -1 +1 @@ -help: Set to advertise ORF capability to this neighbor +help: Set to advertise ORF capability to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/node.def index cb911c75..d335cd56 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/node.def @@ -1 +1 @@ -help: Set to advertise prefix-list ORF capability to this neighbor +help: Set to advertise prefix-list ORF capability to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def index a917862e..c3850291 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def @@ -1,2 +1 @@ help: Set capability to receive the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../../../@) --neighbor $VAR(../../../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def index f6dae787..9e059106 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def @@ -1,2 +1 @@ help: Set capability to send the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../../../@) --neighbor $VAR(../../../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/node.def index a696ce4e..3335f496 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/node.def @@ -1,2 +1 @@ -help: Set to send default route to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +help: Set to send default route to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def index 114c2142..5dd8e8dc 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def @@ -1,6 +1,8 @@ type: txt help: Set the route-map to specify criteria of the default +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$(/opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" " ; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) default-originate: route-map $VAR(@) doesn't exist" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" " ; "protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) default-originate: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def index 910e9d8d..bae0ccb6 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def @@ -1,2 +1 @@ -help: Set to not send extended community attributes to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +help: Set to not send extended community attributes to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/node.def index c77a13c4..824d3677 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/node.def @@ -1,2 +1,2 @@ -help: Set to not send community attributes to this neighbor -commit:expression: ($VAR(./extended/) != "") || ($VAR(./standard/) != ""); "protocols bgp $(../../../../@) neighbor $(../../../@): you must specify the type of community" +help: Set to not send community attributes to this peer-group +commit:expression: ($VAR(./extended/) != "") || ($VAR(./standard/) != ""); "protocols bgp $(../../../../@) peer-group $(../../../@): you must specify the type of community" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def index dd5f389b..ee7b46bd 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def @@ -1,2 +1 @@ -help: Set to not send standard community attributes to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +help: Set to not send standard community attributes to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def index 7ab16827..8cd7aeee 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def @@ -1,13 +1,12 @@ type: txt -help: Set an access-list to filter outgoing route updates to this neighbor +help: Set an access-list to filter outgoing route updates to this peer-group comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name allowed: local -a params - params=( /opt/vyatta/config/active/policy/access-list/* - /opt/vyatta/config/active/policy/access-list6/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list; + /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; \ -"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) export: access-list $VAR(@) doesn't exist" -commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) distribute-list export: you can't set both a prefix-list and a distribute list" +"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) export: access-list $VAR(@) doesn't exist" +commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) distribute-list export: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def index a3b6c2b5..ed8084d0 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def @@ -1,9 +1,12 @@ type: txt -help: Set an access-list to filter incoming route updates from this neighbor +help: Set an access-list to filter incoming route updates from this peer-group comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list; + /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";\ -"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) import: access-list $VAR(@) doesn't exist" -commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) distribute-list import: you can't set both a prefix-list and a distribute list" +"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) import: access-list $VAR(@) doesn't exist" +commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) distribute-list import: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/node.def index 4013725c..677b93af 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/node.def @@ -1 +1 @@ -help: Set an access-list to filter route updates to/from this neighbor +help: Set an access-list to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/export/node.def index 75a94dce..f98bb5b9 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/export/node.def @@ -1,9 +1,8 @@ type: txt -help: Set an as-path-list to filter outgoing route updates to this neighbor +help: Set an as-path-list to filter outgoing route updates to this peer-group +comp_help: possible completions: + <txt> as-path-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) echo -n ${params[@]##*/} -comp_help: possible completions: - <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) filter-list export: as-path-list $VAR(@) doesn't exist" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) filter-list export: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/import/node.def index 50f0de8b..f74b3d40 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/import/node.def @@ -1,9 +1,8 @@ type: txt -help: Set an as-path-list to filter incoming route updates from this neighbor -allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) - echo -n ${params[@]##*/} +help: Set an as-path-list to filter incoming route updates from this peer-group comp_help: possible completions: <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) filter-list import: as-path-list $VAR(@) doesn't exist" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) filter-list import: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/node.def index 191c561b..48d9267d 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/node.def @@ -1 +1 @@ -help: Set an as-path-list to filter route updates to/from this neighbor +help: Set an as-path-list to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def index 8859d66c..597e9a3b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def @@ -1,5 +1,4 @@ type: u32 -help: Set the maximum number of prefixes to accept from this neighbor +help: Set the maximum number of prefixes to accept from this peer-group comp_help: possible completions: <1-4294967295> prefix limit -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def index f1790cb4..01f4361a 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def @@ -1,2 +1 @@ help: Leave link-local nexthop unchanged for this peer -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-self/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-self/node.def index 60115cbb..cec29d88 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-self/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-self/node.def @@ -1,2 +1 @@ -help: Set nexthop for routes sent to this neighbor to be the local router -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +help: Set nexthop for routes sent to this peer-group to be the local router diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/node.def new file mode 100644 index 00000000..ac4d3626 --- /dev/null +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/node.def @@ -0,0 +1 @@ +help: Set BGP peer-group IPv6 parameters diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def index 61824722..a379cbc6 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def @@ -1,17 +1,10 @@ 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-list6/*) - echo -n ${params[@]##*/} - +help: Set a prefix-list to filter outgoing route updates to this peer-group comp_help: possible completions: <txt> prefix-list name - -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" - +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy prefix-list6 ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\" "; \ "protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) address-family ipv6-unicast prefix-list export: prefix-list $VAR(@) doesn't exist" - commit:expression: $VAR(../../distribute-list/export/) == ""; "protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) address-family ipv6-unicast prefix-list export: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def index 46e3d06b..9ef4f0db 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def @@ -1,18 +1,11 @@ type: txt - -help: Set a prefix-list to filter incoming route updates from this neighbor - +help: Set a prefix-list to filter incoming route updates from this peer-group +comp_help: possible completions: + <txt> prefix-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/prefix-list6/*) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy prefix-list6 ) echo -n ${params[@]##*/} - -comp_help: possible completions: - <txt> prefix-list name - -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" - commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\" "; \ "protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) address-family ipv6-unicast prefix-list import: prefix-list $VAR(@) doesn't exist" - commit:expression: $VAR(../../distribute-list/import/) == ""; "protocols bgp $VAR(../../../../../@) peer-group $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/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/node.def index 1a6187c9..4d8960c2 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/node.def @@ -1 +1 @@ -help: Set a prefix-list to filter route updates to/from this neighbor +help: Set a prefix-list to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/remove-private-as/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/remove-private-as/node.def index 4126e7b7..c045c88b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/remove-private-as/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/remove-private-as/node.def @@ -1,2 +1 @@ help: Set to remove private AS numbers from AS path in outbound route updates -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/export/node.def index 4dbca6be..6e7a49db 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/export/node.def @@ -1,9 +1,8 @@ type: txt -help: Set a route-map to filter outgoing route updates to this neighbor -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-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) export: route-map $VAR(@) doesn't exist" +help: Set a route-map to filter outgoing route updates to this peer-group comp_help: possible completions: <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) export: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/import/node.def index b0c0278d..0646123f 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/import/node.def @@ -1,9 +1,8 @@ type: txt -help: Set a route-map to filter incoming route updates from this neighbor -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-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) import: route-map $VAR(@) doesn't exist" +help: Set a route-map to filter incoming route updates from this peer-group comp_help: possible completions: <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) import: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/node.def index 7d581eb7..e444dc70 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/node.def @@ -1 +1 @@ -help: Set a route-map to filter route updates to/from this neighbor +help: Set a route-map to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def index 9f95ebd7..e3ecb9dd 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def @@ -1,3 +1,2 @@ -help: Set neighbor as a route reflector client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" -commit:expression: $VAR(../../@) == $VAR(../remote-as/@); "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) route-reflector-client: remote-as must equal local-as" +help: Set peer-group as a route reflector client +commit:expression: $VAR(../../@) == $VAR(../remote-as/@); "protocols bgp $VAR(../../../../@) peer-group $VAR(../../../@) route-reflector-client: remote-as must equal local-as" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-server-client/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-server-client/node.def index d5378742..590ad079 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-server-client/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-server-client/node.def @@ -1,2 +1 @@ -help: Set neighbor as route server client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +help: Set peer-group as route server client diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def index 5ab933c5..f3a5369b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def @@ -1,3 +1 @@ -help: Set inbound soft reconfiguration for this neighbor [REQUIRED] -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as \ - --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +help: Set inbound soft reconfiguration for this peer-group [REQUIRED] diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/node.def index c17d82f9..93440825 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/node.def @@ -1,2 +1,2 @@ -help: Set soft reconfiguration for neighbor -commit:expression: $VAR(./inbound/) != ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) soft-reconfiguration: you must specify the type of soft-reconfiguration" +help: Set soft reconfiguration for peer-group +commit:expression: $VAR(./inbound/) != ""; "protocols bgp $VAR(../../../../@) peer-group $VAR(../../../@) soft-reconfiguration: you must specify the type of soft-reconfiguration" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def index dbdf0c3f..a57c9e07 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def @@ -3,7 +3,6 @@ help: Set a route-map to selectively unsuppress suppressed routes comp_help: possible completions: <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" -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" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../@) peer-group $VAR(../../../@): route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/node.def new file mode 100644 index 00000000..4c25aaf9 --- /dev/null +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/node.def @@ -0,0 +1 @@ +help: Set BGP peer-group address-family parameters diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/node.def index 026dee4e..b6747e41 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/node.def @@ -1,2 +1 @@ help: Set to accept a route that contains the local-AS in the as-path -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/number/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/number/node.def index 4677e1bc..2450edd5 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/number/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/number/node.def @@ -2,4 +2,3 @@ type: u32 help: Set number of occurrences of AS number comp_help: \1 <1-10>\tnumber of times AS is allowed in path syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 10; "allowas-in number must be between 1 and 10" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/attribute-unchanged/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/attribute-unchanged/node.def index 9268c97a..719c0fd8 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/attribute-unchanged/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/attribute-unchanged/node.def @@ -1,3 +1 @@ help: Set whether BGP attributes are sent unchanged -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set attribute-unchanged for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/dynamic/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/dynamic/node.def index 9867ed5f..653555ed 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/dynamic/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/dynamic/node.def @@ -1,2 +1 @@ -help: Set to advertise dynamic capability to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +help: Set to advertise dynamic capability to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/node.def index f83cac18..2452fc2b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/node.def @@ -1 +1 @@ -help: Set to advertise capabilities to this neighbor +help: Set to advertise capabilities to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/node.def index a0058566..ac420788 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/node.def @@ -1 +1 @@ -help: Set to advertise ORF capability to this neighbor +help: Set to advertise ORF capability to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/node.def index cb911c75..d335cd56 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/node.def @@ -1 +1 @@ -help: Set to advertise prefix-list ORF capability to this neighbor +help: Set to advertise prefix-list ORF capability to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/receive/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/receive/node.def index a20df446..c3850291 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/receive/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/receive/node.def @@ -1,3 +1 @@ help: Set capability to receive the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" -commit:expression: $VAR(../../../../peer-group/) == ""; "You can't set orf capability receive for neighbor $VAR(../../../../@) in peer-group $VAR(../../../../peer-group/@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/send/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/send/node.def index 7cc2ff83..9e059106 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/send/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/send/node.def @@ -1,3 +1 @@ help: Set capability to send the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" -commit:expression: $VAR(../../../../peer-group/) == ""; "You can't set capability orf send for neighbor $VAR(../../../../@) in peer-group $VAR(../../../../peer-group/@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/node.def index 65e90e97..3335f496 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/node.def @@ -1,3 +1 @@ -help: Set to send default route to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: $VAR(../peer-group/) == ""; "protocold bgp $VAR(../../@) neighbor $VAR(../@): you can't set default-originate for a neighbor in a peer-group" +help: Set to send default route to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/route-map/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/route-map/node.def index f2209d3f..e1825d4d 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/route-map/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/route-map/node.def @@ -1,7 +1,8 @@ type: txt help: Set the route-map to specify criteria of the default +comp_help: possible completions: + <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$(/opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" " ; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) default-originate: route-map $VAR(@) doesn't exist" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set default-originate 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(../../../@) peer-group $VAR(../../@) default-originate: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/description/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/description/node.def index 9b8fe210..3c817484 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/description/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/description/node.def @@ -1,2 +1,2 @@ type: txt -help: Set a description for this neighbor +help: Set a description for this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-capability-negotiation/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-capability-negotiation/node.def index 9f1b61a1..d237af93 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-capability-negotiation/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-capability-negotiation/node.def @@ -1,2 +1 @@ -help: Set to not perform capability negotiation with this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" +help: Set to not perform capability negotiation with this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-connected-check/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-connected-check/node.def index 649d95ff..5f4fe431 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-connected-check/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-connected-check/node.def @@ -1,2 +1 @@ help: Disable check to see if EBGP peer's address is a connected route -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/extended/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/extended/node.def new file mode 100644 index 00000000..bae0ccb6 --- /dev/null +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/extended/node.def @@ -0,0 +1 @@ +help: Set to not send extended community attributes to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/node.def new file mode 100644 index 00000000..7dbad897 --- /dev/null +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/node.def @@ -0,0 +1,2 @@ +help: Set to not send community attributes to this peer-group +commit:expression: ($VAR(./extended/) != "") || ($VAR(./standard/) != ""); "protocols bgp $(../../@) peer-group $(../@): you must specify the type of community" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/standard/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/standard/node.def new file mode 100644 index 00000000..ee7b46bd --- /dev/null +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/standard/node.def @@ -0,0 +1 @@ +help: Set to not send standard community attributes to this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/export/node.def index c71cfc9a..8aa19846 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/export/node.def @@ -1,14 +1,12 @@ type: txt -help: Set an access-list to filter outgoing route updates to this neighbor +help: Set an access-list to filter outgoing route updates to this peer-group comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name allowed: local -a params - params=( /opt/vyatta/config/active/policy/access-list/* + params=( /opt/vyatta/config/active/policy/access-list/* /opt/vyatta/config/active/policy/access-list6/* ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a distribute-list for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; \ -"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) export: access-list $VAR(@) doesn't exist" -commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) distribute-list export: you can't set both a prefix-list and a distribute list" +"protocols bgp $VAR(../../../@) peer-group $VAR(../../@) export: access-list $VAR(@) doesn't exist" +commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../@) peer-group $VAR(../../@) distribute-list export: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/import/node.def index a8b94680..6b809d4a 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/import/node.def @@ -1,10 +1,12 @@ type: txt -help: Set an access-list to filter incoming route updates from this neighbor +help: Set an access-list to filter incoming route updates from this peer-group comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a distribute-list for a neighbor in a peer-group" +allowed: local -a params + params=( /opt/vyatta/config/active/policy/access-list/* + /opt/vyatta/config/active/policy/access-list6/* ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";\ -"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) import: access-list $VAR(@) doesn't exist" -commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) distribute-list import: you can't set both a prefix-list and a distribute list" +"protocols bgp $VAR(../../../@) peer-group $VAR(../../@) import: access-list $VAR(@) doesn't exist" +commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../@) peer-group $VAR(../../@) distribute-list import: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/node.def index 4013725c..677b93af 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/node.def @@ -1 +1 @@ -help: Set an access-list to filter route updates to/from this neighbor +help: Set an access-list to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/ebgp-multihop/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/ebgp-multihop/node.def index d9189858..f3606389 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/ebgp-multihop/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/ebgp-multihop/node.def @@ -1,6 +1,6 @@ type: u32 -help: Allow this EBGP neighbor to not be on a directly connected network +help: Allow this EBGP peer-group to not be on a directly connected network comp_help: possible completions: <1-255> number of hops -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" syntax:expression: $VAR(@) >=1 && $VAR(@) <= 255; "ebgp-multihop must be between 1 and 255" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --not-exists \"protocols bgp $VAR(../../@) neighbor $VAR(../@) ttl-security\" "; "protocols bgp $VAR(../../@) neighbor $VAR(../@) ebgp-multihop: you can't set both ebgp-multihop and ttl-security" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/export/node.def index 252733c2..7463045d 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/export/node.def @@ -1,10 +1,8 @@ type: txt -help: Set an as-path-list to filter outgoing route updates to this neighbor +help: Set an as-path-list to filter outgoing route updates to this peer-group +comp_help: possible completions: + <txt> as-path-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) echo -n ${params[@]##*/} -comp_help: possible completions: - <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a filter-list for a neighbor in peer-group" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) filter-list export: as-path-list $VAR(@) doesn't exist" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) peer-group $VAR(../../@) filter-list export: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/import/node.def index 27d545f2..940d10c9 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/import/node.def @@ -1,10 +1,8 @@ type: txt -help: Set an as-path-list to filter incoming route updates from this neighbor -allowed: local -a params - params=( /opt/vyatta/config/active/policy/as-path-list/* ) - echo -n ${params[@]##*/} +help: Set an as-path-list to filter incoming route updates from this peer-group comp_help: possible completions: <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a filter-list for a neighbor in peer-group" -commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) filter-list import: as-path-list $VAR(@) doesn't exist" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy as-path-list ) + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) peer-group $VAR(../../@) filter-list import: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/node.def index 191c561b..48d9267d 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/node.def @@ -1 +1 @@ -help: Set an as-path-list to filter route updates to/from this neighbor +help: Set an as-path-list to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/local-as/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/local-as/node.def index d114b437..f0324871 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/local-as/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/local-as/node.def @@ -4,5 +4,4 @@ help: Set the local AS number [REQUIRED] comp_help: possible completions: <1-4294967294> local AS number syntax:expression: $VAR(@) >=1 && $VAR(@) <= 4294967294; "local-as must be between 1 and 4294967294" -commit:expression: $VAR(@) != $VAR(../../@); "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set local-as the same as the router AS" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: $VAR(@) != $VAR(../../@); "protocols bgp $VAR(../../@) peer-group $VAR(../@): you can't set local-as the same as the router AS" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/maximum-prefix/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/maximum-prefix/node.def index 3dbf37c7..597e9a3b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/maximum-prefix/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/maximum-prefix/node.def @@ -1,5 +1,4 @@ type: u32 -help: Set the maximum number of prefixes to accept from this neighbor +help: Set the maximum number of prefixes to accept from this peer-group comp_help: possible completions: <1-4294967295> prefix limit -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/nexthop-self/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/nexthop-self/node.def index b49d0b36..cec29d88 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/nexthop-self/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/nexthop-self/node.def @@ -1,3 +1 @@ -help: Set nexthop for routes sent to this neighbor to be the local router -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@) next-hop-self: you can't set next-hop-self for a neighbor in a peer-group" +help: Set nexthop for routes sent to this peer-group to be the local router diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/override-capability/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/override-capability/node.def index 2abf4417..5229901a 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/override-capability/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/override-capability/node.def @@ -1,3 +1,2 @@ -help: Set to ignore capability negotiation with specified neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: $VAR(../strict-capability/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@) override-capability: you can't set both strict-capability and override-capability" +help: Set to ignore capability negotiation with specified peer-group +commit:expression: $VAR(../strict-capability/) == ""; "protocols bgp $VAR(../../@) peer-group $VAR(../@) override-capability: you can't set both strict-capability and override-capability" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/passive/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/passive/node.def index 773c3679..b14c84a8 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/passive/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/passive/node.def @@ -1,2 +1 @@ -help: Set to not try initiating a session with this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" +help: Set to not try initiating a session with this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/password/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/password/node.def index 242f0590..7aa3b0a1 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/password/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/password/node.def @@ -5,5 +5,4 @@ syntax:expression: exec " \ echo Password must be 80 characters or less;\ exit 1 ; \ fi ; " -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/export/node.def index 02760aa4..7b525a6f 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/export/node.def @@ -1,19 +1,11 @@ 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/* ) - echo -n ${params[@]##*/} - +help: Set a prefix-list to filter outgoing route updates to this peer-group comp_help: possible completions: <txt> prefix-list name - -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" - -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) peer-group $VAR(../../@): you can't set a prefix-list for a neighbor in a peer-group" +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy prefix-list ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../@) peer-group $VAR(../../@) prefix-list export: prefix-list $VAR(@) doesn't exist" - commit:expression: $VAR(../../distribute-list/export/) == ""; "protocols bgp $VAR(../../../@) peer-group $VAR(../../@) prefix-list export: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/import/node.def index a4ad0a7d..4cc48f27 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/import/node.def @@ -1,20 +1,11 @@ type: txt - -help: Set a prefix-list to filter incoming route updates from this neighbor - +help: Set a prefix-list to filter incoming route updates from this peer-group +comp_help: possible completions: + <txt> prefix-list name allowed: local -a params - params=( /opt/vyatta/config/active/policy/prefix-list/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy prefix-list ) echo -n ${params[@]##*/} - -comp_help: possible completions: - <txt> prefix-list name - -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" - -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) peer-group $VAR(../../@): you can't set a prefix-list for a neighbor in a peer-group" - commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../@) peer-group $VAR(../../@) prefix-list import: prefix-list $VAR(@) doesn't exist" - commit:expression: $VAR(../../distribute-list/import/) == ""; "protocols bgp $VAR(../../../@) peer-group $VAR(../../@) prefix-list import: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/node.def index 1a6187c9..4d8960c2 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/node.def @@ -1 +1 @@ -help: Set a prefix-list to filter route updates to/from this neighbor +help: Set a prefix-list to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/remote-as/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/remote-as/node.def index a91de5a7..ea0d414f 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/remote-as/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/remote-as/node.def @@ -1,5 +1,5 @@ type: u32 -help: Set neighbor BGP AS number [REQUIRED] +help: Set peer-group BGP AS number [REQUIRED] comp_help: possible completions: <1-4294967294> AS number syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; \ diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/remove-private-as/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/remove-private-as/node.def index b03cfcf7..c045c88b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/remove-private-as/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/remove-private-as/node.def @@ -1,3 +1 @@ help: Set to remove private AS numbers from AS path in outbound route updates -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../../@): you can't set remove-private-as for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/export/node.def index acf73430..919fd488 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/export/node.def @@ -1,10 +1,8 @@ type: txt -help: Set a route-map to filter outgoing route updates to this neighbor -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-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a route-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(../../@) export: route-map $VAR(@) doesn't exist" +help: Set a route-map to filter outgoing route updates to this peer-group comp_help: possible completions: <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) peer-group $VAR(../../@) export: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/import/node.def index 1240c80d..e9557c5b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/import/node.def @@ -1,10 +1,8 @@ type: txt -help: Set a route-map to filter incoming route updates from this neighbor -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-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a route-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(../../@) import: route-map $VAR(@) doesn't exist" +help: Set a route-map to filter incoming route updates from this peer-group comp_help: possible completions: <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) peer-group $VAR(../../@) import: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/node.def index 7d581eb7..e444dc70 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/node.def @@ -1 +1 @@ -help: Set a route-map to filter route updates to/from this neighbor +help: Set a route-map to filter route updates to/from this peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-reflector-client/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-reflector-client/node.def index 9409fdf5..201b31ff 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-reflector-client/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-reflector-client/node.def @@ -1,4 +1,2 @@ -help: Set neighbor as a route reflector client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set route-reflector-client for a neighbor in a peer-group" -commit:expression: $VAR(../../@) == $VAR(../remote-as/@); "protocols bgp $VAR(../../@) neighbor $VAR(../@) route-reflector-client: remote-as must equal local-as" +help: Set peer-group as a route reflector client +commit:expression: $VAR(../../@) == $VAR(../remote-as/@); "protocols bgp $VAR(../../@) peer-group $VAR(../@) route-reflector-client: remote-as must equal local-as" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-server-client/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-server-client/node.def index 50345ba6..590ad079 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-server-client/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-server-client/node.def @@ -1,3 +1 @@ -help: Set neighbor as route server client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set route-server-client for a neighbor in a peer-group" +help: Set peer-group as route server client diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/shutdown/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/shutdown/node.def index 758a08b5..1594cee8 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/shutdown/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/shutdown/node.def @@ -1,2 +1 @@ -help: Set to administratively shut down neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" +help: Set to administratively shut down peer-group diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/inbound/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/inbound/node.def index dee71305..f3a5369b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/inbound/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/inbound/node.def @@ -1,3 +1 @@ -help: Set inbound soft reconfiguration for this neighbor [REQUIRED] -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as \ - --as $VAR(../../../@) --neighbor $VAR(../../@)" +help: Set inbound soft reconfiguration for this peer-group [REQUIRED] diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/node.def index 4c7f5706..4cf650b5 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/node.def @@ -1,2 +1,2 @@ -help: Set soft reconfiguration for neighbor -commit:expression: $VAR(./inbound/) != ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@) soft-reconfiguration: you must specify the type of soft-reconfiguration" +help: Set soft reconfiguration for peer-group +commit:expression: $VAR(./inbound/) != ""; "protocols bgp $VAR(../../@) peer-group $VAR(../@) soft-reconfiguration: you must specify the type of soft-reconfiguration" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/connect/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/connect/node.def index 3e00ec99..e236028f 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/connect/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/connect/node.def @@ -1,5 +1,5 @@ type: u32 -help: Set the BGP connect timer for this neighbor +help: Set the BGP connect timer for this peer-group comp_help: \1 <1-65535>\tconnect timer in seconds 0\t\tdisable connect timer syntax:expression: $VAR(@) >=0 && $VAR(@) <= 65535; "BGP connect timer must be between 0 and 65535" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/holdtime/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/holdtime/node.def index 3fcce7e2..ec308e9b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/holdtime/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/holdtime/node.def @@ -1,5 +1,5 @@ type: u32 -help: Set the BGP hold timer for this neighbor +help: Set the BGP hold timer for this peer-group comp_help: \1 <1-65535>\thold timer in seconds 0\t\tdisable hold timer syntax:expression: $VAR(@) == 0 || ($VAR(@) >= 4 && $VAR(@) <= 65535); "Holdtime interval must be 0 or between 4 and 65535" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/keepalive/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/keepalive/node.def index cb47e1ce..b812e099 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/keepalive/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/keepalive/node.def @@ -1,4 +1,4 @@ type: u32 -help: Set the BGP keepalive interval for this neighbor +help: Set the BGP keepalive interval for this peer-group comp_help: \1 <1-65535>\tkeepalive interval in seconds syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "Keepalive interval must be between 1 and 65535" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/node.def index 3265a524..8950a4b2 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/node.def @@ -1,5 +1,4 @@ -help: Set neighbor timers -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" +help: Set peer-group timers # TODO: fix this. Can set connect &&|| (keepalive && holdtime) commit:expression: $VAR(./keepalive/) != ""; "protocols bgp $VAR(../../@) timers: you must set a keepalive interval" commit:expression: $VAR(./holdtime/) != ""; "protocols bgp $VAR(../../@) timers: you must set a holdtime interval" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/unsuppress-map/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/unsuppress-map/node.def index 6e7c70a1..07c76466 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/unsuppress-map/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/unsuppress-map/node.def @@ -3,7 +3,6 @@ help: Set a route-map to selectively unsuppress suppressed routes comp_help: possible completions: <txt> route-map name allowed: local -a params - params=( /opt/vyatta/config/active/policy/route-map/* ) + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" -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" +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../@) peer-group $VAR(../@): route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/update-source/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/update-source/node.def index cf7fbd30..ebfe8ee9 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/update-source/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/update-source/node.def @@ -4,4 +4,3 @@ comp_help: <x.x.x.x> Set IP address of route source <interface> Set interface as route source commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-source $VAR(@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/weight/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/weight/node.def index bfcd14aa..61e18254 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/weight/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/weight/node.def @@ -1,5 +1,4 @@ type: u32 -help: Set default weight for routes from this neighbor -comp_help: \1 <1-65535>\tweight for routes from this neighbor +help: Set default weight for routes from this peer-group +comp_help: \1 <1-65535>\tweight for routes from this peer-group syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "weight must be between 1 and 65535" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/redistribute/connected/route-map/node.def b/templates/protocols/bgp/node.tag/redistribute/connected/route-map/node.def index 026de05a..b0da440f 100644 --- a/templates/protocols/bgp/node.tag/redistribute/connected/route-map/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/connected/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) redistribute connected: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/redistribute/kernel/route-map/node.def b/templates/protocols/bgp/node.tag/redistribute/kernel/route-map/node.def index e513130e..ba345828 100644 --- a/templates/protocols/bgp/node.tag/redistribute/kernel/route-map/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/kernel/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) redistribute kernel: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/redistribute/ospf/route-map/node.def b/templates/protocols/bgp/node.tag/redistribute/ospf/route-map/node.def index e2b5c019..82d9992b 100644 --- a/templates/protocols/bgp/node.tag/redistribute/ospf/route-map/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/ospf/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) redistribute ospf: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/redistribute/rip/route-map/node.def b/templates/protocols/bgp/node.tag/redistribute/rip/route-map/node.def index b8461b4c..09dd58af 100644 --- a/templates/protocols/bgp/node.tag/redistribute/rip/route-map/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/rip/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) redistribute rip: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/redistribute/static/route-map/node.def b/templates/protocols/bgp/node.tag/redistribute/static/route-map/node.def index 61352932..c1deb5a3 100644 --- a/templates/protocols/bgp/node.tag/redistribute/static/route-map/node.def +++ b/templates/protocols/bgp/node.tag/redistribute/static/route-map/node.def @@ -1,4 +1,8 @@ type: txt help: Set a route map to filter redistributed routes -comp_help: \1 <txt>\t\troute-map name +comp_help: possible completions: + <txt> route-map name +allowed: local -a params + params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy route-map ) + echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) redistribute static: route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/ospfv3/redistribute/bgp/node.def b/templates/protocols/ospfv3/redistribute/bgp/node.def new file mode 100644 index 00000000..72ea520e --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/bgp/node.def @@ -0,0 +1,13 @@ +help: Set to redistribute bgp routes + +end: vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "no redistribute bgp"; + if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then + if [ -n "$VAR(./route-map/@)" ]; then + COND="route-map $VAR(./route-map/@)"; + fi; + vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "redistribute bgp $COND"; + fi; diff --git a/templates/protocols/ospfv3/redistribute/bgp/route-map/node.def b/templates/protocols/ospfv3/redistribute/bgp/route-map/node.def new file mode 100644 index 00000000..cf70580f --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/bgp/route-map/node.def @@ -0,0 +1,4 @@ +type: txt +help: Set route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" + diff --git a/templates/protocols/ospfv3/redistribute/connected/node.def b/templates/protocols/ospfv3/redistribute/connected/node.def new file mode 100644 index 00000000..ee7cd585 --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/connected/node.def @@ -0,0 +1,13 @@ +help: Set to redistribute connected routes + +end: vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "no redistribute connected"; + if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then + if [ -n "$VAR(./route-map/@)" ]; then + COND="route-map $VAR(./route-map/@)"; + fi; + vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "redistribute connected $COND"; + fi; diff --git a/templates/protocols/ospfv3/redistribute/connected/route-map/node.def b/templates/protocols/ospfv3/redistribute/connected/route-map/node.def new file mode 100644 index 00000000..3f570311 --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/connected/route-map/node.def @@ -0,0 +1,3 @@ +type: txt +help: Set route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/ospfv3/redistribute/kernel/node.def b/templates/protocols/ospfv3/redistribute/kernel/node.def new file mode 100644 index 00000000..f61cb564 --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/kernel/node.def @@ -0,0 +1,13 @@ +help: Set to redistribute kernel routes + +end: vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "no redistribute kernel"; + if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then + if [ -n "$VAR(./route-map/@)" ]; then + COND="route-map $VAR(./route-map/@)"; + fi; + vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "redistribute kernel $COND"; + fi; diff --git a/templates/protocols/ospfv3/redistribute/kernel/route-map/node.def b/templates/protocols/ospfv3/redistribute/kernel/route-map/node.def new file mode 100644 index 00000000..3f570311 --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/kernel/route-map/node.def @@ -0,0 +1,3 @@ +type: txt +help: Set route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/ospfv3/redistribute/node.def b/templates/protocols/ospfv3/redistribute/node.def index c33bd557..0f60ac58 100644 --- a/templates/protocols/ospfv3/redistribute/node.def +++ b/templates/protocols/ospfv3/redistribute/node.def @@ -1,10 +1 @@ -multi: -type: txt -help: Set route type to redistribute -allowed: echo "static kernel connected ripng bgp" -create:expression: "vtysh -c \"configure terminal\" \ - -c \"router ospf6 \" \ - -c \"redistribute $VAR(@) \"; " -delete:expression: "vtysh -c \"configure terminal\" \ - -c \"router ospf6 \" \ - -c \"no redistribute $VAR(@) \"; " +help: Set to redistribute information from another routing protocol diff --git a/templates/protocols/ospfv3/redistribute/ripng/node.def b/templates/protocols/ospfv3/redistribute/ripng/node.def new file mode 100644 index 00000000..6732c9da --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/ripng/node.def @@ -0,0 +1,13 @@ +help: Set to redistribute RIPNG routes + +end: vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "no redistribute ripng"; + if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then + if [ -n "$VAR(./route-map/@)" ]; then + COND="route-map $VAR(./route-map/@)"; + fi; + vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "redistribute ripng $COND"; + fi; diff --git a/templates/protocols/ospfv3/redistribute/ripng/route-map/node.def b/templates/protocols/ospfv3/redistribute/ripng/route-map/node.def new file mode 100644 index 00000000..3f570311 --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/ripng/route-map/node.def @@ -0,0 +1,3 @@ +type: txt +help: Set route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/ospfv3/redistribute/static/node.def b/templates/protocols/ospfv3/redistribute/static/node.def new file mode 100644 index 00000000..df31b1b1 --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/static/node.def @@ -0,0 +1,13 @@ +help: Set to redistribute static routes + +end: vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "no redistribute static"; + if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then + if [ -n "$VAR(./route-map/@)" ]; then + COND="route-map $VAR(./route-map/@)"; + fi; + vtysh -c "configure terminal" \ + -c "router ospf6" \ + -c "redistribute static $COND"; + fi; diff --git a/templates/protocols/ospfv3/redistribute/static/route-map/node.def b/templates/protocols/ospfv3/redistribute/static/route-map/node.def new file mode 100644 index 00000000..3f570311 --- /dev/null +++ b/templates/protocols/ospfv3/redistribute/static/route-map/node.def @@ -0,0 +1,3 @@ +type: txt +help: Set route map reference +commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"route-map $VAR(@) doesn't exist" |