Search in sources :

Example 21 with SetFieldCaseBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCaseBuilder in project openflowplugin by opendaylight.

the class TableFeaturesConvertorTest method setupActions.

private static void setupActions() {
    org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder actionBuilder = new ActionBuilder();
    OutputActionCaseBuilder outputActionCaseBuilder = new OutputActionCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(outputActionCaseBuilder.build()).build());
    GroupActionCaseBuilder groupActionCaseBuilder = new GroupActionCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(groupActionCaseBuilder.build()).build());
    CopyTtlOutCaseBuilder copyTtlOutCaseBuilder = new CopyTtlOutCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(copyTtlOutCaseBuilder.build()).build());
    CopyTtlInCaseBuilder copyTtlInCaseBuilder = new CopyTtlInCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(copyTtlInCaseBuilder.build()).build());
    SetMplsTtlActionCaseBuilder setMplsTtlActionCaseBuilder = new SetMplsTtlActionCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(setMplsTtlActionCaseBuilder.build()).build());
    DecMplsTtlCaseBuilder decMplsTtlCaseBuilder = new DecMplsTtlCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(decMplsTtlCaseBuilder.build()).build());
    PushVlanActionCaseBuilder pushVlanActionCaseBuilder = new PushVlanActionCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(pushVlanActionCaseBuilder.build()).build());
    PopVlanActionCaseBuilder popVlanActionCaseBuilder = new PopVlanActionCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(popVlanActionCaseBuilder.build()).build());
    PushMplsActionCaseBuilder pushMplsActionCaseBuilder = new PushMplsActionCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(pushMplsActionCaseBuilder.build()).build());
    PopMplsActionCaseBuilder popMplsActionCaseBuilder = new PopMplsActionCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(popMplsActionCaseBuilder.build()).build());
    SetQueueActionCaseBuilder setQueueActionCaseBuilder = new SetQueueActionCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(setQueueActionCaseBuilder.build()).build());
    SetNwTtlActionCaseBuilder setNwTtlActionCaseBuilder = new SetNwTtlActionCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(setNwTtlActionCaseBuilder.build()).build());
    DecNwTtlCaseBuilder decNwTtlCaseBuilder = new DecNwTtlCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(decNwTtlCaseBuilder.build()).build());
    SetFieldCaseBuilder setFieldCaseBuilder = new SetFieldCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(setFieldCaseBuilder.build()).build());
    PushPbbActionCaseBuilder pushPbbActionCaseBuilder = new PushPbbActionCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(pushPbbActionCaseBuilder.build()).build());
    PopPbbActionCaseBuilder popPbbActionCaseBuilder = new PopPbbActionCaseBuilder();
    ACTIONS.add(actionBuilder.setAction(popPbbActionCaseBuilder.build()).build());
}
Also used : OutputActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.OutputActionCaseBuilder) SetFieldCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCaseBuilder) ActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder) PushMplsActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushMplsActionCaseBuilder) PopPbbActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PopPbbActionCaseBuilder) DecMplsTtlCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.DecMplsTtlCaseBuilder) PushPbbActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushPbbActionCaseBuilder) CopyTtlInCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.CopyTtlInCaseBuilder) DecNwTtlCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.DecNwTtlCaseBuilder) PopMplsActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PopMplsActionCaseBuilder) SetNwTtlActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetNwTtlActionCaseBuilder) GroupActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.GroupActionCaseBuilder) SetMplsTtlActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetMplsTtlActionCaseBuilder) SetQueueActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetQueueActionCaseBuilder) PopVlanActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PopVlanActionCaseBuilder) PushVlanActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushVlanActionCaseBuilder) ActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder) CopyTtlOutCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.CopyTtlOutCaseBuilder)

Example 22 with SetFieldCaseBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCaseBuilder in project openflowplugin by opendaylight.

the class ActionConvertorTest method setFieldData.

