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 label { type uint32; config "false"; } /* optional */
20 leaf mac_address {type string;} /* optional */
24 grouping vpn-route-list{
25 leaf-list route-entry-id{
30 augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
31 ext:augment-identifier "adjacencies";
35 augment "/l3vpn:vpn-interfaces/l3vpn:vpn-interface" {
36 ext:augment-identifier "opState";
37 leaf stateUp {type boolean; config false;}
40 /* Operational DS containers for reverse lookups*/
41 container prefix-to-interface {
45 leaf vpn-id {type uint32;}
48 leaf ip_address {type string;}
52 leaf vpn-interface-name {
59 container vpn-to-extraroute {
65 "The vrf-id command configures a route distinguisher (RD)
66 for the IPv4 or IPv6 address family of a VPN instance or
67 vpn instance name for internal vpn case.";
72 leaf prefix {type string;}
73 leaf-list nexthop-ip-list {
80 /* Data models to adhere to restart requirements */
81 container vpn-instance-to-vpn-id {
83 key vpn-instance-name;
84 leaf vpn-instance-name {
92 "The vrf-id command configures a route distinguisher (RD)
93 for the IPv4 or IPv6 address family of a VPN instance or
94 vpn instance name for internal vpn case.";
100 container vpn-id-to-vpn-instance {
106 leaf vpn-instance-name {
111 "The vrf-id command configures a route distinguisher (RD)
112 for the IPv4 or IPv6 address family of a VPN instance or
113 vpn instance name for internal vpn case.";
118 description "The VPN is external?";
123 container vpn-to-pseudo-port-tag-data {
124 description "Makes a correspondence between VRFs and their corresponding VpnPseudoPort";
125 list vpn-to-pseudo-port-tag {
131 description "Vpn Pseudo Logical Port Tag";
137 container vpn-instance-op-data {
139 list vpn-instance-op-data-entry {
141 leaf vpn-id { type uint32;}
144 "The vrf-id command configures a route distinguisher (RD)
145 for the IPv4 or IPv6 address family of a VPN instance or
146 vpn instance name for internal vpn case.";
150 leaf vpn-instance-name {
151 description "Typical the VPN Uuid";
155 leaf vpn-interface-count { type uint32; }
157 list vpn-to-dpn-list {
162 list vpn-interfaces {
164 leaf interface-name {
170 leaf ip-address { type string; }
174 "This flag indicates the state of the DPN.
175 Active state indicates atleast one vpn interface present on that DPN for the vpn.
176 Inactive state indicates no vpn interface present on that DPN for this vpn.";
193 container vpnTargets {
195 "The vpn-target command configures the export or import VPN target
196 extended community attribute for the VPN instance IPv4/IPv6 address
198 Format is ASN:nn or IP-address:nn.";
202 max-elements "unbounded";
205 "L3vpn vpntarget configure class";
209 "Vpn-target: adds VPN target extended community attribute to the
210 export or import VPN target extended community list. The
211 vpn-target can be expressed in either of the following formats:
212 (1)16-bit AS number:32-bit user-defined number
213 For example, 1:3. The AS number ranges from 0 to 65535. The
214 user-defined number ranges from 0 to 4294967295. The AS number
215 and the user-defined number cannot be 0s at the same time.
216 That is, a VPN target cannot be 0:0.
217 (2)32-bit IP address:16-bit user-defined number
218 For example, 192.168.122.15:1. The IP address ranges from
219 0.0.0.0 to 255.255.255.255. The user-defined number ranges from
221 (3)32-bit IP address:16-bit user-defined number
222 For example, 192.168.122.15:1. An IP address ranges from
223 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0
232 "Specifies the vpn target type, export-extcommunity:
233 specifies the extended community attributes carried in routing
234 information to be sent. import-extcommunity: receives routing
235 information carrying specified extended community attributes.";
238 enum export_extcommunity {
240 description "export-extcommunity:";
242 enum import_extcommunity {
244 description "import-extcommunity:";
248 description "export-extcommunity & import-extcommunity:";
263 "Task not applicable";
268 "Task is in pending state";
273 "Task has been completed";
277 "This value the status of any task.
278 The possible values are NA, PENDING or DONE.
283 container subnet-op-data {
285 list subnet-op-data-entry {
289 description "UUID representing the subnet ";
293 description "DpnId for the DPN used as nexthop for this subnet";
297 description "VPN Instance name";
304 description "Subnet in cidr notation";
306 leaf route-adv-state {
308 description "The status of the subnet route advertisement. Route advertisement could be in a NA, PENDING or DONE state.";
318 list vpn-interfaces {
320 leaf interface-name {
329 container port-op-data {
331 list port-op-data-entry {
335 description "UUID in string format representing the port ";
339 description "Back reference to obtain the subnet for a port ";
348 grouping dpn-in-vpn-event {
349 leaf dpn-id { type uint64; }
350 leaf vpn-name { type string; }
351 leaf rd { type string; }
354 notification add-dpn-event {
355 container add-event-data {
356 uses dpn-in-vpn-event;
360 notification remove-dpn-event {
361 container remove-event-data {
362 uses dpn-in-vpn-event;
367 * Configured Transport Type for l3vpn service.
369 container conf-transport-type-l3vpn {
370 leaf transport-type {
373 base odlif:tunnel-type-base;
376 "L3VPN service will use this config to setup
377 the transport type for tunnels between DPNs.";
381 /* container to maintain mapping between neutron router and DPN(s) on which vpn-interfaces for router are present */
382 container neutron-router-dpns {
384 list router-dpn-list {
386 leaf router-id { type string;}
387 list dpn-vpninterfaces-list {
389 leaf dpn-id { type uint64;}
390 list router-interfaces {
392 leaf interface { type string; }
399 container router-interfaces {
400 list router-interface {
402 leaf interface-name { type string; }
403 leaf router-name { type string; }