From 8f25989caeeb6b916363091756a626e05d4edbc5 Mon Sep 17 00:00:00 2001 From: Robert Bays Date: Fri, 14 Dec 2007 15:47:42 -0800 Subject: change bgp node names --- .../node.tag/disable-capability-negotiation/node.def | 13 +++++++++++++ .../node.tag/disable-send-community/extended/node.def | 14 ++++++++++++++ .../neighbor/node.tag/disable-send-community/node.def | 2 ++ .../node.tag/disable-send-community/standard/node.def | 13 +++++++++++++ .../bgp/node.tag/neighbor/node.tag/disable/node.def | 12 ++++++++++++ 5 files changed, 54 insertions(+) create mode 100644 templates/protocols/bgp/node.tag/neighbor/node.tag/disable-capability-negotiation/node.def create mode 100644 templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/extended/node.def create mode 100644 templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/node.def create mode 100644 templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/standard/node.def create mode 100644 templates/protocols/bgp/node.tag/neighbor/node.tag/disable/node.def (limited to 'templates') 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 new file mode 100644 index 00000000..6dc7c734 --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-capability-negotiation/node.def @@ -0,0 +1,13 @@ +help: "Do not perform capability negotiation" +commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" +update: "if [ -n \"$(../remote-as/@)\" ]; then \ + peer=\"remote-as $(../remote-as/@)\"; \ + else \ + peer=\"peer-group $(../peer-group/@)\"; \ + fi; \ + /usr/bin/vtysh -c \"configure terminal\" -c \"router bgp $(../../@)\" \ + -c \"neighbor $(../@) \\$peer\" \ + -c \"neighbor $(../@) dont-capability-negotiate \" " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router bgp $(../../@)\" \ + -c \"no neighbor $(../@) dont-capability-negotiate \" " + 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 new file mode 100644 index 00000000..98c1b64a --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/extended/node.def @@ -0,0 +1,14 @@ +help: "Do not send extended community attributes" +commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../@) --neighbor $(../../@)" +commit: $(../../peer-group/) == ""; "You can't set no-send-community for neighbor $(../../@) in peer-group $(../../peer-group/@)" +update: "if [ -n \"$(../../remote-as/@)\" ]; then \ + peer=\"remote-as $(../../remote-as/@)\"; \ + else \ + peer=\"peer-group $(../../peer-group/@)\"; \ + fi; \ + /usr/bin/vtysh -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ + -c \"neighbor $(../../@) \\$peer\" \ + -c \"no neighbor $(../../@) send-community extended\" " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ + -c \"neighbor $(../../@) send-community extended\" " + diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/node.def new file mode 100644 index 00000000..6251cb84 --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/node.def @@ -0,0 +1,2 @@ +help: "Do not send community attributes to this neighbor" +commit: ($(./extended/) != "") || ($(./standard/) != ""); "You must specify the type of community." 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 new file mode 100644 index 00000000..60787ebb --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/standard/node.def @@ -0,0 +1,13 @@ +help: "Do not send standard community attributes" +commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../../@) --neighbor $(../../@)" +update: "if [ -n \"$(../../remote-as/@)\" ]; then \ + peer=\"remote-as $(../../remote-as/@)\"; \ + else \ + peer=\"peer-group $(../../peer-group/@)\"; \ + fi; \ + /usr/bin/vtysh -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ + -c \"neighbor $(../../@) \\$peer\" \ + -c \"no neighbor $(../../@) send-community standard\" " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router bgp $(../../../@)\" \ + -c \"neighbor $(../../@) send-community standard\" " + diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable/node.def new file mode 100644 index 00000000..6f203b5a --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable/node.def @@ -0,0 +1,12 @@ +help: "Disable the Address Family for this Neighbor" +commit: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $(../../@) --neighbor $(../@)" +update: "if [ -n \"$(../remote-as/@)\" ]; then \ + peer=\"remote-as $(../remote-as/@)\"; \ + else \ + peer=\"peer-group $(../peer-group/@)\"; \ + fi; \ + /usr/bin/vtysh -c \"configure terminal\" -c \"router bgp $(../../@)\" \ + -c \"neighbor $(../@) \\$peer\" \ + -c \"no neighbor $(../@) activate \" " +delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router bgp $(../../@)\" \ + -c \"neighbor $(../@) activate \" " -- cgit v1.2.3