ONOS-6887 Move neighbour classes from incubator to core

Change-Id: I5fa70253b833838566a3527d8938e04be4274210
This commit is contained in:
Ray Milkey 2017-08-03 16:28:24 -07:00
parent facf286f9c
commit b65d7844e2
27 changed files with 71 additions and 75 deletions

View File

@ -23,8 +23,8 @@ import org.apache.felix.scr.annotations.Reference;
import org.apache.felix.scr.annotations.ReferenceCardinality;
import org.onosproject.core.ApplicationId;
import org.onosproject.core.CoreService;
import org.onosproject.incubator.net.neighbour.DefaultNeighbourMessageHandler;
import org.onosproject.incubator.net.neighbour.NeighbourResolutionService;
import org.onosproject.net.neighbour.DefaultNeighbourMessageHandler;
import org.onosproject.net.neighbour.NeighbourResolutionService;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.edge.EdgePortEvent;
import org.onosproject.net.edge.EdgePortListener;

View File

@ -29,9 +29,9 @@ import org.onosproject.net.intf.Interface;
import org.onosproject.net.intf.InterfaceEvent;
import org.onosproject.net.intf.InterfaceListener;
import org.onosproject.net.intf.InterfaceService;
import org.onosproject.incubator.net.neighbour.NeighbourMessageContext;
import org.onosproject.incubator.net.neighbour.NeighbourMessageHandler;
import org.onosproject.incubator.net.neighbour.NeighbourResolutionService;
import org.onosproject.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.neighbour.NeighbourMessageHandler;
import org.onosproject.net.neighbour.NeighbourResolutionService;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.Host;
import org.onosproject.net.config.NetworkConfigEvent;

View File