private void setFieldData() {
    SetFieldBuilder matchBuilder = new SetFieldBuilder();
    matchBuilder.setInPort(new NodeConnectorId("openflow:1:2125"));
    SetFieldBuilder setFB = new SetFieldBuilder();
    ActionBuilder actionBuilder = new ActionBuilder();
    actionBuilder.setOrder(actionItem).setAction(new SetFieldCaseBuilder().setSetField(setFB.build()).build());
    actions.add(actionItem++, actionBuilder.build());
}
Also used : SetFieldCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCaseBuilder) PushVlanActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.vlan.action._case.PushVlanActionBuilder) SetNwTtlActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.nw.ttl.action._case.SetNwTtlActionBuilder) PopPbbActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.pbb.action._case.PopPbbActionBuilder) GroupActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.group.action._case.GroupActionBuilder) PushMplsActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.mpls.action._case.PushMplsActionBuilder) PopVlanActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.vlan.action._case.PopVlanActionBuilder) OutputActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.output.action._case.OutputActionBuilder) PushPbbActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.pbb.action._case.PushPbbActionBuilder) SetQueueActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.queue.action._case.SetQueueActionBuilder) SetMplsTtlActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.mpls.ttl.action._case.SetMplsTtlActionBuilder) PopMplsActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.mpls.action._case.PopMplsActionBuilder) ActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder) NodeConnectorId(org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeConnectorId) SetFieldBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.field._case.SetFieldBuilder)

Example 23 with SetFieldCaseBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCaseBuilder in project openflowplugin by opendaylight.

the class ActionConvertorV13Test method testToMDSalActions2.

/**
 * Test {@link ActionConvertor#convert(List, ActionConvertorData)}}.
 */
