Addressing review comments of patch-3
Addressing review comments of patch-2
Fixing javadoc warnings
Pushing changes for onos-5146 - Added 2 new APIs in DeviceService.java to get port specific PortStatistics by specifying Device ID & Port Number. Also implemented the APIs in SimpleDeviceStore etc. This will be a very useful API for app developers who are intersted to query port specific port statistics
Change-Id: I8f3e5a443eb5b50237a679999311b48609e54a44
diff --git a/incubator/net/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkDeviceService.java b/incubator/net/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkDeviceService.java
index 5dfdd57..c466502 100644
--- a/incubator/net/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkDeviceService.java
+++ b/incubator/net/src/main/java/org/onosproject/incubator/net/virtual/impl/VirtualNetworkDeviceService.java
@@ -47,6 +47,7 @@
private static final String NETWORK_NULL = "Network ID cannot be null";
private static final String TYPE_NULL = "Type cannot be null";
private static final String DEVICE_NULL = "Device cannot be null";
+ private static final String PORT_NUMBER_NULL = "PortNumber cannot be null";
private final VirtualNetwork network;
private final VirtualNetworkService manager;
@@ -135,6 +136,22 @@
}
@Override
+ public PortStatistics getStatisticsForPort(DeviceId deviceId, PortNumber portNumber) {
+ checkNotNull(deviceId, DEVICE_NULL);
+ checkNotNull(deviceId, PORT_NUMBER_NULL);
+ // TODO not supported at the moment.
+ return null;
+ }
+
+ @Override
+ public PortStatistics getDeltaStatisticsForPort(DeviceId deviceId, PortNumber portNumber) {
+ checkNotNull(deviceId, DEVICE_NULL);
+ checkNotNull(deviceId, PORT_NUMBER_NULL);
+ // TODO not supported at the moment.
+ return null;
+ }
+
+ @Override
public Port getPort(DeviceId deviceId, PortNumber portNumber) {
checkNotNull(deviceId, DEVICE_NULL);