Add dump command

Change-Id: If38d01ebb8788090f91a76daf6b7fc9add0320b7
diff --git a/src/netconf_access.cpp b/src/netconf_access.cpp
index dccec1c..ecdece0 100644
--- a/src/netconf_access.cpp
+++ b/src/netconf_access.cpp
@@ -215,3 +215,12 @@
 
     return res;
 }
+
+std::string NetconfAccess::dump(const DataFormat format) const
+{
+    auto config = m_session->get();
+    if (!config) {
+        return "";
+    }
+    return config->print_mem(format == DataFormat::Xml ? LYD_XML : LYD_JSON, LYP_WITHSIBLINGS | LYP_FORMAT);
+}