MRI version bumpup for Aluminium
[netvirt.git] / elanmanager / impl / src / test / java / org / opendaylight / netvirt / elanmanager / tests / Verifications.java
index 432a29d774ee2b22abf7e18b7d66855592a07bed..2a31e13724627b5f3858afaedba7a9c799d097e8 100644 (file)
@@ -7,7 +7,7 @@
  */
 package org.opendaylight.netvirt.elanmanager.tests;
 
-import static org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType.CONFIGURATION;
+import static org.opendaylight.mdsal.common.api.LogicalDatastoreType.CONFIGURATION;
 
 import com.google.common.collect.Sets;
 import java.util.ArrayList;
@@ -20,15 +20,15 @@ import java.util.function.BiPredicate;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 import org.awaitility.core.ConditionFactory;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.common.api.data.ReadFailedException;
-import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
 import org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker;
 import org.opendaylight.genius.mdsalutil.MDSALUtil;
 import org.opendaylight.genius.mdsalutil.NwConstants;
 import org.opendaylight.genius.mdsalutil.actions.ActionGroup;
 import org.opendaylight.genius.testutils.interfacemanager.TunnelInterfaceDetails;
 import org.opendaylight.mdsal.binding.testutils.AssertDataObjects;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
+import org.opendaylight.mdsal.common.api.ReadFailedException;
+import org.opendaylight.mdsal.common.api.TransactionCommitFailedException;
 import org.opendaylight.netvirt.elan.utils.ElanConstants;
 import org.opendaylight.netvirt.elan.utils.ElanUtils;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action;
@@ -127,7 +127,7 @@ public class Verifications {
                 }
             }
             boolean remoteMcastFoundFlag = false;
-            for (RemoteMcastMacs remoteMcastMacs : augmentation.getRemoteMcastMacs()) {
+            for (RemoteMcastMacs remoteMcastMacs : augmentation.getRemoteMcastMacs().values()) {
                 for (LocatorSet locatorSet : remoteMcastMacs.getLocatorSet()) {
                     TpId tpId = locatorSet.getLocatorRef().getValue().firstKeyOf(TerminationPoint.class).getTpId();
                     if (tpId.getValue().contains(tepIp)) {
@@ -171,7 +171,7 @@ public class Verifications {
                 }
             }
             boolean remoteUcastFoundFlag = false;
-            for (RemoteUcastMacs remoteUcastMacs : augmentation.getRemoteUcastMacs()) {
+            for (RemoteUcastMacs remoteUcastMacs : augmentation.getRemoteUcastMacs().values()) {
                 String mac = remoteUcastMacs.getMacEntryKey().getValue();
                 if (mac.equals(dpnMac)) {
                     remoteUcastFoundFlag = true;
@@ -201,8 +201,8 @@ public class Verifications {
                         .setIntfName(extnIntfs.get(dpnId + ":" + otherDpn).getInterfaceInfo().getInterfaceName())
                         .setTunnelKey(elanInfo.getElanTag().longValue() + ElanConstants.ELAN_TAG_ADDEND).build();
                 List<Action> actionsList =
-                        odlInterfaceRpcService.getEgressActionsForInterface(getEgressActInput).get().getResult()
-                                .getAction();
+                        new ArrayList<Action>(odlInterfaceRpcService.getEgressActionsForInterface(getEgressActInput)
+                                .get().getResult().getAction().values());
                 listBucketInfo.add(MDSALUtil.buildBucket(actionsList, MDSALUtil.GROUP_WEIGHT, bucketId,
                         MDSALUtil.WATCH_PORT, MDSALUtil.WATCH_GROUP));
 
@@ -216,8 +216,8 @@ public class Verifications {
                         .setIntfName(extnIntfs.get(dpnId + ":" + otherTor).getInterfaceInfo().getInterfaceName())
                         .setTunnelKey(elanInfo.getSegmentationId()).build();
                 List<Action> actionsList =
-                        odlInterfaceRpcService.getEgressActionsForInterface(getEgressActInput).get().getResult()
-                                .getAction();
+                        new ArrayList<Action>(odlInterfaceRpcService.getEgressActionsForInterface(getEgressActInput)
+                                .get().getResult().getAction().values());
                 listBucketInfo.add(MDSALUtil.buildBucket(actionsList, MDSALUtil.GROUP_WEIGHT, bucketId,
                         MDSALUtil.WATCH_PORT, MDSALUtil.WATCH_GROUP));
 
@@ -261,8 +261,8 @@ public class Verifications {
             AssertDataObjects.assertEqualBeans(expected, actual);
         }
 
-        Set<Bucket> actualBuckets = modifyBucketId(actual.getBuckets().getBucket());
-        Set<Bucket> expectedBuckets = modifyBucketId(expected.getBuckets().getBucket());
+        Set<Bucket> actualBuckets = modifyBucketId(new ArrayList<Bucket>(actual.getBuckets().getBucket().values()));
+        Set<Bucket> expectedBuckets = modifyBucketId(new ArrayList<Bucket>(expected.getBuckets().getBucket().values()));
         Set<Bucket> diff = Sets.difference(actualBuckets, expectedBuckets);
         if (diff != null && !diff.isEmpty()) {
             AssertDataObjects.assertEqualBeans(expected, actual);