// @Test
public void testToMDSalActions2() {
    OutputActionCaseBuilder caseBuilder = new OutputActionCaseBuilder();
    OutputActionBuilder outputBuilder = new OutputActionBuilder();
    outputBuilder.setPort(new PortNumber(42L));
    outputBuilder.setMaxLength(52);
    caseBuilder.setOutputAction(outputBuilder.build());
    ActionBuilder actionBuilder = new ActionBuilder();
    actionBuilder.setActionChoice(caseBuilder.build());
    List<Action> actions = new ArrayList<>();
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    actionBuilder.setActionChoice(new CopyTtlOutCaseBuilder().build());
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    actionBuilder.setActionChoice(new CopyTtlInCaseBuilder().build());
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    SetMplsTtlCaseBuilder setMplsTtlCaseBuilder = new SetMplsTtlCaseBuilder();
    SetMplsTtlActionBuilder setMplsTtlBuilder = new SetMplsTtlActionBuilder();
    setMplsTtlBuilder.setMplsTtl((short) 4);
    setMplsTtlCaseBuilder.setSetMplsTtlAction(setMplsTtlBuilder.build());
    actionBuilder.setActionChoice(setMplsTtlCaseBuilder.build());
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    actionBuilder.setActionChoice(new DecMplsTtlCaseBuilder().build());
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    PushVlanCaseBuilder pushVlanCaseBuilder = new PushVlanCaseBuilder();
    PushVlanActionBuilder pushVlanBuilder = new PushVlanActionBuilder();
    pushVlanBuilder.setEthertype(new EtherType(new EtherType(16)));
    pushVlanCaseBuilder.setPushVlanAction(pushVlanBuilder.build());
    actionBuilder.setActionChoice(pushVlanCaseBuilder.build());
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    actionBuilder.setActionChoice(new PopVlanCaseBuilder().build());
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    PushMplsCaseBuilder pushMplsCaseBuilder = new PushMplsCaseBuilder();
    PushMplsActionBuilder pushMplsBuilder = new PushMplsActionBuilder();
    pushMplsBuilder.setEthertype(new EtherType(new EtherType(17)));
    pushMplsCaseBuilder.setPushMplsAction(pushMplsBuilder.build());
    actionBuilder.setActionChoice(pushMplsCaseBuilder.build());
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    PopMplsCaseBuilder popMplsCaseBuilder = new PopMplsCaseBuilder();
    PopMplsActionBuilder popMplsBuilder = new PopMplsActionBuilder();
    popMplsBuilder.setEthertype(new EtherType(new EtherType(18)));
    popMplsCaseBuilder.setPopMplsAction(popMplsBuilder.build());
    actionBuilder.setActionChoice(popMplsCaseBuilder.build());
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    SetQueueCaseBuilder setQueueCaseBuilder = new SetQueueCaseBuilder();
    SetQueueActionBuilder setQueueBuilder = new SetQueueActionBuilder();
    setQueueBuilder.setQueueId(1234L);
    setQueueCaseBuilder.setSetQueueAction(setQueueBuilder.build());
    actionBuilder.setActionChoice(setQueueCaseBuilder.build());
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    GroupCaseBuilder groupCaseBuilder = new GroupCaseBuilder();
    GroupActionBuilder groupActionBuilder = new GroupActionBuilder();
    groupActionBuilder.setGroupId(555L);
    groupCaseBuilder.setGroupAction(groupActionBuilder.build());
    actionBuilder.setActionChoice(groupCaseBuilder.build());
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    SetNwTtlCaseBuilder nwTtlCaseBuilder = new SetNwTtlCaseBuilder();
    SetNwTtlActionBuilder nwTtlBuilder = new SetNwTtlActionBuilder();
    nwTtlBuilder.setNwTtl((short) 8);
    nwTtlCaseBuilder.setSetNwTtlAction(nwTtlBuilder.build());
    actionBuilder.setActionChoice(nwTtlCaseBuilder.build());
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    actionBuilder.setActionChoice(new DecNwTtlCaseBuilder().build());
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    MatchEntryBuilder matchBuilder = new MatchEntryBuilder();
    matchBuilder.setOxmClass(OpenflowBasicClass.class);
    matchBuilder.setOxmMatchField(InPort.class);
    matchBuilder.setHasMask(false);
    InPortCaseBuilder inPortCaseBuilder = new InPortCaseBuilder();
    InPortBuilder inPortBuilder = new InPortBuilder();
    inPortBuilder.setPortNumber(new PortNumber(1L));
    inPortCaseBuilder.setInPort(inPortBuilder.build());
    matchBuilder.setMatchEntryValue(inPortCaseBuilder.build());
    List<MatchEntry> entries = new ArrayList<>();
    entries.add(matchBuilder.build());
    SetFieldActionBuilder setFieldBuilder = new SetFieldActionBuilder();
    setFieldBuilder.setMatchEntry(entries);
    SetFieldCaseBuilder setFieldCaseBuilder = new SetFieldCaseBuilder();
    setFieldCaseBuilder.setSetFieldAction(setFieldBuilder.build());
    actionBuilder.setActionChoice(setFieldCaseBuilder.build());
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    PushPbbCaseBuilder pushPbbCaseBuilder = new PushPbbCaseBuilder();
    PushPbbActionBuilder pushPbbBuilder = new PushPbbActionBuilder();
    pushPbbBuilder.setEthertype(new EtherType(new EtherType(19)));
    pushPbbCaseBuilder.setPushPbbAction(pushPbbBuilder.build());
    actionBuilder.setActionChoice(pushPbbCaseBuilder.build());
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    actionBuilder.setActionChoice(new PopPbbCaseBuilder().build());
    actions.add(actionBuilder.build());
    // Add some unsupported actions and check if they are missing from results
    actionBuilder = new ActionBuilder();
    actionBuilder.setActionChoice(new SetNwDstCaseBuilder().build());
    actions.add(actionBuilder.build());
    actionBuilder = new ActionBuilder();
    actionBuilder.setActionChoice(new StripVlanCaseBuilder().build());
    actions.add(actionBuilder.build());
    ActionResponseConvertorData data = new ActionResponseConvertorData(OFConstants.OFP_VERSION_1_3);
    data.setActionPath(ActionPath.FLOWS_STATISTICS_UPDATE_APPLY_ACTIONS);
    Optional<List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action>> mdSalActionsOptional = convertorManager.convert(actions, data);
    List<org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action> mdSalActions = mdSalActionsOptional.orElse(Collections.emptyList());
    Assert.assertEquals("Wrong number of output actions", 16, mdSalActions.size());
    org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.Action action = mdSalActions.get(0);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.OutputActionCase", action.getImplementedInterface().getName());
    OutputActionCase output = (OutputActionCase) action;
    Assert.assertEquals("Wrong output port", "42", output.getOutputAction().getOutputNodeConnector().getValue());
    Assert.assertEquals("Wrong max length", 52, output.getOutputAction().getMaxLength().intValue());
    action = mdSalActions.get(1);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.CopyTtlOutCase", action.getImplementedInterface().getName());
    action = mdSalActions.get(2);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.CopyTtlInCase", action.getImplementedInterface().getName());
    action = mdSalActions.get(3);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.SetMplsTtlActionCase", action.getImplementedInterface().getName());
    SetMplsTtlActionCase setMplsTtl = (SetMplsTtlActionCase) action;
    Assert.assertEquals("Wrong mpls ttl", 4, setMplsTtl.getSetMplsTtlAction().getMplsTtl().intValue());
    action = mdSalActions.get(4);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.DecMplsTtlCase", action.getImplementedInterface().getName());
    action = mdSalActions.get(5);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.PushVlanActionCase", action.getImplementedInterface().getName());
    PushVlanActionCase pushVlan = (PushVlanActionCase) action;
    Assert.assertEquals("Wrong ethertype", 16, pushVlan.getPushVlanAction().getEthernetType().intValue());
    action = mdSalActions.get(6);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.PopVlanActionCase", action.getImplementedInterface().getName());
    action = mdSalActions.get(7);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.PushMplsActionCase", action.getImplementedInterface().getName());
    PushMplsActionCase pushMpls = (PushMplsActionCase) action;
    Assert.assertEquals("Wrong ethertype", 17, pushMpls.getPushMplsAction().getEthernetType().intValue());
    action = mdSalActions.get(8);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.PopMplsActionCase", action.getImplementedInterface().getName());
    PopMplsActionCase popMpls = (PopMplsActionCase) action;
    Assert.assertEquals("Wrong ethertype", 18, popMpls.getPopMplsAction().getEthernetType().intValue());
    action = mdSalActions.get(9);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.SetQueueActionCase", action.getImplementedInterface().getName());
    SetQueueActionCase setQueue = (SetQueueActionCase) action;
    Assert.assertEquals("Wrong queue-id", 1234, setQueue.getSetQueueAction().getQueueId().intValue());
    action = mdSalActions.get(10);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.GroupActionCase", action.getImplementedInterface().getName());
    GroupActionCase groupAction = (GroupActionCase) action;
    Assert.assertEquals("Wrong group-id", 555, groupAction.getGroupAction().getGroupId().intValue());
    action = mdSalActions.get(11);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.SetNwTtlActionCase", action.getImplementedInterface().getName());
    SetNwTtlActionCase setNwTtl = (SetNwTtlActionCase) action;
    Assert.assertEquals("Wrong nw ttl", 8, setNwTtl.getSetNwTtlAction().getNwTtl().intValue());
    action = mdSalActions.get(12);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.DecNwTtlCase", action.getImplementedInterface().getName());
    action = mdSalActions.get(13);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.SetFieldCase", action.getImplementedInterface().getName());
    SetFieldCase setField = (SetFieldCase) action;
    Assert.assertEquals("Wrong in port", "openflow:null:1", setField.getSetField().getInPort().getValue());
    action = mdSalActions.get(14);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.PushPbbActionCase", action.getImplementedInterface().getName());
    PushPbbActionCase pushPbb = (PushPbbActionCase) action;
    Assert.assertEquals("Wrong ethertype", 19, pushPbb.getPushPbbAction().getEthernetType().intValue());
    action = mdSalActions.get(15);
    Assert.assertEquals("Wrong action type", "org.opendaylight.yang.gen.v1.urn.opendaylight.action.types" + ".rev131112.action.action.PopPbbActionCase", action.getImplementedInterface().getName());
}
Also used : PopPbbCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.PopPbbCaseBuilder) ArrayList(java.util.ArrayList) PopMplsActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.pop.mpls._case.PopMplsActionBuilder) EtherType(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.EtherType) MatchEntryBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntryBuilder) PopMplsActionCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PopMplsActionCase) PushPbbActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.pbb._case.PushPbbActionBuilder) OutputActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.output.action._case.OutputActionBuilder) SetFieldActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.set.field._case.SetFieldActionBuilder) ArrayList(java.util.ArrayList) List(java.util.List) OutputActionCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.OutputActionCase) GroupActionCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.GroupActionCase) SetNwTtlActionCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetNwTtlActionCase) PushPbbActionCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushPbbActionCase) CopyTtlInCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.CopyTtlInCaseBuilder) SetMplsTtlActionCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetMplsTtlActionCase) GroupActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.group._case.GroupActionBuilder) DecNwTtlCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.DecNwTtlCaseBuilder) PushMplsActionCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushMplsActionCase) SetQueueActionCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetQueueActionCase) PushMplsCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.PushMplsCaseBuilder) SetQueueActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.set.queue._case.SetQueueActionBuilder) PushVlanCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.PushVlanCaseBuilder) SetQueueCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetQueueCaseBuilder) ActionResponseConvertorData(org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.action.data.ActionResponseConvertorData) PortNumber(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.PortNumber) CopyTtlOutCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.CopyTtlOutCaseBuilder) OutputActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.OutputActionCaseBuilder) SetNwTtlCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetNwTtlCaseBuilder) Action(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action) GroupCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.GroupCaseBuilder) SetFieldCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetFieldCaseBuilder) MatchEntry(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entries.grouping.MatchEntry) SetVlanIdActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.vlan.id.action._case.SetVlanIdActionBuilder) PopMplsActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.pop.mpls._case.PopMplsActionBuilder) SetNwTtlActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.set.nw.ttl._case.SetNwTtlActionBuilder) PushMplsActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.mpls._case.PushMplsActionBuilder) SetMplsTtlActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.set.mpls.ttl._case.SetMplsTtlActionBuilder) SetDlSrcActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.dl.src.action._case.SetDlSrcActionBuilder) GroupActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.group._case.GroupActionBuilder) SetTpDstActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.tp.dst.action._case.SetTpDstActionBuilder) SetFieldActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.set.field._case.SetFieldActionBuilder) SetNwTosActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.nw.tos.action._case.SetNwTosActionBuilder) SetTpSrcActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.tp.src.action._case.SetTpSrcActionBuilder) SetNwDstActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.nw.dst.action._case.SetNwDstActionBuilder) PushVlanActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.vlan._case.PushVlanActionBuilder) SetQueueActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.set.queue._case.SetQueueActionBuilder) SetDlDstActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.dl.dst.action._case.SetDlDstActionBuilder) StripVlanActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.strip.vlan.action._case.StripVlanActionBuilder) SetVlanPcpActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.vlan.pcp.action._case.SetVlanPcpActionBuilder) OutputActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.output.action._case.OutputActionBuilder) ActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder) SetNwSrcActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.nw.src.action._case.SetNwSrcActionBuilder) PushPbbActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.pbb._case.PushPbbActionBuilder) SetFieldCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCase) PushVlanActionCase(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushVlanActionCase) DecMplsTtlCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.DecMplsTtlCaseBuilder) SetNwTtlActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.set.nw.ttl._case.SetNwTtlActionBuilder) PushPbbCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.PushPbbCaseBuilder) SetMplsTtlActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.set.mpls.ttl._case.SetMplsTtlActionBuilder) InPortBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.in.port._case.InPortBuilder) SetMplsTtlCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetMplsTtlCaseBuilder) PopVlanCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.PopVlanCaseBuilder) SetNwDstCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.SetNwDstCaseBuilder) PushMplsActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.mpls._case.PushMplsActionBuilder) StripVlanCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.StripVlanCaseBuilder) PushVlanActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.vlan._case.PushVlanActionBuilder) InPortCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.match.entry.value.grouping.match.entry.value.InPortCaseBuilder) PopMplsCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.PopMplsCaseBuilder)

