Provide a map between all devices and their driver names

- Introduce a new Java API in DriverService
- Implement a new CLI command device-drivers that dumps all devices and their driver names or a driver name of a device
- Include this CLI command as part of onos-diags

Change-Id: I978690e6af6c00dbfc09259b50449779b1167754
(cherry picked from commit dfaf4622e00256a8063ec4f12765381f7290a476)
diff --git a/core/net/src/main/java/org/onosproject/net/driver/impl/DriverManager.java b/core/net/src/main/java/org/onosproject/net/driver/impl/DriverManager.java
index 31032b3..1814722 100644
--- a/core/net/src/main/java/org/onosproject/net/driver/impl/DriverManager.java
+++ b/core/net/src/main/java/org/onosproject/net/driver/impl/DriverManager.java
@@ -40,6 +40,8 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.HashMap;
+import java.util.Map;
 import java.util.Set;
 import java.util.stream.Collectors;
 
@@ -150,6 +152,15 @@
                               NO_DRIVER);
     }
 
+    @Override
+    public Map<DeviceId, String> getDeviceDrivers() {
+        Map<DeviceId, String> deviceDriverNameMap = new HashMap<>();
+        deviceService.getDevices().forEach(device -> {
+            deviceDriverNameMap.put(device.id(), getDriver(device.id()).name());
+        });
+        return deviceDriverNameMap;
+    }
+
     private Driver getPipeconfMergedDriver(DeviceId deviceId) {
         PiPipeconfId pipeconfId = pipeconfService.ofDevice(deviceId).orElse(null);
         if (pipeconfId == null) {