Search in sources :

Example 1 with InstructionWriteActions

use of org.opendaylight.genius.mdsalutil.instructions.InstructionWriteActions in project netvirt by opendaylight.

the class ElanInterfaceManager method getInstructionsForOutGroup.

private List<InstructionInfo> getInstructionsForOutGroup(long groupId) {
    List<InstructionInfo> mkInstructions = new ArrayList<>();
    mkInstructions.add(new InstructionWriteActions(Collections.singletonList(new ActionGroup(groupId))));
    return mkInstructions;
}
Also used : InstructionInfo(org.opendaylight.genius.mdsalutil.InstructionInfo) InstructionWriteActions(org.opendaylight.genius.mdsalutil.instructions.InstructionWriteActions) ActionGroup(org.opendaylight.genius.mdsalutil.actions.ActionGroup) ArrayList(java.util.ArrayList)

Example 2 with InstructionWriteActions

use of org.opendaylight.genius.mdsalutil.instructions.InstructionWriteActions in project genius by opendaylight.

the class MdSalUtilTest method createFlowEntity.

// Methods to test the install Flow and Group
public FlowEntity createFlowEntity(String dpnId, String tableId) {
    BigInteger dpId;
    final int serviceId = 0;
    List<ActionInfo> listActionInfo = new ArrayList<>();
    listActionInfo.add(new ActionPuntToController());
    dpId = new BigInteger(dpnId.split(":")[1]);
    List<MatchInfo> mkMatches = new ArrayList<>();
    final BigInteger cookie = new BigInteger("9000000", 16);
    short shortTableId = Short.parseShort(tableId);
    mkMatches.add(new MatchTunnelId(new BigInteger("0000000000000000", 16)));
    List<InstructionInfo> mkInstructions = new ArrayList<>();
    mkInstructions.add(new InstructionWriteActions(listActionInfo));
    FlowEntity terminatingServiceTableFlowEntity = MDSALUtil.buildFlowEntity(dpId, shortTableId, getFlowRef(shortTableId, serviceId), 5, "Terminating Service Flow Entry: " + serviceId, 0, 0, cookie.add(BigInteger.valueOf(serviceId)), null, null);
    return terminatingServiceTableFlowEntity;
}
Also used : ActionPuntToController(org.opendaylight.genius.mdsalutil.actions.ActionPuntToController) ArrayList(java.util.ArrayList) ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) FlowEntity(org.opendaylight.genius.mdsalutil.FlowEntity) MatchTunnelId(org.opendaylight.genius.mdsalutil.matches.MatchTunnelId) MatchInfo(org.opendaylight.genius.mdsalutil.MatchInfo) InstructionInfo(org.opendaylight.genius.mdsalutil.InstructionInfo) InstructionWriteActions(org.opendaylight.genius.mdsalutil.instructions.InstructionWriteActions) BigInteger(java.math.BigInteger)

Aggregations

ArrayList (java.util.ArrayList)2 InstructionInfo (org.opendaylight.genius.mdsalutil.InstructionInfo)2 InstructionWriteActions (org.opendaylight.genius.mdsalutil.instructions.InstructionWriteActions)2 BigInteger (java.math.BigInteger)1 ActionInfo (org.opendaylight.genius.mdsalutil.ActionInfo)1 FlowEntity (org.opendaylight.genius.mdsalutil.FlowEntity)1 MatchInfo (org.opendaylight.genius.mdsalutil.MatchInfo)1 ActionGroup (org.opendaylight.genius.mdsalutil.actions.ActionGroup)1 ActionPuntToController (org.opendaylight.genius.mdsalutil.actions.ActionPuntToController)1 MatchTunnelId (org.opendaylight.genius.mdsalutil.matches.MatchTunnelId)1