use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushPbbActionCaseBuilder in project openflowplugin by opendaylight.
the class OpenflowPluginBulkGroupTransactionProvider method createPushPbbAction.
private List<Action> createPushPbbAction() {
PushPbbActionBuilder pbb = new PushPbbActionBuilder();
pbb.setEthernetType(0x88E7);
ActionBuilder action = new ActionBuilder();
action.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build());
List<Action> actions = new ArrayList<>();
actions.add(action.build());
return actions;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushPbbActionCaseBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginGroupTestCommandProvider method createPushPbbAction.
private List<Action> createPushPbbAction() {
PushPbbActionBuilder pbb = new PushPbbActionBuilder();
pbb.setEthernetType(0x88E7);
ActionBuilder action = new ActionBuilder();
action.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build());
List<Action> actions = new ArrayList<>();
actions.add(action.build());
return actions;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushPbbActionCaseBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginGroupTestCommandProvider method createNonAppyPushPbbAction.
private static List<Action> createNonAppyPushPbbAction() {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
PushPbbActionBuilder pbb = new PushPbbActionBuilder();
pbb.setEthernetType(0x88E8);
ab.setAction(new PushPbbActionCaseBuilder().setPushPbbAction(pbb.build()).build());
actionList.add(ab.build());
return actionList;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushPbbActionCaseBuilder in project openflowplugin by opendaylight.
the class OfToSalPushPbbCase method process.
@Override
public Optional<Action> process(@Nonnull final PushPbbCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
PushPbbAction pushPbbActionFromOf = source.getPushPbbAction();
PushPbbActionBuilder pushPbbAction = new PushPbbActionBuilder();
pushPbbAction.setEthernetType(pushPbbActionFromOf.getEthertype().getValue());
return Optional.of(new PushPbbActionCaseBuilder().setPushPbbAction(pushPbbAction.build()).build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushPbbActionCaseBuilder in project openflowplugin by opendaylight.
the class PushPbbActionSerializerTest method testSerialize.
@Test
public void testSerialize() throws Exception {
final int ethType = 10;
final Action action = new PushPbbActionCaseBuilder().setPushPbbAction(new PushPbbActionBuilder().setEthernetType(ethType).build()).build();
assertAction(action, out -> {
assertEquals(out.readUnsignedShort(), ethType);
out.skipBytes(ActionConstants.ETHERTYPE_ACTION_PADDING);
});
}
Aggregations