Abondon the concept of resources under a link
Resources under a link are tied to resources under both ends of the link,
and resources under a port are thought to be first-class objects compared
to concept of link resources. We will deal with only device related
resources from now on.
Change-Id: I6aa418d1bf64b28374f325db0bc7e393f770dcdd
diff --git a/core/net/src/test/java/org/onosproject/net/intent/impl/ObjectiveTrackerTest.java b/core/net/src/test/java/org/onosproject/net/intent/impl/ObjectiveTrackerTest.java
index eb7f2cc..7cee0d0 100644
--- a/core/net/src/test/java/org/onosproject/net/intent/impl/ObjectiveTrackerTest.java
+++ b/core/net/src/test/java/org/onosproject/net/intent/impl/ObjectiveTrackerTest.java
@@ -29,8 +29,10 @@
import org.onosproject.core.IdGenerator;
import org.onosproject.event.Event;
import org.onosproject.net.Device;
+import org.onosproject.net.DeviceId;
import org.onosproject.net.Link;
import org.onosproject.net.NetworkResource;
+import org.onosproject.net.PortNumber;
import org.onosproject.net.device.DeviceEvent;
import org.onosproject.net.device.DeviceListener;
import org.onosproject.net.intent.Intent;
@@ -52,7 +54,6 @@
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasSize;
import static org.hamcrest.Matchers.is;
-import static org.onosproject.net.LinkKey.linkKey;
import static org.onosproject.net.newresource.ResourceEvent.Type.*;
import static org.onosproject.net.NetTestTools.APP_ID;
import static org.onosproject.net.NetTestTools.device;
@@ -231,7 +232,7 @@
@Test
public void testResourceEvent() throws Exception {
ResourceEvent event = new ResourceEvent(RESOURCE_ADDED,
- ResourcePath.discrete(linkKey(link("a", 1, "b", 1))));
+ ResourcePath.discrete(DeviceId.deviceId("a"), PortNumber.portNumber(1)));
resourceListener.event(event);
assertThat(