*/
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;
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;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.inventory.rev130819.FlowCapableNode;
}
}
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)) {
}
}
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;
for (Uint64 otherDpn : otherDpns) {
GetEgressActionsForInterfaceInput getEgressActInput = new GetEgressActionsForInterfaceInputBuilder()
.setIntfName(extnIntfs.get(dpnId + ":" + otherDpn).getInterfaceInfo().getInterfaceName())
- .setTunnelKey(elanInfo.getElanTag()).build();
+ .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));
.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));
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);