summaryrefslogtreecommitdiff
path: root/python/vyos/template.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/vyos/template.py')
-rw-r--r--python/vyos/template.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/python/vyos/template.py b/python/vyos/template.py
index e1986b1e4..5c12e9914 100644
--- a/python/vyos/template.py
+++ b/python/vyos/template.py
@@ -375,3 +375,15 @@ def get_ipv4(interface):
""" Get interface IPv4 addresses"""
from vyos.ifconfig import Interface
return Interface(interface).get_addr_v4()
+
+@register_filter('get_ipv6')
+def get_ipv6(interface):
+ """ Get interface IPv6 addresses"""
+ from vyos.ifconfig import Interface
+ return Interface(interface).get_addr_v6()
+
+@register_filter('get_ip')
+def get_ip(interface):
+ """ Get interface IP addresses"""
+ from vyos.ifconfig import Interface
+ return Interface(interface).get_addr()