use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.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.action.types.rev131112.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.action.types.rev131112.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.action.types.rev131112.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());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.Action in project netvirt by opendaylight.
the class OpenFlow13ProviderTest method checkActionOutport.
private void checkActionOutport(Action action, String outport) {
OutputActionCase output = (OutputActionCase) action.getAction();
assertEquals(output.getOutputAction().getOutputNodeConnector().getValue(), outport);
}
Aggregations