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 vpn-instance-op-data {
149 list vpn-instance-op-data-entry {
151 leaf vpn-id { type uint32;}
154 "The vrf-id command configures a route distinguisher (RD)
155 for the IPv4 or IPv6 address family of a VPN instance or
156 vpn instance name for internal vpn case.";
160 leaf vpn-instance-name {
161 description "Typical the VPN Uuid";
165 leaf vpn-interface-count { type uint32; }
167 list vpn-to-dpn-list {
172 list vpn-interfaces {
174 leaf interface-name {
180 leaf ip-address { type string; }
184 "This flag indicates the state of the DPN.
185 Active state indicates atleast one vpn interface present on that DPN for the vpn.
186 Inactive state indicates no vpn interface present on that DPN for this vpn.";
205 "The type of the VPN Instance.
206 L3 indicates it is an L3VPN.
207 L2 indicates it is an EVPN";
212 description “L3VPN";
224 container vpnTargets {
226 "The vpn-target command configures the export or import VPN target
227 extended community attribute for the VPN instance IPv4/IPv6 address
229 Format is ASN:nn or IP-address:nn.";
233 max-elements "unbounded";
236 "L3vpn vpntarget configure class";
240 "Vpn-target: adds VPN target extended community attribute to the
241 export or import VPN target extended community list. The
242 vpn-target can be expressed in either of the following formats:
243 (1)16-bit AS number:32-bit user-defined number
244 For example, 1:3. The AS number ranges from 0 to 65535. The
245 user-defined number ranges from 0 to 4294967295. The AS number
246 and the user-defined number cannot be 0s at the same time.
247 That is, a VPN target cannot be 0:0.
248 (2)32-bit IP address:16-bit user-defined number
249 For example, 192.168.122.15:1. The IP address ranges from
250 0.0.0.0 to 255.255.255.255. The user-defined number ranges from
252 (3)32-bit IP address:16-bit user-defined number
253 For example, 192.168.122.15:1. An IP address ranges from
254 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0
263 "Specifies the vpn target type, export-extcommunity:
264 specifies the extended community attributes carried in routing
265 information to be sent. import-extcommunity: receives routing
266 information carrying specified extended community attributes.";
269 enum export_extcommunity {
271 description "export-extcommunity:";
273 enum import_extcommunity {
275 description "import-extcommunity:";
279 description "export-extcommunity & import-extcommunity:";
294 "Task not applicable";
299 "Task is in pending state";
304 "Task has been completed";
308 "This value the status of any task.
309 The possible values are NA, PENDING or DONE.
314 container subnet-op-data {
316 list subnet-op-data-entry {
320 description "UUID representing the subnet ";
324 description "DpnId for the DPN used as nexthop for this subnet";
328 description "VPN Instance name";
335 description "Subnet in cidr notation";
337 leaf route-adv-state {
339 description "The status of the subnet route advertisement. Route advertisement could be in a NA, PENDING or DONE state.";
349 list vpn-interfaces {
351 leaf interface-name {
357 uses nvpn:network-attributes;
362 container port-op-data {
364 list port-op-data-entry {
368 description "UUID in string format representing the port ";
372 description "Back reference to obtain the subnet for a port ";
381 grouping dpn-in-vpn-event {
382 leaf dpn-id { type uint64; }
383 leaf vpn-name { type string; }
384 leaf rd { type string; }
387 notification add-dpn-event {
388 container add-event-data {
389 uses dpn-in-vpn-event;
393 notification remove-dpn-event {
394 container remove-event-data {
395 uses dpn-in-vpn-event;
400 * Configured Transport Type for l3vpn service.
402 container conf-transport-type-l3vpn {
403 leaf transport-type {
406 base odlif:tunnel-type-base;
409 "L3VPN service will use this config to setup
410 the transport type for tunnels between DPNs.";
414 /* container to maintain mapping between neutron router and DPN(s) on which vpn-interfaces for router are present */
415 container neutron-router-dpns {
417 list router-dpn-list {
419 leaf router-id { type string;}
420 list dpn-vpninterfaces-list {
422 leaf dpn-id { type uint64;}
423 list router-interfaces {
425 leaf interface { type string; }
431 /* container to maintain mapping between DPN(s) and the routers */
432 container dpn-routers {
434 list dpn-routers-list {
436 leaf dpn-id { type uint64;}
439 leaf router { type string;}
444 container router-interfaces {
445 list router-interface {
447 leaf interface-name { type string; }
448 leaf router-name { type string; }
452 container learnt-vpn-vip-to-port-data {
454 list learnt-vpn-vip-to-port {
455 key "vpn-name port-fixedip";
456 leaf vpn-name { type string; }
457 leaf port-fixedip { type string; }
458 leaf port-name { type string; }
459 leaf mac-address { type string; }
463 container evpn-config {
465 leaf multi-homing-mode {
469 enum "single-active";
482 container l3vpn-lb-nexthops {
486 leaf nexthop-key { type string; }
487 leaf group-id { type string; }
488 leaf-list target-device-id { type string; } //dpId or ip-address
492 container dpid-l3vpn-lb-nexthops {
494 list dpn-lb-nexthops {
495 key "src-dp-id dst-device-id";
496 leaf src-dp-id { type uint64; }
497 leaf dst-device-id { type string; } //dpId or ip-address
498 leaf-list nexthop-key { type string; }