Search in sources :

Example 1 with PushVlanAction

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.vlan._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);
}
Also used : PushVlanAction(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.vlan.action._case.PushVlanAction)

Example 2 with PushVlanAction

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.vlan._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());
}
Also used : PushVlanActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.vlan.action._case.PushVlanActionBuilder) PushVlanAction(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.vlan._case.PushVlanAction) PushVlanActionCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushVlanActionCaseBuilder)

Example 3 with PushVlanAction

use of org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.vlan._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());
}
Also used : PushVlanCaseBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.PushVlanCaseBuilder) ActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder) PushVlanActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.vlan._case.PushVlanActionBuilder) PushVlanActionBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.vlan._case.PushVlanActionBuilder) PushVlanAction(org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.vlan.action._case.PushVlanAction) EtherType(org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.EtherType) Nonnull(javax.annotation.Nonnull)

Aggregations

PushVlanAction (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.vlan.action._case.PushVlanAction)2 Nonnull (javax.annotation.Nonnull)1 PushVlanActionCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushVlanActionCaseBuilder)1 PushVlanActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.push.vlan.action._case.PushVlanActionBuilder)1 PushVlanCaseBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.PushVlanCaseBuilder)1 PushVlanAction (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.vlan._case.PushVlanAction)1 PushVlanActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.action.grouping.action.choice.push.vlan._case.PushVlanActionBuilder)1 ActionBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.ActionBuilder)1 EtherType (org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.EtherType)1