use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.pbb._case.PushPbbActionBuilder 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.openflow.common.action.rev150203.action.grouping.action.choice.push.pbb._case.PushPbbActionBuilder 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.openflow.common.action.rev150203.action.grouping.action.choice.push.pbb._case.PushPbbActionBuilder in project openflowplugin by opendaylight.
the class SalToOfPushPbbActionCase method process.
@Nonnull
@Override
public Optional<Action> process(@Nonnull final PushPbbActionCase source, final ActionConvertorData data, ConvertorExecutor convertorExecutor) {
PushPbbCaseBuilder pushPbbCaseBuilder = new PushPbbCaseBuilder();
PushPbbActionBuilder pushPbbBuilder = new PushPbbActionBuilder();
pushPbbBuilder.setEthertype(new EtherType(source.getPushPbbAction().getEthernetType()));
pushPbbCaseBuilder.setPushPbbAction(pushPbbBuilder.build());
return Optional.of(new ActionBuilder().setActionChoice(pushPbbCaseBuilder.build()).build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.pbb._case.PushPbbActionBuilder 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