use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.Action in project netvirt by opendaylight.
the class OpenFlow13ProviderTest method checkActionLoadNshMdtype.
private void checkActionLoadNshMdtype(Action action) {
NxActionRegLoadNodesNodeTableFlowApplyActionsCase regLoad = (NxActionRegLoadNodesNodeTableFlowApplyActionsCase) action.getAction();
DstNxNshMdtypeCase mdTypeCase = (DstNxNshMdtypeCase) regLoad.getNxRegLoad().getDst().getDstChoice();
assertTrue(mdTypeCase.isNxNshMdtype());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.Action in project netvirt by opendaylight.
the class OpenFlow13ProviderTest method createEgressClassifierFilterNshFlow.
@Test
public void createEgressClassifierFilterNshFlow() {
Flow flow = openflowProvider.createEgressClassifierFilterNshFlow(nodeId);
assertEquals(flow.getTableId().shortValue(), NwConstants.EGRESS_SFC_CLASSIFIER_FILTER_TABLE);
assertEquals(flow.getPriority().intValue(), OpenFlow13Provider.EGRESS_CLASSIFIER_FILTER_NSH_PRIORITY);
assertEquals(flow.getId().getValue(), OpenFlow13Provider.EGRESS_CLASSIFIER_FILTER_NSH_FLOW_NAME + nodeId.getValue());
assertEquals(flow.getCookie().getValue(), OpenFlow13Provider.EGRESS_CLASSIFIER_FILTER_COOKIE);
checkMatchNshMdType1(flow.getMatch());
assertEquals(2, flow.getInstructions().getInstruction().size());
List<Action> actionList;
actionList = checkApplyActionSize(flow.getInstructions().getInstruction().get(0).getInstruction(), 1);
checkActionLoadNshc1(actionList.get(0), OpenFlow13Provider.DEFAULT_NSH_CONTEXT_VALUE);
checkActionGotoTable(flow.getInstructions().getInstruction().get(1).getInstruction(), NwConstants.EGRESS_SFC_CLASSIFIER_NEXTHOP_TABLE);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.Action in project netvirt by opendaylight.
the class OpenFlow13ProviderTest method checkActionLoadNsp.
private void checkActionLoadNsp(Action action) {
NxActionRegLoadNodesNodeTableFlowApplyActionsCase regLoad = (NxActionRegLoadNodesNodeTableFlowApplyActionsCase) action.getAction();
DstNxNspCase nspCase = (DstNxNspCase) regLoad.getNxRegLoad().getDst().getDstChoice();
assertTrue(nspCase.isNxNspDst());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.Action in project netvirt by opendaylight.
the class OpenFlow13ProviderTest method checkActionMoveNsc2.
private void checkActionMoveNsc2(Action action, boolean checkSrc) {
NxActionRegMoveNodesNodeTableFlowApplyActionsCase regMove = (NxActionRegMoveNodesNodeTableFlowApplyActionsCase) action.getAction();
if (checkSrc) {
SrcNxNshc2Case src = (SrcNxNshc2Case) regMove.getNxRegMove().getSrc().getSrcChoice();
assertTrue(src.isNxNshc2Dst());
} else {
DstNxNshc2Case dst = (DstNxNshc2Case) regMove.getNxRegMove().getDst().getDstChoice();
assertTrue(dst.isNxNshc2Dst());
}
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.Action in project netvirt by opendaylight.
the class OpenFlow13ProviderTest method checkActionLoadNshc1.
private void checkActionLoadNshc1(Action action, long c1) {
NxActionRegLoadNodesNodeTableFlowApplyActionsCase regLoad = (NxActionRegLoadNodesNodeTableFlowApplyActionsCase) action.getAction();
DstNxNshc1Case c1Case = (DstNxNshc1Case) regLoad.getNxRegLoad().getDst().getDstChoice();
assertTrue(c1Case.isNxNshc1Dst());
assertEquals(regLoad.getNxRegLoad().getValue().longValue(), c1);
}
Aggregations