vty: Introduce API vty_read_config_filep

This new API doesn't use host_config_set(), and allows passing a FILE*
from any source, not only a filesystem path.

Related: SYS#5369
Change-Id: I720ac04386261628c0798a1bfcaa91e2490a86c3
diff --git a/src/vty/vty.c b/src/vty/vty.c
index f4e8e80..76c6ef5 100644
--- a/src/vty/vty.c
+++ b/src/vty/vty.c
@@ -1462,9 +1462,13 @@
 	return 0;
 }
 
-/* Read up configuration file */
-static int
-vty_read_file(FILE *confp, void *priv)
+/* Read up configuration from a file stream */
+/*! Read up VTY configuration from a file stream
+ *  \param[in] confp file pointer of the stream for the configuration file
+ *  \param[in] priv private data to be passed to \ref vty_read_file
+ *  \returns Zero on success, non-zero on error
+ */
+int vty_read_config_filep(FILE *confp, void *priv)
 {
 	int ret;
 	struct vty *vty;
@@ -1870,7 +1874,7 @@
 	if (!cfile)
 		return -ENOENT;
 
-	rc = vty_read_file(cfile, priv);
+	rc = vty_read_config_filep(cfile, priv);
 	fclose(cfile);
 
 	host_config_set(file_name);