Fix parent resource path and set the correct child
Change-Id: I2cbb21d2d8e63cfc2181c16b0c4131e3aec7fd82
diff --git a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceDeviceListener.java b/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceDeviceListener.java
index b46a99f..144dc7a 100644
--- a/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceDeviceListener.java
+++ b/core/net/src/main/java/org/onosproject/net/newresource/impl/ResourceDeviceListener.java
@@ -16,7 +16,6 @@
package org.onosproject.net.newresource.impl;
import org.onosproject.net.Device;
-import org.onosproject.net.DeviceId;
import org.onosproject.net.Port;
import org.onosproject.net.device.DeviceEvent;
import org.onosproject.net.device.DeviceListener;
@@ -61,8 +60,7 @@
}
private void registerDeviceResource(Device device) {
- DeviceId deviceId = device.id();
- executor.submit(() -> adminService.registerResources(new ResourcePath(ResourcePath.ROOT, deviceId)));
+ executor.submit(() -> adminService.registerResources(ResourcePath.ROOT, device.id()));
}
private void registerPortResource(Device device, Port port) {