summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-02-11 14:54:15 +0100
committerChristian Poessinger <christian@poessinger.com>2021-02-11 14:54:43 +0100
commit1cabdbedffec3dcd9fd8287b0a7c60d57ccdbe03 (patch)
tree33f5910dcfa995f20d63c664c165a59fe1d7bee0
parentd88eb0f5e4231007680050f6fa4f75b755793172 (diff)
downloadvyatta-cfg-quagga-1cabdbedffec3dcd9fd8287b0a7c60d57ccdbe03.tar.gz
vyatta-cfg-quagga-1cabdbedffec3dcd9fd8287b0a7c60d57ccdbe03.zip
T3281: migrate ripng to vyos-1x
-rw-r--r--Makefile.am2
-rw-r--r--debian/vyatta-cfg-quagga.install1
-rwxr-xr-xscripts/vyatta-update-static-route.pl30
-rw-r--r--scripts/vyos-update-rpki-cache.py89
-rw-r--r--templates/protocols/ripng/aggregate-address/node.def13
-rw-r--r--templates/protocols/ripng/default-information/node.def1
-rw-r--r--templates/protocols/ripng/default-information/originate/node.def9
-rw-r--r--templates/protocols/ripng/default-metric/node.def13
-rw-r--r--templates/protocols/ripng/distribute-list/access-list/in/node.def12
-rw-r--r--templates/protocols/ripng/distribute-list/access-list/node.def1
-rw-r--r--templates/protocols/ripng/distribute-list/access-list/out/node.def12
-rw-r--r--templates/protocols/ripng/distribute-list/interface/node.def9
-rw-r--r--templates/protocols/ripng/distribute-list/interface/node.tag/access-list/in/node.def12
-rw-r--r--templates/protocols/ripng/distribute-list/interface/node.tag/access-list/node.def1
-rw-r--r--templates/protocols/ripng/distribute-list/interface/node.tag/access-list/out/node.def12
-rw-r--r--templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/in/node.def12
-rw-r--r--templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/node.def1
-rw-r--r--templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/out/node.def12
-rw-r--r--templates/protocols/ripng/distribute-list/node.def2
-rw-r--r--templates/protocols/ripng/distribute-list/prefix-list/in/node.def12
-rw-r--r--templates/protocols/ripng/distribute-list/prefix-list/node.def1
-rw-r--r--templates/protocols/ripng/distribute-list/prefix-list/out/node.def12
-rw-r--r--templates/protocols/ripng/interface/node.def15
-rw-r--r--templates/protocols/ripng/network/node.def13
-rw-r--r--templates/protocols/ripng/node.def11
-rw-r--r--templates/protocols/ripng/passive-interface/node.def28
-rw-r--r--templates/protocols/ripng/redistribute/bgp/metric/node.def6
-rw-r--r--templates/protocols/ripng/redistribute/bgp/node.def20
-rw-r--r--templates/protocols/ripng/redistribute/bgp/route-map/node.def4
-rw-r--r--templates/protocols/ripng/redistribute/connected/metric/node.def5
-rw-r--r--templates/protocols/ripng/redistribute/connected/node.def20
-rw-r--r--templates/protocols/ripng/redistribute/connected/route-map/node.def3
-rw-r--r--templates/protocols/ripng/redistribute/kernel/metric/node.def5
-rw-r--r--templates/protocols/ripng/redistribute/kernel/node.def20
-rw-r--r--templates/protocols/ripng/redistribute/kernel/route-map/node.def3
-rw-r--r--templates/protocols/ripng/redistribute/node.def1
-rw-r--r--templates/protocols/ripng/redistribute/ospfv3/metric/node.def6
-rw-r--r--templates/protocols/ripng/redistribute/ospfv3/node.def21
-rw-r--r--templates/protocols/ripng/redistribute/ospfv3/route-map/node.def3
-rw-r--r--templates/protocols/ripng/redistribute/static/metric/node.def5
-rw-r--r--templates/protocols/ripng/redistribute/static/node.def20
-rw-r--r--templates/protocols/ripng/redistribute/static/route-map/node.def3
-rw-r--r--templates/protocols/ripng/route-map/node.def8
-rw-r--r--templates/protocols/ripng/route/node.def14
-rw-r--r--templates/protocols/ripng/timers/garbage-collection/node.def7
-rw-r--r--templates/protocols/ripng/timers/node.def16
-rw-r--r--templates/protocols/ripng/timers/timeout/node.def7
-rw-r--r--templates/protocols/ripng/timers/update/node.def7
48 files changed, 0 insertions, 540 deletions
diff --git a/Makefile.am b/Makefile.am
index de7bbb57..f14191ba 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,8 +11,6 @@ sbin_SCRIPTS += scripts/vyatta-policy-action-verify.pl
sbin_SCRIPTS += scripts/vyatta-gateway-static_route-check.pl
sbin_SCRIPTS += scripts/vyatta-link-detect
sbin_SCRIPTS += scripts/vyatta-next-hop-check
-sbin_SCRIPTS += scripts/vyatta-update-static-route.pl
-sbin_SCRIPTS += scripts/vyos-update-rpki-cache.py
bin_sudo_users_SCRIPTS = scripts/vyatta-static-dhcp.pl
diff --git a/debian/vyatta-cfg-quagga.install b/debian/vyatta-cfg-quagga.install
index a68a7227..beaa4132 100644
--- a/debian/vyatta-cfg-quagga.install
+++ b/debian/vyatta-cfg-quagga.install
@@ -2,7 +2,6 @@ opt/vyatta/sbin
opt/vyatta/bin
opt/vyatta/share/perl5
opt/vyatta/share/vyatta-cfg/templates/policy
-opt/vyatta/share/vyatta-cfg/templates/protocols
opt/vyatta/share/vyatta-cfg/templates/interfaces/bonding
opt/vyatta/share/vyatta-cfg/templates/interfaces/bridge
opt/vyatta/share/vyatta-cfg/templates/interfaces/ethernet
diff --git a/scripts/vyatta-update-static-route.pl b/scripts/vyatta-update-static-route.pl
deleted file mode 100755
index c1c35bf8..00000000
--- a/scripts/vyatta-update-static-route.pl
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/perl
-
-use Getopt::Long;
-use strict;
-use lib "/opt/vyatta/share/perl5";
-use Vyatta::Config;
-
-my ($iface, $route, $table, $option);
-GetOptions("interface=s" => \$iface,
- "route=s" => \$route,
- "table=s" => \$table,
- "option=s" => \$option
- );
-my $hash = `echo $iface $route $table | md5sum | cut -c1-10`;
-chomp $hash;
-my $FILE_DHCP_HOOK = "/etc/dhcp/dhclient-exit-hooks.d/static-route-$hash";
-my $dhcp_hook = '';
-if ($option eq 'create') {
- $dhcp_hook =<<EOS;
-#!/bin/sh
-/opt/vyatta/bin/sudo-users/vyatta-static-dhcp.pl --interface=\"\$interface\" --dhcp=\"$iface\" --route=\"$route\" --table=\"$table\" --new_ip=\"\$new_ip_address\" --old_ip=\"\$old_ip_address\" --new_routers=\"\$new_routers\" --old_routers=\"\$old_routers\" --reason=\"\$reason\"
-EOS
-}
-
-open my $dhcp_hook_file, '>', $FILE_DHCP_HOOK
- or die "cannot open $FILE_DHCP_HOOK";
-print ${dhcp_hook_file} $dhcp_hook;
-close $dhcp_hook_file;
-exit 0;
-
diff --git a/scripts/vyos-update-rpki-cache.py b/scripts/vyos-update-rpki-cache.py
deleted file mode 100644
index f290d119..00000000
--- a/scripts/vyos-update-rpki-cache.py
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/env python3
-
-import sys
-import subprocess
-
-import vyos.config
-
-
-base_path = "protocols rpki "
-
-def create_cache(c, cache):
- new_port = c.return_value(base_path + "cache {0} port".format(cache))
- new_addr = c.return_value(base_path + "cache {0} address".format(cache))
- new_pref = c.return_value(base_path + "cache {0} preference".format(cache))
-
- ssh = False
- if c.exists(base_path + "cache {0} ssh".format(cache)):
- ssh = True
- new_user = c.return_value(base_path + "cache {0} ssh username".format(cache))
- new_pubkey = c.return_value(base_path + "cache {0} ssh public-key-file".format(cache))
- new_privkey = c.return_value(base_path + "cache {0} ssh private-key-file".format(cache))
- new_known_hosts = c.return_value(base_path + "cache {0} ssh known-hosts-file".format(cache))
-
- if (not new_user) or (not new_pubkey) or (not new_privkey) or (not new_known_hosts):
- print("If SSH is used for RPKI cache, username, public/private keys, and known hosts file must be defined")
- sys.exit(1)
-
- if (not new_addr) or (not new_port):
- print("Address and port must be defined for RPKI cache servers")
- sys.exit(1)
-
- if not new_pref:
- new_pref = 1
-
- if ssh:
- subprocess.call(""" vtysh -c 'conf t' -c 'rpki' -c 'rpki cache {0} {1} {2} {3} {4} {5} preference {6}' """.format(new_addr, new_port, new_user, new_privkey, new_pubkey, new_known_hosts, new_pref), shell=True)
- else:
- subprocess.call(""" vtysh -c 'conf t' -c 'rpki' -c 'rpki cache {0} {1} preference {2}' """.format(new_addr, new_port, new_pref), shell=True)
-
-def delete_cache(c, cache):
- ssh = False
- port = c.return_effective_value(base_path + "cache {0} port".format(cache))
- addr = c.return_effective_value(base_path + "cache {0} address".format(cache))
- pref = c.return_effective_value(base_path + "cache {0} preference".format(cache))
-
- if not pref:
- pref = 1
-
- if c.exists_effective(base_path + "cache {0} ssh".format(cache)):
- ssh = True
- user = c.return_effective_value(base_path + "cache {0} ssh username".format(cache))
- pubkey = c.return_effective_value(base_path + "cache {0} ssh public-key-file".format(cache))
- privkey = c.return_effective_value(base_path + "cache {0} ssh private-key-file".format(cache))
- known_hosts = c.return_effective_value(base_path + "cache {0} ssh known-hosts-file".format(cache))
-
- if ssh:
- subprocess.call(""" vtysh -c 'conf t' -c 'rpki' -c 'no rpki cache {0} {1} {2} {3} {4} {5} preference {6}' """.format(addr, port, user, privkey, pubkey, known_hosts, pref), shell=True)
-
- else:
- subprocess.call(""" vtysh -c 'conf t' -c 'rpki' -c 'no rpki cache {0} {1} preference {2}' """.format(addr, port, pref), shell=True)
-
-
-config = vyos.config.Config()
-
-caches = config.list_nodes(base_path + "cache")
-orig_caches = config.list_effective_nodes(base_path + "cache")
-
-# RPKI caches can only be manipulated when RPKI is stopped
-print("Stopping RPKI")
-subprocess.call(""" vtysh -c 'rpki stop' """, shell=True)
-
-if not caches:
- for cache in orig_caches:
- delete_cache(config, cache)
-else:
- for cache in caches:
- if cache in orig_caches:
- delete_cache(config, cache)
- create_cache(config, cache)
-
- for cache in orig_caches:
- if not cache in caches:
- # No longer exists
- delete_cache(config, cache)
-
-if caches:
- print("Starting RPKI")
- subprocess.call(""" vtysh -c 'rpki start' """, shell=True)
-
diff --git a/templates/protocols/ripng/aggregate-address/node.def b/templates/protocols/ripng/aggregate-address/node.def
deleted file mode 100644
index 811ed064..00000000
--- a/templates/protocols/ripng/aggregate-address/node.def
+++ /dev/null
@@ -1,13 +0,0 @@
-multi:
-type: ipv6net
-help: Aggregate RIPng route announcement
-
-syntax:expression: exec "ipaddrcheck --verbose --is-ipv6-net $VAR(@)"
-
-create: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "aggregate-address $VAR(@)"
-
-delete: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no aggregate-address $VAR(@)"
diff --git a/templates/protocols/ripng/default-information/node.def b/templates/protocols/ripng/default-information/node.def
deleted file mode 100644
index 7d35a646..00000000
--- a/templates/protocols/ripng/default-information/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Control distribution of default route
diff --git a/templates/protocols/ripng/default-information/originate/node.def b/templates/protocols/ripng/default-information/originate/node.def
deleted file mode 100644
index bad74c43..00000000
--- a/templates/protocols/ripng/default-information/originate/node.def
+++ /dev/null
@@ -1,9 +0,0 @@
-help: Distribute a default route
-
-create: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "default-information originate"
-
-delete: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no default-information originate"
diff --git a/templates/protocols/ripng/default-metric/node.def b/templates/protocols/ripng/default-metric/node.def
deleted file mode 100644
index dcbb7723..00000000
--- a/templates/protocols/ripng/default-metric/node.def
+++ /dev/null
@@ -1,13 +0,0 @@
-type: u32
-help: Metric of redistributed routes
-syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 16; "Must be between 1-16"
-val_help: u32:1-16; Default metric
-
-update: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "default-metric $VAR(@)"
-
-delete: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no default-metric $VAR(@)"
-
diff --git a/templates/protocols/ripng/distribute-list/access-list/in/node.def b/templates/protocols/ripng/distribute-list/access-list/in/node.def
deleted file mode 100644
index 5c890df9..00000000
--- a/templates/protocols/ripng/distribute-list/access-list/in/node.def
+++ /dev/null
@@ -1,12 +0,0 @@
-type: u32
-help: Access list to apply to input packets
-
-commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list6 $VAR(@)\" ";"access-list6 $VAR(@) doesn't exist"
-
-update: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "ipv6 distribute-list $VAR(@) in"
-
-delete: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no ipv6 distribute-list $VAR(@) in"
diff --git a/templates/protocols/ripng/distribute-list/access-list/node.def b/templates/protocols/ripng/distribute-list/access-list/node.def
deleted file mode 100644
index 0cb37cd4..00000000
--- a/templates/protocols/ripng/distribute-list/access-list/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Access list
diff --git a/templates/protocols/ripng/distribute-list/access-list/out/node.def b/templates/protocols/ripng/distribute-list/access-list/out/node.def
deleted file mode 100644
index 13f9edd2..00000000
--- a/templates/protocols/ripng/distribute-list/access-list/out/node.def
+++ /dev/null
@@ -1,12 +0,0 @@
-type: u32
-help: Access list to apply to output packets
-
-commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list6 $VAR(@)\" ";"access-list6 $VAR(@) doesn't exist"
-
-update: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "ipv6 distribute-list $VAR(@) out"
-
-delete: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no ipv6 distribute-list $VAR(@) out"
diff --git a/templates/protocols/ripng/distribute-list/interface/node.def b/templates/protocols/ripng/distribute-list/interface/node.def
deleted file mode 100644
index b5e5bc16..00000000
--- a/templates/protocols/ripng/distribute-list/interface/node.def
+++ /dev/null
@@ -1,9 +0,0 @@
-tag:
-type: txt
-help: Apply filtering to an interface
-allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
-syntax:expression: exec "\
- if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \
- echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \
- exit 1 ; \
- fi ; "
diff --git a/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/in/node.def b/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/in/node.def
deleted file mode 100644
index 098b0084..00000000
--- a/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/in/node.def
+++ /dev/null
@@ -1,12 +0,0 @@
-type: u32
-help: Access list to apply to input packets
-
-commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list6 $VAR(@)\" ";"access-list6 $VAR(@) doesn't exist"
-
-update: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "ipv6 distribute-list $VAR(@) in $VAR(../../@)"
-
-delete: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no ipv6 distribute-list $VAR(@) in $VAR(../../@)"
diff --git a/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/node.def b/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/node.def
deleted file mode 100644
index 0cb37cd4..00000000
--- a/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Access list
diff --git a/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/out/node.def b/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/out/node.def
deleted file mode 100644
index a4b59bd3..00000000
--- a/templates/protocols/ripng/distribute-list/interface/node.tag/access-list/out/node.def
+++ /dev/null
@@ -1,12 +0,0 @@
-type: u32
-help: Access list to apply to output packets
-
-commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list6 $VAR(@)\" ";"access-list6 $VAR(@) doesn't exist"
-
-update: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "ipv6 distribute-list $VAR(@) out $VAR(../../@)"
-
-delete: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no ipv6 distribute-list $VAR(@) out $VAR(../../@)"
diff --git a/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/in/node.def b/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/in/node.def
deleted file mode 100644
index 473ee68d..00000000
--- a/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/in/node.def
+++ /dev/null
@@ -1,12 +0,0 @@
-type: txt
-help: Prefix-list to apply to input packets
-
-commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\" ";"prefix-list6 $VAR(@) doesn't exist"
-
-update: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "ipv6 distribute-list prefix $VAR(@) in $VAR(../../@)"
-
-delete: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no ipv6 distribute-list prefix $VAR(@) in $VAR(../../@)"
diff --git a/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/node.def b/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/node.def
deleted file mode 100644
index 2aa289c3..00000000
--- a/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Prefix-list
diff --git a/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/out/node.def b/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/out/node.def
deleted file mode 100644
index 033c0931..00000000
--- a/templates/protocols/ripng/distribute-list/interface/node.tag/prefix-list/out/node.def
+++ /dev/null
@@ -1,12 +0,0 @@
-type: txt
-help: Prefix-list to apply to output packets
-
-commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\" ";"prefix-list6 $VAR(@) doesn't exist"
-
-update: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "ipv6 distribute-list prefix $VAR(@) out $VAR(../../@)"
-
-delete: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no ipv6 distribute-list prefix $VAR(@) out $VAR(../../@)"
diff --git a/templates/protocols/ripng/distribute-list/node.def b/templates/protocols/ripng/distribute-list/node.def
deleted file mode 100644
index 34c3cd35..00000000
--- a/templates/protocols/ripng/distribute-list/node.def
+++ /dev/null
@@ -1,2 +0,0 @@
-help: Filter networks in routing updates
-
diff --git a/templates/protocols/ripng/distribute-list/prefix-list/in/node.def b/templates/protocols/ripng/distribute-list/prefix-list/in/node.def
deleted file mode 100644
index c33ed1c8..00000000
--- a/templates/protocols/ripng/distribute-list/prefix-list/in/node.def
+++ /dev/null
@@ -1,12 +0,0 @@
-type: txt
-help: Prefix-list to apply to input packets
-
-commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\" ";"prefix-list6 $VAR(@) doesn't exist"
-
-update: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "ipv6 distribute-list prefix $VAR(@) in"
-
-delete: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no ipv6 distribute-list prefix $VAR(@) in"
diff --git a/templates/protocols/ripng/distribute-list/prefix-list/node.def b/templates/protocols/ripng/distribute-list/prefix-list/node.def
deleted file mode 100644
index 2aa289c3..00000000
--- a/templates/protocols/ripng/distribute-list/prefix-list/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Prefix-list
diff --git a/templates/protocols/ripng/distribute-list/prefix-list/out/node.def b/templates/protocols/ripng/distribute-list/prefix-list/out/node.def
deleted file mode 100644
index c6f247b2..00000000
--- a/templates/protocols/ripng/distribute-list/prefix-list/out/node.def
+++ /dev/null
@@ -1,12 +0,0 @@
-type: txt
-help: Prefix-list to apply to output packets
-
-commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list6 $VAR(@)\" ";"prefix-list6 $VAR(@) doesn't exist"
-
-update: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "ipv6 distribute-list prefix $VAR(@) out"
-
-delete: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no ipv6 distribute-list prefix $VAR(@) out"
diff --git a/templates/protocols/ripng/interface/node.def b/templates/protocols/ripng/interface/node.def
deleted file mode 100644
index 0aee4971..00000000
--- a/templates/protocols/ripng/interface/node.def
+++ /dev/null
@@ -1,15 +0,0 @@
-multi:
-type: txt
-help: Interface name
-allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
-commit:expression: exec " \
- if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \
- echo interface $VAR(@) doesn\\'t exist on this system ; \
- exit 1 ; \
- fi ; "
-
-create: vtysh -c "configure terminal" -c "router ripng" \
- -c "network $VAR(@)"
-
-delete: vtysh -c "configure terminal" -c "router ripng" \
- -c "no network $VAR(@)"
diff --git a/templates/protocols/ripng/network/node.def b/templates/protocols/ripng/network/node.def
deleted file mode 100644
index 058bcaec..00000000
--- a/templates/protocols/ripng/network/node.def
+++ /dev/null
@@ -1,13 +0,0 @@
-multi:
-type: ipv6net
-help: RIPng network
-
-syntax:expression: exec "ipaddrcheck --verbose --is-ipv6-net $VAR(@)"
-
-create: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "network $VAR(@)"
-
-delete: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no network $VAR(@)"
diff --git a/templates/protocols/ripng/node.def b/templates/protocols/ripng/node.def
deleted file mode 100644
index 6f12edce..00000000
--- a/templates/protocols/ripng/node.def
+++ /dev/null
@@ -1,11 +0,0 @@
-priority: 660
-help: Routing Information Protocol (RIPng) parameters
-create: vtysh -c "configure terminal" -c "router ripng"
-delete: vtysh -c "configure terminal" -c "no router ripng"
-end:
- if [ "$COMMIT_ACTION" != "DELETE" ]; then
- vtysh -d ripngd -c 'sh run' > /opt/vyatta/etc/quagga/ripngd.conf
- else
- rm -f /opt/vyatta/etc/quagga/ripngd.conf
- fi
-
diff --git a/templates/protocols/ripng/passive-interface/node.def b/templates/protocols/ripng/passive-interface/node.def
deleted file mode 100644
index 0dd5ffc2..00000000
--- a/templates/protocols/ripng/passive-interface/node.def
+++ /dev/null
@@ -1,28 +0,0 @@
-multi:
-type: txt
-help: Suppress routing updates on an interface
-allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all
-syntax:expression: exec " \
- if [ -z \"`ip addr | grep $VAR(@) `\" ] && [ x$VAR(@) != xdefault ]; then \
- echo ethernet interface $VAR(@) doesn\\'t exist on this system ; \
- exit 1; \
- fi ; "
-
-create: if [ x$VAR(x) == xdefault ]; then
- vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "passive-interface default";
- else
- vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "passive-interface $VAR(@)";
- fi;
-delete: if [ x$VAR(x) == xdefault ]; then
- vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no passive-interface default"
- else
- vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no passive-interface $VAR(@)";
- fi;
diff --git a/templates/protocols/ripng/redistribute/bgp/metric/node.def b/templates/protocols/ripng/redistribute/bgp/metric/node.def
deleted file mode 100644
index f3f58d49..00000000
--- a/templates/protocols/ripng/redistribute/bgp/metric/node.def
+++ /dev/null
@@ -1,6 +0,0 @@
-type: u32
-help: Metric for redistributed routes
-val_help: u32:1-16; Redistribute route metric
-
-syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 16; \
- "metric must be between 1 and 16"
diff --git a/templates/protocols/ripng/redistribute/bgp/node.def b/templates/protocols/ripng/redistribute/bgp/node.def
deleted file mode 100644
index 26494bd1..00000000
--- a/templates/protocols/ripng/redistribute/bgp/node.def
+++ /dev/null
@@ -1,20 +0,0 @@
-help: Redistribute BGP routes
-
-delete: touch /tmp/rip-redist-bgp.$PPID
-
-end: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no redistribute bgp"
- if [ -f "/tmp/rip-redist-bgp.$PPID" ]; then
- rm -rf /tmp/rip-redist-bgp.$PPID;
- else
- if [ -n "$VAR(./metric/@)" ]; then
- COND="metric $VAR(./metric/@)";
- fi;
- if [ -n "$VAR(./route-map/@)" ]; then
- COND="$COND route-map $VAR(./route-map/@)";
- fi;
- vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "redistribute bgp $COND";
- fi
diff --git a/templates/protocols/ripng/redistribute/bgp/route-map/node.def b/templates/protocols/ripng/redistribute/bgp/route-map/node.def
deleted file mode 100644
index a56f5668..00000000
--- a/templates/protocols/ripng/redistribute/bgp/route-map/node.def
+++ /dev/null
@@ -1,4 +0,0 @@
-type: txt
-help: 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/ripng/redistribute/connected/metric/node.def b/templates/protocols/ripng/redistribute/connected/metric/node.def
deleted file mode 100644
index 8446e404..00000000
--- a/templates/protocols/ripng/redistribute/connected/metric/node.def
+++ /dev/null
@@ -1,5 +0,0 @@
-type: u32
-help: Metric for redistributed routes
-val_help: u32:1-16; Redistribute route metric
-
-syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 16; "metric must be between 1 and 16"
diff --git a/templates/protocols/ripng/redistribute/connected/node.def b/templates/protocols/ripng/redistribute/connected/node.def
deleted file mode 100644
index 075461f6..00000000
--- a/templates/protocols/ripng/redistribute/connected/node.def
+++ /dev/null
@@ -1,20 +0,0 @@
-help: Redistribute connected routes
-
-delete: touch /tmp/rip-redist-connected.$PPID
-
-end: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no redistribute connected"
- if [ -f "/tmp/rip-redist-connected.$PPID" ]; then
- rm -rf /tmp/rip-redist-connected.$PPID;
- else
- if [ -n "$VAR(./metric/@)" ]; then
- COND="metric $VAR(./metric/@)";
- fi;
- if [ -n "$VAR(./route-map/@)" ]; then
- COND="$COND route-map $VAR(./route-map/@)";
- fi;
- vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "redistribute connected $COND";
- fi;
diff --git a/templates/protocols/ripng/redistribute/connected/route-map/node.def b/templates/protocols/ripng/redistribute/connected/route-map/node.def
deleted file mode 100644
index f2c6f7c2..00000000
--- a/templates/protocols/ripng/redistribute/connected/route-map/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-type: txt
-help: 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/ripng/redistribute/kernel/metric/node.def b/templates/protocols/ripng/redistribute/kernel/metric/node.def
deleted file mode 100644
index 8446e404..00000000
--- a/templates/protocols/ripng/redistribute/kernel/metric/node.def
+++ /dev/null
@@ -1,5 +0,0 @@
-type: u32
-help: Metric for redistributed routes
-val_help: u32:1-16; Redistribute route metric
-
-syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 16; "metric must be between 1 and 16"
diff --git a/templates/protocols/ripng/redistribute/kernel/node.def b/templates/protocols/ripng/redistribute/kernel/node.def
deleted file mode 100644
index 212fc168..00000000
--- a/templates/protocols/ripng/redistribute/kernel/node.def
+++ /dev/null
@@ -1,20 +0,0 @@
-help: Redistribute kernel routes
-
-delete: touch /tmp/rip-redist-kernel.$PPID
-
-end: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no redistribute kernel";
- if [ -f "/tmp/rip-redist-kernel.$PPID" ]; then
- rm -rf /tmp/rip-redist-kernel.$PPID;
- else
- if [ -n "$VAR(./metric/@)" ]; then
- COND="metric $VAR(./metric/@)";
- fi;
- if [ -n "$VAR(./route-map/@)" ]; then
- COND="$COND route-map $VAR(./route-map/@)";
- fi;
- vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "redistribute kernel $COND";
- fi;
diff --git a/templates/protocols/ripng/redistribute/kernel/route-map/node.def b/templates/protocols/ripng/redistribute/kernel/route-map/node.def
deleted file mode 100644
index f2c6f7c2..00000000
--- a/templates/protocols/ripng/redistribute/kernel/route-map/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-type: txt
-help: 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/ripng/redistribute/node.def b/templates/protocols/ripng/redistribute/node.def
deleted file mode 100644
index 00eefa88..00000000
--- a/templates/protocols/ripng/redistribute/node.def
+++ /dev/null
@@ -1 +0,0 @@
-help: Redistribute information from another routing protocol
diff --git a/templates/protocols/ripng/redistribute/ospfv3/metric/node.def b/templates/protocols/ripng/redistribute/ospfv3/metric/node.def
deleted file mode 100644
index 808090c7..00000000
--- a/templates/protocols/ripng/redistribute/ospfv3/metric/node.def
+++ /dev/null
@@ -1,6 +0,0 @@
-type: u32
-help: Metric for redistributed routes
-val_help: u32:1-16; Redistribute route metric
-
-syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 16; "metric must be between 1 and 16"
-
diff --git a/templates/protocols/ripng/redistribute/ospfv3/node.def b/templates/protocols/ripng/redistribute/ospfv3/node.def
deleted file mode 100644
index cc94d951..00000000
--- a/templates/protocols/ripng/redistribute/ospfv3/node.def
+++ /dev/null
@@ -1,21 +0,0 @@
-help: Redistribute OSPFv3 routes
-
-delete: touch /tmp/rip-redist-ospf6.$PPID
-
-end: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no redistribute ospf6";
- if [ -f "/tmp/rip-redist-ospf6.$PPID" ]; then
- rm -rf /tmp/rip-redist-ospf6.$PPID;
- else
- if [ -n "$VAR(./metric/@)" ]; then
- COND="metric $VAR(./metric/@)";
- fi;
- if [ -n "$VAR(./route-map/@)" ]; then
- COND="$COND route-map $VAR(./route-map/@)";
- fi;
- vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "redistribute ospf6 $COND";
- fi;
-
diff --git a/templates/protocols/ripng/redistribute/ospfv3/route-map/node.def b/templates/protocols/ripng/redistribute/ospfv3/route-map/node.def
deleted file mode 100644
index f2c6f7c2..00000000
--- a/templates/protocols/ripng/redistribute/ospfv3/route-map/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-type: txt
-help: 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/ripng/redistribute/static/metric/node.def b/templates/protocols/ripng/redistribute/static/metric/node.def
deleted file mode 100644
index 8446e404..00000000
--- a/templates/protocols/ripng/redistribute/static/metric/node.def
+++ /dev/null
@@ -1,5 +0,0 @@
-type: u32
-help: Metric for redistributed routes
-val_help: u32:1-16; Redistribute route metric
-
-syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 16; "metric must be between 1 and 16"
diff --git a/templates/protocols/ripng/redistribute/static/node.def b/templates/protocols/ripng/redistribute/static/node.def
deleted file mode 100644
index 65fec6db..00000000
--- a/templates/protocols/ripng/redistribute/static/node.def
+++ /dev/null
@@ -1,20 +0,0 @@
-help: Redistribute static routes
-
-delete: touch /tmp/rip-redist-static.$PPID
-
-end: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no redistribute static";
- if [ -f "/tmp/rip-redist-static.$PPID" ]; then
- rm -rf /tmp/rip-redist-static.$PPID;
- else
- if [ -n "$VAR(./metric/@)" ]; then
- COND="metric $VAR(./metric/@)";
- fi;
- if [ -n "$VAR(./route-map/@)" ]; then
- COND="$COND route-map $VAR(./route-map/@)";
- fi;
- vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "redistribute static $COND";
- fi;
diff --git a/templates/protocols/ripng/redistribute/static/route-map/node.def b/templates/protocols/ripng/redistribute/static/route-map/node.def
deleted file mode 100644
index f2c6f7c2..00000000
--- a/templates/protocols/ripng/redistribute/static/route-map/node.def
+++ /dev/null
@@ -1,3 +0,0 @@
-type: txt
-help: 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/ripng/route-map/node.def b/templates/protocols/ripng/route-map/node.def
deleted file mode 100644
index 7ea923f3..00000000
--- a/templates/protocols/ripng/route-map/node.def
+++ /dev/null
@@ -1,8 +0,0 @@
-type: txt
-help: Filter routes installed in local route map
-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(@)\" ";"route-map $VAR(@) doesn't exist"
-create:expression: "vtysh -c \"configure terminal\" -c \"ipv6 protocol ripng route-map $VAR(@)\" "
-delete:expression: "vtysh -c \"configure terminal\" -c \"no ipv6 protocol ripng\" "
diff --git a/templates/protocols/ripng/route/node.def b/templates/protocols/ripng/route/node.def
deleted file mode 100644
index a44b438d..00000000
--- a/templates/protocols/ripng/route/node.def
+++ /dev/null
@@ -1,14 +0,0 @@
-multi:
-type: ipv6net
-help: RIPng static route
-
-syntax:expression: exec "ipaddrcheck --verbose --is-ipv6-net $VAR(@)"
-
-create: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "route $VAR(@)"
-
-delete: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no route $VAR(@)"
-
diff --git a/templates/protocols/ripng/timers/garbage-collection/node.def b/templates/protocols/ripng/timers/garbage-collection/node.def
deleted file mode 100644
index f5753a6b..00000000
--- a/templates/protocols/ripng/timers/garbage-collection/node.def
+++ /dev/null
@@ -1,7 +0,0 @@
-type: u32
-default: 120
-help: Garbage collection timer
-val_help: u32:0-65535; Garbage colletion time (default 120)
-
-syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 65535; \
- "Garbage collection timer must be between 0 and 65535"
diff --git a/templates/protocols/ripng/timers/node.def b/templates/protocols/ripng/timers/node.def
deleted file mode 100644
index 5802c520..00000000
--- a/templates/protocols/ripng/timers/node.def
+++ /dev/null
@@ -1,16 +0,0 @@
-help: RIPng timer values
-
-delete: touch /tmp/ripng-timers.$PPID
-
-end: vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "no timers basic"; \
- if [ -f "/tmp/ripng-timers.$PPID" ]; then
- rm -rf /tmp/ripng-timers.$PPID;
- else
- vtysh -c "configure terminal" \
- -c "router ripng" \
- -c "timers basic $VAR(./update/@) \
- $VAR(./timeout/@) \
- $VAR(./garbage-collection/@)"
- fi;
diff --git a/templates/protocols/ripng/timers/timeout/node.def b/templates/protocols/ripng/timers/timeout/node.def
deleted file mode 100644
index b272340a..00000000
--- a/templates/protocols/ripng/timers/timeout/node.def
+++ /dev/null
@@ -1,7 +0,0 @@
-type: u32
-default: 180
-help: Routing information timeout timer
-val_help: u32:0-65535; Routing information timeout timer (default 180)
-
-syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 65535; \
- "Timeout timer must be between 0 and 65535"
diff --git a/templates/protocols/ripng/timers/update/node.def b/templates/protocols/ripng/timers/update/node.def
deleted file mode 100644
index 35a66cfe..00000000
--- a/templates/protocols/ripng/timers/update/node.def
+++ /dev/null
@@ -1,7 +0,0 @@
-type: u32
-default: 30
-help: Routing table update timer
-val_help: u32:0-65535; Routing table update timer in seconds (default 30)
-
-syntax:expression: $VAR(@) >= 0 && $VAR(@) <= 65535; \
- "Update timer must be between 0 and 65535"