import org.opendaylight.netvirt.elan.utils.ElanUtils;
import org.opendaylight.netvirt.elanmanager.api.ElanHelper;
import org.opendaylight.netvirt.vpnmanager.api.IVpnManager;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction;
import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.servicebinding.rev160406.service.bindings.services.info.BoundServices;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.forwarding.entries.MacEntry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.VrfEntryBase;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.neutron.vpn.portip.port.data.VpnPortipToPort;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.netvirt.neutronvpn.api.utils.NeutronUtils;
import org.opendaylight.netvirt.vpnmanager.api.IVpnManager;
import org.opendaylight.serviceutils.upgrade.UpgradeState;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnAfConfig;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInstances;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInterfaces;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstanceKey;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterface;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterfaceKey;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.snatint.ip.port.map.intip.port.map.IpPortKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.snatint.ip.port.map.intip.port.map.ip.port.IntIpProtoType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.snatint.ip.port.map.intip.port.map.ip.port.IntIpProtoTypeKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnAfConfig;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInstances;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstanceKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.GetFixedIPsForNeutronPortInputBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.GetFixedIPsForNeutronPortOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.NetworkMaps;
--- /dev/null
+
+module l3vpn-instances-interfaces {
+
+ namespace "urn:opendaylight:netvirt:neutronvpn:l3vpn";
+ prefix l3vpn-instances-interfaces;
+
+ import ietf-yang-types { prefix yang; revision-date "2013-07-15";}
+
+ import ietf-interfaces {
+ prefix if;
+ //rfc7223-YANG Interface Management
+ }
+ import yang-ext {prefix ext; revision-date "2013-07-09";}
+ import neutronvpn {
+ prefix nvpn;
+ revision-date "2015-06-02";
+ }
+ revision "2020-02-04" {
+ description "This YANG module defines the generic configuration data for L3VPN service.
+ This has been adapted from l3vpn.yang";
+ }
+
+ grouping vpn-af-config {
+ description "A set of configuration parameters that is applicable to both IPv4 and
+ IPv6 address family for a VPN instance .";
+
+ leaf-list route-distinguisher {
+ description "The route-distinguisher command configures a route distinguisher (RD)
+ for the IPv4 or IPv6 address family of a VPN instance. Format is ASN:nn or IP-address:nn.";
+
+ config "true";
+ type string {
+ length "3..21";
+ }
+ }
+
+ container vpnTargets {
+ description "The vpn-target command configures the export or import VPN target
+ extended community attribute for the VPN instance IPv4/IPv6 address family.
+ Format is ASN:nn or IP-address:nn.";
+
+ list vpnTarget {
+ key "vrfRTValue";
+ max-elements "unbounded";
+ min-elements "0";
+ description "L3vpn vpntarget configure class";
+
+ leaf vrfRTValue {
+
+ description "Vpn-target: adds VPN target extended community attribute to the
+ export or import VPN target extended community list. The
+ vpn-target can be expressed in either of the following formats:
+ (1)16-bit AS number:32-bit user-defined number
+ For example, 1:3. The AS number ranges from 0 to 65535. The
+ user-defined number ranges from 0 to 4294967295. The AS number
+ and the user-defined number cannot be 0s at the same time.
+ That is, a VPN target cannot be 0:0.
+ (2)32-bit IP address:16-bit user-defined number
+ For example, 192.168.122.15:1. The IP address ranges from
+ 0.0.0.0 to 255.255.255.255. The user-defined number ranges from 0 to 65535.
+ (3)32-bit IP address:16-bit user-defined number
+ For example, 192.168.122.15:1. An IP address ranges from
+ 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0 to 65535.";
+
+ config "true";
+ mandatory "true";
+ type string {
+ length "3..21";
+ }
+ }
+
+ leaf vrfRTType {
+ description "Specifies the vpn target type, export-extcommunity:
+ specifies the extended community attributes carried in routing
+ information to be sent. import-extcommunity: receives routing
+ information carrying specified extended community attributes.";
+
+ mandatory "true";
+ type enumeration {
+ enum export_extcommunity {
+ value "0";
+ description "export-extcommunity:";
+ }
+ enum import_extcommunity {
+ value "1";
+ description "import-extcommunity:";
+ }
+ enum both {
+ value "2";
+ description "export-extcommunity & import-extcommunity:";
+ }
+ }
+ }
+ }
+ }
+
+ container apply-label {
+ description "Apply one label mode for the VPN instance route.";
+
+ choice apply-label-mode {
+ case per-route {
+ description "The apply-label per-route command enables the one-label-per-route
+ mode. The VPN instance IPv4/IPv6 address family assigns a unique
+ label to each route to be sent to the peer PE.";
+
+ leaf apply-label-per-route {
+ type boolean;
+ default "true";
+ }
+ }
+ case per-instance {
+ description "The apply-label per-instance command applies one label to all VPN
+ instance IPv4 address family or IPv6 address family routes to a peer PE.";
+
+ leaf apply-label-per-instance {
+ type boolean;
+ default "false";
+ }
+ }
+ }
+ }//End of "container apply-label"
+
+ leaf import-route-policy {
+ description "The import route-policy command associates a VPN instance enabled
+ with the IPv4 or IPv6 address family with an import routing policy.
+ Only one import routing policy can be associated with a VPN instance
+ enabled with the IPv4 or IPv6 address family. If the import route-policy
+ command is run more than once, the latest configuration overrides the previous ones.";
+
+ config "true";
+ type string {
+ length "1..40";
+ }
+ }
+
+ leaf export-route-policy {
+ description "The export route-policy command associates a VPN instance enabled
+ with the IPv4 or IPv6 address family with an export routing policy.
+ Only one export routing policy can be associated with a VPN instance enabled with
+ the IPv4 or IPv6 address family. If the export route-policy command is run more than once,
+ the latest configuration overrides the previous ones.";
+
+ config "true";
+ type string {
+ length "1..40";
+ }
+ }
+
+ container prefix-limit {
+ description "The prefix limit command sets a limit on the maximum number of
+ prefixes supported in the existing VPN instance, preventing the
+ PE from importing excessive VPN route prefixes.";
+
+ leaf prefix-limit-number {
+ description "Specifies the maximum number of prefixes supported in the VPN
+ instance IPv4 or IPv6 address family.";
+
+ type uint32 {
+ range "1..4294967295";
+ }
+ }
+
+ choice prefix-limit-action {
+ case enable-alert-percent {
+ leaf alert-percent-value {
+ description "Specifies the proportion of the alarm threshold to the maximum
+ number of prefixes.";
+ type uint8 {
+ range "1..100";
+ }
+ }
+ leaf route-unchanged {
+ description "Indicates that the routing table remains unchanged. By default,
+ route-unchanged is not configured. When the number of prefixes
+ in the routing table is greater than the value of the parameter number,
+ routes are processed as follows:
+ (1)If route-unchanged is configured, routes in the routing table remain unchanged.
+ (2)If route-unchanged is not configured, all routes in the
+ routing table are deleted and then re-added.";
+
+ config "true";
+ type boolean;
+ default "false";
+ }
+ }
+ case enable-simple-alert {
+ leaf simple-alert {
+ description "Indicates that when the number of VPN route prefixes exceeds
+ number, prefixes can still join the VPN routing table and alarms are displayed.";
+
+ config "true";
+ type boolean;
+ default "false";
+ }
+ }
+ }
+ }
+
+ container routing-table-limit {
+ description "The routing-table limit command sets a limit on the maximum number of
+ routes that the IPv4 or IPv6 address family of a VPN instance can support.
+ By default, there is no limit on the maximum number of routes that the
+ IPv4 or IPv6 address family of a VPN instance can support, but the
+ total number of private network and public network routes on a device
+ cannot exceed the allowed maximum number of unicast routes.";
+
+ leaf routing-table-limit-number {
+ description "Specifies the maximum number of routes supported by a VPN instance. ";
+ config "true";
+ type uint32 {
+ range "1..4294967295";
+ }
+ }
+ choice routing-table-limit-action {
+ case enable-alert-percent {
+ leaf alert-percent-value {
+ description "Specifies the percentage of the maximum number of routes. When
+ the maximum number of routes that join the VPN instance is up
+ to the value (number*alert-percent)/100, the system prompts alarms.
+ The VPN routes can be still added to the routing table,
+ but after the number of routes reaches number, the subsequent routes are dropped.";
+
+ config "true";
+ type uint8 {
+ range "1..100";
+ }
+ }
+ }
+ case enable-simple-alert {
+ leaf simple-alert {
+ description "Indicates that when VPN routes exceed number, routes can still
+ be added into the routing table, but the system prompts alarms.
+ However, after the total number of VPN routes and network public
+ routes reaches the unicast route limit specified in the License,
+ the subsequent VPN routes are dropped.";
+ config "true";
+ type boolean;
+ }
+ }
+ }
+ }
+
+ leaf vpn-frr {
+ description "Enable VPN FRR in the VPN instance address family view.
+ If a PE is connected to two other PEs, running the vpn frr command in
+ the VPN instance address family view of the PE enables VPN FRR and
+ improves network reliability. After VPN FRR is configured, traffic can
+ switch to the secondary LSP immediately after the primary LSP becomes faulty.";
+
+ type boolean;
+ default "false";
+ }
+
+
+ /*
+ * VPN QoS.
+ */
+ container l3vpnVrfPipe {
+ description "The diffserv-mode command configures the mode of the MPLS
+ differentiated service (Diff-Serv) for ensuring end-to-end QoS.";
+
+ leaf pipeMode {
+ description "Pipe mode";
+
+ type enumeration {
+ enum pipe {
+ value "0";
+ description "pipe: Indicates that the Pipe MPLS Diff-Serv mode is adopted.";
+ }
+ enum shortPipe {
+ value "1";
+ description "shortPipe: Indicates that the Short-pipe MPLS Diff-Serv mode is adopted.";
+ }
+ enum uniform {
+ value "2";
+ description "uniform: Indicates that the Uniform MPLS Diff-Serv mode is adopted.";
+ }
+ }
+ default "uniform";
+ }
+
+ leaf serviceClass {
+ description "Service Class, Specifies the service type when the packet enters the
+ public network from the private network. The values are cs7, cs6, ef, af4, af3, af2, af1, be.";
+
+ type enumeration {
+ enum be {
+ value "0";
+ description "be:";
+ }
+ enum af1 {
+ value "1";
+ description "af1:";
+ }
+ enum af2 {
+ value "2";
+ description "af2:";
+ }
+ enum af3 {
+ value "3";
+ description "af3:";
+ }
+ enum af4 {
+ value "4";
+ description "af4:";
+ }
+ enum ef {
+ value "5";
+ description "ef:";
+ }
+ enum cs6 {
+ value "6";
+ description "cs6:";
+ }
+ enum cs7 {
+ value "7";
+ description "cs7:";
+ }
+ }
+ default "be";
+ }
+
+ leaf color {
+ description "Specifies a color for marking the discard priority of a packet
+ transferred from a private network to a public network. The values
+ are green, yellow, and red.";
+
+ type enumeration {
+ enum green {
+ value "0";
+ description "green:";
+ }
+ enum yellow {
+ value "1";
+ description "yellow:";
+ }
+ enum red {
+ value "2";
+ description "red:";
+ }
+ }
+ default "green";
+ }
+
+ leaf dsName {
+ description "Specifies the DS domain name of the specified Per-Hop Behavior (PHB)
+ applied to the egress in Short pipe mode. It is a string of 1 to 31 characters.";
+
+ type string;
+ default "default";
+ }
+ }
+
+ container l3vpnTtlMode {
+ description "The ttl-mode command enables MPLS to process the TTL in a specified
+ mode. By default, MPLS processes the TTL in pipe mode.";
+
+ leaf ttlMode {
+ description "TTL mode";
+ default "pipe";
+ type enumeration {
+ enum pipe {
+ value "0";
+ description "pipe: Enables MPLS to process the TTL in pipe mode.";
+ }
+
+ enum uniform {
+ value "1";
+ description "uniform: Enables MPLS to process the TTL in uniform mode.";
+ }
+ }
+ }
+ }
+
+ leaf tunnel-policy {
+ description "The tnl-policy command associates the IPv4 or IPv6 address family of
+ a VPN instance with a tunnel policy.";
+
+ type string {
+ length "1..39";
+ }
+ }
+
+ container importRibs {
+ description "Import route class";
+
+ leaf protocol {
+ description "Specifies the protocol from which routes are imported.
+ At present, In the IPv4 unicast address family view, the protocol
+ can be IS-IS,static, direct and BGP.";
+
+ type enumeration {
+ enum ALL {
+ value "0";
+ description "ALL:";
+ }
+ enum Direct {
+ value "1";
+ description "Direct:";
+ }
+ enum OSPF {
+ value "2";
+ description "OSPF:";
+ }
+ enum ISIS {
+ value "3";
+ description "ISIS:";
+ }
+ enum Static {
+ value "4";
+ description "Static:";
+ }
+ enum RIP {
+ value "5";
+ description "RIP:";
+ }
+ enum BGP {
+ value "6";
+ description "BGP:";
+ }
+ enum OSPFV3 {
+ value "7";
+ description "OSPFV3:";
+ }
+ enum RIPNG {
+ value "8";
+ description "RIPNG:";
+ }
+ enum INVALID {
+ value "9";
+ description "INVALID:";
+ }
+ }
+ }
+
+ leaf processId {
+ description "Specifies the process ID if the protocol from routes are imported is IS-IS.";
+
+ default "0";
+ type uint32 {
+ range "0..4294967295";
+ }
+ }
+
+ leaf bgp-valid-route {
+ type boolean;
+ }
+
+ leaf policyName {
+ description "Policy Id for import routes";
+ type string {}
+ }
+ }
+
+ leaf traffic-statistics {
+ description "The traffic-statistics enable command enables traffic statistics
+ for a VPN instance.";
+
+ type boolean;
+ default "false";
+ }
+ }
+
+
+ /*
+ * VPN instance view.
+ */
+ container vpn-instances {
+ description "VPN instances configuration parameters. VPN instances support both the
+ IPv4 and IPv6 address families.";
+
+ list vpn-instance {
+ max-elements "unbounded";
+ min-elements "0";
+ key "vpn-instance-name";
+ description "Specifies the name of the VPN instance. It is a string of 1 to 31
+ case-sensitive characters.";
+
+ leaf vpn-instance-name {
+ mandatory "true";
+ type string;
+ description "The name of the vpn-instance.";
+ }
+ leaf type {
+ description "The type of the VPN Instance.
+ L3 indicates it is an L3VPN.
+ L2 indicates it is an EVPN";
+
+ type enumeration {
+ enum l3 {
+ value "0";
+ description "L3VPN";
+ }
+ enum l2 {
+ value "1";
+ description "EVPN";
+ }
+ }
+ default "l3";
+ }
+
+ leaf l3vni {
+ type uint32;
+ }
+
+ leaf description {
+ description "A textual description of VPN instance, the VPN instance description
+ helps users memorize the VPN instance.";
+
+ type string {
+ length "1..242";
+ pattern "([^?]*)";
+ }
+ }
+
+ container ipv4-family {
+ description "The IPv4 address family is enabled for the VPN instance.";
+ uses vpn-af-config;
+ }
+
+ container ipv6-family {
+ description "The IPv6 address family is enabled for the VPN instance.";
+ uses vpn-af-config;
+ }
+ }
+ }
+}
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.genius.datastoreutils.AsyncDataTreeChangeListenerBase;
import org.opendaylight.netvirt.neutronvpn.api.utils.NeutronConstants;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.CreateIdPoolInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.CreateIdPoolInputBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.CreateIdPoolOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.vpnmaps.VpnMap;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.bgpvpns.rev150903.BgpvpnTypeBase;
import org.opendaylight.yang.gen.v1.urn.opendaylight.neutron.bgpvpns.rev150903.BgpvpnTypeL3;
import org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker;
import org.opendaylight.genius.mdsalutil.MDSALUtil;
import org.opendaylight.netvirt.vpnmanager.api.IVpnManager;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTarget;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.ProviderTypes;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets.VpnTarget;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.NetworkAttributes;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.networkmaps.NetworkMap;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.networkmaps.NetworkMapBuilder;
import org.opendaylight.netvirt.neutronvpn.evpn.utils.NeutronEvpnUtils;
import org.opendaylight.netvirt.vpnmanager.api.IVpnManager;
import org.opendaylight.netvirt.vpnmanager.api.VpnHelper;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInstances;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInterfaces;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.VpnTargets;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.VpnTargetsBuilder;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTarget;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTargetBuilder;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTargetKey;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstanceBuilder;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstanceKey;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.vpn.instance.Ipv4FamilyBuilder;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.vpn.instance.Ipv6FamilyBuilder;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterface;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterfaceBuilder;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterfaceKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.external.networks.NetworksBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.external.networks.NetworksKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.config.rev160806.NeutronvpnConfig;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInstances;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.VpnTargets;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.VpnTargetsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets.VpnTarget;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets.VpnTargetBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets.VpnTargetKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstanceBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstanceKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.vpn.instance.Ipv4FamilyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.vpn.instance.Ipv6FamilyBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.AssociateNetworksInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.AssociateNetworksOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.AssociateNetworksOutputBuilder;
import org.opendaylight.netvirt.neutronvpn.api.enums.IpVersionChoice;
import org.opendaylight.netvirt.neutronvpn.api.utils.NeutronConstants;
import org.opendaylight.netvirt.neutronvpn.api.utils.NeutronUtils;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInstances;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInterfaces;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstanceKey;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterface;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterfaceKey;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.external.subnets.SubnetsKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.floating.ip.port.info.FloatingIpIdToPortMapping;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.floating.ip.port.info.FloatingIpIdToPortMappingKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInstances;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstanceKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.NetworkMaps;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.NeutronVpnPortIdSubportData;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.NeutronVpnPortipPortData;
import org.opendaylight.netvirt.neutronvpn.NeutronvpnManager;
import org.opendaylight.netvirt.neutronvpn.NeutronvpnUtils;
import org.opendaylight.netvirt.vpnmanager.api.VpnHelper;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTarget;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets.VpnTarget;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.CreateEVPNInput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.CreateEVPNOutput;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.CreateEVPNOutputBuilder;
import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
import org.opendaylight.netvirt.elanmanager.api.ElanHelper;
import org.opendaylight.netvirt.vpnmanager.api.IVpnManager;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.EvpnAugmentation;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.EvpnAugmentationBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.evpn.rd.to.networks.EvpnRdToNetwork;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.evpn.rd.to.networks.EvpnRdToNetworkBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.evpn.rd.to.networks.EvpnRdToNetworkKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.opendaylight.genius.infra.TypedReadWriteTransaction;
import org.opendaylight.genius.infra.TypedWriteTransaction;
import org.opendaylight.netvirt.fibmanager.api.RouteOrigin;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTarget;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.fibmanager.rev150330.vrfentries.VrfEntry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.adjacency.list.Adjacency;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets.VpnTarget;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.neutron.vpn.portip.port.data.VpnPortipToPort;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.subnetmaps.Subnetmap;
import org.opendaylight.yangtools.yang.common.Uint32;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInstances;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInterfaces;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstanceKey;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterface;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterfaceKey;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.vpn._interface.VpnInstanceNames;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntryKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnToDpnList;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnToDpnListKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInstances;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstanceKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.Subnetmaps;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.subnetmaps.Subnetmap;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.subnetmaps.SubnetmapKey;
}
- grouping vpn-af-config {
- description
- "A set of configuration parameters that is applicable to both IPv4 and
- IPv6 address family for a VPN instance .";
-
- leaf-list route-distinguisher {
- description
- "The route-distinguisher command configures a route distinguisher (RD)
- for the IPv4 or IPv6 address family of a VPN instance.
-
- Format is ASN:nn or IP-address:nn.";
-
- config "true";
- type string {
- length "3..21";
- }
- }
-
- container vpnTargets {
- description
- "The vpn-target command configures the export or import VPN target
- extended community attribute for the VPN instance IPv4/IPv6 address
- family.
- Format is ASN:nn or IP-address:nn.";
-
- list vpnTarget {
- key "vrfRTValue";
- max-elements "unbounded";
- min-elements "0";
- description
- "L3vpn vpntarget configure class";
-
- leaf vrfRTValue {
-
- description
- "Vpn-target: adds VPN target extended community attribute to the
- export or import VPN target extended community list. The
- vpn-target can be expressed in either of the following formats:
- (1)16-bit AS number:32-bit user-defined number
- For example, 1:3. The AS number ranges from 0 to 65535. The
- user-defined number ranges from 0 to 4294967295. The AS number
- and the user-defined number cannot be 0s at the same time.
- That is, a VPN target cannot be 0:0.
- (2)32-bit IP address:16-bit user-defined number
- For example, 192.168.122.15:1. The IP address ranges from
- 0.0.0.0 to 255.255.255.255. The user-defined number ranges from
- 0 to 65535.
- (3)32-bit IP address:16-bit user-defined number
- For example, 192.168.122.15:1. An IP address ranges from
- 0.0.0.0 to 255.255.255.255. A user-defined number ranges from 0
- to 65535.";
-
- config "true";
- mandatory "true";
- type string {
- length "3..21";
- }
- }
-
- leaf vrfRTType {
- description
- "Specifies the vpn target type, export-extcommunity:
- specifies the extended community attributes carried in routing
- information to be sent. import-extcommunity: receives routing
- information carrying specified extended community attributes.";
-
- mandatory "true";
- type enumeration {
- enum export_extcommunity {
- value "0";
- description "export-extcommunity:";
- }
- enum import_extcommunity {
- value "1";
- description "import-extcommunity:";
- }
- enum both {
- value "2";
- description "export-extcommunity & import-extcommunity:";
- }
- }
- }
- }
- }
-
- container apply-label {
- description
- "Apply one label mode for the VPN instance route.";
-
- choice apply-label-mode {
- case per-route {
- description
- "The apply-label per-route command enables the one-label-per-route
- mode. The VPN instance IPv4/IPv6 address family assigns a unique
- label to each route to be sent to the peer PE.";
-
- leaf apply-label-per-route {
- type boolean;
- default "true";
- }
- }
- case per-instance {
- description
- "The apply-label per-instance command applies one label to all VPN
- instance IPv4 address family or IPv6 address family routes to a
- peer PE.";
-
- leaf apply-label-per-instance {
- type boolean;
- default "false";
- }
- }
- }
- }//End of "container apply-label"
-
- leaf import-route-policy {
- description
- "The import route-policy command associates a VPN instance enabled
- with the IPv4 or IPv6 address family with an import routing policy.
- Only one import routing policy can be associated with a VPN instance
- enabled with the IPv4 or IPv6 address family. If the import
- route-policy command is run more than once, the latest configuration
- overrides the previous ones.";
-
- config "true";
- type string {
- length "1..40";
- }
- }
-
- leaf export-route-policy {
- description
- "The export route-policy command associates a VPN instance enabled
- with the IPv4 or IPv6 address family with an export routing policy.
- Only one export routing policy can be associated with a VPN instance
- enabled with the IPv4 or IPv6 address family. If the export
- route-policy command is run more than once, the latest configuration
- overrides the previous ones.";
-
- config "true";
- type string {
- length "1..40";
- }
- }
-
-
- container prefix-limit {
- description
- "The prefix limit command sets a limit on the maximum number of
- prefixes supported in the existing VPN instance, preventing the
- PE from importing excessive VPN route prefixes.";
-
- leaf prefix-limit-number {
- description
- "Specifies the maximum number of prefixes supported in the VPN
-
-
- instance IPv4 or IPv6 address family.";
-
- type uint32 {
- range "1..4294967295";
- }
- }
-
- choice prefix-limit-action {
- case enable-alert-percent {
- leaf alert-percent-value {
- description
- "Specifies the proportion of the alarm threshold to the maximum
- number of prefixes.";
- type uint8 {
- range "1..100";
- }
- }
- leaf route-unchanged {
- description
- "Indicates that the routing table remains unchanged. By default,
- route-unchanged is not configured. When the number of prefixes
- in the routing table is greater than the value of the parameter
- number, routes are processed as follows:
- (1)If route-unchanged is configured, routes in the routing table
- remain unchanged.
- (2)If route-unchanged is not configured, all routes in the
- routing table are deleted and then re-added.";
-
- config "true";
- type boolean;
- default "false";
- }
- }
- case enable-simple-alert {
- leaf simple-alert {
- description
- "Indicates that when the number of VPN route prefixes exceeds
- number, prefixes can still join the VPN routing table and
- alarms are displayed.";
-
- config "true";
- type boolean;
- default "false";
- }
- }
- }
- }
-
-
-
- container routing-table-limit {
- description
- "The routing-table limit command sets a limit on the maximum number of
- routes that the IPv4 or IPv6 address family of a VPN instance can
- support.
- By default, there is no limit on the maximum number of routes that the
- IPv4 or IPv6 address family of a VPN instance can support, but the
- total number of private network and public network routes on a device
- cannot exceed the allowed maximum number of unicast routes.";
-
- leaf routing-table-limit-number {
- description
- "Specifies the maximum number of routes supported by a VPN instance.
- ";
-
- config "true";
- type uint32 {
- range "1..4294967295";
- }
- }
- choice routing-table-limit-action {
- case enable-alert-percent {
- leaf alert-percent-value {
- description
- "Specifies the percentage of the maximum number of routes. When
- the maximum number of routes that join the VPN instance is up
- to the value (number*alert-percent)/100, the system prompts
- alarms. The VPN routes can be still added to the routing table,
- but after the number of routes reaches number, the subsequent
- routes are dropped.";
-
- config "true";
- type uint8 {
- range "1..100";
- }
- }
- }
- case enable-simple-alert {
- leaf simple-alert {
- description
- "Indicates that when VPN routes exceed number, routes can still
- be added into the routing table, but the system prompts alarms.
- However, after the total number of VPN routes and network public
- routes reaches the unicast route limit specified in the License,
- the subsequent VPN routes are dropped.";
-
- config "true";
- type boolean;
-
- }
- }
- }
- }
-
- leaf vpn-frr {
- description
- "Enable VPN FRR in the VPN instance address family view.
- If a PE is connected to two other PEs, running the vpn frr command in
- the VPN instance address family view of the PE enables VPN FRR and
- improves network reliability. After VPN FRR is configured, traffic can
- switch to the secondary LSP immediately after the primary LSP becomes
- faulty.";
-
- type boolean;
- default "false";
- }
-
-
- /*
- * VPN QoS.
- */
- container l3vpnVrfPipe {
- description
- "The diffserv-mode command configures the mode of the MPLS
- differentiated service (Diff-Serv) for ensuring end-to-end QoS.";
-
- leaf pipeMode {
- description
- "Pipe mode";
-
- type enumeration {
- enum pipe {
- value "0";
- description
- "pipe: Indicates that the Pipe MPLS Diff-Serv mode is adopted.";
- }
- enum shortPipe {
- value "1";
- description
- "shortPipe: Indicates that the Short-pipe MPLS Diff-Serv mode
- is adopted.";
- }
- enum uniform {
- value "2";
- description
- "uniform: Indicates that the Uniform MPLS Diff-Serv mode is
- adopted.";
- }
- }
- default "uniform";
-
- }
-
- leaf serviceClass {
- description
- "Service Class, Specifies the service type when the packet enters the
- public network from the private network. The values are cs7, cs6, ef,
- af4, af3, af2, af1, be.";
-
- type enumeration {
- enum be {
- value "0";
- description "be:";
- }
- enum af1 {
- value "1";
- description "af1:";
- }
- enum af2 {
- value "2";
- description "af2:";
- }
- enum af3 {
- value "3";
- description "af3:";
- }
- enum af4 {
- value "4";
- description "af4:";
- }
- enum ef {
- value "5";
- description "ef:";
- }
- enum cs6 {
- value "6";
- description "cs6:";
- }
- enum cs7 {
- value "7";
- description "cs7:";
- }
- }
- default "be";
- }
-
-
- leaf color {
- description
- "Specifies a color for marking the discard priority of a packet
- transferred from a private network to a public network. The values
- are green, yellow, and red.";
-
- type enumeration {
- enum green {
- value "0";
- description "green:";
- }
- enum yellow {
- value "1";
- description "yellow:";
- }
- enum red {
- value "2";
- description "red:";
- }
- }
- default "green";
- }
-
- leaf dsName {
- description
- "Specifies the DS domain name of the specified Per-Hop Behavior (PHB)
- applied to the egress in Short pipe mode. It is a string of 1 to 31
- characters.";
-
- type string;
- default "default";
- }
- }
-
- container l3vpnTtlMode {
- description
- "The ttl-mode command enables MPLS to process the TTL in a specified
- mode. By default, MPLS processes the TTL in pipe mode.";
-
- leaf ttlMode {
- description "TTL mode";
- default "pipe";
- type enumeration {
- enum pipe {
- value "0";
- description
- "pipe: Enables MPLS to process the TTL in pipe mode.";
- }
-
-
- enum uniform {
- value "1";
- description
- "uniform: Enables MPLS to process the TTL in uniform mode.";
- }
- }
- }
- }
-
- leaf tunnel-policy {
- description
- "The tnl-policy command associates the IPv4 or IPv6 address family of
- a VPN instance with a tunnel policy.";
-
- type string {
- length "1..39";
- }
- }
-
- container importRibs {
- description
- "Import route class";
-
- leaf protocol {
- description
- "Specifies the protocol from which routes are imported.
- At present, In the IPv4 unicast address family view, the protocol
- can be IS-IS,static, direct and BGP.";
-
- type enumeration {
- enum ALL {
- value "0";
- description "ALL:";
- }
- enum Direct {
- value "1";
- description "Direct:";
- }
- enum OSPF {
- value "2";
- description "OSPF:";
- }
- enum ISIS {
- value "3";
- description "ISIS:";
- }
- enum Static {
- value "4";
-
-
- description "Static:";
- }
- enum RIP {
- value "5";
- description "RIP:";
- }
- enum BGP {
- value "6";
- description "BGP:";
- }
- enum OSPFV3 {
- value "7";
- description "OSPFV3:";
- }
- enum RIPNG {
- value "8";
- description "RIPNG:";
- }
- enum INVALID {
- value "9";
- description "INVALID:";
- }
- }
- }
-
- leaf processId {
- description
- "Specifies the process ID if the protocol from routes are imported is
- IS-IS.";
-
- default "0";
- type uint32 {
- range "0..4294967295";
- }
- }
-
- leaf bgp-valid-route {
- type boolean;
- }
-
- leaf policyName {
- description
- "Policy Id for import routes";
- type string {
- }
- }
-
- }
-
-
- leaf traffic-statistics {
- description
- "The traffic-statistics enable command enables traffic statistics
- for a VPN instance.";
-
- type boolean;
- default "false";
- }
-
- }
-
-
- /*
- * VPN instance view.
- */
- container vpn-instances {
- description
- "VPN instances configuration parameters.
- VPN instances support both the IPv4 and IPv6 address families.";
-
- list vpn-instance {
- max-elements "unbounded";
- min-elements "0";
- key "vpn-instance-name";
- description
- "Specifies the name of the VPN instance. It is a string of 1 to 31
- case-sensitive characters.";
-
- leaf vpn-instance-name {
- mandatory "true";
- type string;
- description
- "The name of the vpn-instance.";
- }
- leaf type {
- description
- "The type of the VPN Instance.
- L3 indicates it is an L3VPN.
- L2 indicates it is an EVPN";
-
- type enumeration {
- enum l3 {
- value "0";
- description "L3VPN";
- }
- enum l2 {
- value "1";
- description "EVPN";
- }
- }
- default "l3";
- }
-
- leaf l3vni {
- type uint32;
- }
-
-
- leaf description {
- description
- "A textual description of VPN instance, the VPN instance description
- helps users memorize the VPN instance.";
-
- type string {
- length "1..242";
- pattern "([^?]*)";
- }
- }
-
-
-
-
- container ipv4-family {
- description
- "The IPv4 address family is enabled for the VPN instance.";
-
- uses vpn-af-config;
- }
-
- container ipv6-family {
- description
- "The IPv6 address family is enabled for the VPN instance.";
-
- uses vpn-af-config;
- }
-
-
- }
- }
-
/*
import org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker;
import org.opendaylight.genius.utils.JvmGlobalLocks;
import org.opendaylight.netvirt.vpnmanager.api.IVpnManager;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTarget;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.ElanInstances;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstanceKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets.VpnTarget;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.NetworkAttributes.NetworkType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.Subnetmaps;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.subnetmaps.Subnetmap;
import org.opendaylight.netvirt.fibmanager.api.IFibManager;
import org.opendaylight.netvirt.vpnmanager.api.InterfaceUtils;
import org.opendaylight.netvirt.vpnmanager.api.VpnHelper;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.DpnEndpoints;
import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.dpn.endpoints.DPNTEPsInfo;
import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.dpn.endpoints.dpn.teps.info.TunnelEndPoints;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpn.to.dpn.list.VpnInterfaces;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.Uint32;
import org.opendaylight.yangtools.yang.common.Uint64;
import org.opendaylight.infrautils.jobcoordinator.JobCoordinator;
import org.opendaylight.infrautils.utils.concurrent.ListenableFutures;
import org.opendaylight.netvirt.fibmanager.api.IFibManager;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnAfConfig;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInstances;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.VpnTargets;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTarget;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.ExternalTunnelList;
import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.op.rev160406.external.tunnel.list.ExternalTunnel;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnTargetsBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpntargets.VpnTargetBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.vpntargets.VpnTargetKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnAfConfig;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInstances;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.VpnTargets;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets.VpnTarget;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.Uint32;
import org.opendaylight.yangtools.yang.common.Uint64;
import org.opendaylight.netvirt.vpnmanager.populator.input.L3vpnInput;
import org.opendaylight.netvirt.vpnmanager.populator.registry.L3vpnRegistry;
import org.opendaylight.serviceutils.upgrade.UpgradeState;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInstances;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTarget;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces.state.Interface;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnets.associated.to.route.targets.route.target.AssociatedSubnet;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.subnets.associated.to.route.targets.route.target.associated.subnet.AssociatedVpn;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.to.extraroutes.vpn.extra.routes.Routes;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInstances;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets.VpnTarget;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.neutron.vpn.portip.port.data.VpnPortipToPort;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.subnetmaps.Subnetmap;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.netvirt.vpnmanager.api.VpnExtraRouteHelper;
import org.opendaylight.netvirt.vpnmanager.api.VpnHelper;
import org.opendaylight.netvirt.vpnmanager.iplearn.model.MacEntry;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnAfConfig;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInstances;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInterfaces;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstanceKey;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterface;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterfaceBuilder;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterfaceKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.external.subnets.SubnetsKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.napt.switches.RouterToNaptSwitch;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.napt.switches.RouterToNaptSwitchKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnAfConfig;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInstances;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstanceKey;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.NetworkAttributes.NetworkType;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.NetworkMaps;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.NeutronVpnPortipPortData;
}
}
- Set<org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTarget>
- getRtListForVpn(String vpnName) {
- Set<org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets
+ Set<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config
+ .vpntargets.VpnTarget> getRtListForVpn(String vpnName) {
+ Set<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets
.VpnTarget> rtList = new HashSet<>();
InstanceIdentifier<VpnInstance> vpnInstanceId = InstanceIdentifier.builder(VpnInstances.class)
.child(VpnInstance.class, new VpnInstanceKey(vpnName)).build();
Optional<VpnInstance> vpnInstanceOptional = read(LogicalDatastoreType.CONFIGURATION, vpnInstanceId);
if (vpnInstanceOptional.isPresent()) {
- org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.VpnTargets
+ org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.VpnTargets
vpnTargets = vpnInstanceOptional.get().getIpv4Family().getVpnTargets();
if (vpnTargets != null && vpnTargets.getVpnTarget() != null) {
rtList.addAll(vpnTargets.getVpnTarget());
.child(RouteTarget.class, new RouteTargetKey(rt, rtType)).build();
}
- Set<RouteTarget> getRouteTargetSet(Set<org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815
- .vpn.af.config.vpntargets.VpnTarget> vpnTargets) {
+ Set<RouteTarget> getRouteTargetSet(Set<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn
+ .rev200204.vpn.af.config.vpntargets.VpnTarget> vpnTargets) {
Set<RouteTarget> routeTargetSet = new HashSet<>();
- for (org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets
+ for (org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets
.VpnTarget rt : vpnTargets) {
String rtValue = rt.getVrfRTValue();
switch (rt.getVrfRTType()) {
import java.util.Objects;
import java.util.stream.Collectors;
import org.opendaylight.netvirt.vpnmanager.VpnOperDsUtils;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.VpnTargets;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.VpnTargetsBuilder;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTarget;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTargetBuilder;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTargetKey;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstanceBuilder;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.vpn.instance.Ipv4Family;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.vpn.instance.Ipv4FamilyBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntryBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.VpnTargets;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.VpnTargetsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets.VpnTarget;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets.VpnTargetBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets.VpnTargetKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstanceBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.vpn.instance.Ipv4Family;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.vpn.instance.Ipv4FamilyBuilder;
/**
* Gathers a collections of 'fake' L3VPN objects that can be used in JUnits.
import org.mockito.junit.MockitoJUnitRunner;
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.netvirt.bgpmanager.api.IBgpManager;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInstances;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.ApplyLabelBuilder;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.VpnTargets;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.VpnTargetsBuilder;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.apply.label.apply.label.mode.PerRouteBuilder;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTarget;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTargetBuilder;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.af.config.vpntargets.VpnTargetKey;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstanceBuilder;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstanceKey;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.vpn.instance.Ipv4Family;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.vpn.instance.Ipv4FamilyBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInstances;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.ApplyLabelBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.VpnTargets;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.VpnTargetsBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.apply.label.apply.label.mode.PerRouteBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets.VpnTarget;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets.VpnTargetBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.af.config.vpntargets.VpnTargetKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstanceBuilder;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstanceKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.vpn.instance.Ipv4Family;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.vpn.instance.Ipv4FamilyBuilder;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier.InstanceIdentifierBuilder;
import org.opendaylight.netvirt.vpnmanager.VpnSubnetRouteHandler;
import org.opendaylight.netvirt.vpnmanager.VpnUtil;
import org.opendaylight.netvirt.vpnmanager.api.InterfaceUtils;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInstances;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.vpn.instance.Ipv4Family;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.vpn.instance.Ipv4FamilyBuilder;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.iana._if.type.rev170119.L2vlan;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddress;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpAddressBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.external.networks.Networks;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.external.networks.NetworksBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.natservice.rev160111.external.networks.NetworksKey;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInstances;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.vpn.instance.Ipv4Family;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.vpn.instance.Ipv4FamilyBuilder;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.Subnetmaps;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.subnetmaps.Subnetmap;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.rev150602.subnetmaps.SubnetmapBuilder;
AllocateIdOutput allocateIdOutput = null;
AllocateIdInput allocateIdInput = null;
Networks networks = null;
- org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance vpnInstnce;
+ org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204
+ .vpn.instances.VpnInstance vpnInstnce;
InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.interfaces.rev140508.interfaces
.state.Interface> ifStateId = InterfaceUtils.buildStateInterfaceId(portKey);
InstanceIdentifier<PortOpData> portOpIdentifr = InstanceIdentifier.builder(PortOpData.class).build();
InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.to.vpn.id
.VpnInstance> instVpnInstance = getVpnInstanceToVpnIdIdentifier(interfaceName);
- InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances
+ InstanceIdentifier<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances
.VpnInstance>
- vpnInstanceIdentifier = InstanceIdentifier.builder(VpnInstances.class).child(
- org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance.class,
- new org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances
+ vpnInstanceIdentifier = InstanceIdentifier.builder(VpnInstances.class).child(org.opendaylight.yang.gen.v1.urn
+ .opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance.class,
+ new org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances
.VpnInstanceKey(interfaceName)).build();
InstanceIdentifier<Networks> netsIdentifier =
InstanceIdentifier.builder(ExternalNetworks.class).child(Networks.class, new NetworksKey(portId)).build();
Optional<Subnetmap> optionalSubnetMap;
Optional<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.to.vpn.id.VpnInstance>
optionalVpnInstnce;
- Optional<org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance>
+ Optional<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance>
vpnInstanceOptional;
Optional<Networks> optionalNetworks;
new TunnelEndPointsBuilder().setInterfaceName(interfaceName).setIpAddress(ipAddress).build();
tunnelEndPoints.add(tunlEndPts);
ipv4Family = new Ipv4FamilyBuilder().setRouteDistinguisher(routeDistinguishers).build();
- vpnInstnce = new org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances
- .VpnInstanceBuilder().withKey(new org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn
- .rev140815.vpn.instances.VpnInstanceKey(interfaceName)).setVpnInstanceName(interfaceName)
+ vpnInstnce = new org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances
+ .VpnInstanceBuilder().withKey(new org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn
+ .rev200204.vpn.instances.VpnInstanceKey(interfaceName)).setVpnInstanceName(interfaceName)
.setIpv4Family(ipv4Family).build();
networks = new NetworksBuilder().setId(portId).withKey(new NetworksKey(portId)).build();
doReturn(mockReadTx).when(dataBroker).newReadOnlyTransaction();
import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
import org.opendaylight.netvirt.vpnmanager.api.VpnHelper;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnAfConfig;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInstances;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInterfaces;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.VpnInterface;
import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.interfaces.vpn._interface.VpnInstanceNames;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.VpnInterfaceOpData;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn._interface.op.data.VpnInterfaceOpDataEntry;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnAfConfig;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInstances;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;
private int totalOperCount = 0;
private int totalConfigCount = 0;
private Integer ifPresent;
- private List<org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance>
- vpnInstanceList = new ArrayList<>();
+ private List<org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances
+ .VpnInstance> vpnInstanceList = new ArrayList<>();
private List<VpnInterface> vpnInterfaceConfigList = new ArrayList<>();
private List<VpnInterfaceOpDataEntry> vpnInterfaceOpList = new ArrayList<>();
import org.opendaylight.controller.md.sal.binding.api.DataBroker;
import org.opendaylight.controller.md.sal.binding.api.ReadOnlyTransaction;
import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.VpnInstances;
-import org.opendaylight.yang.gen.v1.urn.huawei.params.xml.ns.yang.l3vpn.rev140815.vpn.instances.VpnInstance;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.VpnInstanceOpData;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.VpnInstanceOpDataEntry;
import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.l3vpn.rev130911.vpn.instance.op.data.vpn.instance.op.data.entry.VpnToDpnList;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.VpnInstances;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.neutronvpn.l3vpn.rev200204.vpn.instances.VpnInstance;
import org.opendaylight.yangtools.yang.binding.DataObject;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.slf4j.Logger;