use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushVlanActionCaseBuilder in project openflowplugin by opendaylight.
the class PushVlanActionSerializerTest method testSerialize.
@Test
public void testSerialize() throws Exception {
final int ethType = 10;
final Action action = new PushVlanActionCaseBuilder().setPushVlanAction(new PushVlanActionBuilder().setEthernetType(ethType).build()).build();
assertAction(action, out -> {
assertEquals(out.readUnsignedShort(), ethType);
out.skipBytes(ActionConstants.ETHERTYPE_ACTION_PADDING);
});
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushVlanActionCaseBuilder in project openflowplugin by opendaylight.
the class OpenflowPluginBulkGroupTransactionProvider method createPushVlanAction.
private List<Action> createPushVlanAction() {
PushVlanActionBuilder vlan = new PushVlanActionBuilder();
vlan.setEthernetType(0x8100);
VlanId vlanId = new VlanId(2);
vlan.setVlanId(vlanId);
ActionBuilder action = new ActionBuilder();
action.setAction(new PushVlanActionCaseBuilder().setPushVlanAction(vlan.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.PushVlanActionCaseBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginGroupTestCommandProvider method createNonAppyPushVlanAction.
private static List<Action> createNonAppyPushVlanAction() {
List<Action> actionList = new ArrayList<>();
ActionBuilder ab = new ActionBuilder();
PushVlanActionBuilder vlan = new PushVlanActionBuilder();
vlan.setEthernetType(0x8101);
ab.setAction(new PushVlanActionCaseBuilder().setPushVlanAction(vlan.build()).build());
actionList.add(ab.build());
return actionList;
}
use of org.opendaylight.yang.gen.v1.urn.opendaylight.action.types.rev131112.action.action.PushVlanActionCaseBuilder in project openflowplugin by opendaylight.
the class OpenflowpluginGroupTestCommandProvider method createPushVlanAction.
private List<Action> createPushVlanAction() {
PushVlanActionBuilder vlan = new PushVlanActionBuilder();
vlan.setEthernetType(0x8100);
ActionBuilder action = new ActionBuilder();
action.setAction(new PushVlanActionCaseBuilder().setPushVlanAction(vlan.build()).build());
List<Action> actions = new ArrayList<>();
actions.add(action.build());
return actions;
}
Aggregations