Madan Jampani

Merge branch 'master' of ssh://gerrit.onlab.us:29418/onos-next

......@@ -14,6 +14,16 @@
"attachmentDpid" : "00:00:00:00:00:00:00:a2",
"attachmentPort" : "1",
"ipAddress" : "192.168.30.1"
},
{
"attachmentDpid" : "00:00:00:00:00:00:00:a6",
"attachmentPort" : "1",
"ipAddress" : "192.168.40.1"
},
{
"attachmentDpid" : "00:00:00:00:00:00:00:a4",
"attachmentPort" : "4",
"ipAddress" : "192.168.60.1"
}
],
"bgpSpeakers" : [
......
......@@ -197,14 +197,7 @@ public class LinkManager
checkNotNull(linkDescription, LINK_DESC_NULL);
checkValidity();
ConnectPoint src = linkDescription.src();
ConnectPoint dst = linkDescription.dst();
// if we aren't master for the device associated with the ConnectPoint
// we probably shouldn't be doing this.
// if (deviceService.getRole(dst.deviceId()) != MastershipRole.MASTER) {
// return;
// }
LinkEvent event = store.createOrUpdateLink(provider().id(),
linkDescription);
if (event != null) {
......@@ -232,11 +225,7 @@ public class LinkManager
public void linksVanished(ConnectPoint connectPoint) {
checkNotNull(connectPoint, "Connect point cannot be null");
checkValidity();
// if we aren't master for the device associated with the ConnectPoint
// we probably shouldn't be doing this.
if (deviceService.getRole(connectPoint.deviceId()) != MastershipRole.MASTER) {
return;
}
log.info("Links for connection point {} vanished", connectPoint);
// FIXME: This will remove links registered by other providers
removeLinks(getLinks(connectPoint));
......@@ -246,11 +235,7 @@ public class LinkManager
public void linksVanished(DeviceId deviceId) {
checkNotNull(deviceId, DEVICE_ID_NULL);
checkValidity();
// if we aren't master for the device associated with the ConnectPoint
// we probably shouldn't be doing this.
if (deviceService.getRole(deviceId) != MastershipRole.MASTER) {
return;
}
log.info("Links for device {} vanished", deviceId);
removeLinks(getDeviceLinks(deviceId));
}
......
......@@ -157,16 +157,12 @@ public class StatisticManager implements StatisticService {
case RULE_UPDATED:
if (rule instanceof FlowEntry) {
statisticStore.addOrUpdateStatistic((FlowEntry) rule);
} else {
log.warn("IT AIN'T A FLOWENTRY");
}
break;
case RULE_ADD_REQUESTED:
log.info("Preparing for stats");
statisticStore.prepareForStatistics(rule);
break;
case RULE_REMOVE_REQUESTED:
log.info("Removing stats");
statisticStore.removeFromStatistics(rule);
break;
case RULE_REMOVED:
......
......@@ -90,7 +90,7 @@ public class LinkDiscovery implements TimerTask {
* Instantiates discovery manager for the given physical switch. Creates a
* generic LLDP packet that will be customized for the port it is sent out on.
* Starts the the timer for the discovery process.
* @param device the physical switch
* @param device the physical switch
* @param masterService
* @param useBDDP flag to also use BDDP for discovery
*/
......@@ -217,7 +217,7 @@ public class LinkDiscovery implements TimerTask {
final PortNumber srcPort = PortNumber.portNumber(onoslldp.getPort());
final DeviceId srcDeviceId = DeviceId.deviceId(onoslldp.getDeviceString());
final DeviceId dstDeviceId = context.inPacket().receivedFrom().deviceId();
this.ackProbe(srcPort.toLong());
this.ackProbe(dstPort.toLong());
ConnectPoint src = new ConnectPoint(srcDeviceId, srcPort);
ConnectPoint dst = new ConnectPoint(dstDeviceId, dstPort);
......@@ -245,7 +245,7 @@ public class LinkDiscovery implements TimerTask {
*/
@Override
public void run(final Timeout t) {
this.log.debug("sending probes");
this.log.trace("sending probes");
synchronized (this) {
final Iterator<Long> fastIterator = this.fastPorts.iterator();
Long portNumber;
......@@ -256,7 +256,7 @@ public class LinkDiscovery implements TimerTask {
.getAndIncrement();
if (probeCount < LinkDiscovery.MAX_PROBE_COUNT) {
this.log.debug("sending fast probe to port");
this.log.trace("sending fast probe to port");
sendProbes(portNumber);
} else {
// Update fast and slow ports
......@@ -278,7 +278,7 @@ public class LinkDiscovery implements TimerTask {
Iterator<Long> slowIterator = this.slowPorts.iterator();
while (slowIterator.hasNext()) {
portNumber = slowIterator.next();
this.log.debug("sending slow probe to port {}", portNumber);
this.log.trace("sending slow probe to port {}", portNumber);
sendProbes(portNumber);
......