From 67ab58c6668dce8af9b98eb96bfe1b714409e08f Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 2 Jun 2009 19:34:32 -0700 Subject: Use create to get remote-as to go first need remote-as to be highest priority sibling Bug 4486 (cherry picked from commit cf0f8def872cf356f10e14c5ac0956022eab9d0b) --- .../bgp/node.tag/neighbor/node.tag/remote-as/node.def | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def index 3813e3c8..10804af4 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def @@ -6,6 +6,19 @@ comp_help: syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967294; \ "remote-as must be between 1 and 4294967294" +# Create action so this leaf is done before others +create: vyatta-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../@)" \ + -c "neighbor $VAR(../@) remote-as $VAR(@)"; + if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../@) + then + vyatta-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../@)" \ + -c "no neighbor $VAR(../@) activate" \ + -c "address-family ipv6" \ + -c "neighbor $VAR(../@) activate"; + fi + update: vyatta-vtysh -c "configure terminal" \ -c "router bgp $VAR(../../@)" \ -c "neighbor $VAR(../@) remote-as $VAR(@)"; -- cgit v1.2.3