Yang changes for l3vpn 43/31043/3
authorDeepthi V V <deepthi.v.v@ericsson.com>
Wed, 9 Dec 2015 04:50:44 +0000 (10:20 +0530)
committerDeepthi V V <deepthi.v.v@ericsson.com>
Wed, 9 Dec 2015 10:45:22 +0000 (16:15 +0530)
Change-Id: I0e5432d8fdff26afc94cc6347d9f74e03db70ffd
Signed-off-by: Deepthi V V <deepthi.v.v@ericsson.com>
nexthopmgr/nexthopmgr-impl/src/test/java/org/opendaylight/vpnservice/nexthopmgr/test/NexthopManagerTest.java
vpnmanager/vpnmanager-api/src/main/yang/odl-l3vpn.yang

index bef3a2770e11d779a552cb3f8acf896c1d3eb9bb..437aa7411bf8af0aeabafebe6874d6d2709c586f 100644 (file)
@@ -116,7 +116,7 @@ public class NexthopManagerTest {
     }
 
     @Override
-    public Long getNextHopId() {
+    public String getNextHopIp() {
       return null;
     }
 
index 0221f292ab1c7767188a739cf036582e28c3ef23..ff52c7104f44165b3b30b57264587dbe36b56d76 100644 (file)
@@ -12,18 +12,18 @@ module odl-l3vpn {
     grouping adjacency-list{
         list adjacency{
             key "ip_address";
-            leaf nextHopId { type uint32;}
+            leaf nextHopIp { type string; }
             leaf ip_address {type string;}
-            leaf label {type uint32;} /* optional */
+            leaf label { type uint32; config "false"; } /* optional */
             leaf mac_address {type string;} /* optional */
         }
     }
-       
-       grouping vpn-route-list{
-               leaf-list route-entry-id{
-                       type uint32;
-               }
-       }
+
+    grouping vpn-route-list{
+        leaf-list route-entry-id{
+            type uint32;
+        }
+    }
 
     augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
         ext:augment-identifier "adjacencies";
@@ -32,7 +32,75 @@ module odl-l3vpn {
 
     augment "/l3vpn:vpn-instances/l3vpn:vpn-instance" {
         leaf vpn-id { type uint32;}
-               uses vpn-route-list;
+        uses vpn-route-list;
+    }
+
+    /* Operational DS containers for reverse lookups*/
+    container prefix-to-interface {
+        config false;
+        list vpn-ids {
+           key vpn-id;
+           leaf vpn-id {type uint32;}
+           list prefixes {
+              key ip_address;
+              leaf ip_address {type string;}
+              leaf dpnId {
+                 type uint64;
+              }
+              leaf vpn-interface-name {
+                  type string;
+              }
+           }
+        }
+    }
+
+    /* Data models to adhere to restart requirements */
+    container vpn-instance-to-vpn-id {
+       list vpn-instance {
+          key vpn-instance-name;
+          leaf vpn-instance-name {
+             type string;
+          }
+          leaf vpn-id {
+             type uint32;
+          }
+          leaf vrf-id {
+              description
+                 "The vrf-id command configures a route distinguisher (RD)
+                  for the IPv4 or IPv6 address family of a VPN instance or
+                  vpn instance name for internal vpn case.";
+              type string;
+          }
+       }
+    }
+
+    container vpn-instance-op-data {
+        config false;
+        list vpn-instance-op-data-entry {
+           key vrf-id;
+           leaf vpn-id { type uint32;}
+           leaf vrf-id {
+              description
+                 "The vrf-id command configures a route distinguisher (RD)
+                  for the IPv4 or IPv6 address family of a VPN instance or
+                  vpn instance name for internal vpn case.";
+              type string;
+           }
+
+           uses vpn-route-list;
+           list vpn-to-dpn-list {
+               key dpnId;
+               leaf dpnId {
+                  type uint64;
+               }
+               list vpn-interfaces {
+                  key interface-name;
+                  leaf interface-name {
+                      type string;
+                  }
+               }
+           }
+        }
     }
 
 }
\ No newline at end of file