@ -22,7 +22,7 @@ import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
import org.onosproject.incubator.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;
import org.onosproject.net.host.HostService;
@ -34,7 +34,7 @@ import org.slf4j.LoggerFactory;
import java.util.Set;
import java.util.stream.Collectors;
import static org.onosproject.incubator.net.neighbour.NeighbourMessageType.REQUEST;
import static org.onosproject.net.neighbour.NeighbourMessageType.REQUEST;
/**
* Handler of ARP packets that responses or forwards ARP packets that

View File

@ -27,8 +27,8 @@ import org.onlab.packet.MPLS;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
import org.onlab.packet.ndp.NeighborSolicitation;
import org.onosproject.incubator.net.neighbour.NeighbourMessageContext;
import org.onosproject.incubator.net.neighbour.NeighbourMessageType;
import org.onosproject.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.neighbour.NeighbourMessageType;
import org.onosproject.incubator.net.routing.ResolvedRoute;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;

View File

@ -43,7 +43,7 @@ import org.onosproject.net.intf.InterfaceService;
import org.onosproject.incubator.net.routing.RouteEvent;
import org.onosproject.incubator.net.routing.RouteListener;
import org.onosproject.incubator.net.routing.RouteService;
import org.onosproject.incubator.net.neighbour.NeighbourResolutionService;
import org.onosproject.net.neighbour.NeighbourResolutionService;
import org.onosproject.mastership.MastershipService;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.Device;

View File

@ -16,8 +16,8 @@
package org.onosproject.segmentrouting;
import org.onosproject.incubator.net.neighbour.NeighbourMessageContext;
import org.onosproject.incubator.net.neighbour.NeighbourMessageHandler;
import org.onosproject.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.neighbour.NeighbourMessageHandler;
import org.onosproject.net.host.HostService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

View File

@ -19,7 +19,7 @@ package org.onosproject.segmentrouting;
import org.onlab.packet.Ethernet;
import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
import org.onosproject.incubator.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.DeviceId;
import org.onosproject.net.Host;

View File

@ -28,9 +28,9 @@ import org.onosproject.net.intf.Interface;
import org.onosproject.net.intf.InterfaceEvent;
import org.onosproject.net.intf.InterfaceListener;
import org.onosproject.net.intf.InterfaceService;
import org.onosproject.incubator.net.neighbour.NeighbourMessageContext;
import org.onosproject.incubator.net.neighbour.NeighbourMessageHandler;
import org.onosproject.incubator.net.neighbour.NeighbourResolutionService;
import org.onosproject.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.neighbour.NeighbourMessageHandler;
import org.onosproject.net.neighbour.NeighbourResolutionService;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.Host;
import org.onosproject.net.config.NetworkConfigEvent;

View File

@ -28,12 +28,12 @@ import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
import org.onosproject.core.ApplicationId;
import org.onosproject.net.intf.Interface;
import org.onosproject.incubator.net.neighbour.NeighbourHandlerRegistration;
import org.onosproject.incubator.net.neighbour.NeighbourMessageContext;
import org.onosproject.incubator.net.neighbour.NeighbourMessageHandler;
import org.onosproject.incubator.net.neighbour.NeighbourMessageType;
import org.onosproject.incubator.net.neighbour.NeighbourProtocol;
import org.onosproject.incubator.net.neighbour.NeighbourResolutionService;
import org.onosproject.net.neighbour.NeighbourHandlerRegistration;
import org.onosproject.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.neighbour.NeighbourMessageHandler;
import org.onosproject.net.neighbour.NeighbourMessageType;
import org.onosproject.net.neighbour.NeighbourProtocol;
import org.onosproject.net.neighbour.NeighbourResolutionService;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.Host;
import org.onosproject.net.host.HostService;

View File

@ -19,7 +19,7 @@ package org.onosproject.cli.net;
import org.apache.karaf.shell.commands.Command;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.net.intf.Interface;
import org.onosproject.incubator.net.neighbour.NeighbourResolutionService;
import org.onosproject.net.neighbour.NeighbourResolutionService;
/**
* Lists neighbour message handlers.

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.onosproject.incubator.net.neighbour;
package org.onosproject.net.neighbour;
import org.onosproject.net.Host;
import org.onosproject.net.host.HostService;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.onosproject.incubator.net.neighbour;
package org.onosproject.net.neighbour;
import org.onosproject.core.ApplicationId;
import org.onosproject.net.intf.Interface;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.onosproject.incubator.net.neighbour;
package org.onosproject.net.neighbour;
import com.google.common.annotations.Beta;
import org.onlab.packet.MacAddress;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.onosproject.incubator.net.neighbour;
package org.onosproject.net.neighbour;
import com.google.common.annotations.Beta;
import org.onlab.packet.Ethernet;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.onosproject.incubator.net.neighbour;
package org.onosproject.net.neighbour;
import com.google.common.annotations.Beta;
import org.onosproject.net.host.HostService;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.onosproject.incubator.net.neighbour;
package org.onosproject.net.neighbour;
import com.google.common.annotations.Beta;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.onosproject.incubator.net.neighbour;
package org.onosproject.net.neighbour;
import com.google.common.annotations.Beta;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.onosproject.incubator.net.neighbour;
package org.onosproject.net.neighbour;
import com.google.common.annotations.Beta;
import org.onosproject.core.ApplicationId;

View File

@ -17,4 +17,4 @@
/**
* Neighbour message (ARP, NDP) handling.
*/
package org.onosproject.incubator.net.neighbour;
package org.onosproject.net.neighbour;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.onosproject.incubator.net.neighbour.impl;
package org.onosproject.net.neighbour.impl;
import org.onlab.packet.ARP;
import org.onlab.packet.Ethernet;
@ -28,8 +28,8 @@ import org.onlab.packet.ndp.NeighborAdvertisement;
import org.onlab.packet.ndp.NeighborDiscoveryOptions;
import org.onlab.util.Tools;
import org.onosproject.net.intf.Interface;
import org.onosproject.incubator.net.neighbour.NeighbourMessageActions;
import org.onosproject.incubator.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.neighbour.NeighbourMessageActions;
import org.onosproject.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.edge.EdgePortService;
import org.onosproject.net.flow.DefaultTrafficTreatment;

View File

