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;}
107 "The vrf-id command configures a route distinguisher (RD)
108 for the IPv4 or IPv6 address family of a VPN instance or
109 vpn instance name for internal vpn case.";
113 leaf vpn-interface-count { type uint32; }
115 list vpn-to-dpn-list {
120 list vpn-interfaces {
122 leaf interface-name {
141 "Task not applicable";
146 "Task is in pending state";
151 "Task has been completed";
155 "This value the status of any task.
156 The possible values are NA, PENDING or DONE.
161 container subnet-op-data {
163 list subnet-op-data-entry {
167 description "UUID representing the subnet ";
171 description "DpnId for the DPN used as nexthop for this subnet";
175 description "VPN Instance name";
182 description "Subnet in cidr notation";
184 leaf route-adv-state {
186 description "The status of the subnet route advertisement. Route advertisement could be in a NA, PENDING or DONE state.";
196 list vpn-interfaces {
198 leaf interface-name {
207 container port-op-data {
209 list port-op-data-entry {
213 description "UUID in string format representing the port ";
217 description "Back reference to obtain the subnet for a port ";
225 grouping dpn-in-vpn-event {
226 leaf dpn-id { type uint64; }
227 leaf vpn-name { type string; }
228 leaf rd { type string; }
231 notification add-dpn-event {
232 container add-event-data {
233 uses dpn-in-vpn-event;
237 notification remove-dpn-event {
238 container remove-event-data {
239 uses dpn-in-vpn-event;
244 /* container to maintain mapping between neutron router and DPN(s) on which vpn-interfaces for router are present */
245 container neutron-router-dpns {
247 list router-dpn-list {
249 leaf router-id { type string;}
250 list dpn-vpninterfaces-list {
252 leaf dpn-id { type uint64;}
253 list router-interfaces {
255 leaf interface { type string; }
261 container router-interfaces {
262 list router-interface {
264 leaf interface-name { type string; }
265 leaf router-name { type string; }
270 * Configured Transport Type for l3vpn service.
272 container conf-transport-type-l3vpn {
273 leaf transport-type {
276 base odlif:tunnel-type-base;
279 "L3VPN service will use this config to setup
280 the transport type for tunnels between DPNs.";