Rename some classes and methods of neighbour API
Change-Id: I77763adbd19b35fe9ad7efa2926751a68bf9a1ef
diff --git a/apps/routing/src/main/java/org/onosproject/routing/impl/BgpSpeakerNeighbourHandler.java b/apps/routing/src/main/java/org/onosproject/routing/impl/BgpSpeakerNeighbourHandler.java
index aeaf13d..c303bdf 100644
--- a/apps/routing/src/main/java/org/onosproject/routing/impl/BgpSpeakerNeighbourHandler.java
+++ b/apps/routing/src/main/java/org/onosproject/routing/impl/BgpSpeakerNeighbourHandler.java
@@ -142,12 +142,12 @@
case REQUEST:
// Reply to requests that target our configured interface IP
// address on this port. Drop all other requests.
-
interfaceService.getInterfacesByPort(context.inPort())
.stream()
.filter(intf -> intf.ipAddresses()
.stream()
- .anyMatch(ia -> ia.ipAddress().equals(context.target())))
+ .anyMatch(ia -> ia.ipAddress().equals(context.target()) &&
+ ia.subnetAddress().contains(context.sender())))
.forEach(intf -> context.reply(intf.mac()));
break;
diff --git a/incubator/api/src/main/java/org/onosproject/incubator/net/neighbour/NeighbourMessageActions.java b/incubator/api/src/main/java/org/onosproject/incubator/net/neighbour/NeighbourMessageActions.java
index 3332e92..50426a8 100644
--- a/incubator/api/src/main/java/org/onosproject/incubator/net/neighbour/NeighbourMessageActions.java
+++ b/incubator/api/src/main/java/org/onosproject/incubator/net/neighbour/NeighbourMessageActions.java
@@ -36,21 +36,21 @@
void reply(NeighbourMessageContext context, MacAddress targetMac);
/**
- * Proxies the incoming message to the given connect point.
+ * Forwards the incoming message to the given connect point.
*
* @param context incoming message context
* @param outPort port to send the message out
*/
- void proxy(NeighbourMessageContext context, ConnectPoint outPort);
+ void forward(NeighbourMessageContext context, ConnectPoint outPort);
/**
- * Proxies the incoming message to a given interface.
+ * Forwards the incoming message to a given interface. The message will be
+ * modified to fit the parameters of the outgoing interface.
*
* @param context incoming message context
- * @param outIntf interface to send the message out. The message will be
- * modified to fit the parameters of the outgoing interface.
+ * @param outIntf interface to send the message out
*/
- void proxy(NeighbourMessageContext context, Interface outIntf);
+ void forward(NeighbourMessageContext context, Interface outIntf);
/**
* Floods the incoming message to all edge ports except the in port.
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/neighbour/impl/DefaultNeighbourMessageContext.java b/incubator/net/src/main/java/org/onosproject/incubator/net/neighbour/impl/DefaultNeighbourMessageContext.java
index 44e97f9..4241a34 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/neighbour/impl/DefaultNeighbourMessageContext.java
+++ b/incubator/net/src/main/java/org/onosproject/incubator/net/neighbour/impl/DefaultNeighbourMessageContext.java
@@ -125,12 +125,12 @@
@Override
public void proxy(ConnectPoint outPort) {
- actions.proxy(this, outPort);
+ actions.forward(this, outPort);
}
@Override
public void proxy(Interface outIntf) {
- actions.proxy(this, outIntf);
+ actions.forward(this, outIntf);
}
@Override
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/neighbour/impl/NeighbourPacketManager.java b/incubator/net/src/main/java/org/onosproject/incubator/net/neighbour/impl/NeighbourResolutionManager.java
similarity index 98%
rename from incubator/net/src/main/java/org/onosproject/incubator/net/neighbour/impl/NeighbourPacketManager.java
rename to incubator/net/src/main/java/org/onosproject/incubator/net/neighbour/impl/NeighbourResolutionManager.java
index e0e9c98..1bf3e13 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/neighbour/impl/NeighbourPacketManager.java
+++ b/incubator/net/src/main/java/org/onosproject/incubator/net/neighbour/impl/NeighbourResolutionManager.java
@@ -85,7 +85,7 @@
*/
@Service
@Component(immediate = true)
-public class NeighbourPacketManager implements NeighbourResolutionService {
+public class NeighbourResolutionManager implements NeighbourResolutionService {
private final Logger log = LoggerFactory.getLogger(getClass());
@@ -509,16 +509,16 @@
@Override
public void reply(NeighbourMessageContext context, MacAddress targetMac) {
- NeighbourPacketManager.this.reply(context, targetMac);
+ NeighbourResolutionManager.this.reply(context, targetMac);
}
@Override
- public void proxy(NeighbourMessageContext context, ConnectPoint outPort) {
+ public void forward(NeighbourMessageContext context, ConnectPoint outPort) {
sendTo(context.packet(), outPort);
}
@Override
- public void proxy(NeighbourMessageContext context, Interface outIntf) {
+ public void forward(NeighbourMessageContext context, Interface outIntf) {
// TODO implement
}