2 module l3vpn-instances-interfaces {
4 namespace "urn:opendaylight:netvirt:neutronvpn:l3vpn";
5 prefix l3vpn-instances-interfaces;
7 import ietf-yang-types { prefix yang; revision-date "2013-07-15";}
9 import ietf-interfaces {
11 //rfc7223-YANG Interface Management
13 import yang-ext {prefix ext; revision-date "2013-07-09";}
16 revision-date "2015-06-02";
18 revision "2020-02-04" {
19 description "This YANG module defines the generic configuration data for L3VPN service.
20 This has been adapted from l3vpn.yang";
26 container vpn-instances {
28 max-elements "unbounded";
30 key "vpn-instance-name";
32 leaf vpn-instance-name {
36 "The name of the vpn-instance.";
39 leaf-list route-distinguisher {
42 "A set of configuration parameters that is applicable to both IPv4 and
43 IPv6 address family for a VPN instance.
45 Format is ASN:nn or IP-address:nn.";
53 container vpnTargets {
56 "The vpn-target command configures the export or import VPN target
57 extended community attribute for the VPN instance IPv4/IPv6 address
59 Format is ASN:nn or IP-address:nn.";
63 max-elements "unbounded";
67 "L3vpn vpntarget configure class";
72 "Vpn-target: adds VPN target extended community attribute to the
73 export or import VPN target extended community list. The
74 vpn-target can be expressed in either of the following formats:
75 (1)16-bit AS number:32-bit user-defined number
76 For example, 1:3. The AS number ranges from 0 to 65535. The
77 user-defined number ranges from 0 to 4294967295. The AS number
78 and the user-defined number cannot be 0s at the same time.
79 That is, a VPN target cannot be 0:0.
80 (2)32-bit IP address:16-bit user-defined number
81 For example, 192.168.122.15:1. The IP address ranges from
82 0.0.0.0 to 255.255.255.255. The user-defined number ranges from
84 (3)32-bit IP address:16-bit user-defined number
85 For example, 192.168.122.15:1. An IP address ranges from
86 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0
99 "Specifies the vpn target type, export-extcommunity:
100 specifies the extended community attributes carried in routing
101 information to be sent. import-extcommunity: receives routing
102 information carrying specified extended community attributes.";
106 enum export_extcommunity {
108 description "export-extcommunity:";
110 enum import_extcommunity {
112 description "import-extcommunity:";
116 description "export-extcommunity & import-extcommunity:";
127 "The type of the VPN Instance.
128 false indicates it is an L3VPN.
129 true indicates it is an EVPN";
134 enum InternetBGPVPN {
136 description "Internet BGPVPN";
140 description "BGPVPN";
144 description "InternalVPN";
150 leaf ip-address-family-configured {
161 enum "ipv4-and-ipv6" {
175 augment "/vpn-interfaces/vpn-interface" {
176 ext:augment-identifier "adjacencies";
180 grouping adjacency-list{
183 leaf-list next-hop-ip-list { type string; }
184 leaf ip_address {type string;}
185 leaf adjacency_type {
186 description "The type of adjacency";
188 enum "primary-adjacency" {
190 description "Primary adjacency type.";
194 description "Learnt ip adjacency type.";
198 description "Extra route adjacency type.";
201 default "extra-route";
203 leaf mac_address {type string;} /* optional */
204 leaf subnet_id {type yang:uuid;} /* optional */
205 leaf subnet_gateway_ip {type string;} /* optional */
206 leaf phys-network-func {
209 description "Value of True indicates this is an adjacency of a device in a provider network";
211 uses adjacency-op-data;
215 grouping adjacency-op-data{
216 leaf label { type uint32; config "false"; } /* optional */
217 leaf subnet_gateway_mac_address {type string; config "false";} /* optional */
218 leaf vrf-id { type string; config "false"; }
219 leaf marked_for_deletion {
222 description "This flag if true suggest this adjancency has been marked for deletion";
228 * Binding Interfaces to a VPN Instance.
231 container vpn-interfaces {
232 description "VPN is enabled on interfaces.";
236 max-elements "unbounded";
240 path "/if:interfaces/if:interface/if:name";
243 list vpn-instance-names {
250 leaf associated-subnet-type {
254 description "V4 Router Internal VPN";
258 description "V6 Router Internal VPN";
262 description "BGPVPN Internet";
264 enum V4AndV6Subnets {
266 description "BGPVPN dual stack or V6/V4 Router or undefined";
274 leaf router-interface {
277 uses nvpn:network-attributes;