Example 24 with SetFieldCaseBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCaseBuilder in project openflowplugin by opendaylight.

the class OpenflowpluginTestCommandProvider method createAppyActionInstruction44.

private static InstructionsBuilder createAppyActionInstruction44() {
    final List<Action> actionLists = new ArrayList<>();
    final ActionBuilder ab = new ActionBuilder();
    final SetFieldBuilder setFieldBuilder = new SetFieldBuilder();
    final ActionBuilder ab1 = new ActionBuilder();
    final SetFieldBuilder setFieldBuilder1 = new SetFieldBuilder();
    final ActionBuilder ab5 = new ActionBuilder();
    final SetFieldBuilder setFieldBuilder5 = new SetFieldBuilder();
    final ActionBuilder ab6 = new ActionBuilder();
    final SetFieldBuilder setFieldBuilder6 = new SetFieldBuilder();
    // IPv6
    final Ipv6MatchBuilder ipv6Builder = new Ipv6MatchBuilder();
    final Ipv6MatchBuilder ipv6Builder1 = new Ipv6MatchBuilder();
    final Ipv6MatchBuilder ipv6Builder5 = new Ipv6MatchBuilder();
    final Ipv6MatchBuilder ipv6Builder6 = new Ipv6MatchBuilder();
    final Ipv6Prefix dstip6 = new Ipv6Prefix("2002::2/128");
    final Ipv6Prefix srcip6 = new Ipv6Prefix("2001:0:0:0:0:0:0:1/128");
    final Ipv6ExtHeaderBuilder nextheader = new Ipv6ExtHeaderBuilder();
    nextheader.setIpv6Exthdr(58);
    final Ipv6LabelBuilder ipv6label = new Ipv6LabelBuilder();
    final Ipv6FlowLabel label = new Ipv6FlowLabel(10028L);
    ipv6label.setIpv6Flabel(label);
    ipv6Builder.setIpv6Source(srcip6);
    ipv6Builder1.setIpv6Destination(dstip6);
    ipv6Builder5.setIpv6ExtHeader(nextheader.build());
    ipv6Builder6.setIpv6Label(ipv6label.build());
    setFieldBuilder.setLayer3Match(ipv6Builder.build());
    ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build());
    ab.setKey(new ActionKey(0));
    actionLists.add(ab.build());
    setFieldBuilder1.setLayer3Match(ipv6Builder1.build());
    ab1.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder1.build()).build());
    ab1.setKey(new ActionKey(1));
    actionLists.add(ab1.build());
    setFieldBuilder5.setLayer3Match(ipv6Builder5.build());
    ab5.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder5.build()).build());
    ab5.setKey(new ActionKey(5));
    actionLists.add(ab5.build());
    setFieldBuilder6.setLayer3Match(ipv6Builder6.build());
    ab6.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder6.build()).build());
    ab6.setKey(new ActionKey(6));
    actionLists.add(ab6.build());
    final ApplyActionsBuilder aab = new ApplyActionsBuilder();
    aab.setAction(actionLists);
    final InstructionBuilder ib = new InstructionBuilder();
    ib.setKey(new InstructionKey(0));
    ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
    // Put our Instruction in a list of Instructions
    final InstructionsBuilder isb = new InstructionsBuilder();
    final List<Instruction> instructions = new ArrayList<>();
    instructions.add(ib.build());
    isb.setInstruction(instructions);
    return isb;
}
Also used : InstructionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder) DropAction(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.drop.action._case.DropAction) Action(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action) SetFieldCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCaseBuilder) ControllerActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.controller.action._case.ControllerActionBuilder) LoopbackActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.loopback.action._case.LoopbackActionBuilder) HwPathActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.hw.path.action._case.HwPathActionBuilder) SetVlanIdActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.vlan.id.action._case.SetVlanIdActionBuilder) DropActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.drop.action._case.DropActionBuilder) SetVlanCfiActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.vlan.cfi.action._case.SetVlanCfiActionBuilder) PushPbbActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.pbb.action._case.PushPbbActionBuilder) SetMplsTtlActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.mpls.ttl.action._case.SetMplsTtlActionBuilder) PopMplsActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.mpls.action._case.PopMplsActionBuilder) SetDlSrcActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.dl.src.action._case.SetDlSrcActionBuilder) SetDlTypeActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.dl.type.action._case.SetDlTypeActionBuilder) SetTpDstActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.tp.dst.action._case.SetTpDstActionBuilder) SetNextHopActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.next.hop.action._case.SetNextHopActionBuilder) PushVlanActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.vlan.action._case.PushVlanActionBuilder) SetNwTtlActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.nw.ttl.action._case.SetNwTtlActionBuilder) PopPbbActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.pbb.action._case.PopPbbActionBuilder) SetNwTosActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.nw.tos.action._case.SetNwTosActionBuilder) SetTpSrcActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.tp.src.action._case.SetTpSrcActionBuilder) SetNwDstActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.nw.dst.action._case.SetNwDstActionBuilder) GroupActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.group.action._case.GroupActionBuilder) PushMplsActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.mpls.action._case.PushMplsActionBuilder) PopVlanActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.vlan.action._case.PopVlanActionBuilder) OutputActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.output.action._case.OutputActionBuilder) SwPathActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.sw.path.action._case.SwPathActionBuilder) SetDlDstActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.dl.dst.action._case.SetDlDstActionBuilder) StripVlanActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.strip.vlan.action._case.StripVlanActionBuilder) FloodAllActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.all.action._case.FloodAllActionBuilder) SetVlanPcpActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.vlan.pcp.action._case.SetVlanPcpActionBuilder) SetQueueActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.queue.action._case.SetQueueActionBuilder) SetNwSrcActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.nw.src.action._case.SetNwSrcActionBuilder) FloodActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodActionBuilder) ActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder) ArrayList(java.util.ArrayList) InstructionKey(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionKey) ActionKey(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionKey) Ipv6ExtHeaderBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ipv6.match.fields.Ipv6ExtHeaderBuilder) Ipv6FlowLabel(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6FlowLabel) Instruction(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction) SetFieldBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.field._case.SetFieldBuilder) Ipv6Prefix(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.Ipv6Prefix) InstructionsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.InstructionsBuilder) ApplyActionsCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder) Ipv6LabelBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.ipv6.match.fields.Ipv6LabelBuilder) Ipv6MatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._3.match.Ipv6MatchBuilder) ApplyActionsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.apply.actions._case.ApplyActionsBuilder)

