From 79dd5282b0462b3b116248821a58cdfc0a597812 Mon Sep 17 00:00:00 2001
From: root <root@debianlenny.sici.thales.no>
Date: Mon, 9 Feb 2009 13:28:52 +0100
Subject: Initial commit of config commands for ospfv3

---
 templates/protocols/ospfv3/area/node.def             |  6 ++++++
 .../ospfv3/area/node.tag/export-list/node.def        |  8 ++++++++
 .../ospfv3/area/node.tag/filter-list/node.def        |  3 +++
 .../area/node.tag/filter-list/node.tag/node.def      | 10 ++++++++++
 .../ospfv3/area/node.tag/import-list/node.def        |  8 ++++++++
 .../ospfv3/area/node.tag/interface/node.def          | 17 +++++++++++++++++
 templates/protocols/ospfv3/area/node.tag/node.def    |  1 +
 .../protocols/ospfv3/area/node.tag/range/node.def    | 20 ++++++++++++++++++++
 .../area/node.tag/range/node.tag/advertise/node.def  |  7 +++++++
 .../node.tag/range/node.tag/not-advertise/node.def   |  7 +++++++
 10 files changed, 87 insertions(+)
 create mode 100644 templates/protocols/ospfv3/area/node.def
 create mode 100644 templates/protocols/ospfv3/area/node.tag/export-list/node.def
 create mode 100644 templates/protocols/ospfv3/area/node.tag/filter-list/node.def
 create mode 100644 templates/protocols/ospfv3/area/node.tag/filter-list/node.tag/node.def
 create mode 100644 templates/protocols/ospfv3/area/node.tag/import-list/node.def
 create mode 100644 templates/protocols/ospfv3/area/node.tag/interface/node.def
 create mode 100644 templates/protocols/ospfv3/area/node.tag/node.def
 create mode 100644 templates/protocols/ospfv3/area/node.tag/range/node.def
 create mode 100644 templates/protocols/ospfv3/area/node.tag/range/node.tag/advertise/node.def
 create mode 100644 templates/protocols/ospfv3/area/node.tag/range/node.tag/not-advertise/node.def

(limited to 'templates/protocols/ospfv3/area')

