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"; }
32 leaf phys-network-func {
35 description "Value of True indicates this is an adjacency of a device in a provider network";
40 grouping vpn-route-list{
41 leaf-list route-entry-id{
46 augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
47 ext:augment-identifier "adjacencies";
51 augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
52 ext:augment-identifier "opState";
53 leaf stateUp {type boolean; config false;}
56 /* Operational DS containers for reverse lookups*/
57 container prefix-to-interface {
61 leaf vpn-id {type uint32;}
64 leaf ip_address {type string;}
68 leaf vpn-interface-name {
82 container vpn-to-extraroutes {
88 description "VPN Instance name";
94 "The vrf-id configures unique route distinguisher (RD) for each ipv4
95 or ipv6 prefix when its nexthop-ip-list connected to same compute node";
100 leaf prefix {type string;}
101 leaf-list nexthop-ip-list {
109 /* Data models to adhere to restart requirements */
110 container vpn-instance-to-vpn-id {
112 key vpn-instance-name;
113 leaf vpn-instance-name {
121 "The vrf-id command configures a route distinguisher (RD)
122 for the IPv4 or IPv6 address family of a VPN instance or
123 vpn instance name for internal vpn case.";
129 container vpn-id-to-vpn-instance {
135 leaf vpn-instance-name {
140 "The vrf-id command configures a route distinguisher (RD)
141 for the IPv4 or IPv6 address family of a VPN instance or
142 vpn instance name for internal vpn case.";
147 description "The VPN is external?";
152 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:";
322 "Task not applicable";
327 "Task is in pending state";
332 "Task has been completed";
336 "This value the status of any task.
337 The possible values are NA, PENDING or DONE.
342 container subnet-op-data {
344 list subnet-op-data-entry {
348 description "UUID representing the subnet ";
352 description "DpnId for the DPN used as nexthop for this subnet";
356 description "VPN Instance name";
363 description "Subnet in cidr notation";
365 leaf route-adv-state {
367 description "The status of the subnet route advertisement. Route advertisement could be in a NA, PENDING or DONE state.";
377 list vpn-interfaces {
379 leaf interface-name {
385 uses nvpn:network-attributes;
390 container port-op-data {
392 list port-op-data-entry {
396 description "UUID in string format representing the port ";
400 description "Back reference to obtain the subnet for a port ";
409 grouping dpn-in-vpn-event {
410 leaf dpn-id { type uint64; }
411 leaf vpn-name { type string; }
412 leaf rd { type string; }
415 notification add-dpn-event {
416 container add-event-data {
417 uses dpn-in-vpn-event;
421 notification remove-dpn-event {
422 container remove-event-data {
423 uses dpn-in-vpn-event;
428 * Configured Transport Type for l3vpn service.
430 container conf-transport-type-l3vpn {
431 leaf transport-type {
434 base odlif:tunnel-type-base;
437 "L3VPN service will use this config to setup
438 the transport type for tunnels between DPNs.";
442 /* container to maintain mapping between neutron router and DPN(s) on which vpn-interfaces for router are present */
443 container neutron-router-dpns {
445 list router-dpn-list {
447 leaf router-id { type string;}
448 list dpn-vpninterfaces-list {
450 leaf dpn-id { type uint64;}
451 list router-interfaces {
453 leaf interface { type string; }
459 /* container to maintain mapping between DPN(s) and the routers */
460 container dpn-routers {
462 list dpn-routers-list {
464 leaf dpn-id { type uint64;}
467 leaf router { type string;}
472 container router-interfaces {
473 list router-interface {
475 leaf interface-name { type string; }
476 leaf router-name { type string; }
480 container learnt-vpn-vip-to-port-data {
482 list learnt-vpn-vip-to-port {
483 key "vpn-name port-fixedip";
484 leaf vpn-name { type string; }
485 leaf port-fixedip { type string; }
486 leaf port-name { type string; }
487 leaf mac-address { type string; }
491 container evpn-config {
493 leaf multi-homing-mode {
497 enum "single-active";
510 container l3vpn-lb-nexthops {
514 leaf nexthop-key { type string; }
515 leaf group-id { type string; }
516 leaf-list target-device-id { type string; } //dpId or ip-address
520 container dpid-l3vpn-lb-nexthops {
522 list dpn-lb-nexthops {
523 key "src-dp-id dst-device-id";
524 leaf src-dp-id { type uint64; }
525 leaf dst-device-id { type string; } //dpId or ip-address
526 leaf-list nexthop-key { type string; }