Fixed a bug in the Topology Manager dealing with Archipelagos and clusters. (#750)
* Fixed a bug in the Topology Manager dealing with Archipelagos and clusters. Also fixed a few broken tests. The bug in question came in two parts: 1) The way a Cluster hashcode was previously calculated meant that any cluster with an ID less than 2^32 was given a hashcode of 0. The Cluster hashCode function has been fixed. and 2) Archipelagos were previously stored in a HashSet. This was a mistake as archipelagos are by currently mutable objects. This meant that if an archipelago was modified, its hashcode would be modified as well, making it impossible to retrieve the archipelago in question from the HashSet of archipelagos. To fix this problem, archipelagos are now stored in a List.
Showing
- src/main/java/net/floodlightcontroller/core/internal/NaiveSwitchDriverRegistry.java 7 additions, 14 deletions...htcontroller/core/internal/NaiveSwitchDriverRegistry.java
- src/main/java/net/floodlightcontroller/core/internal/RoleManager.java 7 additions, 15 deletions...a/net/floodlightcontroller/core/internal/RoleManager.java
- src/main/java/net/floodlightcontroller/debugcounter/DebugCounterServiceImpl.java 8 additions, 17 deletions...lightcontroller/debugcounter/DebugCounterServiceImpl.java
- src/main/java/net/floodlightcontroller/topology/Cluster.java 15 additions, 18 deletionssrc/main/java/net/floodlightcontroller/topology/Cluster.java
- src/main/java/net/floodlightcontroller/topology/TopologyInstance.java 6 additions, 7 deletions...a/net/floodlightcontroller/topology/TopologyInstance.java
- src/test/java/net/floodlightcontroller/core/internal/ControllerTest.java 13 additions, 46 deletions...et/floodlightcontroller/core/internal/ControllerTest.java
- src/test/java/net/floodlightcontroller/debugcounter/DebugCounterServiceTest.java 5 additions, 14 deletions...lightcontroller/debugcounter/DebugCounterServiceTest.java
- src/test/java/net/floodlightcontroller/staticentry/StaticFlowTests.java 25 additions, 36 deletions...net/floodlightcontroller/staticentry/StaticFlowTests.java
- src/test/java/net/floodlightcontroller/topology/TopologyInstanceTest.java 12 additions, 12 deletions...t/floodlightcontroller/topology/TopologyInstanceTest.java
Loading
Please register or sign in to comment