Search in sources :

Example 1 with GetEgressActionsForTunnelInputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelInputBuilder in project netvirt by opendaylight.

the class ElanItmUtils method buildItmEgressActions.

/**
 * Builds the list of actions to be taken when sending the packet over external port such as tunnel, physical
 * port etc.
 *
 * @param interfaceName
 *            the interface name
 * @param tunnelKey
 *            can be VNI for VxLAN tunnel interfaces, Gre Key for GRE
 *            tunnels, etc.
 * @return the list
 */
@SuppressWarnings("checkstyle:IllegalCatch")
public List<Action> buildItmEgressActions(String interfaceName, @Nullable Long tunnelKey, boolean internal) {
    try {
        if (internal && interfaceManager.isItmDirectTunnelsEnabled()) {
            GetEgressActionsForTunnelInput getEgressActInputItm = new GetEgressActionsForTunnelInputBuilder().setIntfName(interfaceName).setTunnelKey(tunnelKey).build();
            Future<RpcResult<GetEgressActionsForTunnelOutput>> egressActionsOutputItm = itmRpcService.getEgressActionsForTunnel(getEgressActInputItm);
            if (egressActionsOutputItm.get().isSuccessful()) {
                return new ArrayList<Action>(egressActionsOutputItm.get().getResult().nonnullAction().values());
            }
        } else {
            GetEgressActionsForInterfaceInput getEgressActInput = new GetEgressActionsForInterfaceInputBuilder().setIntfName(interfaceName).setTunnelKey(tunnelKey).build();
            Future<RpcResult<GetEgressActionsForInterfaceOutput>> egressActionsOutputFuture = interfaceManagerRpcService.getEgressActionsForInterface(getEgressActInput);
            if (egressActionsOutputFuture.get().isSuccessful()) {
                return new ArrayList<Action>(egressActionsOutputFuture.get().getResult().nonnullAction().values());
            }
        }
    } catch (Exception 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();
}
Also used : GetEgressActionsForTunnelInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelInputBuilder) GetEgressActionsForTunnelInput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelInput) GetEgressActionsForInterfaceInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressActionsForInterfaceInputBuilder) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) ArrayList(java.util.ArrayList) GetEgressActionsForInterfaceInput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressActionsForInterfaceInput) ExecutionException(java.util.concurrent.ExecutionException)

Example 2 with GetEgressActionsForTunnelInputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelInputBuilder in project netvirt by opendaylight.

the class DhcpPktHandler method getEgressAction.

private List<Action> getEgressAction(String interfaceName, Uint64 tunnelId) {
    try {
        if (interfaceManager.isItmDirectTunnelsEnabled() && tunnelId != null) {
            GetEgressActionsForTunnelInputBuilder egressAction = new GetEgressActionsForTunnelInputBuilder().setIntfName(interfaceName);
            egressAction.setTunnelKey(tunnelId.longValue());
            RpcResult<GetEgressActionsForTunnelOutput> rpcResult = itmRpcService.getEgressActionsForTunnel(egressAction.build()).get();
            if (!rpcResult.isSuccessful()) {
                LOG.warn("RPC Call to Get egress actions for interface {} returned with Errors {}", interfaceName, rpcResult.getErrors());
            } else {
                return new ArrayList<>(rpcResult.getResult().nonnullAction().values());
            }
        } else {
            GetEgressActionsForInterfaceInputBuilder egressAction = new GetEgressActionsForInterfaceInputBuilder().setIntfName(interfaceName);
            if (tunnelId != null) {
                egressAction.setTunnelKey(tunnelId.longValue());
            }
            Future<RpcResult<GetEgressActionsForInterfaceOutput>> result = interfaceManagerRpc.getEgressActionsForInterface(egressAction.build());
            RpcResult<GetEgressActionsForInterfaceOutput> rpcResult = result.get();
            if (!rpcResult.isSuccessful()) {
                LOG.warn("RPC Call to Get egress actions for interface {} returned with Errors {}", interfaceName, rpcResult.getErrors());
            } else {
                return new ArrayList<>(rpcResult.getResult().nonnullAction().values());
            }
        }
    } catch (InterruptedException | ExecutionException e) {
        LOG.warn("Exception when egress actions for interface {}", interfaceName, e);
    }
    return Collections.emptyList();
}
Also used : GetEgressActionsForTunnelInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelInputBuilder) GetEgressActionsForTunnelOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelOutput) GetEgressActionsForInterfaceInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressActionsForInterfaceInputBuilder) ArrayList(java.util.ArrayList) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) GetEgressActionsForInterfaceOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressActionsForInterfaceOutput) ExecutionException(java.util.concurrent.ExecutionException)

Example 3 with GetEgressActionsForTunnelInputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelInputBuilder in project netvirt by opendaylight.

the class NexthopManager method getEgressActionsForInterface.

protected List<ActionInfo> getEgressActionsForInterface(final String ifName, int actionKey, boolean isTunnelInterface, Uint32 vpnId, String destIpPrefix) {
    List<Action> actions;
    try {
        if (isTunnelInterface && interfaceManager.isItmDirectTunnelsEnabled()) {
            RpcResult<GetEgressActionsForTunnelOutput> rpcResult = itmManager.getEgressActionsForTunnel(new GetEgressActionsForTunnelInputBuilder().setIntfName(ifName).build()).get();
            if (!rpcResult.isSuccessful()) {
                LOG.error("RPC Call to Get egress tunnel actions for interface {} returned with Errors {}", ifName, rpcResult.getErrors());
                return Collections.emptyList();
            } else {
                actions = new ArrayList<Action>(rpcResult.getResult().nonnullAction().values());
            }
        } else {
            RpcResult<GetEgressActionsForInterfaceOutput> rpcResult = odlInterfaceRpcService.getEgressActionsForInterface(new GetEgressActionsForInterfaceInputBuilder().setIntfName(ifName).build()).get();
            if (!rpcResult.isSuccessful()) {
                LOG.error("RPC Call to Get egress vm actions for interface {} vpnId {} ipPrefix {} returned with " + "Errors {}", ifName, vpnId, destIpPrefix, rpcResult.getErrors());
                return Collections.emptyList();
            } else {
                actions = new ArrayList<Action>(rpcResult.getResult().nonnullAction().values());
            }
        }
        List<ActionInfo> listActionInfo = new ArrayList<>();
        for (Action action : actions) {
            actionKey = action.key().getOrder() + actionKey;
            org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action actionClass = action.getAction();
            if (actionClass instanceof OutputActionCase) {
                listActionInfo.add(new ActionOutput(actionKey, ((OutputActionCase) actionClass).getOutputAction().getOutputNodeConnector()));
            } else if (actionClass instanceof PushVlanActionCase) {
                listActionInfo.add(new ActionPushVlan(actionKey));
            } else if (actionClass instanceof SetFieldCase) {
                if (((SetFieldCase) actionClass).getSetField().getVlanMatch() != null) {
                    int vlanVid = ((SetFieldCase) actionClass).getSetField().getVlanMatch().getVlanId().getVlanId().getValue().toJava();
                    listActionInfo.add(new ActionSetFieldVlanVid(actionKey, vlanVid));
                }
            } else if (actionClass instanceof NxActionResubmitRpcAddGroupCase) {
                Short tableId = ((NxActionResubmitRpcAddGroupCase) actionClass).getNxResubmit().getTable().toJava();
                listActionInfo.add(new ActionNxResubmit(actionKey, tableId));
            } else if (actionClass instanceof NxActionRegLoadNodesNodeTableFlowApplyActionsCase) {
                NxRegLoad nxRegLoad = ((NxActionRegLoadNodesNodeTableFlowApplyActionsCase) actionClass).getNxRegLoad();
                listActionInfo.add(new ActionRegLoad(actionKey, NxmNxReg6.class, nxRegLoad.getDst().getStart().toJava(), nxRegLoad.getDst().getEnd().toJava(), nxRegLoad.getValue().longValue()));
            }
        }
        return listActionInfo;
    } catch (InterruptedException | ExecutionException | NullPointerException e) {
        LOG.error("Exception when egress actions for interface {} isTunnel {} vpnId {} ipPrefix {}", ifName, isTunnelInterface, vpnId, destIpPrefix, e);
    }
    LOG.warn("Exception when egress actions for interface {}", ifName);
    return Collections.emptyList();
}
Also used : NxActionResubmitRpcAddGroupCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.add.group.input.buckets.bucket.action.action.NxActionResubmitRpcAddGroupCase) Action(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action) GetEgressActionsForTunnelInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelInputBuilder) GetEgressActionsForInterfaceInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressActionsForInterfaceInputBuilder) SetFieldCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCase) NxActionRegLoadNodesNodeTableFlowApplyActionsCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nodes.node.table.flow.instructions.instruction.instruction.apply.actions._case.apply.actions.action.action.NxActionRegLoadNodesNodeTableFlowApplyActionsCase) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) ArrayList(java.util.ArrayList) PushVlanActionCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushVlanActionCase) ActionSetFieldVlanVid(org.opendaylight.genius.mdsalutil.actions.ActionSetFieldVlanVid) GetEgressActionsForInterfaceOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressActionsForInterfaceOutput) ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) GetEgressActionsForTunnelOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelOutput) ActionNxResubmit(org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit) ExecutionException(java.util.concurrent.ExecutionException) OutputActionCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.OutputActionCase) ActionOutput(org.opendaylight.genius.mdsalutil.actions.ActionOutput) NxRegLoad(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.load.grouping.NxRegLoad) NxmNxReg6(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6) ActionRegLoad(org.opendaylight.genius.mdsalutil.actions.ActionRegLoad) ActionPushVlan(org.opendaylight.genius.mdsalutil.actions.ActionPushVlan)

Example 4 with GetEgressActionsForTunnelInputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelInputBuilder in project netvirt by opendaylight.

the class ArpResponderUtil method getEgressActionsForInterface.

/**
 * Get List of Egress Action for the VPN interface.
 *
 * @param ifaceMgrRpcService
 *            Interface Manager RPC reference that invokes API to retrieve
 *            Egress Action
 * @param ifName
 *            VPN Interface for which Egress Action to be retrieved
 * @param actionCounter
 *            Action Key
 * @return List of Egress Actions
 */
public static List<Action> getEgressActionsForInterface(IInterfaceManager ifaceMgrRpcService, ItmRpcService itmRpcService, String ifName, int actionCounter, boolean isTunnelInterface) {
    if (isTunnelInterface && ifaceMgrRpcService.isItmDirectTunnelsEnabled()) {
        try {
            RpcResult result = itmRpcService.getEgressActionsForTunnel(new GetEgressActionsForTunnelInputBuilder().setIntfName(ifName).build()).get();
            Map<ActionKey, Action> listActions = new HashMap<ActionKey, Action>();
            if (!result.isSuccessful()) {
                LOG.error("getEgressActionsForInterface: RPC Call to Get egress actions for interface {} " + "returned with Errors {}", ifName, result.getErrors());
            } else {
                listActions = ((GetEgressActionsForTunnelOutput) result.getResult()).nonnullAction();
            }
            return new ArrayList<Action>(listActions.values());
        } catch (InterruptedException | ExecutionException e) {
            LOG.error("getEgressActionsForInterface: Exception when egress actions for interface {}", ifName, e);
        }
    } else {
        List<ActionInfo> actionInfos = ifaceMgrRpcService.getInterfaceEgressActions(ifName);
        AtomicInteger counter = new AtomicInteger(actionCounter);
        return actionInfos.stream().map(v -> v.buildAction(counter.getAndIncrement())).collect(Collectors.toList());
    }
    return Collections.emptyList();
}
Also used : Arrays(java.util.Arrays) ActionDrop(org.opendaylight.genius.mdsalutil.actions.ActionDrop) GetEgressActionsForTunnelOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelOutput) LoggerFactory(org.slf4j.LoggerFactory) NxActionResubmitRpcAddGroupCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.add.group.input.buckets.bucket.action.action.NxActionResubmitRpcAddGroupCase) ActionNxResubmit(org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit) Future(java.util.concurrent.Future) MatchArpTpa(org.opendaylight.genius.mdsalutil.matches.MatchArpTpa) ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) ActionKey(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionKey) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) Map(java.util.Map) GetEgressActionsForTunnelInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelInputBuilder) BigInteger(java.math.BigInteger) MDSALUtil(org.opendaylight.genius.mdsalutil.MDSALUtil) ActionLoadMacToSha(org.opendaylight.genius.mdsalutil.actions.ActionLoadMacToSha) MacAddress(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.MacAddress) ActionMoveSpaToTpa(org.opendaylight.genius.mdsalutil.actions.ActionMoveSpaToTpa) Action(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action) ActionLoadIpToSpa(org.opendaylight.genius.mdsalutil.actions.ActionLoadIpToSpa) MatchMetadata(org.opendaylight.genius.mdsalutil.matches.MatchMetadata) InstructionApplyActions(org.opendaylight.genius.mdsalutil.instructions.InstructionApplyActions) ActionNxLoadInPort(org.opendaylight.genius.mdsalutil.actions.ActionNxLoadInPort) Collectors(java.util.stream.Collectors) FlowEntity(org.opendaylight.genius.mdsalutil.FlowEntity) AllocateIdInput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.AllocateIdInput) ElanInstance(org.opendaylight.yang.gen.v1.urn.opendaylight.netvirt.elan.rev150602.elan.instances.ElanInstance) List(java.util.List) AllocateIdOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.AllocateIdOutput) Uint64(org.opendaylight.yangtools.yang.common.Uint64) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) HashMap(java.util.HashMap) ActionSetArpOp(org.opendaylight.genius.mdsalutil.actions.ActionSetArpOp) MatchArpOp(org.opendaylight.genius.mdsalutil.matches.MatchArpOp) Supplier(java.util.function.Supplier) ActionSetFieldEthernetSource(org.opendaylight.genius.mdsalutil.actions.ActionSetFieldEthernetSource) MessageFormat(java.text.MessageFormat) ArrayList(java.util.ArrayList) ActionMoveShaToTha(org.opendaylight.genius.mdsalutil.actions.ActionMoveShaToTha) MatchInfo(org.opendaylight.genius.mdsalutil.MatchInfo) MatchEthernetType(org.opendaylight.genius.mdsalutil.matches.MatchEthernetType) NwConstants(org.opendaylight.genius.mdsalutil.NwConstants) IInterfaceManager(org.opendaylight.genius.interfacemanager.interfaces.IInterfaceManager) Logger(org.slf4j.Logger) ElanHelper(org.opendaylight.netvirt.elanmanager.api.ElanHelper) ActionMoveSourceDestinationEth(org.opendaylight.genius.mdsalutil.actions.ActionMoveSourceDestinationEth) IdManagerService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.IdManagerService) ExecutionException(java.util.concurrent.ExecutionException) InstructionInfo(org.opendaylight.genius.mdsalutil.InstructionInfo) AllocateIdInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.idmanager.rev160406.AllocateIdInputBuilder) InstructionGotoTable(org.opendaylight.genius.mdsalutil.instructions.InstructionGotoTable) BucketInfo(org.opendaylight.genius.mdsalutil.BucketInfo) Collections(java.util.Collections) MetaDataUtil(org.opendaylight.genius.mdsalutil.MetaDataUtil) Instruction(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction) ItmRpcService(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.ItmRpcService) Action(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action) GetEgressActionsForTunnelInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelInputBuilder) HashMap(java.util.HashMap) RpcResult(org.opendaylight.yangtools.yang.common.RpcResult) ArrayList(java.util.ArrayList) ActionKey(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionKey) ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) ExecutionException(java.util.concurrent.ExecutionException)

