2 namespace "urn:opendaylight:netvirt:l3vpn";
5 import yang-ext {prefix ext; revision-date "2013-07-09";}
6 import l3vpn { prefix l3vpn; revision-date "2014-08-15"; }
7 import ietf-yang-types { prefix "yang"; revision-date "2013-07-15"; }
8 import odl-interface { prefix odlif; revision-date "2016-04-06"; }
10 revision "2013-09-11" {
11 description "L3 VPN Service module";
14 grouping adjacency-list{
17 leaf-list next-hop-ip-list { type string; }
18 leaf ip_address {type string;}
19 leaf label { type uint32; config "false"; } /* optional */
20 leaf mac_address {type string;} /* optional */
24 grouping vpn-route-list{
25 leaf-list route-entry-id{
30 augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
31 ext:augment-identifier "adjacencies";
35 augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
36 ext:augment-identifier "opState";
37 leaf stateUp {type boolean; config false;}
40 /* Operational DS containers for reverse lookups*/
41 container prefix-to-interface {
45 leaf vpn-id {type uint32;}
48 leaf ip_address {type string;}
52 leaf vpn-interface-name {
59 container vpn-to-extraroute {
65 "The vrf-id command configures a route distinguisher (RD)
66 for the IPv4 or IPv6 address family of a VPN instance or
67 vpn instance name for internal vpn case.";
72 leaf prefix {type string;}
73 leaf-list nexthop-ip-list {
80 /* Data models to adhere to restart requirements */
81 container vpn-instance-to-vpn-id {
83 key vpn-instance-name;
84 leaf vpn-instance-name {
92 "The vrf-id command configures a route distinguisher (RD)
93 for the IPv4 or IPv6 address family of a VPN instance or
94 vpn instance name for internal vpn case.";
100 container vpn-id-to-vpn-instance {
106 leaf vpn-instance-name {
111 "The vrf-id command configures a route distinguisher (RD)
112 for the IPv4 or IPv6 address family of a VPN instance or
113 vpn instance name for internal vpn case.";
118 description "The VPN is external?";
123 container vpn-to-pseudo-port-tag-data {
124 description "Makes a correspondence between VRFs and their corresponding VpnPseudoPort";
125 list vpn-to-pseudo-port-tag {
131 description "Vpn Pseudo Logical Port Tag";
137 container vpn-instance-op-data {
139 list vpn-instance-op-data-entry {
141 leaf vpn-id { type uint32;}
144 "The vrf-id command configures a route distinguisher (RD)
145 for the IPv4 or IPv6 address family of a VPN instance or
146 vpn instance name for internal vpn case.";
150 leaf vpn-instance-name {
151 description "Typical the VPN Uuid";
155 leaf vpn-interface-count { type uint32; }
157 list vpn-to-dpn-list {
162 list vpn-interfaces {
164 leaf interface-name {
170 leaf ip-address { type string; }
182 "Task not applicable";
187 "Task is in pending state";
192 "Task has been completed";
196 "This value the status of any task.
197 The possible values are NA, PENDING or DONE.
202 container subnet-op-data {
204 list subnet-op-data-entry {
208 description "UUID representing the subnet ";
212 description "DpnId for the DPN used as nexthop for this subnet";
216 description "VPN Instance name";
223 description "Subnet in cidr notation";
225 leaf route-adv-state {
227 description "The status of the subnet route advertisement. Route advertisement could be in a NA, PENDING or DONE state.";
237 list vpn-interfaces {
239 leaf interface-name {
248 container port-op-data {
250 list port-op-data-entry {
254 description "UUID in string format representing the port ";
258 description "Back reference to obtain the subnet for a port ";
267 grouping dpn-in-vpn-event {
268 leaf dpn-id { type uint64; }
269 leaf vpn-name { type string; }
270 leaf rd { type string; }
273 notification add-dpn-event {
274 container add-event-data {
275 uses dpn-in-vpn-event;
279 notification remove-dpn-event {
280 container remove-event-data {
281 uses dpn-in-vpn-event;
286 * Configured Transport Type for l3vpn service.
288 container conf-transport-type-l3vpn {
289 leaf transport-type {
292 base odlif:tunnel-type-base;
295 "L3VPN service will use this config to setup
296 the transport type for tunnels between DPNs.";
300 /* container to maintain mapping between neutron router and DPN(s) on which vpn-interfaces for router are present */
301 container neutron-router-dpns {
303 list router-dpn-list {
305 leaf router-id { type string;}
306 list dpn-vpninterfaces-list {
308 leaf dpn-id { type uint64;}
309 list router-interfaces {
311 leaf interface { type string; }
318 container router-interfaces {
319 list router-interface {
321 leaf interface-name { type string; }
322 leaf router-name { type string; }