Search in sources :

Example 21 with Action

use of org.powerbot.script.rt6.Action in project genius by opendaylight.

the class ActionRegLoadTest method actionInfoTestForRegLoadAction.

@Test
public void actionInfoTestForRegLoadAction() {
    ActionInfo actionInfo = new ActionRegLoad(1, NxmNxReg6.class, 0, 31, 100);
    Action action = actionInfo.buildAction();
    assertTrue(action.getAction() instanceof NxActionRegLoadNodesNodeTableFlowApplyActionsCase);
    NxActionRegLoadNodesNodeTableFlowApplyActionsCase actionsCase = (NxActionRegLoadNodesNodeTableFlowApplyActionsCase) action.getAction();
    NxRegLoad nxRegLoad = actionsCase.getNxRegLoad();
    assertTrue(nxRegLoad.getDst().getDstChoice() instanceof DstNxRegCase);
    DstNxRegCase dstNxRegCase = (DstNxRegCase) nxRegLoad.getDst().getDstChoice();
    assertEquals(NxmNxReg6.class, dstNxRegCase.getNxReg());
    assertEquals((Integer) 0, nxRegLoad.getDst().getStart());
    assertEquals((Integer) 31, nxRegLoad.getDst().getEnd());
    assertEquals(100, nxRegLoad.getValue().longValue());
}
Also used : Action(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.Action) 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) ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) DstNxRegCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstNxRegCase) NxRegLoad(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.load.grouping.NxRegLoad) Test(org.junit.Test)

Example 22 with Action

use of org.powerbot.script.rt6.Action in project genius by opendaylight.

the class ActionRegMoveTest method actionInfoTestForRegMoveToMplsAction.

@Test
public void actionInfoTestForRegMoveToMplsAction() {
    ActionInfo actionInfo = new ActionRegMove(1, NxmNxReg1.class, 0, 31);
    Action action = actionInfo.buildAction();
    assertTrue(action.getAction() instanceof NxActionRegMoveNodesNodeTableFlowApplyActionsCase);
    NxActionRegMoveNodesNodeTableFlowApplyActionsCase actionsCase = (NxActionRegMoveNodesNodeTableFlowApplyActionsCase) action.getAction();
    NxRegMove nxRegMove = actionsCase.getNxRegMove();
    assertTrue(nxRegMove.getDst().getDstChoice() instanceof DstOfMplsLabelCase);
    assertEquals((Integer) 0, nxRegMove.getDst().getStart());
    assertEquals((Integer) 31, nxRegMove.getDst().getEnd());
}
Also used : Action(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.Action) NxRegMove(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.nx.action.reg.move.grouping.NxRegMove) DstOfMplsLabelCase(org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.extension.nicira.action.rev140714.dst.choice.grouping.dst.choice.DstOfMplsLabelCase) ActionInfo(org.opendaylight.genius.mdsalutil.ActionInfo) NxActionRegMoveNodesNodeTableFlowApplyActionsCase(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.NxActionRegMoveNodesNodeTableFlowApplyActionsCase) Test(org.junit.Test)

Aggregations

ArrayList (java.util.ArrayList)9 Collections (java.util.Collections)9 List (java.util.List)9 SettableApiFuture (com.google.api.core.SettableApiFuture)8 ServiceOptions (com.google.cloud.ServiceOptions)8 DlpServiceClient (com.google.cloud.dlp.v2.DlpServiceClient)8 Subscriber (com.google.cloud.pubsub.v1.Subscriber)8 Action (com.google.privacy.dlp.v2.Action)8 BigQueryTable (com.google.privacy.dlp.v2.BigQueryTable)8 CreateDlpJobRequest (com.google.privacy.dlp.v2.CreateDlpJobRequest)8 DlpJob (com.google.privacy.dlp.v2.DlpJob)8 GetDlpJobRequest (com.google.privacy.dlp.v2.GetDlpJobRequest)8 InfoType (com.google.privacy.dlp.v2.InfoType)8 ProjectName (com.google.privacy.dlp.v2.ProjectName)8 ProjectSubscriptionName (com.google.pubsub.v1.ProjectSubscriptionName)8 ProjectTopicName (com.google.pubsub.v1.ProjectTopicName)8 TimeUnit (java.util.concurrent.TimeUnit)8 CommandLine (org.apache.commons.cli.CommandLine)8 CommandLineParser (org.apache.commons.cli.CommandLineParser)8 DefaultParser (org.apache.commons.cli.DefaultParser)8