Distinguish between address and prefix for IPvX 12/28212/1
authorLorand Jakab <lojakab@cisco.com>
Fri, 9 Oct 2015 14:05:04 +0000 (17:05 +0300)
committerLorand Jakab <lojakab@cisco.com>
Fri, 9 Oct 2015 14:05:04 +0000 (17:05 +0300)
Change-Id: I183a49ea0bef8097d38d01645e5fa939fa0cc9ec
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
mappingservice/lisp-proto/src/main/yang/lisp-address-types.yang

index 72d1fbc34c6722959cbdbcf44eb5282e5cdd5792..84123912bdbff62a7e7bc57b898173d74d3d9007 100644 (file)
@@ -42,20 +42,30 @@ module lisp-address-types {
        families are derived.";
   }
   identity no-address {
-      base lisp-address-family;
-      description
-        "IANA Reserved.";
+    base lisp-address-family;
+    description
+      "IANA Reserved.";
     }
   identity ipv4 {
     base lisp-address-family;
     description
       "IANA IPv4 address family.";
   }
+  identity ipv4-prefix {
+    base lisp-address-family;
+    description
+      "IANA IPv4 address family prefix.";
+  }
   identity ipv6 {
     base lisp-address-family;
     description
       "IANA IPv6 address family.";
   }
+  identity ipv6-prefix {
+    base lisp-address-family;
+    description
+      "IANA IPv6 address family prefix.";
+  }
   identity mac {
     base lisp-address-family;
     description
@@ -549,15 +559,33 @@ module lisp-address-types {
           description
             "When AFI is IPv4.";
         }
-        type inet:ipv4-prefix;
+        type inet:ipv4-address;
         description
           "IPv4 address.";
       }
+      leaf ipv4-prefix {
+        when "../../afi = 'laddr:ipv4-prefix'" {
+          description
+            "When AFI is IPv4.";
+        }
+        type inet:ipv4-prefix;
+        description
+          "IPv4 prefix.";
+      }
       leaf ipv6 {
         when "../../afi = 'laddr:ipv6'" {
           description
             "When AFI is IPv6.";
         }
+        type inet:ipv6-address;
+        description
+          "IPv6 address.";
+      }
+      leaf ipv6-prefix {
+        when "../../afi = 'laddr:ipv6-prefix'" {
+          description
+            "When AFI is IPv6.";
+        }
         type inet:ipv6-prefix;
         description
           "IPv6 address.";