Example 5 with GetEgressActionsForTunnelInputBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelInputBuilder in project netvirt by opendaylight.

the class NatUtil method getEgressActionsForInterface.

@NonNull
public static List<ActionInfo> getEgressActionsForInterface(OdlInterfaceRpcService odlInterfaceRpcService, ItmRpcService itmRpcService, IInterfaceManager interfaceManager, String ifName, @Nullable Uint32 tunnelKey, int pos, boolean internalTunnelInterface) {
    LOG.debug("getEgressActionsForInterface : called for interface {}", ifName);
    GetEgressActionsForInterfaceInputBuilder egressActionsIfmBuilder = new GetEgressActionsForInterfaceInputBuilder().setIntfName(ifName);
    GetEgressActionsForTunnelInputBuilder egressActionsItmBuilder = new GetEgressActionsForTunnelInputBuilder().setIntfName(ifName);
    if (tunnelKey != null) {
        egressActionsIfmBuilder.setTunnelKey(tunnelKey);
        egressActionsItmBuilder.setTunnelKey(tunnelKey);
    }
    try {
        List<Action> actions = emptyList();
        if (interfaceManager.isItmDirectTunnelsEnabled() && internalTunnelInterface) {
            RpcResult<GetEgressActionsForTunnelOutput> rpcResult = itmRpcService.getEgressActionsForTunnel(egressActionsItmBuilder.build()).get();
            if (!rpcResult.isSuccessful()) {
                LOG.error("getEgressActionsForTunnels : RPC Call to Get egress actions for Tunnels {} " + "returned with Errors {}", ifName, rpcResult.getErrors());
            } else {
                actions = new ArrayList<>(rpcResult.getResult().nonnullAction().values());
            }
        } else {
            RpcResult<GetEgressActionsForInterfaceOutput> rpcResult = odlInterfaceRpcService.getEgressActionsForInterface(egressActionsIfmBuilder.build()).get();
            if (!rpcResult.isSuccessful()) {
                LOG.error("getEgressActionsForInterface : RPC Call to Get egress actions for interface {} " + "returned with Errors {}", ifName, rpcResult.getErrors());
            } else {
                actions = new ArrayList<>(rpcResult.getResult().nonnullAction().values());
            }
        }
        List<ActionInfo> listActionInfo = new ArrayList<>();
        for (Action action : actions) {
            org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action actionClass = action.getAction();
            if (actionClass instanceof OutputActionCase) {
                listActionInfo.add(new ActionOutput(pos++, ((OutputActionCase) actionClass).getOutputAction().getOutputNodeConnector()));
            } else if (actionClass instanceof PushVlanActionCase) {
                listActionInfo.add(new ActionPushVlan(pos++));
            } else if (actionClass instanceof SetFieldCase) {
                if (((SetFieldCase) actionClass).getSetField().getVlanMatch() != null) {
                    int vlanVid = ((SetFieldCase) actionClass).getSetField().getVlanMatch().getVlanId().getVlanId().getValue().toJava();
                    listActionInfo.add(new ActionSetFieldVlanVid(pos++, vlanVid));
                }
            } else if (actionClass instanceof NxActionResubmitRpcAddGroupCase) {
                Short tableId = ((NxActionResubmitRpcAddGroupCase) actionClass).getNxResubmit().getTable().toJava();
                listActionInfo.add(new ActionNxResubmit(pos++, tableId));
            } else if (actionClass instanceof NxActionRegLoadNodesNodeTableFlowApplyActionsCase) {
                NxRegLoad nxRegLoad = ((NxActionRegLoadNodesNodeTableFlowApplyActionsCase) actionClass).getNxRegLoad();
                listActionInfo.add(new ActionRegLoad(pos++, NxmNxReg6.class, nxRegLoad.getDst().getStart().toJava(), nxRegLoad.getDst().getEnd().toJava(), nxRegLoad.getValue().longValue()));
            }
        }
        return listActionInfo;
    } catch (InterruptedException | ExecutionException e) {
        LOG.error("Exception when egress actions for interface {}", ifName, e);
    }
    LOG.error("Error when getting egress actions for interface {}", ifName);
    return emptyList();
}
Also used : NxActionResubmitRpcAddGroupCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.add.group.input.buckets.bucket.action.action.NxActionResubmitRpcAddGroupCase) Action(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action) GetEgressActionsForTunnelInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelInputBuilder) GetEgressActionsForInterfaceInputBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressActionsForInterfaceInputBuilder) SetFieldCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCase) NxActionRegLoadNodesNodeTableFlowApplyActionsCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nodes.node.table.flow.instructions.instruction.instruction.apply.actions._case.apply.actions.action.action.NxActionRegLoadNodesNodeTableFlowApplyActionsCase) ArrayList(java.util.ArrayList) PushVlanActionCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushVlanActionCase) ActionSetFieldVlanVid(org.opendaylight.genius.mdsalutil.actions.ActionSetFieldVlanVid) GetEgressActionsForInterfaceOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressActionsForInterfaceOutput) ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) GetEgressActionsForTunnelOutput(org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelOutput) TypedWriteTransaction(org.opendaylight.mdsal.binding.util.TypedWriteTransaction) TypedReadWriteTransaction(org.opendaylight.mdsal.binding.util.TypedReadWriteTransaction) TypedReadTransaction(org.opendaylight.mdsal.binding.util.TypedReadTransaction) ActionNxResubmit(org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit) ExecutionException(java.util.concurrent.ExecutionException) OutputActionCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.OutputActionCase) ActionOutput(org.opendaylight.genius.mdsalutil.actions.ActionOutput) NxRegLoad(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.load.grouping.NxRegLoad) NxmNxReg6(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowjava.nx.match.rev140421.NxmNxReg6) ActionRegLoad(org.opendaylight.genius.mdsalutil.actions.ActionRegLoad) ActionPushVlan(org.opendaylight.genius.mdsalutil.actions.ActionPushVlan) NonNull(org.eclipse.jdt.annotation.NonNull) Objects.requireNonNull(java.util.Objects.requireNonNull)