@ -14,9 +14,10 @@
* limitations under the License.
*/
package org.onosproject.incubator.net.neighbour.impl;
package org.onosproject.net.neighbour.impl;
import java.util.Objects;
import com.google.common.annotations.Beta;
import org.onlab.packet.ARP;
import org.onlab.packet.Ethernet;
import org.onlab.packet.ICMP6;
@ -27,21 +28,19 @@ import org.onlab.packet.IpAddress;
import org.onlab.packet.MacAddress;
import org.onlab.packet.VlanId;
import org.onlab.packet.ndp.NeighborSolicitation;
import org.onosproject.net.intf.Interface;
import org.onosproject.incubator.net.neighbour.NeighbourMessageActions;
import org.onosproject.incubator.net.neighbour.NeighbourMessageContext;
import org.onosproject.incubator.net.neighbour.NeighbourMessageType;
import org.onosproject.incubator.net.neighbour.NeighbourProtocol;
import org.onosproject.net.ConnectPoint;
import java.util.Objects;
import org.onosproject.net.intf.Interface;
import org.onosproject.net.neighbour.NeighbourMessageActions;
import org.onosproject.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.neighbour.NeighbourMessageType;
import org.onosproject.net.neighbour.NeighbourProtocol;
import static com.google.common.base.Preconditions.checkState;
/**
* Default implementation of a neighbour message context.
*/
@Beta
public class DefaultNeighbourMessageContext implements NeighbourMessageContext {
private final NeighbourProtocol protocol;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.onosproject.incubator.net.neighbour.impl;
package org.onosproject.net.neighbour.impl;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.ImmutableMap;
@ -39,11 +39,11 @@ import org.onosproject.cfg.ComponentConfigService;
import org.onosproject.core.ApplicationId;
import org.onosproject.core.CoreService;
import org.onosproject.net.intf.Interface;
import org.onosproject.incubator.net.neighbour.NeighbourHandlerRegistration;
import org.onosproject.incubator.net.neighbour.NeighbourMessageActions;
import org.onosproject.incubator.net.neighbour.NeighbourMessageContext;
import org.onosproject.incubator.net.neighbour.NeighbourMessageHandler;
import org.onosproject.incubator.net.neighbour.NeighbourResolutionService;
import org.onosproject.net.neighbour.NeighbourHandlerRegistration;
import org.onosproject.net.neighbour.NeighbourMessageActions;
import org.onosproject.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.neighbour.NeighbourMessageHandler;
import org.onosproject.net.neighbour.NeighbourResolutionService;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.edge.EdgePortService;
import org.onosproject.net.flow.DefaultTrafficSelector;

View File

@ -17,4 +17,4 @@
/**
* Implementation of neighbour resolution service.
*/
package org.onosproject.incubator.net.neighbour.impl;
package org.onosproject.net.neighbour.impl;

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.onosproject.incubator.net.neighbour.impl;
package org.onosproject.net.neighbour.impl;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Sets;
@ -43,9 +43,7 @@ import static org.easymock.EasyMock.createMock;
import static org.easymock.EasyMock.expectLastCall;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
import static org.onosproject.incubator.net.neighbour.impl.DefaultNeighbourMessageContext.createContext;
import static org.onosproject.incubator.net.neighbour.impl.NeighbourTestUtils.createArpRequest;
import static org.onosproject.incubator.net.neighbour.impl.NeighbourTestUtils.intf;
import static org.onosproject.net.neighbour.impl.DefaultNeighbourMessageContext.createContext;
/**
* Unit tests for DefaultNeighbourMessageActions.
@ -70,8 +68,8 @@ public class DefaultNeighbourMessageActionsTest {
private static final VlanId VLAN1 = VlanId.vlanId((short) 1);
private static final Interface INTF1 = intf(CP1, IP1, MAC1, VLAN1);
private static final Interface INTF2 = intf(CP2, IP2, MAC2, VLAN1);
private static final Interface INTF1 = NeighbourTestUtils.intf(CP1, IP1, MAC1, VLAN1);
private static final Interface INTF2 = NeighbourTestUtils.intf(CP2, IP2, MAC2, VLAN1);
private DefaultNeighbourMessageActions actions;
private PacketService packetService;
@ -84,7 +82,7 @@ public class DefaultNeighbourMessageActionsTest {
@Test
public void reply() throws Exception {
Ethernet request = createArpRequest(IP1);
Ethernet request = NeighbourTestUtils.createArpRequest(IP1);
Ip4Address ip4Address = INTF1.ipAddressesList().get(0).ipAddress().getIp4Address();
Ethernet response = ARP.buildArpReply(ip4Address, MAC2, request);
@ -100,7 +98,7 @@ public class DefaultNeighbourMessageActionsTest {
@Test
public void forwardToConnectPoint() {
Ethernet request = createArpRequest(IP1);
Ethernet request = NeighbourTestUtils.createArpRequest(IP1);
packetService.emit(outbound(request, CP2));
expectLastCall().once();
@ -113,7 +111,7 @@ public class DefaultNeighbourMessageActionsTest {
@Test
public void forwardToInterface() {
Ethernet request = createArpRequest(IP1);
Ethernet request = NeighbourTestUtils.createArpRequest(IP1);
Ethernet forwardedRequest = (Ethernet) request.clone();
forwardedRequest.setSourceMACAddress(INTF2.mac());
@ -130,7 +128,7 @@ public class DefaultNeighbourMessageActionsTest {
@Test
public void flood() {
Ethernet request = createArpRequest(IP1);
Ethernet request = NeighbourTestUtils.createArpRequest(IP1);
// Expect the packet to be emitted out all ports apart from the in port
Sets.difference(Sets.newLinkedHashSet(EDGE_PORTS), Collections.singleton(CP1))

View File

@ -14,7 +14,9 @@
* limitations under the License.
*/
package org.onosproject.incubator.net.neighbour.impl;
package org.onosproject.net.neighbour.impl;
import java.util.Collection;
import org.junit.Before;
import org.junit.Test;
@ -27,26 +29,24 @@ import org.onosproject.TestApplicationId;
import org.onosproject.cfg.ComponentConfigAdapter;
import org.onosproject.core.ApplicationId;
import org.onosproject.core.CoreService;
import org.onosproject.net.intf.Interface;
import org.onosproject.incubator.net.neighbour.NeighbourHandlerRegistration;
import org.onosproject.incubator.net.neighbour.NeighbourMessageContext;
import org.onosproject.incubator.net.neighbour.NeighbourMessageHandler;
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.flow.TrafficSelector;
import org.onosproject.net.host.HostService;
import org.onosproject.net.intf.Interface;
import org.onosproject.net.neighbour.NeighbourHandlerRegistration;
import org.onosproject.net.neighbour.NeighbourMessageContext;
import org.onosproject.net.neighbour.NeighbourMessageHandler;
import org.onosproject.net.packet.DefaultInboundPacket;
import org.onosproject.net.packet.DefaultOutboundPacket;
import org.onosproject.net.packet.InboundPacket;
import org.onosproject.net.packet.PacketContextAdapter;
import org.onosproject.net.packet.OutboundPacket;
import org.onosproject.net.packet.PacketContext;
import org.onosproject.net.packet.PacketContextAdapter;
import org.onosproject.net.packet.PacketPriority;
import org.onosproject.net.packet.PacketProcessor;
import org.onosproject.net.packet.PacketService;
import org.onosproject.net.packet.PacketServiceAdapter;
import java.util.Collection;
import static org.easymock.EasyMock.anyInt;
import static org.easymock.EasyMock.anyObject;
import static org.easymock.EasyMock.createMock;
@ -58,9 +58,9 @@ import static org.easymock.EasyMock.reset;
import static org.easymock.EasyMock.verify;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.onosproject.incubator.net.neighbour.impl.DefaultNeighbourMessageContext.createContext;
import static org.onosproject.incubator.net.neighbour.impl.NeighbourTestUtils.createArpRequest;
import static org.onosproject.incubator.net.neighbour.impl.NeighbourTestUtils.intf;
import static org.onosproject.net.neighbour.impl.DefaultNeighbourMessageContext.createContext;
import static org.onosproject.net.neighbour.impl.NeighbourTestUtils.createArpRequest;
import static org.onosproject.net.neighbour.impl.NeighbourTestUtils.intf;
/**
* Unit tests for the NeighbourResolutionManager.

View File

@ -14,7 +14,7 @@
* limitations under the License.
*/
package org.onosproject.incubator.net.neighbour.impl;
package org.onosproject.net.neighbour.impl;
import org.onlab.packet.ARP;
import org.onlab.packet.Ethernet;

View File

@ -7,7 +7,6 @@ org.onosproject.incubator.store.tunnel.impl
org.onosproject.incubator.net.config.impl
org.onosproject.incubator.net.domain.impl
org.onosproject.incubator.store.config.impl
org.onosproject.net.intf.impl
org.onosproject.incubator.net.meter.impl
org.onosproject.incubator.net.resource.label
org.onosproject.incubator.store.meter.impl