use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecord.Action in project netvirt by opendaylight.
the class OpenFlow13ProviderTest method createEgressClassifierNextHopNoC1C2Flow.
@Test
public void createEgressClassifierNextHopNoC1C2Flow() {
Flow flow = openflowProvider.createEgressClassifierNextHopNoC1C2Flow(nodeId);
assertEquals(flow.getTableId().shortValue(), NwConstants.EGRESS_SFC_CLASSIFIER_NEXTHOP_TABLE);
assertEquals(flow.getPriority().intValue(), OpenFlow13Provider.EGRESS_CLASSIFIER_NEXTHOP_NOC1C2_PRIORITY);
assertEquals(flow.getId().getValue(), OpenFlow13Provider.EGRESS_CLASSIFIER_NEXTHOP_NOC1C2_FLOW_NAME + nodeId.getValue());
assertEquals(flow.getCookie().getValue(), OpenFlow13Provider.EGRESS_CLASSIFIER_NEXTHOP_COOKIE);
checkMatchC1(flow.getMatch(), OpenFlow13Provider.DEFAULT_NSH_CONTEXT_VALUE);
checkMatchC2(flow.getMatch(), OpenFlow13Provider.DEFAULT_NSH_CONTEXT_VALUE);
assertEquals(2, flow.getInstructions().getInstruction().size());
Instruction curInstruction = flow.getInstructions().getInstruction().get(0).getInstruction();
List<Action> actionList = checkApplyActionSize(curInstruction, 4);
checkActionMoveTunReg(actionList.get(0), NxmNxReg0.class, true);
checkActionMoveNsc1(actionList.get(0), false);
checkActionMoveTunId(actionList.get(1), true);
checkActionMoveNsc2(actionList.get(1), false);
checkActionMoveTunReg(actionList.get(2), NxmNxReg6.class, true);
checkActionMoveNsc4(actionList.get(2), false);
checkActionLoadTunId(actionList.get(3), OpenFlow13Provider.SFC_TUNNEL_ID);
curInstruction = flow.getInstructions().getInstruction().get(1).getInstruction();
checkActionGotoTable(curInstruction, NwConstants.EGRESS_SFC_CLASSIFIER_EGRESS_TABLE);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecord.Action in project netvirt by opendaylight.
the class OpenFlow13ProviderTest method checkActionMoveNsc4.
private void checkActionMoveNsc4(Action action, boolean checkSrc) {
NxActionRegMoveNodesNodeTableFlowApplyActionsCase regMove = (NxActionRegMoveNodesNodeTableFlowApplyActionsCase) action.getAction();
if (checkSrc) {
SrcNxNshc4Case src = (SrcNxNshc4Case) regMove.getNxRegMove().getSrc().getSrcChoice();
assertTrue(src.isNxNshc4Dst());
} else {
DstNxNshc4Case dst = (DstNxNshc4Case) regMove.getNxRegMove().getDst().getDstChoice();
assertTrue(dst.isNxNshc4Dst());
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecord.Action in project netvirt by opendaylight.
the class OpenFlow13ProviderTest method checkActionResubmit.
//
// Internal util methods to check Flow Actions
//
private void checkActionResubmit(Instruction curInstruction, short nextTableId) {
assertTrue(curInstruction instanceof ApplyActionsCase);
boolean resubmitActionFound = false;
for (Action action : ((ApplyActionsCase) curInstruction).getApplyActions().getAction()) {
if (action.getAction() instanceof NxActionResubmitNodesNodeTableFlowWriteActionsCase) {
NxActionResubmitNodesNodeTableFlowWriteActionsCase resubmitAction = (NxActionResubmitNodesNodeTableFlowWriteActionsCase) action.getAction();
assertEquals(resubmitAction.getNxResubmit().getTable().shortValue(), nextTableId);
resubmitActionFound = true;
}
}
assertTrue(resubmitActionFound);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecord.Action in project netvirt by opendaylight.
the class OpenFlow13ProviderTest method checkActionPopNsh.
private void checkActionPopNsh(Action action) {
NxActionPopNshNodesNodeTableFlowApplyActionsCase popNshCase = (NxActionPopNshNodesNodeTableFlowApplyActionsCase) action.getAction();
assertNotNull(popNshCase.getNxPopNsh());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.lfm.lisp.proto.rev151105.mapping.record.container.MappingRecord.Action in project netvirt by opendaylight.
the class OpenFlow13ProviderTest method checkActionLoadNshNp.
private void checkActionLoadNshNp(Action action) {
NxActionRegLoadNodesNodeTableFlowApplyActionsCase regLoad = (NxActionRegLoadNodesNodeTableFlowApplyActionsCase) action.getAction();
DstNxNshNpCase npCase = (DstNxNshNpCase) regLoad.getNxRegLoad().getDst().getDstChoice();
assertTrue(npCase.isNxNshNp());
}
Aggregations