Issue: Table-0 to Table-36 flow was missing 01/83301/2
authorApurba Mukherjee <apurba.mukherjee@ericsson.com>
Mon, 29 Jul 2019 12:29:08 +0000 (17:59 +0530)
committerApurba Mukherjee <apurba.mukherjee@ericsson.com>
Mon, 29 Jul 2019 18:25:20 +0000 (23:55 +0530)
As part of ITM Yang Models Cleanup, internal flag was removed which
caused the issue. The internal flag is brought back to fix the issue.

Change-Id: Ia069fc52ecbd3223fa7ca7c4713ffb475fb3a353
Signed-off-by: Apurba Mukherjee <apurba.mukherjee@ericsson.com>
itm/itm-impl/src/main/java/org/opendaylight/genius/itm/cache/DpnTepStateCache.java
itm/itm-impl/src/main/java/org/opendaylight/genius/itm/confighelpers/ItmExternalTunnelAddWorker.java
itm/itm-impl/src/main/java/org/opendaylight/genius/itm/confighelpers/ItmInternalTunnelAddWorker.java
itm/itm-impl/src/main/java/org/opendaylight/genius/itm/impl/ItmUtils.java
itm/itm-impl/src/test/java/org/opendaylight/genius/itm/cli/TepCommandHelperTest.java
itm/itm-impl/src/test/java/org/opendaylight/genius/itm/impl/ItmExternalTunnelAddTest.java
itm/itm-impl/src/test/java/org/opendaylight/genius/itm/impl/ItmManagerRpcServiceTest.java
itm/itm-impl/src/test/java/org/opendaylight/genius/itm/tests/ItmManagerRpcServiceTest.java

index 6056fba0171e6be24d597c1cc6f04674128acb2b..72b125f8d807bf445514e42bf8f3640fe66512cc 100644 (file)
@@ -281,7 +281,7 @@ public class DpnTepStateCache extends DataObjectCache<BigInteger, DpnsTeps> {
                     String.format("%s %s", ItmUtils.convertTunnelTypetoString(dpnTepInfo.getTunnelType()),
                             "Trunk Interface"), true, dpnTepInfo.getTunnelType(),
                     srcDpnTEPsInfo.get(0).getTunnelEndPoints().get(0).getIpAddress(),
-                    dstDpnTEPsInfo.get(0).getTunnelEndPoints().get(0).getIpAddress(),
+                    dstDpnTEPsInfo.get(0).getTunnelEndPoints().get(0).getIpAddress(),true,
                     dpnTepInfo.isMonitoringEnabled(), TunnelMonitoringTypeBfd.class,
                     monitoringInt, true, null);
         }
index 4ee7822178fe4edaa82c1601550fe6cf23212d72..f9af7901dcfc9a7a60cbdf43d39bff715dc4f98f 100644 (file)
@@ -77,7 +77,7 @@ public class ItmExternalTunnelAddWorker {
                         interfaceName, firstEndPt.getIpAddress(), extIp, gwyIpAddress);
                 Interface iface = ItmUtils.buildTunnelInterface(teps.getDPNID(), trunkInterfaceName,
                         String.format("%s %s", ItmUtils.convertTunnelTypetoString(tunType), "Trunk Interface"),
-                        true, tunType, firstEndPt.getIpAddress(), extIp, false,
+                        true, tunType, firstEndPt.getIpAddress(), extIp, false, false,
                         ITMConstants.DEFAULT_MONITOR_PROTOCOL, null, useOfTunnel, tunOptions);
 
                 LOG.debug(" Trunk Interface builder - {} ", iface);
@@ -301,7 +301,7 @@ public class ItmExternalTunnelAddWorker {
                 dstIp, gwyIpAddress);
         Interface extTunnelIf = ItmUtils.buildTunnelInterface(dpnId, tunnelIfName,
                 String.format("%s %s", tunType.getName(), "Trunk Interface"), true, tunType, srcIp, dstIp,
-                monitorEnabled, monitorProtocol, monitorInterval, remoteIpFlow, null);
+                false, monitorEnabled, monitorProtocol, monitorInterval, remoteIpFlow, null);
         InstanceIdentifier<Interface> ifIID = InstanceIdentifier.builder(Interfaces.class).child(Interface.class,
                 new InterfaceKey(tunnelIfName)).build();
         LOG.trace(" Writing Trunk Interface to Config DS {}, {} ", ifIID, extTunnelIf);
