summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorStig Thormodsrud <stig@vyatta.com>2007-11-29 11:51:22 -0800
committerStig Thormodsrud <stig@vyatta.com>2007-11-29 11:51:22 -0800
commit67a64a925231ac24036bdad5916e175bf1bb5dbf (patch)
treed610299f576ff427bff078ec042ab2ee37df885d /templates
parentbf8fe41f2d976e8cd10f258110fe7ec98e39fee4 (diff)
downloadvyatta-cfg-quagga-67a64a925231ac24036bdad5916e175bf1bb5dbf.tar.gz
vyatta-cfg-quagga-67a64a925231ac24036bdad5916e175bf1bb5dbf.zip
Add cli for OSPF authentication.
Diffstat (limited to 'templates')
-rw-r--r--templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/key-id/node.def22
-rw-r--r--templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/key-id/node.tag/md5-key/node.def2
-rw-r--r--templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/key-id/node.tag/node.def1
-rw-r--r--templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/node.def10
-rw-r--r--templates/interfaces/ethernet/node.tag/ip/ospf/authentication/node.def2
-rw-r--r--templates/interfaces/ethernet/node.tag/ip/ospf/authentication/simple/node.def12
-rw-r--r--templates/protocols/ospf/area/node.tag/authentication/node.def17
7 files changed, 66 insertions, 0 deletions
diff --git a/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/key-id/node.def b/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/key-id/node.def
new file mode 100644
index 00000000..ac984fb4
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/key-id/node.def
@@ -0,0 +1,22 @@
+tag:
+type: u32
+help: "Configure MD5 key id"
+syntax: $(@) >= 1 && $(@) <= 255; "ID must be between (1-255)"
+commit: $(md5-key/) != ""; "must add the md5-key for key-id $(@)"
+delete: "touch /tmp/ospf-md5.\\$PPID"
+end: "if [ -f \"/tmp/ospf-md5.\\$PPID\" ]; then \
+ /usr/bin/vtysh -c \"configure terminal\" \
+ -c \"interface $(../../../../../@) \" \
+ -c \"no ip ospf message-digest-key $(@)\"; \
+ rm /tmp/ospf-md5.\\$PPID; \
+ else \
+ /usr/bin/vtysh -c \"configure terminal\" \
+ -c \"interface $(../../../../../@) \" \
+ -c \"ip ospf message-digest-key $(@) md5 $(md5-key/@)\"; \
+ fi; "
+
+
+
+
+
+
diff --git a/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/key-id/node.tag/md5-key/node.def b/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/key-id/node.tag/md5-key/node.def
new file mode 100644
index 00000000..54bbd8f7
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/key-id/node.tag/md5-key/node.def
@@ -0,0 +1,2 @@
+type: txt
+help: "Configure md5 key"
diff --git a/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/key-id/node.tag/node.def b/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/key-id/node.tag/node.def
new file mode 100644
index 00000000..7d644d6f
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/key-id/node.tag/node.def
@@ -0,0 +1 @@
+help: "Configure md5 key"
diff --git a/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/node.def b/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/node.def
new file mode 100644
index 00000000..50fca5ea
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/md5/node.def
@@ -0,0 +1,10 @@
+help: "Configure MD5 key id"
+update: "/usr/bin/vtysh -c \"configure terminal\" \
+ -c \"interface $(../../../../@) \" \
+ -c \"no ip ospf authentication \" \
+ -c \"ip ospf authentication message-digest\"; "
+delete: "/usr/bin/vtysh -c \"configure terminal\" \
+ -c \"interface $(../../../../@) \" \
+ -c \"no ip ospf authentication \"; "
+
+
diff --git a/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/node.def b/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/node.def
new file mode 100644
index 00000000..3ae4a65e
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/node.def
@@ -0,0 +1,2 @@
+help: "Configure OSPF interface authentication"
+
diff --git a/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/simple/node.def b/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/simple/node.def
new file mode 100644
index 00000000..834f581b
--- /dev/null
+++ b/templates/interfaces/ethernet/node.tag/ip/ospf/authentication/simple/node.def
@@ -0,0 +1,12 @@
+type: txt
+help: "Configure simple password"
+update: "/usr/bin/vtysh -c \"configure terminal\" \
+ -c \"interface $(../../../@) \" \
+ -c \"no ip ospf authentication \" \
+ -c \"ip ospf authentication \" \
+ -c \"ip ospf authentication-key $(@) \"; "
+delete: "/usr/bin/vtysh -c \"configure terminal\" \
+ -c \"interface $(../../../@) \" \
+ -c \"no ip ospf authentication \" \
+ -c \"no ip ospf authentication-key \"; "
+
diff --git a/templates/protocols/ospf/area/node.tag/authentication/node.def b/templates/protocols/ospf/area/node.tag/authentication/node.def
new file mode 100644
index 00000000..2a55767d
--- /dev/null
+++ b/templates/protocols/ospf/area/node.tag/authentication/node.def
@@ -0,0 +1,17 @@
+type: txt
+help: "Configure OSPF area authentication type"
+syntax: $(@) in "simple", "md5"; "Must be either simple or md5"
+update: "if [ x$(@) == xsimple ]; then \
+ /usr/bin/vtysh -c \"configure terminal\" \
+ -c \"router ospf \" \
+ -c \"no area $(../@) authentication \" \
+ -c \"area $(../@) authentication \" ; \
+ else \
+ /usr/bin/vtysh -c \"configure terminal\" \
+ -c \"router ospf \" \
+ -c \"no area $(../@) authentication \" \
+ -c \"area $(../@) authentication message-digest\" ; \
+ fi; "
+delete: "/usr/bin/vtysh -c \"configure terminal\" \
+ -c \"router ospf \" \
+ -c \"no area $(../@) authentication \" "