"neutronvpn:createL3VPN" fails to create L3VPN for IPv6 use case.
[netvirt.git] / vpnmanager / api / src / main / yang / odl-l3vpn.yang
index b03a029c2f0aeea40705f2471a9e5b8844b10d44..ef1af3baeb270a189760bdd89acd3991f44e87b2 100644 (file)
@@ -10,71 +10,20 @@ module odl-l3vpn {
         prefix nvpn;
         revision-date "2015-06-02";
     }
-
+    import l3vpn-instances-interfaces {
+        prefix nvpn-l3vpn;
+        revision-date "2020-02-04";
+    }
     revision "2013-09-11" {
         description "L3 VPN Service module";
     }
 
-    grouping adjacency-list{
-        list adjacency{
-            key "ip_address";
-            leaf-list next-hop-ip-list { type string; }
-            leaf ip_address {type string;}
-            leaf adjacency_type {
-                description "The type of adjacency";
-                type enumeration {
-                    enum "primary-adjacency" {
-                        value 1;
-                        description
-                            "Primary adjacency type.";
-                    }
-                    enum "learnt-ip" {
-                        value 2;
-                        description
-                            "Learnt ip adjacency type.";
-                    }
-                    enum "extra-route" {
-                        value 3;
-                        description
-                            "Extra route adjacency type.";
-                    }
-                }
-                default "extra-route";
-            }
-            leaf mac_address {type string;} /* optional */
-            leaf subnet_id {type yang:uuid;} /* optional */
-            leaf subnet_gateway_ip {type string;}  /* optional */
-            leaf phys-network-func {
-                type boolean;
-                default false;
-                description "Value of True indicates this is an adjacency of a device in a provider network";
-            }
-            uses adjacency-op-data;
-        }
-    }
-
-    grouping adjacency-op-data{
-        leaf label { type uint32; config "false"; } /* optional */
-        leaf subnet_gateway_mac_address {type string; config "false";} /* optional */
-        leaf vrf-id { type string; config "false"; }
-        leaf marked_for_deletion {
-            config "false";
-            type boolean;
-            description "This flag if true suggest this adjancency has been marked for deletion";
-        }
-    }
-
     grouping vpn-route-list{
         leaf-list route-entry-id{
             type uint32;
         }
     }
 
-    augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
-        ext:augment-identifier "adjacencies";
-        uses adjacency-list;
-    }
-
     /* Operational DS containers for reverse lookups*/
     container prefix-to-interface {
         config false;
@@ -223,6 +172,9 @@ module odl-l3vpn {
             leaf gateway-mac-address {
                 type string;
             }
+            leaf gateway-ip-address {
+                type string;
+            }
             leaf lport-tag {
                 type uint32;
             }
@@ -253,7 +205,7 @@ module odl-l3vpn {
 
     augment "/odl-l3vpn:vpn-interface-op-data/odl-l3vpn:vpn-interface-op-data-entry" {
         ext:augment-identifier "adjacencies-op";
-        uses adjacency-list;
+        uses nvpn-l3vpn:adjacency-list;
     }
 
     container vpn-instance-op-data {
@@ -321,17 +273,22 @@ module odl-l3vpn {
                   default "active";
                }
            }
-           leaf ipv4-configured {
-              type boolean;
-              description
-                 "This VPN Instance handles IPv4 traffic";
-              default false;
-           }
-           leaf ipv6-configured {
-              type boolean;
-              description
-                 "This VPN Instance handles IPv6 traffic";
-              default false;
+           leaf ip-address-family-configured {
+              type enumeration {
+                 enum "undefined" {
+                    value "0";
+                 }
+                 enum "ipv4" {
+                    value "4";
+                 }
+                 enum "ipv6" {
+                    value "6";
+                 }
+                 enum "ipv4-and-ipv6" {
+                    value "10";
+                 }
+              }
+              default "undefined";
            }
            leaf bgpvpn-type {
               type enumeration {
@@ -688,13 +645,13 @@ module odl-l3vpn {
         }
     }
 
-    container dpid-l3vpn-lb-nexthops {
+    container l3vpn-dc-gws {
         config false;
-        list dpn-lb-nexthops {
-            key "src-dp-id dst-device-id";
-            leaf src-dp-id { type uint64; }
-            leaf dst-device-id { type string; } //dpId or ip-address
-            leaf-list nexthop-key { type string; }
+        list dc-gateway {
+            key "ip-address";
+            leaf ip-address {
+                type string;
+            }
         }
     }