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"; }
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 nextHopIp { 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;}
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-instance-op-data {
102 list vpn-instance-op-data-entry {
104 leaf vpn-id { type uint32;}
105 leaf vpn-instance-name {
110 "The vrf-id command configures a route distinguisher (RD)
111 for the IPv4 or IPv6 address family of a VPN instance or
112 vpn instance name for internal vpn case.";
116 leaf vpn-interface-count { type uint32; }
118 list vpn-to-dpn-list {
123 list vpn-interfaces {
125 leaf interface-name {
136 leaf cleanup_complete { type boolean;}
145 "Task not applicable";
150 "Task is in pending state";
155 "Task has been completed";
159 "This value the status of any task.
160 The possible values are NA, PENDING or DONE.
165 container subnet-op-data {
167 list subnet-op-data-entry {
171 description "UUID representing the subnet ";
175 description "DpnId for the DPN used as nexthop for this subnet";
179 description "VPN Instance name";
186 description "Subnet in cidr notation";
188 leaf route-adv-state {
190 description "The status of the subnet route advertisement. Route advertisement could be in a NA, PENDING or DONE state.";
200 list vpn-interfaces {
202 leaf interface-name {
211 container port-op-data {
213 list port-op-data-entry {
217 description "UUID in string format representing the port ";
221 description "Back reference to obtain the subnet for a port ";
229 grouping dpn-in-vpn-event {
230 leaf dpn-id { type uint64; }
231 leaf vpn-name { type string; }
232 leaf rd { type string; }
235 notification add-dpn-event {
236 container add-event-data {
237 uses dpn-in-vpn-event;
241 notification remove-dpn-event {
242 container remove-event-data {
243 uses dpn-in-vpn-event;
248 /* container to maintain mapping between neutron router and DPN(s) on which vpn-interfaces for router are present */
249 container neutron-router-dpns {
251 list router-dpn-list {
253 leaf router-id { type string;}
254 list dpn-vpninterfaces-list {
256 leaf dpn-id { type uint64;}
257 list router-interfaces {
259 leaf interface { type string; }
265 container router-interfaces {
266 list router-interface {
268 leaf interface-name { type string; }
269 leaf router-name { type string; }
274 * Configured Transport Type for l3vpn service.
276 container conf-transport-type-l3vpn {
277 leaf transport-type {
280 base odlif:tunnel-type-base;
283 "L3VPN service will use this config to setup
284 the transport type for tunnels between DPNs.";