index c735d9ce1a47d23a01d94d9b801799850aa02b06..89dd4f5fef03e1c52e39cad3fe146b632a70fc75 100644 (file)
@@ -254,7 +254,7 @@ public final class ItmInternalTunnelAddWorker {
         Boolean isMonitorEnabled = !tunType.isAssignableFrom(TunnelTypeLogicalGroup.class) && isTunnelMonitoringEnabled;
         Interface iface = ItmUtils.buildTunnelInterface(srcDpnId, trunkInterfaceName,
                 String.format("%s %s",ItmUtils.convertTunnelTypetoString(tunType), "Trunk Interface"),
-                true, tunType, srcte.getIpAddress(), dstte.getIpAddress(),
+                true, tunType, srcte.getIpAddress(), dstte.getIpAddress(), true,
                 isMonitorEnabled, monitorProtocol, monitorInterval, useOfTunnel, parentInterfaceName, tunOptions);
         LOG.debug(" Trunk Interface builder - {} ", iface);
         InstanceIdentifier<Interface> trunkIdentifier = ItmUtils.buildId(trunkInterfaceName);
@@ -344,7 +344,7 @@ public final class ItmInternalTunnelAddWorker {
         Boolean isMonitorEnabled = !tunType.isAssignableFrom(TunnelTypeLogicalGroup.class) && isTunnelMonitoringEnabled;
         Interface iface = ItmUtils.buildTunnelInterface(srcDpnId, trunkInterfaceName,
                 String.format("%s %s",ItmUtils.convertTunnelTypetoString(srcte.getTunnelType()), "Trunk Interface"),
-                true, tunType, srcte.getIpAddress(), dstte.getIpAddress(),
+                true, tunType, srcte.getIpAddress(), dstte.getIpAddress(), true,
                 isMonitorEnabled, monitorProtocol, monitorInterval, useOfTunnel, parentInterfaceName, tunOptions);
         LOG.debug("Trunk Interface builder - {} ", iface);
 
index 558c2d2f1b450d18d0b2944888b5635db5d42b93..9d96881ce5475fb07fc1b5caee4023de20b740a5 100644 (file)
@@ -352,20 +352,20 @@ public final class ItmUtils {
 
     public static Interface buildTunnelInterface(BigInteger dpn, String ifName, String desc, boolean enabled,
                                                  Class<? extends TunnelTypeBase> tunType, IpAddress localIp,
-                                                 IpAddress remoteIp,
+                                                 IpAddress remoteIp, boolean internal,
                                                  Boolean monitorEnabled,
                                                  Class<? extends TunnelMonitoringTypeBase> monitorProtocol,
                                                  Integer monitorInterval, boolean useOfTunnel,
                                                  List<TunnelOptions> tunOptions) {
 
-        return buildTunnelInterface(dpn, ifName, desc, enabled, tunType, localIp, remoteIp,
+        return buildTunnelInterface(dpn, ifName, desc, enabled, tunType, localIp, remoteIp, internal,
                 monitorEnabled, monitorProtocol, monitorInterval,  useOfTunnel, null,
                 tunOptions);
     }
 
     public static Interface buildTunnelInterface(BigInteger dpn, String ifName, String desc, boolean enabled,
                                                  Class<? extends TunnelTypeBase> tunType, IpAddress localIp,
-                                                 IpAddress remoteIp,
+                                                 IpAddress remoteIp, boolean internal,
                                                  Boolean monitorEnabled,
                                                  Class<? extends TunnelMonitoringTypeBase> monitorProtocol,
                                                  Integer monitorInterval, boolean useOfTunnel, String parentIfaceName,
@@ -387,7 +387,7 @@ public final class ItmUtils {
                 .setTunnelSource(localIp).setTunnelInterfaceType(tunType)
                 .setMonitorEnabled(monitorEnabled).setMonitorProtocol(monitorProtocol)
                 .setMonitorInterval(monitoringInterval).setTunnelRemoteIpFlow(useOfTunnel)
-                .setTunnelOptions(tunnelOptions)
+                .setTunnelOptions(tunnelOptions).setInternal(internal)
                 .build();
         builder.addAugmentation(IfTunnel.class, tunnel);
         return builder.build();
index 6feb93d42927bda424fc135c6dd5e02772265847..eaa16309ba7e4e9150487873c7a13485b2cf1580 100644 (file)
@@ -227,7 +227,7 @@ public class TepCommandHelperTest {
                         .PhysAddress.getDefaultInstance("AA:AA:AA:AA:AA:AA"))
                 .setIfIndex(100).setLowerLayerIf(lowerLayerIfList).setType(L2vlan.class).build();
         interfaceTestNew = ItmUtils.buildTunnelInterface(dpId1, tunnelInterfaceName, destinationDevice, enabled,
-                TunnelTypeVxlan.class, ipAddress1, ipAddress2, enabled,monitorProtocol,
+                TunnelTypeVxlan.class, ipAddress1, ipAddress2, true, enabled,monitorProtocol,
                 interval, false, null);
         doReturn(mockReadTx).when(dataBroker).newReadOnlyTransaction();
         doReturn(mockWriteTx).when(dataBroker).newWriteOnlyTransaction();
index dee7b7b19ab2b0b0aad5bbd76ea5b550e3768db2..1811a088778448a461ef608bac3c1a22d7e97b00 100644 (file)
@@ -277,7 +277,7 @@ public class ItmExternalTunnelAddTest {
                         dpId1.toString(), tunnelType1));
         iface = ItmUtils.buildTunnelInterface(dpId1,trunkInterfaceName, String.format("%s %s",
                 ItmUtils.convertTunnelTypetoString(tunnelType1), "Trunk Interface"), true, tunnelType1, ipAddress3,
-                ipAddress2, false, monitorProtocol, null,  false,
+                ipAddress2, false, false, monitorProtocol, null,  false,
                 null);
         externalTunnel = ItmUtils.buildExternalTunnel(dpId1.toString(), ipAddress2.stringValue(),
                 tunnelType1, trunkInterfaceName);
@@ -313,7 +313,7 @@ public class ItmExternalTunnelAddTest {
 
         final Interface extTunnelIf1 = ItmUtils.buildTunnelInterface(dpId1, "tun030025bd04f",
                 String.format("%s %s", tunnelType1.getName(), "Trunk Interface"), true, tunnelType1,
-                tunnelEndPointsVxlan.getIpAddress(), ipAddress1,
+                tunnelEndPointsVxlan.getIpAddress(), ipAddress1, false,
                 false, monitorProtocol, ITMConstants.BFD_DEFAULT_MONITOR_INTERVAL, false,
                 null);
         final Interface hwTunnelIf2 = ItmUtils.buildHwTunnelInterface("tun9a55a9c38f2",
@@ -322,7 +322,7 @@ public class ItmExternalTunnelAddTest {
                 ITMConstants.BFD_DEFAULT_MONITOR_INTERVAL);
         final Interface extTunnelIf3 = ItmUtils.buildTunnelInterface(dpId1, "tun17c6e20c283",
                 String.format("%s %s", tunnelType1.getName(), "Trunk Interface"), true, tunnelType1,
-                tunnelEndPointsVxlan.getIpAddress(), ipAddress2, false, monitorProtocol,
+                tunnelEndPointsVxlan.getIpAddress(), ipAddress2, false, false, monitorProtocol,
                 ITMConstants.BFD_DEFAULT_MONITOR_INTERVAL, false, null);
         final Interface hwTunnelIf4 = ItmUtils.buildHwTunnelInterface("tunaa109b6c8c5",
                 String.format("%s %s", tunnelType1.getName(), "Trunk Interface"), true, hwVtep1.getTopoId(),
index b40c99b1a8020bdbec5c211fb96ddaecef546ad7..a6961f910896eacf2b848dcb99ac376663559c7b 100644 (file)
@@ -292,7 +292,7 @@ public class ItmManagerRpcServiceTest {
                 .setTunnelType(tunnelType1).setDestinationNode(destinationDevice).setSourceNode(sourceDevice).build();
         iface = ItmUtils.buildTunnelInterface(dpId1,trunkInterfaceName, String.format("%s %s",
                 ItmUtils.convertTunnelTypetoString(tunnelType1), "Trunk Interface"),true,tunnelType1,
-                tunnelEndPointsVxlan.getIpAddress(),ipAddress1, false,
+                tunnelEndPointsVxlan.getIpAddress(),ipAddress1, false, false,
                 monitorProtocol,null, false, null);
 
         transportZone = new TransportZoneBuilder().setZoneName(transportZone1)
index fb7345cbcae7f06f830d33c0dd14615c3f9cf7d4..b04824b63b30ff8e0fccc5f59ec929b0804d1a69 100644 (file)
@@ -246,7 +246,7 @@ public class ItmManagerRpcServiceTest {
         iface = ItmUtils.buildTunnelInterface(ItmTestConstants.DP_ID_1,trunkInterfaceName, String.format("%s %s",
                 ItmUtils.convertTunnelTypetoString(ItmTestConstants.TUNNEL_TYPE_VXLAN), "Trunk Interface"),
                 true,ItmTestConstants.TUNNEL_TYPE_VXLAN,tunnelEndPointsVxlan.getIpAddress(),
-                ItmTestConstants.IP_ADDRESS_3,false, ItmTestConstants.MONITOR_PROTOCOL,null, false, null);
+                ItmTestConstants.IP_ADDRESS_3,false,false, ItmTestConstants.MONITOR_PROTOCOL,null, false, null);
 
         transportZone = new TransportZoneBuilder().setZoneName(ItmTestConstants.TZ_NAME)
                 .setTunnelType(ItmTestConstants.TUNNEL_TYPE_VXLAN)