Skip to content
Snippets Groups Projects
Commit f5430760 authored by Saurav Das's avatar Saurav Das
Browse files

Bug fix to attachment point logic - do not treat an attachment point going

from null to non-null as device moved
parent 98e804db
No related branches found
No related tags found
No related merge requests found
......@@ -418,7 +418,9 @@ public class Device implements IDevice {
if (apMap == null || apMap.isEmpty()) {
apList.add(newAP);
attachmentPoints = apList;
return true;
// there are no old attachement points - we should not treat this
// as a device moved.
return false;
}
long id = topology.getL2DomainId(sw);
......
......@@ -1036,6 +1036,7 @@ IFlowReconcileListener, IInfoProvider, IHAListener {
(learnap ? (int)inPort : null),
new Date());
}
/**
* Look up a {@link Device} based on the provided {@link Entity}. We first
* check the primary index. If we do not find an entry there we classify
......@@ -1107,7 +1108,6 @@ IFlowReconcileListener, IInfoProvider, IHAListener {
return deviceMap.get(deviceKey);
}
/**
* Look up a {@link Device} within a particular entity class based on
* the provided {@link Entity}.
......@@ -1707,6 +1707,7 @@ IFlowReconcileListener, IInfoProvider, IHAListener {
return new Device(device, entity, insertionpoint);
}
//not used
protected Device allocateDevice(Device device, Set <Entity> entities) {
List <AttachmentPoint> newPossibleAPs =
new ArrayList<AttachmentPoint>();
......@@ -1737,7 +1738,7 @@ IFlowReconcileListener, IInfoProvider, IHAListener {
}
// *********************
// IEntityClassListener
// ITopologyListener
// *********************
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment