Log port registration error
Change-Id: Ib50f843d03deecc762269c58c9b13a8c5f3adb22
diff --git a/core/net/src/main/java/org/onosproject/net/resource/impl/ResourceDeviceListener.java b/core/net/src/main/java/org/onosproject/net/resource/impl/ResourceDeviceListener.java
index cdc4144..7ba0296 100644
--- a/core/net/src/main/java/org/onosproject/net/resource/impl/ResourceDeviceListener.java
+++ b/core/net/src/main/java/org/onosproject/net/resource/impl/ResourceDeviceListener.java
@@ -146,7 +146,7 @@
executor.execute(() -> {
boolean success = adminService.register(Resources.discrete(device.id()).resource());
if (!success) {
- log.warn("Failed to register Device: {}", device.id());
+ log.error("Failed to register Device: {}", device.id());
}
});
}
@@ -162,14 +162,16 @@
private void registerPortResource(Device device, Port port) {
Resource portPath = Resources.discrete(device.id(), port.number()).resource();
executor.execute(() -> {
- adminService.register(portPath);
+ if (!adminService.register(portPath)) {
+ log.error("Failed to register Port: {}", portPath.id());
+ }
queryBandwidth(device.id(), port.number())
.map(bw -> portPath.child(Bandwidth.class, bw.bps()))
.map(adminService::register)
.ifPresent(success -> {
if (!success) {
- log.warn("Failed to register Bandwidth for {}", portPath.id());
+ log.error("Failed to register Bandwidth for {}", portPath.id());
}
});
@@ -180,7 +182,7 @@
.map(portPath::child)
.collect(Collectors.toList()));
if (!success) {
- log.warn("Failed to register VLAN IDs for {}", portPath.id());
+ log.error("Failed to register VLAN IDs for {}", portPath.id());
}
}
@@ -191,7 +193,7 @@
.map(portPath::child)
.collect(Collectors.toList()));
if (!success) {
- log.warn("Failed to register MPLS Labels for {}", portPath.id());
+ log.error("Failed to register MPLS Labels for {}", portPath.id());
}
}
@@ -202,7 +204,7 @@
.map(portPath::child)
.collect(Collectors.toList()));
if (!success) {
- log.warn("Failed to register lambdas for {}", portPath.id());
+ log.error("Failed to register lambdas for {}", portPath.id());
}
}
@@ -213,7 +215,7 @@
.map(portPath::child)
.collect(Collectors.toList()));
if (!success) {
- log.warn("Failed to register tributary slots for {}", portPath.id());
+ log.error("Failed to register tributary slots for {}", portPath.id());
}
}
});