Bump versions by 0.1.0 for next dev cycle
[vpnservice.git] / vpnmanager / vpnmanager-api / src / main / yang / odl-l3vpn.yang
index ff52c7104f44165b3b30b57264587dbe36b56d76..5f0c708f5bf1fc2935cb9e4b24510b11402370ae 100644 (file)
@@ -4,6 +4,7 @@ module odl-l3vpn {
 
     import yang-ext {prefix ext; revision-date "2013-07-09";}
     import l3vpn { prefix l3vpn; revision-date "2014-08-15"; }
+    import ietf-yang-types { prefix "yang"; }
 
     revision "2013-09-11" {
         description "L3 VPN Service module";
@@ -30,9 +31,9 @@ module odl-l3vpn {
         uses adjacency-list;
     }
 
-    augment "/l3vpn:vpn-instances/l3vpn:vpn-instance" {
-        leaf vpn-id { type uint32;}
-        uses vpn-route-list;
+    augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
+        ext:augment-identifier "opState";
+        leaf stateUp {type boolean; config false;}
     }
 
     /* Operational DS containers for reverse lookups*/
@@ -54,6 +55,27 @@ module odl-l3vpn {
         }
     }
 
+    container vpn-to-extraroute {
+        config false;
+        list vpn {
+           key vrf-id;
+           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;
+           }
+           list extraroute {
+              key prefix;
+              leaf prefix {type string;}
+                     leaf nexthop-ip {
+                         type string;
+                     }
+           }
+        }
+    }
+
     /* Data models to adhere to restart requirements */
     container vpn-instance-to-vpn-id {
        list vpn-instance {
@@ -87,6 +109,7 @@ module odl-l3vpn {
               type string;
            }
 
+           leaf vpn-interface-count { type uint32; }
            uses vpn-route-list;
            list vpn-to-dpn-list {
                key dpnId;
@@ -99,8 +122,166 @@ module odl-l3vpn {
                       type string;
                   }
                }
+               list ip-addresses {
+                  key ip-address;
+                  leaf ip-address {
+                      type string;
+                  }
+               }
+           }
+        }
+    }
+
+    typedef task-state {
+         type enumeration {
+           enum na {
+             value "0";
+             description
+              "Task not applicable";
            }
+           enum pending {
+             value "1";
+             description
+              "Task is in pending state";
+           }
+           enum done {
+             value "2";
+             description
+              "Task has been completed";
+           }
+         }
+         description
+          "This value the status of any task.
+           The possible values are NA, PENDING or DONE.
+           ";
+    }
+
+
+    container subnet-op-data {
+        list subnet-op-data-entry {
+            key subnet-id;
+            leaf subnet-id {
+                type    yang:uuid;
+                description "UUID representing the subnet ";
+            }
+            leaf nh-dpnId {
+                type uint64;
+                description "DpnId for the DPN used as nexthop for this subnet";
+            }
+            leaf vpn-name {
+                type string;
+                description "VPN Instance name";
+            }
+            leaf vrf-id {
+                type string;
+            }
+            leaf subnet-cidr {
+                type string;
+                description "Subnet in cidr notation";
+            }
+            leaf route-adv-state {
+                type task-state;
+                description "The status of the subnet route advertisement. Route advertisement could be in a NA, PENDING or DONE state.";
+            }
+            leaf elan-tag{
+                type uint32;
+            }
+            list subnet-to-dpn {
+                key dpnId;
+                leaf dpnId {
+                    type uint64;
+                }
+                list vpn-interfaces {
+                    key interface-name;
+                    leaf interface-name {
+                        type string;
+                    }
+                }
+            }
+
+        }
+    }
+
+    container port-op-data {
+        list port-op-data-entry {
+            key port-id;
+            leaf port-id {
+                type  string;
+                description "UUID in string format representing the port ";
+            }
+            leaf subnet-id {
+                type  yang:uuid;
+                description "Back reference to obtain the subnet for a port ";
+            }
+            leaf dpnId {
+                type uint64;
+            }
+        }
+    }
+
+    container rd-to-elan-op{
+        list rd-to-elan-op-entry{
+            key "rd subnet-ip";
+            leaf rd {
+                type string;
+            }
+            leaf subnet-ip {
+                type string;
+            }
+            leaf next-hop-ip {
+                type string;
+            }
+            leaf vpn-name {
+                type string;
+            }
+            leaf elan-tag{
+                type uint32;
+            }
+        }
+    }
+
+    grouping dpn-in-vpn-event {
+            leaf dpn-id { type uint64; }
+            leaf vpn-name { type string; }
+            leaf rd { type string; }
+        }
+
+        notification add-dpn-event {
+            container add-event-data {
+               uses dpn-in-vpn-event;
+            }
+        }
+
+        notification remove-dpn-event {
+            container remove-event-data {
+               uses dpn-in-vpn-event;
+            }
+        }
+
+
+      /* container to maintain mapping between neutron router and DPN(s) on which vpn-interfaces for router are present */
+    container neutron-router-dpns {
+        list router-dpn-list {
+            key router-id;
+            leaf router-id { type string;}
+            list dpn-vpninterfaces-list {
+                key dpn-id;
+                leaf dpn-id { type uint64;}
+                list router-interfaces { 
+                    key interface;
+                    leaf interface { type string; }
+                }
+            }
+        }
+    }
+
+
+    container router-interfaces {
+        list router-interface {
+            key interface-name;
+            leaf interface-name { type string; }
+            leaf router-name { type string; }
         }
     }
 
-}
\ No newline at end of file
+}