ElanInstance DS not populated properly 93/84093/2
authorAmitesh Soni <amitesh.soni@ericsson.com>
Fri, 30 Aug 2019 10:01:44 +0000 (15:31 +0530)
committerAbhinav Gupta <abhinav.gupta@ericsson.com>
Fri, 6 Dec 2019 07:17:05 +0000 (07:17 +0000)
While debugging "VMs cannot refresh IPs via DHCP",
it was seen that in "updateOperationalDataStore" method,
we were not writing to ElanInstance DS properly, due to
which, ElanInstance DS was having certain fields null and
eventually not programming table 36 and table 52 (for remote
unknown DMAC flow).

Now, fixing this issue to populate ElanInstance DS properly.

Change-Id: If2132ae191b5694074a272fc4baf37757da6f88c
Signed-off-by: Amitesh Soni <amitesh.soni@ericsson.com>
elanmanager/impl/src/main/java/org/opendaylight/netvirt/elan/utils/ElanUtils.java

index 31042d10507832e6da31d00b772f0f5dc4486b92..60563c855c3f21d7b4603d758b043adb99412d2a 100755 (executable)
@@ -1190,7 +1190,8 @@ public class ElanUtils {
 
         // Updates the ElanInstance Config DS by setting the just acquired
         // elanTag
-        ElanInstanceBuilder elanInstanceBuilder = new ElanInstanceBuilder().setElanInstanceName(elanInstanceName)
+        ElanInstanceBuilder elanInstanceBuilder = new ElanInstanceBuilder(elanInstanceAdded)
+                .setElanInstanceName(elanInstanceName)
                 .setDescription(elanInstanceAdded.getDescription())
                 .setMacTimeout(elanInstanceAdded.getMacTimeout() == null
                         ? Uint32.valueOf(ElanConstants.DEFAULT_MAC_TIME_OUT) : elanInstanceAdded.getMacTimeout())