Example 25 with SetFieldCaseBuilder

use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCaseBuilder in project openflowplugin by opendaylight.

the class OpenflowpluginTestCommandProvider method createAppyActionInstruction40.

private static InstructionsBuilder createAppyActionInstruction40() {
    final List<Action> actionList = new ArrayList<>();
    final ActionBuilder ab = new ActionBuilder();
    final ActionBuilder ab1 = new ActionBuilder();
    final SetFieldBuilder setFieldBuilder = new SetFieldBuilder();
    final SetFieldBuilder setFieldBuilder1 = new SetFieldBuilder();
    // Udp
    final PortNumber udpsrcport = new PortNumber(1325);
    final PortNumber udpdstport = new PortNumber(42);
    final UdpMatchBuilder udpmatch = new UdpMatchBuilder();
    final UdpMatchBuilder udpmatch1 = new UdpMatchBuilder();
    udpmatch.setUdpDestinationPort(udpdstport);
    udpmatch1.setUdpSourcePort(udpsrcport);
    setFieldBuilder.setLayer4Match(udpmatch.build());
    ab.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder.build()).build());
    ab.setKey(new ActionKey(0));
    actionList.add(ab.build());
    setFieldBuilder1.setLayer4Match(udpmatch1.build());
    ab1.setAction(new SetFieldCaseBuilder().setSetField(setFieldBuilder1.build()).build());
    ab1.setKey(new ActionKey(1));
    actionList.add(ab1.build());
    final ApplyActionsBuilder aab = new ApplyActionsBuilder();
    aab.setAction(actionList);
    final InstructionBuilder ib = new InstructionBuilder();
    ib.setKey(new InstructionKey(0));
    ib.setInstruction(new ApplyActionsCaseBuilder().setApplyActions(aab.build()).build());
    // Put our Instruction in a list of Instructions
    final InstructionsBuilder isb = new InstructionsBuilder();
    final List<Instruction> instructions = new ArrayList<>();
    instructions.add(ib.build());
    isb.setInstruction(instructions);
    return isb;
}
Also used : InstructionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionBuilder) DropAction(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.drop.action._case.DropAction) Action(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action) SetFieldCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCaseBuilder) ControllerActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.controller.action._case.ControllerActionBuilder) LoopbackActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.loopback.action._case.LoopbackActionBuilder) HwPathActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.hw.path.action._case.HwPathActionBuilder) SetVlanIdActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.vlan.id.action._case.SetVlanIdActionBuilder) DropActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.drop.action._case.DropActionBuilder) SetVlanCfiActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.vlan.cfi.action._case.SetVlanCfiActionBuilder) PushPbbActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.pbb.action._case.PushPbbActionBuilder) SetMplsTtlActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.mpls.ttl.action._case.SetMplsTtlActionBuilder) PopMplsActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.mpls.action._case.PopMplsActionBuilder) SetDlSrcActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.dl.src.action._case.SetDlSrcActionBuilder) SetDlTypeActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.dl.type.action._case.SetDlTypeActionBuilder) SetTpDstActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.tp.dst.action._case.SetTpDstActionBuilder) SetNextHopActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.next.hop.action._case.SetNextHopActionBuilder) PushVlanActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.vlan.action._case.PushVlanActionBuilder) SetNwTtlActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.nw.ttl.action._case.SetNwTtlActionBuilder) PopPbbActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.pbb.action._case.PopPbbActionBuilder) SetNwTosActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.nw.tos.action._case.SetNwTosActionBuilder) SetTpSrcActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.tp.src.action._case.SetTpSrcActionBuilder) SetNwDstActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.nw.dst.action._case.SetNwDstActionBuilder) GroupActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.group.action._case.GroupActionBuilder) PushMplsActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.mpls.action._case.PushMplsActionBuilder) PopVlanActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.vlan.action._case.PopVlanActionBuilder) OutputActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.output.action._case.OutputActionBuilder) SwPathActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.sw.path.action._case.SwPathActionBuilder) SetDlDstActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.dl.dst.action._case.SetDlDstActionBuilder) StripVlanActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.strip.vlan.action._case.StripVlanActionBuilder) FloodAllActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.all.action._case.FloodAllActionBuilder) SetVlanPcpActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.vlan.pcp.action._case.SetVlanPcpActionBuilder) SetQueueActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.queue.action._case.SetQueueActionBuilder) SetNwSrcActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.nw.src.action._case.SetNwSrcActionBuilder) FloodActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.flood.action._case.FloodActionBuilder) ActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder) ArrayList(java.util.ArrayList) InstructionKey(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.InstructionKey) ActionKey(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionKey) UdpMatchBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.model.match.types.rev131026.match.layer._4.match.UdpMatchBuilder) Instruction(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction) SetFieldBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.field._case.SetFieldBuilder) InstructionsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.InstructionsBuilder) ApplyActionsCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.ApplyActionsCaseBuilder) PortNumber(org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.PortNumber) ApplyActionsBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.instruction.apply.actions._case.ApplyActionsBuilder)