diff --git a/templates/protocols/ospfv3/area/node.def b/templates/protocols/ospfv3/area/node.def
new file mode 100644
index 00000000..244756b2
--- /dev/null
+++ b/templates/protocols/ospfv3/area/node.def
@@ -0,0 +1,6 @@
+tag:
+type: txt
+help: Set OSPFv3 Area
+syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-ospf-area $VAR(@)"; "Invalid OSFPv3 area \"$VAR(@)\" "
+comp_help: possible completions:
+ <x.x.x.x>          Set OSPFv3 area in dotted decimal notation
diff --git a/templates/protocols/ospfv3/area/node.tag/export-list/node.def b/templates/protocols/ospfv3/area/node.tag/export-list/node.def
new file mode 100644
index 00000000..ff984240
--- /dev/null
+++ b/templates/protocols/ospfv3/area/node.tag/export-list/node.def
@@ -0,0 +1,8 @@
+type: txt
+help: Set name of export-list 
+create:expression: "vyatta-vtysh -c \"configure terminal\" \
+        -c \"router ospf6 \" \
+        -c \"area $VAR(../@) export-list $VAR(@) \"; "
+delete:expression: "vyatta-vtysh -c \"configure terminal\" \
+        -c \"router ospf6 \" \
+        -c \"no area $VAR(../@) export-list $VAR(@) \"; "
diff --git a/templates/protocols/ospfv3/area/node.tag/filter-list/node.def b/templates/protocols/ospfv3/area/node.tag/filter-list/node.def
new file mode 100644
index 00000000..358fa36c
--- /dev/null
+++ b/templates/protocols/ospfv3/area/node.tag/filter-list/node.def
@@ -0,0 +1,3 @@
+tag:
+type: txt
+help: Set filter-list
\ No newline at end of file
diff --git a/templates/protocols/ospfv3/area/node.tag/filter-list/node.tag/node.def b/templates/protocols/ospfv3/area/node.tag/filter-list/node.tag/node.def
new file mode 100644
index 00000000..eb63a9c2
--- /dev/null
+++ b/templates/protocols/ospfv3/area/node.tag/filter-list/node.tag/node.def
@@ -0,0 +1,10 @@
+tag:
+type: txt
+help: Set direction of filter (in|out)
+allowed: echo "in out"
+create:expression: "vyatta-vtysh -c \"configure terminal\" \
+        -c \"router ospf6 \" \
+        -c \"area $VAR(../../@) filter-list $VAR(../@) $VAR(@) \"; "
+delete:expression: "vyatta-vtysh -c \"configure terminal\" \
+        -c \"router ospf6 \" \
+        -c \"no area $VAR(../../@) filter-list $VAR(../@) $VAR(@) \"; "
diff --git a/templates/protocols/ospfv3/area/node.tag/import-list/node.def b/templates/protocols/ospfv3/area/node.tag/import-list/node.def
new file mode 100644
index 00000000..9409e9d1
--- /dev/null
+++ b/templates/protocols/ospfv3/area/node.tag/import-list/node.def
@@ -0,0 +1,8 @@
+type: txt
+help: Set name of import-list 
+create:expression: "vyatta-vtysh -c \"configure terminal\" \
+        -c \"router ospf6 \" \
+        -c \"area $VAR(../@) import-list $VAR(@) \"; "
+delete:expression: "vyatta-vtysh -c \"configure terminal\" \
+        -c \"router ospf6 \" \
+        -c \"no area $VAR(../@) import-list $VAR(@) \"; "
diff --git a/templates/protocols/ospfv3/area/node.tag/interface/node.def b/templates/protocols/ospfv3/area/node.tag/interface/node.def
new file mode 100644
index 00000000..384a225f
--- /dev/null
+++ b/templates/protocols/ospfv3/area/node.tag/interface/node.def
@@ -0,0 +1,17 @@
+type: txt
+help: Set OSPFv3 area interface
+create:expression: "vyatta-vtysh --noerror -c \"configure terminal\" \
+        -c \"router ospf6 \" \
+        -c \"no interface $VAR(@) area $VAR(../@) \"; "
+create:expression: "vyatta-vtysh -c \"configure terminal\" \
+        -c \"router ospf6 \" \
+        -c \"interface $VAR(@) area $VAR(../@) \"; "
+delete:expression: "vyatta-vtysh -c \"configure terminal\" \
+        -c \"router ospf6 \" \
+        -c \"no interface $VAR(@) area $VAR(../@) \"; "
+
+allowed: for dev in /sys/class/net/*; 
+         do if [[ -d $dev && -L $dev/device ]]
+	    then echo -n ${dev##*/} " "
+            fi
+         done
diff --git a/templates/protocols/ospfv3/area/node.tag/node.def b/templates/protocols/ospfv3/area/node.tag/node.def
new file mode 100644
index 00000000..03cac4e1
--- /dev/null
+++ b/templates/protocols/ospfv3/area/node.tag/node.def
@@ -0,0 +1 @@
+help: Set OSPFv3 area parameters
\ No newline at end of file
diff --git a/templates/protocols/ospfv3/area/node.tag/range/node.def b/templates/protocols/ospfv3/area/node.tag/range/node.def
new file mode 100644
index 00000000..4df392fc
--- /dev/null
+++ b/templates/protocols/ospfv3/area/node.tag/range/node.def
@@ -0,0 +1,20 @@
+tag:
+type: ipv6net
+help: Set to spcify IPv6 prefix (border routers only)
+syntax:expression: exec "${vyatta_sbindir}/check_prefix_boundary $VAR(@)"
+
+delete: touch /tmp/ospf6-range.$PPID
+
+end: if [ -f /tmp/ospf6-range.$PPID ]; then
+        vyatta-vtysh -c "configure terminal" \
+          -c "router ospf6"                                        \
+          -c "no area $VAR(../@) range $VAR(@)";
+        rm /tmp/ospf6-range.$PPID;
+     else
+        vyatta-vtysh --noerror -c "configure terminal" \
+          -c "router ospf6"                                               \
+          -c "no area $VAR(../@) range $VAR(@)";
+        vyatta-vtysh -c "configure terminal" \
+          -c "router ospf6"                                        \
+          -c "area $VAR(../@) range $VAR(@)";
+     fi;
diff --git a/templates/protocols/ospfv3/area/node.tag/range/node.tag/advertise/node.def b/templates/protocols/ospfv3/area/node.tag/range/node.tag/advertise/node.def
new file mode 100644
index 00000000..5da43c1e
--- /dev/null
+++ b/templates/protocols/ospfv3/area/node.tag/range/node.tag/advertise/node.def
@@ -0,0 +1,7 @@
+help: Set to advertise this range
+create:expression: "vyatta-vtysh -c \"configure terminal\" \
+       -c \"router ospf6\" \
+       -c \"area $VAR(../../@) range $VAR(../@) advertise\"; "
+delete:expression: "vyatta-vtysh -c \"configure terminal\" \
+       -c \"router ospf6\" \
+       -c \"no area $VAR(../../@) range $VAR(../@) advertise\"; "
diff --git a/templates/protocols/ospfv3/area/node.tag/range/node.tag/not-advertise/node.def b/templates/protocols/ospfv3/area/node.tag/range/node.tag/not-advertise/node.def
new file mode 100644
index 00000000..1b97f964
--- /dev/null
+++ b/templates/protocols/ospfv3/area/node.tag/range/node.tag/not-advertise/node.def
@@ -0,0 +1,7 @@
+help: Set to not advertise this range
+create:expression: "vyatta-vtysh -c \"configure terminal\" \
+       -c \"router ospf6\" \
+       -c \"area $VAR(../../@) range $VAR(../@) not-advertise\"; "
+delete:expression: "vyatta-vtysh -c \"configure terminal\" \
+       -c \"router ospf6\" \
+       -c \"no area $VAR(../../@) range $VAR(../@) not-advertise\"; "
-- 
cgit v1.2.3