Search in sources :

Example 1 with PushMplsAction

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.mpls._case.PushMplsAction in project openflowplugin by opendaylight.

the class PushMplsActionSerializer method serialize.

@Override
public void serialize(PushMplsActionCase action, ByteBuf outBuffer) {
    super.serialize(action, outBuffer);
    final PushMplsAction pushMplsAction = action.getPushMplsAction();
    outBuffer.writeShort(pushMplsAction.getEthernetType());
    outBuffer.writeZero(ActionConstants.ETHERTYPE_ACTION_PADDING);
}
Also used : PushMplsAction(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.mpls.action._case.PushMplsAction)

Example 2 with PushMplsAction

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.mpls._case.PushMplsAction in project openflowplugin by opendaylight.

the class OfToSalPushMplsCase method process.

@Override
public Optional<Action> process(@Nonnull final PushMplsCase source, final ActionResponseConvertorData data, ConvertorExecutor convertorExecutor) {
    PushMplsAction pushMplsActionFromOF = source.getPushMplsAction();
    PushMplsActionBuilder pushMplsAction = new PushMplsActionBuilder();
    pushMplsAction.setEthernetType(pushMplsActionFromOF.getEthertype().getValue());
    return Optional.of(new PushMplsActionCaseBuilder().setPushMplsAction(pushMplsAction.build()).build());
}
Also used : PushMplsAction(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.mpls._case.PushMplsAction) PushMplsActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushMplsActionCaseBuilder) PushMplsActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.mpls.action._case.PushMplsActionBuilder)

Aggregations

PushMplsActionCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushMplsActionCaseBuilder)1 PushMplsAction (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.mpls.action._case.PushMplsAction)1 PushMplsActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.mpls.action._case.PushMplsActionBuilder)1 PushMplsAction (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.mpls._case.PushMplsAction)1