added metric to routes
[nepi.git] / src / nepi / util / validation.py
index 4d4a4d9..c78ea9b 100644 (file)
@@ -54,13 +54,19 @@ def is_ip6_address(attribute, value):
         return False
     return True
 
-# TODO: Allow netrefs!
 def is_ip_address(attribute, value):
     if not is_ip4_address(attribute, value) and \
             not is_ip6_address(attribute, value):
         return False
     return True
 
+# TODO: Allow netrefs!
+def is_ref_address(attribute, value):
+    if not is_ip4_address(attribute, value) and \
+            not is_ip6_address(attribute, value):
+        return False
+    return True
+
 def is_mac_address(attribute, value):
     regex = r'^([0-9a-zA-Z]{0,2}:)*[0-9a-zA-Z]{0,2}'
     found = re.search(regex, value)