YANG support for binary IPv4/v6 prefixes 24/39024/3
authorLorand Jakab <lojakab@cisco.com>
Tue, 17 May 2016 12:32:47 +0000 (15:32 +0300)
committerLorand Jakab <lojakab@cisco.com>
Thu, 19 May 2016 18:39:49 +0000 (21:39 +0300)
Change-Id: I87fb1c1fa489959d86834b9ec4b72ff9973ca29f
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
mappingservice/lisp-proto/src/main/yang/odl-lisp-address-types.yang

index 22a6ff8e605e9ebba1120428519e5cd71916e931..0451de14b09b4697100e661370f6c5344e5b1965 100644 (file)
@@ -30,6 +30,18 @@ module odl-lisp-address-types {
             "IANA IPv6 address family (binary representation).";
     }
 
+    identity ipv4-prefix-binary-afi {
+        base laddr:lisp-address-family;
+        description
+          "IANA IPv4 address family prefix (binary representation).";
+      }
+
+    identity ipv6-prefix-binary-afi {
+        base laddr:lisp-address-family;
+        description
+          "IANA IPv6 address family prefix (binary representation).";
+    }
+
     grouping augmented-lisp-address {
         uses laddr:lisp-address {
             augment "address" {
@@ -55,6 +67,42 @@ module odl-lisp-address-types {
                           "IPv6 (binary) address.";
                     }
                 }
+                case ipv4-prefix-binary {
+                    container ipv4-prefix-binary {
+                        when "../../address-type = 'ipv4-prefix-binary-afi'" {
+                          description
+                            "When AFI is IPv4 (binary).";
+                        }
+                        leaf network-address {
+                            type bin:ipv4-address-binary;
+                            description "IPv4 binary address.";
+                        }
+                        leaf mask-length {
+                            type uint8 {
+                                range "0..32";
+                            }
+                            description "IPv4 mask length.";
+                        }
+                    }
+                }
+                case ipv6-prefix-binary {
+                    container ipv6-prefix-binary {
+                        when "../../address-type = 'ipv6-prefix-binary-afi'" {
+                          description
+                            "When AFI is IPv6 (binary).";
+                        }
+                        leaf network-address {
+                            type bin:ipv6-address-binary;
+                            description "IPv6 binary address.";
+                        }
+                        leaf mask-length {
+                            type uint8 {
+                                range "0..128";
+                            }
+                            description "IPv6 mask length.";
+                        }
+                    }
+                }
             }
         }
     }