Work toward ONOS-1451: Separate Event Key space per instance
Misc changes and cleanup:
* Added new class OnosInstanceId
* Replace (as appropriate) the string controllerId (and associated methods)
with the new class OnosInstanceId
* Renaming: Host -> Device
- Method getDeviceID -> getHostID
- Changed Host Key ID prefix 'D' to 'H'
- Few renaming of Host -> Device inside Javadoc
Change-Id: I59c20d68277ecde2f7df4e7097a4a52d5786df1b
diff --git a/src/test/java/net/onrc/onos/core/topology/TopologyManagerTest.java b/src/test/java/net/onrc/onos/core/topology/TopologyManagerTest.java
index 79dfc89..ae0a936 100644
--- a/src/test/java/net/onrc/onos/core/topology/TopologyManagerTest.java
+++ b/src/test/java/net/onrc/onos/core/topology/TopologyManagerTest.java
@@ -22,6 +22,7 @@
import net.onrc.onos.core.metrics.OnosMetrics;
import net.onrc.onos.core.registry.IControllerRegistryService;
import net.onrc.onos.core.util.Dpid;
+import net.onrc.onos.core.util.OnosInstanceId;
import net.onrc.onos.core.util.PortNumber;
import net.onrc.onos.core.util.SwitchPort;
import net.onrc.onos.core.util.TestUtils;
@@ -277,7 +278,8 @@
// Generate a new Switch Mastership event
Dpid dpid = new Dpid(100L);
- String onosInstanceId = "ONOS-Test-Instance-ID";
+ OnosInstanceId onosInstanceId =
+ new OnosInstanceId("ONOS-Test-Instance-ID");
Role role = Role.MASTER;
MastershipEvent mastershipEvent =
new MastershipEvent(dpid, onosInstanceId, role);
@@ -303,7 +305,8 @@
// Generate a new Switch Mastership event
Dpid dpid = new Dpid(100L);
- String onosInstanceId = "ONOS-Test-Instance-ID";
+ OnosInstanceId onosInstanceId =
+ new OnosInstanceId("ONOS-Test-Instance-ID");
Role role = Role.MASTER;
MastershipEvent mastershipEvent =
new MastershipEvent(dpid, onosInstanceId, role);