Thomas Vachuska

Fixing OF flow and group provider run-time dependency.

Change-Id: I25fa3c72ab01500c39fc90198abc4c383a9512a2
......@@ -64,6 +64,8 @@ import org.onosproject.net.flow.criteria.UdpPortCriterion;
import org.onosproject.net.flow.criteria.VlanIdCriterion;
import org.onosproject.net.flow.criteria.VlanPcpCriterion;
import org.onosproject.openflow.controller.ExtensionSelectorInterpreter;
import org.onosproject.provider.of.flow.util.NoMappingFoundException;
import org.onosproject.provider.of.flow.util.OpenFlowValueMapper;
import org.projectfloodlight.openflow.protocol.OFFactory;
import org.projectfloodlight.openflow.protocol.OFFlowMod;
import org.projectfloodlight.openflow.protocol.match.Match;
......
......@@ -54,6 +54,8 @@ import org.onosproject.net.flow.instructions.L3ModificationInstruction.ModIPv6Fl
import org.onosproject.net.flow.instructions.L4ModificationInstruction;
import org.onosproject.net.flow.instructions.L4ModificationInstruction.ModTransportPortInstruction;
import org.onosproject.openflow.controller.ExtensionTreatmentInterpreter;
import org.onosproject.provider.of.flow.util.NoMappingFoundException;
import org.onosproject.provider.of.flow.util.OpenFlowValueMapper;
import org.projectfloodlight.openflow.protocol.OFFactory;
import org.projectfloodlight.openflow.protocol.OFFlowAdd;
import org.projectfloodlight.openflow.protocol.OFFlowDeleteStrict;
......
......@@ -53,6 +53,7 @@ import org.onosproject.openflow.controller.OpenFlowSwitch;
import org.onosproject.openflow.controller.OpenFlowSwitchListener;
import org.onosproject.openflow.controller.RoleState;
import org.onosproject.openflow.controller.ThirdPartyMessage;
import org.onosproject.provider.of.flow.util.FlowEntryBuilder;
import org.osgi.service.component.ComponentContext;
import org.projectfloodlight.openflow.protocol.OFBadRequestCode;
import org.projectfloodlight.openflow.protocol.OFBarrierRequest;
......
/*
* Copyright 2014-2015 Open Networking Laboratory
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.provider.of.flow.impl;
package org.onosproject.provider.of.flow.util;
import com.google.common.collect.Lists;
import org.onlab.packet.EthType;
......@@ -101,10 +101,10 @@ import static org.onosproject.net.flow.criteria.Criteria.matchOduSignalId;
import static org.onosproject.net.flow.criteria.Criteria.matchOduSignalType;
import static org.onosproject.net.flow.instructions.Instructions.modL0Lambda;
import static org.onosproject.net.flow.instructions.Instructions.modL1OduSignalId;
import static org.onosproject.provider.of.flow.impl.OpenFlowValueMapper.lookupChannelSpacing;
import static org.onosproject.provider.of.flow.impl.OpenFlowValueMapper.lookupGridType;
import static org.onosproject.provider.of.flow.impl.OpenFlowValueMapper.lookupOchSignalType;
import static org.onosproject.provider.of.flow.impl.OpenFlowValueMapper.lookupOduSignalType;
import static org.onosproject.provider.of.flow.util.OpenFlowValueMapper.lookupChannelSpacing;
import static org.onosproject.provider.of.flow.util.OpenFlowValueMapper.lookupGridType;
import static org.onosproject.provider.of.flow.util.OpenFlowValueMapper.lookupOchSignalType;
import static org.onosproject.provider.of.flow.util.OpenFlowValueMapper.lookupOduSignalType;
public class FlowEntryBuilder {
private static final Logger log = LoggerFactory.getLogger(FlowEntryBuilder.class);
......
/*
* Copyright 2015 Open Networking Laboratory
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.provider.of.flow.impl;
package org.onosproject.provider.of.flow.util;
/**
* Thrown to indicate that no mapping for the input value is found.
......
/*
* Copyright 2015 Open Networking Laboratory
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.onosproject.provider.of.flow.impl;
package org.onosproject.provider.of.flow.util;
import com.google.common.collect.BiMap;
import com.google.common.collect.EnumHashBiMap;
......@@ -25,7 +25,7 @@ import org.onosproject.net.OduSignalType;
/**
* Collection of helper methods to convert protocol agnostic models to values used in OpenFlow spec.
*/
final class OpenFlowValueMapper {
public final class OpenFlowValueMapper {
// prohibit instantiation
private OpenFlowValueMapper() {}
......@@ -94,7 +94,7 @@ final class OpenFlowValueMapper {
* @return the byte value corresponding to the specified grid type
* @throws NoMappingFoundException if the specified grid type is not found
*/
static byte lookupGridType(GridType type) {
public static byte lookupGridType(GridType type) {
return lookup(GRID_TYPES, type, Byte.class);
}
......@@ -106,7 +106,7 @@ final class OpenFlowValueMapper {
* @param type byte value as grid type defined the spec
* @return the corresponding GridType instance
*/
static GridType lookupGridType(byte type) {
public static GridType lookupGridType(byte type) {
return lookup(GRID_TYPES.inverse(), type, GridType.class);
}
......@@ -119,7 +119,7 @@ final class OpenFlowValueMapper {
* @return byte value corresponding to the specified channel spacing
* @throws NoMappingFoundException if the specified channel spacing is not found
*/
static byte lookupChannelSpacing(ChannelSpacing spacing) {
public static byte lookupChannelSpacing(ChannelSpacing spacing) {
return lookup(CHANNEL_SPACING, spacing, Byte.class);
}
......@@ -132,7 +132,7 @@ final class OpenFlowValueMapper {
* @return the corresponding ChannelSpacing instance
* @throws NoMappingFoundException if the specified channel spacing is not found
*/
static ChannelSpacing lookupChannelSpacing(byte spacing) {
public static ChannelSpacing lookupChannelSpacing(byte spacing) {
return lookup(CHANNEL_SPACING.inverse(), spacing, ChannelSpacing.class);
}
......@@ -145,7 +145,7 @@ final class OpenFlowValueMapper {
* @return byte value corresponding to the specified OCh signal type
* @throws NoMappingFoundException if the specified Och signal type is not found
*/
static byte lookupOchSignalType(OchSignalType signalType) {
public static byte lookupOchSignalType(OchSignalType signalType) {
return lookup(OCH_SIGNAL_TYPES, signalType, Byte.class);
}
......@@ -158,7 +158,7 @@ final class OpenFlowValueMapper {
* @return the corresponding OchSignalType instance
* @throws NoMappingFoundException if the specified Och signal type is not found
*/
static OchSignalType lookupOchSignalType(byte signalType) {
public static OchSignalType lookupOchSignalType(byte signalType) {
return lookup(OCH_SIGNAL_TYPES.inverse(), signalType, OchSignalType.class);
}
......@@ -171,7 +171,7 @@ final class OpenFlowValueMapper {
* @return byte value corresponding to the specified ODU signal type
* @throws NoMappingFoundException if the specified ODU signal type is not found
*/
static byte lookupOduSignalType(OduSignalType signalType) {
public static byte lookupOduSignalType(OduSignalType signalType) {
return lookup(ODU_SIGNAL_TYPES, signalType, Byte.class);
}
......@@ -184,7 +184,7 @@ final class OpenFlowValueMapper {
* @return the corresponding OchSignalType instance
* @throws NoMappingFoundException if the specified ODU signal type is not found
*/
static OduSignalType lookupOduSignalType(byte signalType) {
public static OduSignalType lookupOduSignalType(byte signalType) {
return lookup(ODU_SIGNAL_TYPES.inverse(), signalType, OduSignalType.class);
}
}
......
/*
* Copyright 2016 Open Networking Laboratory
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Shared utilities for OF flow rule and group providers.
*/
package org.onosproject.provider.of.flow.util;
\ No newline at end of file
......@@ -31,7 +31,7 @@ import org.onosproject.net.group.DefaultGroupBucket;
import org.onosproject.net.group.GroupBucket;
import org.onosproject.net.group.GroupBuckets;
import org.onosproject.openflow.controller.Dpid;
import org.onosproject.provider.of.flow.impl.FlowEntryBuilder;
import org.onosproject.provider.of.flow.util.FlowEntryBuilder;
import org.projectfloodlight.openflow.protocol.OFBucket;
import org.projectfloodlight.openflow.protocol.OFGroupType;
import org.projectfloodlight.openflow.protocol.action.OFAction;
......@@ -41,7 +41,7 @@ import java.util.List;
import static org.slf4j.LoggerFactory.getLogger;
/*
/**
* Builder for GroupBucketEntry.
*/
public class GroupBucketEntryBuilder {
......