*/
package org.opendaylight.openflowplugin.api;
-import com.google.common.collect.ImmutableList;
import java.util.List;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.FlowCookie;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.Match;
import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.types.rev131026.flow.MatchBuilder;
+import org.opendaylight.yangtools.yang.common.ErrorTag;
import org.opendaylight.yangtools.yang.common.Uint16;
import org.opendaylight.yangtools.yang.common.Uint32;
import org.opendaylight.yangtools.yang.common.Uint64;
* OFP related constants.
*/
public final class OFConstants {
-
- private OFConstants() {
- throw new UnsupportedOperationException("OF plugin Constants holder class");
- }
-
/** enum ofp_port_no, reserved port: process with normal L2/L3 switching. */
public static final short OFPP_NORMAL = (short)0xfffa;
/** enum ofp_port_no, reserved port: all physical ports except input port. */
public static final short OFPP_LOCAL = (short)0xfffe;
/** openflow protocol 1.0 - version identifier. */
- public static final short OFP_VERSION_1_0 = 0x01;
+ public static final Uint8 OFP_VERSION_1_0 = Uint8.ONE;
/** openflow protocol 1.3 - version identifier. */
- public static final short OFP_VERSION_1_3 = 0x04;
+ public static final Uint8 OFP_VERSION_1_3 = Uint8.valueOf(0x04);
public static final String OF_URI_PREFIX = "openflow:";
public static final Uint16 OFPCML_NO_BUFFER = Uint16.MAX_VALUE;
public static final int MAC_ADDRESS_LENGTH = 6;
- public static final int SIZE_OF_LONG_IN_BYTES = 8;
public static final int SIGNUM_UNSIGNED = 1;
/** RpcError application tag. */
- public static final String APPLICATION_TAG = "OPENFLOW_PLUGIN";
- /** RpcError tag - timeout. */
- public static final String ERROR_TAG_TIMEOUT = "TIMOUT";
+ public static final ErrorTag APPLICATION_TAG = new ErrorTag("OPENFLOW_PLUGIN");
/** Persistent ID of OpenFlowPlugin configuration file. */
public static final String CONFIG_FILE_ID = "org.opendaylight.openflowplugin";
/** supported version ordered by height (highest version is at the beginning). */
- public static final List<Short> VERSION_ORDER = ImmutableList
- .<Short>builder()
- .add((short) 0x04, (short) 0x01)
- .build();
+ public static final List<Uint8> VERSION_ORDER = List.of(OFP_VERSION_1_3, OFP_VERSION_1_0);
+
+ private OFConstants() {
+ // Hidden on purpose
+ }
}