use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.vlan.action._case.PushVlanAction in project openflowplugin by opendaylight.
the class PushVlanActionSerializer method serialize.
@Override
public void serialize(PushVlanActionCase action, ByteBuf outBuffer) {
super.serialize(action, outBuffer);
final PushVlanAction pushVlanAction = action.getPushVlanAction();
outBuffer.writeShort(pushVlanAction.getEthernetType());
outBuffer.writeZero(ActionConstants.ETHERTYPE_ACTION_PADDING);
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.vlan.action._case.PushVlanAction in project openflowplugin by opendaylight.
the class OfToSalPushVlanCase method process.
@Override
public Optional<Action> process(@Nonnull final PushVlanCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
PushVlanAction pushVlanActionFromOF = source.getPushVlanAction();
PushVlanActionBuilder pushVlanAction = new PushVlanActionBuilder();
pushVlanAction.setEthernetType(pushVlanActionFromOF.getEthertype().getValue());
return Optional.of(new PushVlanActionCaseBuilder().setPushVlanAction(pushVlanAction.build()).build());
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.vlan.action._case.PushVlanAction in project openflowplugin by opendaylight.
the class SalToOfPushVlanActionCase method process.
@Nonnull
@Override
public Optional<Action> process(@Nonnull final PushVlanActionCase source, final ActionConvertorData data, ConvertorExecutor convertorExecutor) {
PushVlanAction pushVlanAction = source.getPushVlanAction();
PushVlanCaseBuilder pushVlanCaseBuilder = new PushVlanCaseBuilder();
PushVlanActionBuilder pushVlanBuilder = new PushVlanActionBuilder();
if (pushVlanAction.getEthernetType() != null) {
pushVlanBuilder.setEthertype(new EtherType(pushVlanAction.getEthernetType()));
}
pushVlanCaseBuilder.setPushVlanAction(pushVlanBuilder.build());
return Optional.of(new ActionBuilder().setActionChoice(pushVlanCaseBuilder.build()).build());
}
Aggregations