diff options
author | Gaurav Sinha <gaurav.sinha@vyatta.com> | 2012-08-27 11:50:17 -0700 |
---|---|---|
committer | Gaurav Sinha <gaurav.sinha@vyatta.com> | 2012-08-27 11:50:17 -0700 |
commit | 1e981aec04b10bab35af6841686be002c61d6258 (patch) | |
tree | b3b205fa9e78ff13fe45e23ab7ba230484cf576d | |
parent | 9001352855d4e3c52c0986bdbeb90682073ea91d (diff) | |
download | vyatta-cfg-quagga-1e981aec04b10bab35af6841686be002c61d6258.tar.gz vyatta-cfg-quagga-1e981aec04b10bab35af6841686be002c61d6258.zip |
modifying CLI scripts to use new backend as per patch 0003 by Daniil
14 files changed, 2 insertions, 125 deletions
diff --git a/templates/protocols/ospfv3/area/node.def b/templates/protocols/ospfv3/area/node.def index 73750abb..f3824397 100644 --- a/templates/protocols/ospfv3/area/node.def +++ b/templates/protocols/ospfv3/area/node.def @@ -1,6 +1,5 @@ tag: type: txt help: OSPFv3 Area -syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-ospf-area $VAR(@)"; "Invalid OSFPv3 area \"$VAR(@)\" " -val_help: u32; OSPFv3 area in decimal notation +syntax:expression: exec "/opt/vyatta/sbin/vyatta-ospfv3.pl --check-area --area=$VAR(@)" val_help: ipv4; OSPFv3 area in dotted decimal notation 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 index 6bcaaf77..5fa7a60c 100644 --- 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 @@ -2,9 +2,3 @@ tag: type: txt help: Direction of filter (in|out) allowed: echo "in out" -create:expression: "vtysh -c \"configure terminal\" \ - -c \"router ospf6 \" \ - -c \"area $VAR(../../@) filter-list $VAR(../@) $VAR(@) \"; " -delete:expression: "vtysh -c \"configure terminal\" \ - -c \"router ospf6 \" \ - -c \"no area $VAR(../../@) filter-list $VAR(../@) $VAR(@) \"; " diff --git a/templates/protocols/ospfv3/area/node.tag/export-list/node.def b/templates/protocols/ospfv3/area/node.tag/export-list/node.def index a27ca264..4e603e7d 100644 --- a/templates/protocols/ospfv3/area/node.tag/export-list/node.def +++ b/templates/protocols/ospfv3/area/node.tag/export-list/node.def @@ -1,8 +1,2 @@ type: txt help: Name of export-list -create:expression: "vtysh -c \"configure terminal\" \ - -c \"router ospf6 \" \ - -c \"area $VAR(../@) export-list $VAR(@) \"; " -delete:expression: "vtysh -c \"configure terminal\" \ - -c \"router ospf6 \" \ - -c \"no area $VAR(../@) export-list $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 index cc689ab2..43feacca 100644 --- a/templates/protocols/ospfv3/area/node.tag/import-list/node.def +++ b/templates/protocols/ospfv3/area/node.tag/import-list/node.def @@ -1,8 +1,2 @@ type: txt help: Name of import-list -create:expression: "vtysh -c \"configure terminal\" \ - -c \"router ospf6 \" \ - -c \"area $VAR(../@) import-list $VAR(@) \"; " -delete:expression: "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 index 046b78d6..00dead6c 100644 --- a/templates/protocols/ospfv3/area/node.tag/interface/node.def +++ b/templates/protocols/ospfv3/area/node.tag/interface/node.def @@ -1,11 +1,4 @@ multi: type: txt help: OSPFv3 area interface - -create: vtysh -c "configure terminal" -c "router ospf6" \ - -c "interface $VAR(@) area $VAR(../@)" - -delete: vtysh -c "configure terminal" -c "router ospf6" \ - -c "no interface $VAR(@) area $VAR(../@)" - allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all diff --git a/templates/protocols/ospfv3/area/node.tag/range/node.def b/templates/protocols/ospfv3/area/node.tag/range/node.def index 4b594cd9..513a692e 100644 --- a/templates/protocols/ospfv3/area/node.tag/range/node.def +++ b/templates/protocols/ospfv3/area/node.tag/range/node.def @@ -3,18 +3,3 @@ type: ipv6net help: Specify 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 - vtysh -c "configure terminal" \ - -c "router ospf6" \ - -c "no area $VAR(../@) range $VAR(@)"; - rm /tmp/ospf6-range.$PPID; - else - vtysh --noerror -c "configure terminal" \ - -c "router ospf6" \ - -c "no area $VAR(../@) range $VAR(@)"; - 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 index 81be1db0..0fa80b1f 100644 --- 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 @@ -1,7 +1 @@ help: Advertise this range -create:expression: "vtysh -c \"configure terminal\" \ - -c \"router ospf6\" \ - -c \"area $VAR(../../@) range $VAR(../@) advertise\"; " -delete:expression: "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 index d0a74ecd..bb524e98 100644 --- 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 @@ -1,7 +1 @@ help: Do not advertise this range -create:expression: "vtysh -c \"configure terminal\" \ - -c \"router ospf6\" \ - -c \"area $VAR(../../@) range $VAR(../@) not-advertise\"; " -delete:expression: "vtysh -c \"configure terminal\" \ - -c \"router ospf6\" \ - -c \"no area $VAR(../../@) range $VAR(../@) not-advertise\"; " diff --git a/templates/protocols/ospfv3/node.def b/templates/protocols/ospfv3/node.def index 56655199..0776b936 100644 --- a/templates/protocols/ospfv3/node.def +++ b/templates/protocols/ospfv3/node.def @@ -1,15 +1,3 @@ priority: 640 help: IPv6 Open Shortest Path First protocol (OSPFv3) parameters -begin: if [ "$COMMIT_ACTION" != DELETE ]; then - if [ -n "$VAR(parameters/router-id/@)" ]; then - vtysh -c "configure terminal" -c "router ospf6" \ - -c "router-id $VAR(parameters/router-id/@)" - else - vtysh -c "configure terminal" -c "router ospf6" \ - -c "no router-id" - fi - fi -end: if [ "$COMMIT_ACTION" == DELETE ]; then - vtysh -c "configure terminal" -c "router ospf6" -c "no router-id" - vtysh -c "configure terminal" -c "no router ospf6" - fi +end: ${vyatta_sbindir}/vyatta-ospfv3.pl --main diff --git a/templates/protocols/ospfv3/redistribute/bgp/node.def b/templates/protocols/ospfv3/redistribute/bgp/node.def index 3541a9a4..fbcab040 100644 --- a/templates/protocols/ospfv3/redistribute/bgp/node.def +++ b/templates/protocols/ospfv3/redistribute/bgp/node.def @@ -1,13 +1,2 @@ help: Redistribute bgp routes -end: vtysh -c "configure terminal" \ - -c "router ospf6" \ - -c "no redistribute bgp"; - if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then - if [ -n "$VAR(./route-map/@)" ]; then - COND="route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" \ - -c "router ospf6" \ - -c "redistribute bgp $COND"; - fi; diff --git a/templates/protocols/ospfv3/redistribute/connected/node.def b/templates/protocols/ospfv3/redistribute/connected/node.def index d9b43cb0..5a824447 100644 --- a/templates/protocols/ospfv3/redistribute/connected/node.def +++ b/templates/protocols/ospfv3/redistribute/connected/node.def @@ -1,13 +1,2 @@ help: Redistribute connected routes -end: vtysh -c "configure terminal" \ - -c "router ospf6" \ - -c "no redistribute connected"; - if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then - if [ -n "$VAR(./route-map/@)" ]; then - COND="route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" \ - -c "router ospf6" \ - -c "redistribute connected $COND"; - fi; diff --git a/templates/protocols/ospfv3/redistribute/kernel/node.def b/templates/protocols/ospfv3/redistribute/kernel/node.def index 78fe7d36..c52e5f95 100644 --- a/templates/protocols/ospfv3/redistribute/kernel/node.def +++ b/templates/protocols/ospfv3/redistribute/kernel/node.def @@ -1,13 +1 @@ help: Redistribute kernel routes - -end: vtysh -c "configure terminal" \ - -c "router ospf6" \ - -c "no redistribute kernel"; - if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then - if [ -n "$VAR(./route-map/@)" ]; then - COND="route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" \ - -c "router ospf6" \ - -c "redistribute kernel $COND"; - fi; diff --git a/templates/protocols/ospfv3/redistribute/ripng/node.def b/templates/protocols/ospfv3/redistribute/ripng/node.def index f418999a..0aba8758 100644 --- a/templates/protocols/ospfv3/redistribute/ripng/node.def +++ b/templates/protocols/ospfv3/redistribute/ripng/node.def @@ -1,13 +1 @@ help: Redistribute RIPNG routes - -end: vtysh -c "configure terminal" \ - -c "router ospf6" \ - -c "no redistribute ripng"; - if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then - if [ -n "$VAR(./route-map/@)" ]; then - COND="route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" \ - -c "router ospf6" \ - -c "redistribute ripng $COND"; - fi; diff --git a/templates/protocols/ospfv3/redistribute/static/node.def b/templates/protocols/ospfv3/redistribute/static/node.def index d82d5f05..fd4c7b04 100644 --- a/templates/protocols/ospfv3/redistribute/static/node.def +++ b/templates/protocols/ospfv3/redistribute/static/node.def @@ -1,13 +1 @@ help: Redistribute static routes - -end: vtysh -c "configure terminal" \ - -c "router ospf6" \ - -c "no redistribute static"; - if [ "$COMMIT_ACTION" = "SET" -o "$COMMIT_ACTION" = "ACTIVE" ]; then - if [ -n "$VAR(./route-map/@)" ]; then - COND="route-map $VAR(./route-map/@)"; - fi; - vtysh -c "configure terminal" \ - -c "router ospf6" \ - -c "redistribute static $COND"; - fi; |