Aggregations

ArrayList (java.util.ArrayList)5 ExecutionException (java.util.concurrent.ExecutionException)5 GetEgressActionsForTunnelInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelInputBuilder)5 GetEgressActionsForTunnelOutput (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.itm.rpcs.rev160406.GetEgressActionsForTunnelOutput)4 ActionInfo (org.opendaylight.genius.mdsalutil.ActionInfo)3 ActionNxResubmit (org.opendaylight.genius.mdsalutil.actions.ActionNxResubmit)3 Action (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action)3 GetEgressActionsForInterfaceInputBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressActionsForInterfaceInputBuilder)3 NxActionResubmitRpcAddGroupCase (org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.add.group.input.buckets.bucket.action.action.NxActionResubmitRpcAddGroupCase)3 ActionOutput (org.opendaylight.genius.mdsalutil.actions.ActionOutput)2 ActionPushVlan (org.opendaylight.genius.mdsalutil.actions.ActionPushVlan)2 ActionRegLoad (org.opendaylight.genius.mdsalutil.actions.ActionRegLoad)2 GetEgressActionsForInterfaceOutput (org.opendaylight.yang.gen.v1.urn.opendaylight.genius.interfacemanager.rpcs.rev160406.GetEgressActionsForInterfaceOutput)2 RpcResult (org.opendaylight.yangtools.yang.common.RpcResult)2 BigInteger (java.math.BigInteger)1 MessageFormat (java.text.MessageFormat)1 Arrays (java.util.Arrays)1 Collections (java.util.Collections)1 HashMap (java.util.HashMap)1 List (java.util.List)1