summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/disable-capability-negotiation/node.def13
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/extended/node.def14
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/node.def2
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/standard/node.def13
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/disable/node.def12
5 files changed, 54 insertions, 0 deletions
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 \" "