/**
- * Copyright (c) 2013-2014 Ericsson. and others. All rights reserved.
+ * Copyright (c) 2013, 2015 Ericsson. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
/**
* Default idle timeout
*/
- public static final Integer DEFAULT_IDLE_TIMEOUT = 5 * 60;
+ public static final Integer DEFAULT_IDLE_TIMEOUT = 0;
/**
* Default hard timeout
*/
- public static final Integer DEFAULT_HARD_TIMEOUT = 10 * 60;
+ public static final Integer DEFAULT_HARD_TIMEOUT = 0;
/**
* Default priority
*/
* default match entries - empty
*/
public static final List<MatchEntry> DEFAULT_MATCH_ENTRIES = new ArrayList<MatchEntry>();
+ private static final Integer PUSH_VLAN = 0x8100;
private static final Ordering<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction> INSTRUCTION_ORDERING =
Ordering.from(OrderComparator.<org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.instruction.list.Instruction>build());
* This method converts the SAL Flow to OF Flow.
* It checks if there is a set-vlan-id (1.0) action made on OF1.3.
* If yes its handled separately
+ *
+ * @param srcFlow source flow
+ * @param version openflow version
+ * @param datapathId datapath id
+ * @return list of flow mod build
*/
public static List<FlowModInputBuilder> toFlowModInputs(Flow srcFlow, short version, BigInteger datapathId) {
if (version >= OFConstants.OFP_VERSION_1_3 && isSetVlanIdActionCasePresent(srcFlow)) {
}
}
- public static FlowModInputBuilder toFlowModInput(Flow flow, short version, BigInteger datapathid) {
+ private static FlowModInputBuilder toFlowModInput(Flow flow, short version, BigInteger datapathid) {
FlowModInputBuilder flowMod = new FlowModInputBuilder();
salToOFFlowCookie(flow, flowMod);
pushVlanActionBuilder.setCfi(new VlanCfi(1))
.setVlanId(setVlanIdActionCase.getSetVlanIdAction().getVlanId())
- .setEthernetType(sourceFlow.getMatch().getEthernetMatch()
- .getEthernetType().getType().getValue().intValue())
- .setTag(sourceFlow.getMatch().getEthernetMatch()
- .getEthernetType().getType().getValue().intValue());
+ .setEthernetType(PUSH_VLAN)
+ .setTag(PUSH_VLAN);
pushVlanActionCaseBuilder.setPushVlanAction(pushVlanActionBuilder.build());
PushVlanActionCase injectedAction = pushVlanActionCaseBuilder.build();