summaryrefslogtreecommitdiff
path: root/templates/protocols/rip/interface
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@uffda.(none)>2007-10-12 16:48:14 -0700
committerStig Thormodsrud <stig@uffda.(none)>2007-10-12 16:48:14 -0700
commit83331a0a334130cc438805c124fd05d93eddd5d0 (patch)
treeb99cc192313d7803a4594084a65c041e7752e0dc /templates/protocols/rip/interface
parent0c23fb8b146cab3fbc48d4f8d45aae501e599a8a (diff)
downloadvyatta-cfg-quagga-83331a0a334130cc438805c124fd05d93eddd5d0.tar.gz
vyatta-cfg-quagga-83331a0a334130cc438805c124fd05d93eddd5d0.zip
First cut of RIP new cli.
Fix filename on vyatta_policy.pl.
Diffstat (limited to 'templates/protocols/rip/interface')
-rw-r--r--templates/protocols/rip/interface/node.def11
-rw-r--r--templates/protocols/rip/interface/node.tag/network/node.def8
-rw-r--r--templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.def5
-rw-r--r--templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.tag/node.def1
-rw-r--r--templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.tag/password/node.def8
-rw-r--r--templates/protocols/rip/interface/node.tag/network/node.tag/authentication/node.def1
-rw-r--r--templates/protocols/rip/interface/node.tag/network/node.tag/authentication/simple-password/node.def6
-rw-r--r--templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/in/node.def8
-rw-r--r--templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/node.def1
-rw-r--r--templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/out/node.def7
-rw-r--r--templates/protocols/rip/interface/node.tag/network/node.tag/metric/node.def9
-rw-r--r--templates/protocols/rip/interface/node.tag/network/node.tag/passive/node.def5
-rw-r--r--templates/protocols/rip/interface/node.tag/network/node.tag/split-horizon/node.def6
-rw-r--r--templates/protocols/rip/interface/node.tag/network/node.tag/split-horizon/poison-reverse/node.def5
-rw-r--r--templates/protocols/rip/interface/node.tag/node.def1
15 files changed, 82 insertions, 0 deletions
diff --git a/templates/protocols/rip/interface/node.def b/templates/protocols/rip/interface/node.def
new file mode 100644
index 00000000..1c493597
--- /dev/null
+++ b/templates/protocols/rip/interface/node.def
@@ -0,0 +1,11 @@
+tag:
+type: txt
+help: "Interface name"
+syntax: exec " \
+ if [ -z \"`ip addr | grep $(@) `\" ]; then \
+ echo ethernet interface $(@) doesn\\'t exist on this system ; \
+ exit 1 ; \
+ fi ; "
+create: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" -c \"network $(@)\" "
+update: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" -c \"network $(@)\" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" -c \"no network $(@)\" "
diff --git a/templates/protocols/rip/interface/node.tag/network/node.def b/templates/protocols/rip/interface/node.tag/network/node.def
new file mode 100644
index 00000000..7b226a4f
--- /dev/null
+++ b/templates/protocols/rip/interface/node.tag/network/node.def
@@ -0,0 +1,8 @@
+tag:
+type: ipv4net
+help: "RIP network"
+syntax: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-prefix-boundry $(@)"
+update: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"network $(@)\"; "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"no network $(@)\"; "
diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.def
new file mode 100644
index 00000000..5cd0b2e8
--- /dev/null
+++ b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.def
@@ -0,0 +1,5 @@
+tag:
+type: u32
+help: "MD5 authentication key ID"
+syntax: $(@) >= 0 && $(@) <= 255; "ID must be between 1 and 255"
+
diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.tag/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.tag/node.def
new file mode 100644
index 00000000..8b0f3125
--- /dev/null
+++ b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.tag/node.def
@@ -0,0 +1 @@
+help: "Authentication password"
diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.tag/password/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.tag/password/node.def
new file mode 100644
index 00000000..3fd4e1a2
--- /dev/null
+++ b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/md5/node.tag/password/node.def
@@ -0,0 +1,8 @@
+type: txt
+help: "Authentication password"
+create: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../../@)\" \
+ -c \"ip rip authentication mode md5\" -c \"ip rip authentication key-chain $(../@)\" \
+ -c \"key chain $(../@)\" -c \"key $(../@)\" -c \"key-string $(@)\" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../../@)\" \
+ -c \"no ip rip authentication mode md5\" -c \"no ip rip authentication key-chain $(../@)\" \
+ -c \"no key chain $(../@)\" "
diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/node.def
new file mode 100644
index 00000000..cd07a983
--- /dev/null
+++ b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/node.def
@@ -0,0 +1 @@
+help: "Authentication method"
diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/simple-password/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/simple-password/node.def
new file mode 100644
index 00000000..2ab4fc5c
--- /dev/null
+++ b/templates/protocols/rip/interface/node.tag/network/node.tag/authentication/simple-password/node.def
@@ -0,0 +1,6 @@
+type: txt
+help: "Simple password authentication key"
+create: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../../@)\" \
+ -c \"ip rip authentication mode text\" -c \"ip rip authentication string $(@)\"; "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../../@)\" \
+ -c \"no ip rip authentication mode\" -c \"no ip rip authentication string $(@)\"; "
diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/in/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/in/node.def
new file mode 100644
index 00000000..83b31f9c
--- /dev/null
+++ b/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/in/node.def
@@ -0,0 +1,8 @@
+type: u32
+help: "ACL to be used in redistribution"
+commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" ";"access-list $(@) doesn't exist"
+create: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"distribute-list $(@) $(../@) $(../../../@)\" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"no distribute-list $(@) $(../@) $(../../../@)\" "
+
diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/node.def
new file mode 100644
index 00000000..0de08fbd
--- /dev/null
+++ b/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/node.def
@@ -0,0 +1 @@
+help: "direction of redistribution"
diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/out/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/out/node.def
new file mode 100644
index 00000000..0e7ea992
--- /dev/null
+++ b/templates/protocols/rip/interface/node.tag/network/node.tag/distribute-list/out/node.def
@@ -0,0 +1,7 @@
+type: u32
+help: "ACL to be used in redistribution"
+commit: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $(@)\" ";"access-list $(@) doesn't exist"
+create: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"distribute-list $(@) $(../@) $(../../../@)\" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"no distribute-list $(@) $(../@) $(../../../@)\" "
diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/metric/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/metric/node.def
new file mode 100644
index 00000000..5beb6cb9
--- /dev/null
+++ b/templates/protocols/rip/interface/node.tag/network/node.tag/metric/node.def
@@ -0,0 +1,9 @@
+type: u32
+help: "Metric for this RIP network"
+syntax: $(@) >= 1 && $(@) <= 255; "metric must be between 1 and 255"
+create: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"distance $(@) $(../@)\" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"no distance $(@) $(../@)\" "
+
+
diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/passive/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/passive/node.def
new file mode 100644
index 00000000..3410022d
--- /dev/null
+++ b/templates/protocols/rip/interface/node.tag/network/node.tag/passive/node.def
@@ -0,0 +1,5 @@
+help: "Set interface as recieve only"
+create: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"passive-interface $(../@)\" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"router rip\" \
+ -c \"no passive-interface $(../@)\" "
diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/split-horizon/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/split-horizon/node.def
new file mode 100644
index 00000000..82cb152a
--- /dev/null
+++ b/templates/protocols/rip/interface/node.tag/network/node.tag/split-horizon/node.def
@@ -0,0 +1,6 @@
+help: "enable split horizon on this interface"
+create: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../@)\" \
+ -c \"ip rip split-horizon\" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../@)\" \
+ -c \"no ip rip split-horizon\" "
+
diff --git a/templates/protocols/rip/interface/node.tag/network/node.tag/split-horizon/poison-reverse/node.def b/templates/protocols/rip/interface/node.tag/network/node.tag/split-horizon/poison-reverse/node.def
new file mode 100644
index 00000000..a7631d44
--- /dev/null
+++ b/templates/protocols/rip/interface/node.tag/network/node.tag/split-horizon/poison-reverse/node.def
@@ -0,0 +1,5 @@
+help: "with poison-reverse"
+create: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../../@)\" \
+ -c \"ip rip split-horizon poisoned-reverse\" "
+delete: "/usr/bin/vtysh -c \"configure terminal\" -c \"interface $(../../../@)\" \
+ -c \"no ip rip split-horizon\" -c \"ip rip split-horizon\" "
diff --git a/templates/protocols/rip/interface/node.tag/node.def b/templates/protocols/rip/interface/node.tag/node.def
new file mode 100644
index 00000000..d62d4841
--- /dev/null
+++ b/templates/protocols/rip/interface/node.tag/node.def
@@ -0,0 +1 @@
+help: "Configure RIP network"