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 primary-adjacency {
23 "Value of True indicates this is a primary adjacency";
25 leaf label { type uint32; config "false"; } /* optional */
26 leaf mac_address {type string;} /* optional */
30 grouping vpn-route-list{
31 leaf-list route-entry-id{
36 augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
37 ext:augment-identifier "adjacencies";
41 augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
42 ext:augment-identifier "opState";
43 leaf stateUp {type boolean; config false;}
46 /* Operational DS containers for reverse lookups*/
47 container prefix-to-interface {
51 leaf vpn-id {type uint32;}
54 leaf ip_address {type string;}
58 leaf vpn-interface-name {
65 container vpn-to-extraroute {
71 "The vrf-id command configures a route distinguisher (RD)
72 for the IPv4 or IPv6 address family of a VPN instance or
73 vpn instance name for internal vpn case.";
78 leaf prefix {type string;}
79 leaf-list nexthop-ip-list {
86 /* Data models to adhere to restart requirements */
87 container vpn-instance-to-vpn-id {
89 key vpn-instance-name;
90 leaf vpn-instance-name {
98 "The vrf-id command configures a route distinguisher (RD)
99 for the IPv4 or IPv6 address family of a VPN instance or
100 vpn instance name for internal vpn case.";
106 container vpn-id-to-vpn-instance {
112 leaf vpn-instance-name {
117 "The vrf-id command configures a route distinguisher (RD)
118 for the IPv4 or IPv6 address family of a VPN instance or
119 vpn instance name for internal vpn case.";
124 description "The VPN is external?";
129 container vpn-instance-op-data {
131 list vpn-instance-op-data-entry {
133 leaf vpn-id { type uint32;}
136 "The vrf-id command configures a route distinguisher (RD)
137 for the IPv4 or IPv6 address family of a VPN instance or
138 vpn instance name for internal vpn case.";
142 leaf vpn-instance-name {
143 description "Typical the VPN Uuid";
147 leaf vpn-interface-count { type uint32; }
149 list vpn-to-dpn-list {
154 list vpn-interfaces {
156 leaf interface-name {
162 leaf ip-address { type string; }
166 "This flag indicates the state of the DPN.
167 Active state indicates atleast one vpn interface present on that DPN for the vpn.
168 Inactive state indicates no vpn interface present on that DPN for this vpn.";
185 container vpnTargets {
187 "The vpn-target command configures the export or import VPN target
188 extended community attribute for the VPN instance IPv4/IPv6 address
190 Format is ASN:nn or IP-address:nn.";
194 max-elements "unbounded";
197 "L3vpn vpntarget configure class";
201 "Vpn-target: adds VPN target extended community attribute to the
202 export or import VPN target extended community list. The
203 vpn-target can be expressed in either of the following formats:
204 (1)16-bit AS number:32-bit user-defined number
205 For example, 1:3. The AS number ranges from 0 to 65535. The
206 user-defined number ranges from 0 to 4294967295. The AS number
207 and the user-defined number cannot be 0s at the same time.
208 That is, a VPN target cannot be 0:0.
209 (2)32-bit IP address:16-bit user-defined number
210 For example, 192.168.122.15:1. The IP address ranges from
211 0.0.0.0 to 255.255.255.255. The user-defined number ranges from
213 (3)32-bit IP address:16-bit user-defined number
214 For example, 192.168.122.15:1. An IP address ranges from
215 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0
224 "Specifies the vpn target type, export-extcommunity:
225 specifies the extended community attributes carried in routing
226 information to be sent. import-extcommunity: receives routing
227 information carrying specified extended community attributes.";
230 enum export_extcommunity {
232 description "export-extcommunity:";
234 enum import_extcommunity {
236 description "import-extcommunity:";
240 description "export-extcommunity & import-extcommunity:";
255 "Task not applicable";
260 "Task is in pending state";
265 "Task has been completed";
269 "This value the status of any task.
270 The possible values are NA, PENDING or DONE.
275 container subnet-op-data {
277 list subnet-op-data-entry {
281 description "UUID representing the subnet ";
285 description "DpnId for the DPN used as nexthop for this subnet";
289 description "VPN Instance name";
296 description "Subnet in cidr notation";
298 leaf route-adv-state {
300 description "The status of the subnet route advertisement. Route advertisement could be in a NA, PENDING or DONE state.";
310 list vpn-interfaces {
312 leaf interface-name {
321 container port-op-data {
323 list port-op-data-entry {
327 description "UUID in string format representing the port ";
331 description "Back reference to obtain the subnet for a port ";
340 grouping dpn-in-vpn-event {
341 leaf dpn-id { type uint64; }
342 leaf vpn-name { type string; }
343 leaf rd { type string; }
346 notification add-dpn-event {
347 container add-event-data {
348 uses dpn-in-vpn-event;
352 notification remove-dpn-event {
353 container remove-event-data {
354 uses dpn-in-vpn-event;
359 * Configured Transport Type for l3vpn service.
361 container conf-transport-type-l3vpn {
362 leaf transport-type {
365 base odlif:tunnel-type-base;
368 "L3VPN service will use this config to setup
369 the transport type for tunnels between DPNs.";
373 /* container to maintain mapping between neutron router and DPN(s) on which vpn-interfaces for router are present */
374 container neutron-router-dpns {
376 list router-dpn-list {
378 leaf router-id { type string;}
379 list dpn-vpninterfaces-list {
381 leaf dpn-id { type uint64;}
382 list router-interfaces {
384 leaf interface { type string; }
390 /* container to maintain mapping between DPN(s) and the routers */
391 container dpn-routers {
393 list dpn-routers-list {
395 leaf dpn-id { type uint64;}
398 leaf router { type string;}
403 container router-interfaces {
404 list router-interface {
406 leaf interface-name { type string; }
407 leaf router-name { type string; }
411 container dpn-to-vtep-map {
415 leaf dpnId { type uint64;}
416 leaf vtepip { type string; }