*/
package org.opendaylight.netvirt.elan.utils;
-import java.math.BigInteger;
+import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
-import javax.annotation.Nullable;
import javax.inject.Inject;
import javax.inject.Singleton;
-import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.eclipse.jdt.annotation.Nullable;
import org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager;
+import org.opendaylight.mdsal.binding.api.DataBroker;
import org.opendaylight.netvirt.elan.l2gw.utils.ElanL2GatewayUtils;
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.interfaces.rev140508.interfaces.Interface;
import org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService;
import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
import org.opendaylight.yangtools.yang.common.RpcResult;
+import org.opendaylight.yangtools.yang.common.Uint64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
* Vni to be stamped on the VxLAN Header.
* @return the external itm egress action
*/
- public List<Action> getExternalTunnelItmEgressAction(BigInteger srcDpnId, NodeId torNode, long vni) {
+ public List<Action> getExternalTunnelItmEgressAction(Uint64 srcDpnId, NodeId torNode, long vni) {
List<Action> result = Collections.emptyList();
GetExternalTunnelInterfaceNameInput input = new GetExternalTunnelInterfaceNameInputBuilder()
}
} catch (InterruptedException | ExecutionException e) {
- LOG.error("Error in RPC call getTunnelInterfaceName {}", e);
+ LOG.error("Error in RPC call getTunnelInterfaceName", e);
}
return result;
}
- public List<Action> getExternalTunnelItmEgressAction(BigInteger srcDpnId, String nexthopIP, long vni) {
+ public List<Action> getExternalTunnelItmEgressAction(Uint64 srcDpnId, String nexthopIP, long vni) {
List<Action> result = Collections.emptyList();
GetExternalTunnelInterfaceNameInput input = new GetExternalTunnelInterfaceNameInputBuilder()
}
} catch (InterruptedException | ExecutionException e) {
- LOG.error("Error in RPC call getTunnelInterfaceName {}", e);
+ LOG.error("Error in RPC call getTunnelInterfaceName", e);
}
return result;
* Tunnel key to be sent on the VxLAN header.
* @return the internal itm egress action
*/
- public List<Action> getInternalTunnelItmEgressAction(BigInteger sourceDpnId, BigInteger destinationDpnId, long
+ public List<Action> getInternalTunnelItmEgressAction(Uint64 sourceDpnId, Uint64 destinationDpnId, long
tunnelKey) {
List<Action> result = Collections.emptyList();
LOG.trace("In getInternalItmEgressAction Action source {}, destination {}, serviceTag/Vni {}", sourceDpnId,
destinationDpnId);
}
} catch (InterruptedException | ExecutionException e) {
- LOG.error("Error in RPC call getTunnelInterfaceName {}", e);
+ LOG.error("Error in RPC call getTunnelInterfaceName", e);
}
return result;
}
Future<RpcResult<GetEgressActionsForTunnelOutput>> egressActionsOutputItm =
itmRpcService.getEgressActionsForTunnel(getEgressActInputItm);
if (egressActionsOutputItm.get().isSuccessful()) {
- return egressActionsOutputItm.get().getResult().getAction();
+ return new ArrayList<Action>(egressActionsOutputItm.get().getResult().getAction().values());
}
} else {
GetEgressActionsForInterfaceInput getEgressActInput = new GetEgressActionsForInterfaceInputBuilder()
Future<RpcResult<GetEgressActionsForInterfaceOutput>> egressActionsOutputFuture =
interfaceManagerRpcService.getEgressActionsForInterface(getEgressActInput);
if (egressActionsOutputFuture.get().isSuccessful()) {
- return egressActionsOutputFuture.get().getResult().getAction();
+ return new ArrayList<Action>(egressActionsOutputFuture.get().getResult().getAction().values());
}
}
} catch (Exception e) {
- LOG.error("Error in RPC call getEgressActionsForInterface {}", e);
+ LOG.error("Error in RPC call getEgressActionsForInterface", e);
}
LOG.warn("Could not build Egress actions for interface {} and tunnelId {}", interfaceName, tunnelKey);
return Collections.emptyList();
* the dst hw vtep node id
* @return the dpn tep ip
*/
- public IpAddress getSourceDpnTepIp(BigInteger srcDpnId,
+ public IpAddress getSourceDpnTepIp(Uint64 srcDpnId,
org.opendaylight.yang.gen.v1.urn.tbd.params.xml.ns.yang.network.topology.rev131021.NodeId dstHwVtepNodeId) {
IpAddress dpnTepIp = null;
- String tunnelInterfaceName = getExternalTunnelInterfaceName(String.valueOf(srcDpnId),
+ String tunnelInterfaceName = getExternalTunnelInterfaceName(srcDpnId.toString(),
dstHwVtepNodeId.getValue());
if (tunnelInterfaceName != null) {
Interface tunnelInterface =