summaryrefslogtreecommitdiff
path: root/python/vyos/template.py
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2025-03-20 16:22:10 +0100
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2025-04-14 11:50:41 +0200
commitf3e77facc06750caafb100cdc6e96a1dc362182a (patch)
treec6e1a5781733ebaa03344bf34f6858e152cf3661 /python/vyos/template.py
parentd1e8dbd33ad84999ea4feea075d723068628ab1d (diff)
downloadveeos-1x-f3e77facc06750caafb100cdc6e96a1dc362182a.tar.gz
veeos-1x-f3e77facc06750caafb100cdc6e96a1dc362182a.zip
kea: T7281: Use Kea internal option for option 121 routes, remove option 249
Remove legacy windows static route on option 249
Diffstat (limited to 'python/vyos/template.py')
-rwxr-xr-xpython/vyos/template.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/python/vyos/template.py b/python/vyos/template.py
index e75db1a8d..f5baf8dbd 100755
--- a/python/vyos/template.py
+++ b/python/vyos/template.py
@@ -390,28 +390,6 @@ def compare_netmask(netmask1, netmask2):
except:
return False
-@register_filter('isc_static_route')
-def isc_static_route(subnet, router):
- # https://ercpe.de/blog/pushing-static-routes-with-isc-dhcp-server
- # Option format is:
- # <netmask>, <network-byte1>, <network-byte2>, <network-byte3>, <router-byte1>, <router-byte2>, <router-byte3>
- # where bytes with the value 0 are omitted.
- from ipaddress import ip_network
- net = ip_network(subnet)
- # add netmask
- string = str(net.prefixlen) + ','
- # add network bytes
- if net.prefixlen:
- width = net.prefixlen // 8
- if net.prefixlen % 8:
- width += 1
- string += ','.join(map(str,tuple(net.network_address.packed)[:width])) + ','
-
- # add router bytes
- string += ','.join(router.split('.'))
-
- return string
-
@register_filter('is_file')
def is_file(filename):
if os.path.exists(filename):