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 subnet_gateway_mac_address {type string; config "false";} /* optional */
32 leaf vrf-id { type string; config "false"; }
33 leaf phys-network-func {
36 description "Value of True indicates this is an adjacency of a device in a provider network";
41 grouping vpn-route-list{
42 leaf-list route-entry-id{
47 augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
48 ext:augment-identifier "adjacencies";
52 augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
53 ext:augment-identifier "opState";
54 leaf stateUp {type boolean; config false;}
57 /* Operational DS containers for reverse lookups*/
58 container prefix-to-interface {
62 leaf vpn-id {type uint32;}
65 leaf ip_address {type string;}
69 leaf vpn-interface-name {
83 container vpn-to-extraroutes {
89 description "VPN Instance name";
95 "The vrf-id configures unique route distinguisher (RD) for each ipv4
96 or ipv6 prefix when its nexthop-ip-list connected to same compute node";
101 leaf prefix {type string;}
102 leaf-list nexthop-ip-list {
110 /* Data models to adhere to restart requirements */
111 container vpn-instance-to-vpn-id {
113 key vpn-instance-name;
114 leaf vpn-instance-name {
122 "The vrf-id command configures a route distinguisher (RD)
123 for the IPv4 or IPv6 address family of a VPN instance or
124 vpn instance name for internal vpn case.";
130 container vpn-id-to-vpn-instance {
136 leaf vpn-instance-name {
141 "The vrf-id command configures a route distinguisher (RD)
142 for the IPv4 or IPv6 address family of a VPN instance or
143 vpn instance name for internal vpn case.";
148 description "The VPN is external?";
153 container evpn-rd-to-networks {
154 description "Holds the networks to which given evpn is attached";
155 list evpn-rd-to-network {
166 container vpn-instance-op-data {
168 list vpn-instance-op-data-entry {
170 leaf vpn-id { type uint32;}
173 "The vrf-id command configures a route distinguisher (RD)
174 for the IPv4 or IPv6 address family of a VPN instance or
175 vpn instance name for internal vpn case.";
179 leaf vpn-instance-name {
180 description "Typical the VPN Uuid";
184 leaf vpn-interface-count { type uint32; }
186 list vpn-to-dpn-list {
191 list vpn-interfaces {
193 leaf interface-name {
199 leaf ip-address { type string; }
200 leaf ip-address-source {
202 "This field indicates whether the IP address here is an External-Fixed-Ip(Owned by Router).
203 or Floating-Ip(Used by Ports).";
205 enum "ExternalFixedIP";
212 "This flag indicates the state of the DPN.
213 Active state indicates atleast one vpn interface present on that DPN for the vpn.
214 Inactive state indicates no vpn interface present on that DPN for this vpn.";
233 "The type of the VPN Instance.
234 L3 indicates it is an L3VPN.
235 L2 indicates it is an EVPN";
240 description “L3VPN";
252 container vpnTargets {
254 "The vpn-target command configures the export or import VPN target
255 extended community attribute for the VPN instance IPv4/IPv6 address
257 Format is ASN:nn or IP-address:nn.";
261 max-elements "unbounded";
264 "L3vpn vpntarget configure class";
268 "Vpn-target: adds VPN target extended community attribute to the
269 export or import VPN target extended community list. The
270 vpn-target can be expressed in either of the following formats:
271 (1)16-bit AS number:32-bit user-defined number
272 For example, 1:3. The AS number ranges from 0 to 65535. The
273 user-defined number ranges from 0 to 4294967295. The AS number
274 and the user-defined number cannot be 0s at the same time.
275 That is, a VPN target cannot be 0:0.
276 (2)32-bit IP address:16-bit user-defined number
277 For example, 192.168.122.15:1. The IP address ranges from
278 0.0.0.0 to 255.255.255.255. The user-defined number ranges from
280 (3)32-bit IP address:16-bit user-defined number
281 For example, 192.168.122.15:1. An IP address ranges from
282 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0
291 "Specifies the vpn target type, export-extcommunity:
292 specifies the extended community attributes carried in routing
293 information to be sent. import-extcommunity: receives routing
294 information carrying specified extended community attributes.";
297 enum export_extcommunity {
299 description "export-extcommunity:";
301 enum import_extcommunity {
303 description "import-extcommunity:";
307 description "export-extcommunity & import-extcommunity:";
321 description "Task in idle state";
323 enum pending_advertise {
325 description "Task is pending advertisement state";
327 enum pending_withdraw {
329 description "Task is pending withdrawal state";
333 description "Task is in advertised state";
337 description "Task is in withdrawn state";
341 "This value the status of any task.
342 The possible values are IDLE, PENDING_ADVERTISE, PENDING_WITHDRAW, ADVERTISED, WITHDRAWN.";
346 container subnet-op-data {
348 list subnet-op-data-entry {
352 description "UUID representing the subnet ";
356 description "DpnId for the DPN used as nexthop for this subnet";
360 description "VPN Instance name";
367 description "Subnet in cidr notation";
369 leaf route-adv-state {
371 description "The status of the subnet route advertisement/withdrawal";
381 list vpn-interfaces {
383 leaf interface-name {
394 uses nvpn:network-attributes;
399 container port-op-data {
401 list port-op-data-entry {
405 description "UUID in string format representing the port ";
409 description "Back reference to obtain the subnet for a port ";
418 grouping dpn-in-vpn-event {
419 leaf dpn-id { type uint64; }
420 leaf vpn-name { type string; }
421 leaf rd { type string; }
424 notification add-dpn-event {
425 container add-event-data {
426 uses dpn-in-vpn-event;
430 notification remove-dpn-event {
431 container remove-event-data {
432 uses dpn-in-vpn-event;
437 * Configured Transport Type for l3vpn service.
439 container conf-transport-type-l3vpn {
440 leaf transport-type {
443 base odlif:tunnel-type-base;
446 "L3VPN service will use this config to setup
447 the transport type for tunnels between DPNs.";
451 /* container to maintain mapping between neutron router and DPN(s) on which vpn-interfaces for router are present */
452 container neutron-router-dpns {
454 list router-dpn-list {
456 leaf router-id { type string;}
457 list dpn-vpninterfaces-list {
459 leaf dpn-id { type uint64;}
460 list router-interfaces {
462 leaf interface { type string; }
468 /* container to maintain mapping between DPN(s) and the routers */
469 container dpn-routers {
471 list dpn-routers-list {
473 leaf dpn-id { type uint64;}
476 leaf router { type string;}
481 container router-interfaces {
482 list router-interface {
484 leaf interface-name { type string; }
485 leaf router-name { type string; }
489 container learnt-vpn-vip-to-port-data {
491 list learnt-vpn-vip-to-port {
492 key "vpn-name port-fixedip";
493 leaf vpn-name { type string; }
494 leaf port-fixedip { type string; }
495 leaf port-name { type string; }
496 leaf mac-address { type string; }
497 leaf creation-time { type string; }
501 container evpn-config {
503 leaf multi-homing-mode {
507 enum "single-active";
520 container l3vpn-lb-nexthops {
524 leaf nexthop-key { type string; }
525 leaf group-id { type string; }
526 leaf-list target-device-id { type string; } //dpId or ip-address
530 container dpid-l3vpn-lb-nexthops {
532 list dpn-lb-nexthops {
533 key "src-dp-id dst-device-id";
534 leaf src-dp-id { type uint64; }
535 leaf dst-device-id { type string; } //dpId or ip-address
536 leaf-list nexthop-key { type string; }