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"; }
11 revision-date "2015-06-02";
14 revision "2013-09-11" {
15 description "L3 VPN Service module";
18 grouping adjacency-list{
21 leaf-list next-hop-ip-list { type string; }
22 leaf ip_address {type string;}
23 leaf primary-adjacency {
26 description "Value of True indicates this is a primary adjacency";
28 leaf label { type uint32; config "false"; } /* optional */
29 leaf mac_address {type string;} /* optional */
30 leaf subnet_id {type yang:uuid;} /* optional */
31 leaf vrf-id { type string; config "false"; }
35 grouping vpn-route-list{
36 leaf-list route-entry-id{
41 augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
42 ext:augment-identifier "adjacencies";
46 augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
47 ext:augment-identifier "opState";
48 leaf stateUp {type boolean; config false;}
51 /* Operational DS containers for reverse lookups*/
52 container prefix-to-interface {
56 leaf vpn-id {type uint32;}
59 leaf ip_address {type string;}
63 leaf vpn-interface-name {
77 container vpn-to-extraroutes {
83 description "VPN Instance name";
89 "The vrf-id configures unique route distinguisher (RD) for each ipv4
90 or ipv6 prefix when its nexthop-ip-list connected to same compute node";
95 leaf prefix {type string;}
96 leaf-list nexthop-ip-list {
104 /* Data models to adhere to restart requirements */
105 container vpn-instance-to-vpn-id {
107 key vpn-instance-name;
108 leaf vpn-instance-name {
116 "The vrf-id command configures a route distinguisher (RD)
117 for the IPv4 or IPv6 address family of a VPN instance or
118 vpn instance name for internal vpn case.";
124 container vpn-id-to-vpn-instance {
130 leaf vpn-instance-name {
135 "The vrf-id command configures a route distinguisher (RD)
136 for the IPv4 or IPv6 address family of a VPN instance or
137 vpn instance name for internal vpn case.";
142 description "The VPN is external?";
147 container evpn-rd-to-networks {
149 description "Holds the networks to which given evpn is attached";
150 list evpn-rd-to-network {
161 container vpn-instance-op-data {
163 list vpn-instance-op-data-entry {
165 leaf vpn-id { type uint32;}
168 "The vrf-id command configures a route distinguisher (RD)
169 for the IPv4 or IPv6 address family of a VPN instance or
170 vpn instance name for internal vpn case.";
174 leaf vpn-instance-name {
175 description "Typical the VPN Uuid";
179 leaf vpn-interface-count { type uint32; }
181 list vpn-to-dpn-list {
186 list vpn-interfaces {
188 leaf interface-name {
194 leaf ip-address { type string; }
198 "This flag indicates the state of the DPN.
199 Active state indicates atleast one vpn interface present on that DPN for the vpn.
200 Inactive state indicates no vpn interface present on that DPN for this vpn.";
219 "The type of the VPN Instance.
220 L3 indicates it is an L3VPN.
221 L2 indicates it is an EVPN";
226 description “L3VPN";
238 container vpnTargets {
240 "The vpn-target command configures the export or import VPN target
241 extended community attribute for the VPN instance IPv4/IPv6 address
243 Format is ASN:nn or IP-address:nn.";
247 max-elements "unbounded";
250 "L3vpn vpntarget configure class";
254 "Vpn-target: adds VPN target extended community attribute to the
255 export or import VPN target extended community list. The
256 vpn-target can be expressed in either of the following formats:
257 (1)16-bit AS number:32-bit user-defined number
258 For example, 1:3. The AS number ranges from 0 to 65535. The
259 user-defined number ranges from 0 to 4294967295. The AS number
260 and the user-defined number cannot be 0s at the same time.
261 That is, a VPN target cannot be 0:0.
262 (2)32-bit IP address:16-bit user-defined number
263 For example, 192.168.122.15:1. The IP address ranges from
264 0.0.0.0 to 255.255.255.255. The user-defined number ranges from
266 (3)32-bit IP address:16-bit user-defined number
267 For example, 192.168.122.15:1. An IP address ranges from
268 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0
277 "Specifies the vpn target type, export-extcommunity:
278 specifies the extended community attributes carried in routing
279 information to be sent. import-extcommunity: receives routing
280 information carrying specified extended community attributes.";
283 enum export_extcommunity {
285 description "export-extcommunity:";
287 enum import_extcommunity {
289 description "import-extcommunity:";
293 description "export-extcommunity & import-extcommunity:";
308 "Task not applicable";
313 "Task is in pending state";
318 "Task has been completed";
322 "This value the status of any task.
323 The possible values are NA, PENDING or DONE.
328 container subnet-op-data {
330 list subnet-op-data-entry {
334 description "UUID representing the subnet ";
338 description "DpnId for the DPN used as nexthop for this subnet";
342 description "VPN Instance name";
349 description "Subnet in cidr notation";
351 leaf route-adv-state {
353 description "The status of the subnet route advertisement. Route advertisement could be in a NA, PENDING or DONE state.";
363 list vpn-interfaces {
365 leaf interface-name {
371 uses nvpn:network-attributes;
376 container port-op-data {
378 list port-op-data-entry {
382 description "UUID in string format representing the port ";
386 description "Back reference to obtain the subnet for a port ";
395 grouping dpn-in-vpn-event {
396 leaf dpn-id { type uint64; }
397 leaf vpn-name { type string; }
398 leaf rd { type string; }
401 notification add-dpn-event {
402 container add-event-data {
403 uses dpn-in-vpn-event;
407 notification remove-dpn-event {
408 container remove-event-data {
409 uses dpn-in-vpn-event;
414 * Configured Transport Type for l3vpn service.
416 container conf-transport-type-l3vpn {
417 leaf transport-type {
420 base odlif:tunnel-type-base;
423 "L3VPN service will use this config to setup
424 the transport type for tunnels between DPNs.";
428 /* container to maintain mapping between neutron router and DPN(s) on which vpn-interfaces for router are present */
429 container neutron-router-dpns {
431 list router-dpn-list {
433 leaf router-id { type string;}
434 list dpn-vpninterfaces-list {
436 leaf dpn-id { type uint64;}
437 list router-interfaces {
439 leaf interface { type string; }
445 /* container to maintain mapping between DPN(s) and the routers */
446 container dpn-routers {
448 list dpn-routers-list {
450 leaf dpn-id { type uint64;}
453 leaf router { type string;}
458 container router-interfaces {
459 list router-interface {
461 leaf interface-name { type string; }
462 leaf router-name { type string; }
466 container learnt-vpn-vip-to-port-data {
468 list learnt-vpn-vip-to-port {
469 key "vpn-name port-fixedip";
470 leaf vpn-name { type string; }
471 leaf port-fixedip { type string; }
472 leaf port-name { type string; }
473 leaf mac-address { type string; }
477 container evpn-config {
479 leaf multi-homing-mode {
483 enum "single-active";
496 container l3vpn-lb-nexthops {
500 leaf nexthop-key { type string; }
501 leaf group-id { type string; }
502 leaf-list target-device-id { type string; } //dpId or ip-address
506 container dpid-l3vpn-lb-nexthops {
508 list dpn-lb-nexthops {
509 key "src-dp-id dst-device-id";
510 leaf src-dp-id { type uint64; }
511 leaf dst-device-id { type string; } //dpId or ip-address
512 leaf-list nexthop-key { type string; }