Aggregations

ArrayList (java.util.ArrayList)35 SetFieldCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.SetFieldCaseBuilder)26 SetFieldBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.field._case.SetFieldBuilder)24 ActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.ActionBuilder)20 GroupActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.group.action._case.GroupActionBuilder)18 PopVlanActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.vlan.action._case.PopVlanActionBuilder)18 SetDlDstActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.dl.dst.action._case.SetDlDstActionBuilder)18 SetDlSrcActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.dl.src.action._case.SetDlSrcActionBuilder)18 SetNwDstActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.nw.dst.action._case.SetNwDstActionBuilder)18 SetNwSrcActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.nw.src.action._case.SetNwSrcActionBuilder)18 SetNwTosActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.nw.tos.action._case.SetNwTosActionBuilder)18 SetTpDstActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.tp.dst.action._case.SetTpDstActionBuilder)18 SetTpSrcActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.tp.src.action._case.SetTpSrcActionBuilder)18 SetVlanIdActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.vlan.id.action._case.SetVlanIdActionBuilder)18 SetVlanPcpActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.set.vlan.pcp.action._case.SetVlanPcpActionBuilder)18 Action (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.list.Action)18 OutputActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.output.action._case.OutputActionBuilder)17 PopMplsActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.mpls.action._case.PopMplsActionBuilder)17 PopPbbActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.pop.pbb.action._case.PopPbbActionBuilder)17 PushMplsActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.mpls.action._case.PushMplsActionBuilder)17