diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-02-05 22:56:01 +0100 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-02-05 22:56:01 +0100 |
commit | 7640413d9dcb66d8a78148edca150fadaef1f60d (patch) | |
tree | 420ce7e6bdec0cbc9786371be881980eccd94f00 /templates/protocols/static/interface-route | |
parent | 3265bf37a79b5231ce738948decb44e63b0647d7 (diff) | |
download | vyatta-cfg-quagga-7640413d9dcb66d8a78148edca150fadaef1f60d.tar.gz vyatta-cfg-quagga-7640413d9dcb66d8a78148edca150fadaef1f60d.zip |
T2450: migrate vrf and static routes to vyos-1x
Diffstat (limited to 'templates/protocols/static/interface-route')
5 files changed, 0 insertions, 64 deletions
diff --git a/templates/protocols/static/interface-route/node.def b/templates/protocols/static/interface-route/node.def deleted file mode 100644 index 2b9d75ad..00000000 --- a/templates/protocols/static/interface-route/node.def +++ /dev/null @@ -1,7 +0,0 @@ -tag: -type: ipv4net -help: Interface based static route -syntax:expression: exec "ipaddrcheck --verbose --is-ipv4-net $VAR(@)" - -commit:expression: $VAR(./next-hop-interface/) != "" ; \ - "Must add a next-hop-interface for route $VAR(@)" diff --git a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def deleted file mode 100644 index f8bc9270..00000000 --- a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def +++ /dev/null @@ -1,32 +0,0 @@ -tag: -type: txt -help: Next-hop interface [REQUIRED] -# show all current interface -# but syntax accepts any interface since it may exist later (ppp etc) -allowed: ${vyatta_sbindir}/vyatta-interfaces.pl --show all - - -end: - if [[ -z "$VAR(./disable)" ]] - then - if [[ ${COMMIT_ACTION} = 'DELETE' ]] - then - if ! ${vyatta_sbindir}/vyatta-next-hop-check $VAR(../@) ipv4 interface; then - exit 1; - fi - vtysh -c "configure terminal" \ - -c "no ip route $VAR(../@) $VAR(@)" - else - if [[ -n "$VAR(./distance/@)" ]]; then - DIST="$VAR(./distance/@)" - fi - if [[ -n "$VAR(./next-hop-vrf/@)" ]]; then - NEXTHOP_VRF="nexthop-vrf $VAR(./next-hop-vrf/@)" - fi - vtysh -c "configure terminal" \ - -c "ip route $VAR(../@) $VAR(@) $NEXTHOP_VRF $DIST"; - fi - else - vtysh -c "configure terminal" \ - -c "no ip route $VAR(../@) $VAR(@)" - fi diff --git a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/disable/node.def b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/disable/node.def deleted file mode 100644 index 92f2ba51..00000000 --- a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/disable/node.def +++ /dev/null @@ -1 +0,0 @@ -help: Disable IPv4 interface static route diff --git a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/distance/node.def b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/distance/node.def deleted file mode 100644 index 61abcc65..00000000 --- a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/distance/node.def +++ /dev/null @@ -1,4 +0,0 @@ -type: u32 -help: Distance value for this route -syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 255; "Must be between (1-255)" -val_help: u32:1-255; Distance for this route diff --git a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/next-hop-vrf/node.def b/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/next-hop-vrf/node.def deleted file mode 100644 index c4fee0e0..00000000 --- a/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.tag/next-hop-vrf/node.def +++ /dev/null @@ -1,20 +0,0 @@ -type: txt -help: VRF to leak route -allowed: local -a params - eval "params=($(cli-shell-api listNodes vrf name))" - echo -n "${params[@]}" -val_help: <vrf> ; Name of VRF to leak to -end: - if [[ ${COMMIT_ACTION} = 'DELETE' ]] - then - if ! ${vyatta_sbindir}/vyatta-next-hop-check $VAR(../@) ipv4 address; then - exit 1; - fi - if ${vyatta_sbindir}/vyatta-gateway-static_route-check.pl \ - "$VAR(../../@)" "$VAR(../@)" - then - VRF_NAME=$VAR(../../../../@) - vtysh -c "configure terminal" \ - -c "no ip route $VAR(../../@) $VAR(../@) nexthop-vrf $VAR(@)" - fi - fi |