connect netconf devices through ssh key

Change-Id: I1a0961ffffd33559f903ead0634dbb5492e9a154
diff --git a/core/api/src/main/java/org/onosproject/net/key/DeviceKey.java b/core/api/src/main/java/org/onosproject/net/key/DeviceKey.java
index 971a233..7511735 100644
--- a/core/api/src/main/java/org/onosproject/net/key/DeviceKey.java
+++ b/core/api/src/main/java/org/onosproject/net/key/DeviceKey.java
@@ -144,6 +144,25 @@
     }
 
     /**
+     * Method to create a device key of type SSL_KEY.
+     *
+     * @param id    device key identifier
+     * @param label optional label for this device key
+     * @param username username for this device key
+     * @param password password for this device key
+     * @param sshkey sshkey for this device key
+     * @return device key
+     */
+    public static DeviceKey createDeviceKeyUsingSshKey(DeviceKeyId id, String label,
+                                                                 String username, String password, String sshkey) {
+        DefaultAnnotations annotations = builder().set(AnnotationKeys.USERNAME, username)
+                .set(AnnotationKeys.PASSWORD, password)
+                .set(AnnotationKeys.SSHKEY, sshkey).build();
+
+        return new DeviceKey(id, label, Type.SSL_KEY, annotations);
+    }
+
+    /**
      * Returns a username and password object from the device key.
      *
      * @return username and password