Manage misleading log messages
- Reduce logging for
- Packet rule installation failure for NETCONF packet switch
- NETCONF device which does not support port stats
Change-Id: I4721f65088f34d3e473f22738f27e093fe8df270
diff --git a/core/net/src/main/java/org/onosproject/net/packet/impl/PacketManager.java b/core/net/src/main/java/org/onosproject/net/packet/impl/PacketManager.java
index cb52c94..5393aab 100644
--- a/core/net/src/main/java/org/onosproject/net/packet/impl/PacketManager.java
+++ b/core/net/src/main/java/org/onosproject/net/packet/impl/PacketManager.java
@@ -16,6 +16,7 @@
package org.onosproject.net.packet.impl;
import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
import org.apache.felix.scr.annotations.Activate;
import org.apache.felix.scr.annotations.Component;
@@ -61,6 +62,7 @@
import java.util.List;
import java.util.Optional;
+import java.util.Set;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
@@ -257,6 +259,11 @@
}
/**
+ * Set of DeviceId scheme which supports packet requests.
+ */
+ private static final Set<String> SUPPORTED = ImmutableSet.of("of");
+
+ /**
* Pushes a packet request flow rule to all devices.
*
* @param request the packet request
@@ -264,7 +271,10 @@
private void pushToAllDevices(PacketRequest request) {
log.debug("Pushing packet request {} to all devices", request);
for (Device device : deviceService.getDevices()) {
- pushRule(device, request);
+ // TODO properly test capability via driver, defining behaviour
+ if (SUPPORTED.contains(device.id().uri().getScheme())) {
+ pushRule(device, request);
+ }
}
}
diff --git a/providers/netconf/device/src/main/java/org/onosproject/provider/netconf/device/impl/NetconfDeviceProvider.java b/providers/netconf/device/src/main/java/org/onosproject/provider/netconf/device/impl/NetconfDeviceProvider.java
index be5a936..5ddbba0 100644
--- a/providers/netconf/device/src/main/java/org/onosproject/provider/netconf/device/impl/NetconfDeviceProvider.java
+++ b/providers/netconf/device/src/main/java/org/onosproject/provider/netconf/device/impl/NetconfDeviceProvider.java
@@ -257,7 +257,7 @@
@Override
public void triggerProbe(DeviceId deviceId) {
// TODO: This will be implemented later.
- log.info("Triggering probe on device {}", deviceId);
+ log.debug("Should be triggering probe on device {}", deviceId);
}
@Override
@@ -424,8 +424,8 @@
portStatistics);
}
} else {
- log.warn("No port statistics getter behaviour for device {}",
- device.id());
+ log.debug("No port statistics getter behaviour for device {}",
+ device.id());
}
}