Add yang-cli
The original idea for this was that I would libyang C++ bindings for
this. Unfortunately, there have been problems with them as explained
here: https://github.com/CESNET/libyang/issues/1106. The easiest
solution to this was to just use the C api of libyang. After creating
some safe wrappers around pointers, it wasn't too difficult.
Change-Id: I0421cb64df66c640956501e56ffc4122eef0b9b7
diff --git a/tests/data_query.cpp b/tests/data_query.cpp
index 50de180..f6f7343 100644
--- a/tests/data_query.cpp
+++ b/tests/data_query.cpp
@@ -13,6 +13,9 @@
#elif defined(netconf_BACKEND)
#include "netconf_access.hpp"
#include "netopeer_vars.hpp"
+#elif defined(yang_BACKEND)
+#include "yang_access.hpp"
+#include "yang_access_test_vars.hpp"
#else
#error "Unknown backend"
#endif
@@ -32,6 +35,10 @@
SysrepoAccess datastore("netconf-cli-test", Datastore::Running);
#elif defined(netconf_BACKEND)
NetconfAccess datastore(NETOPEER_SOCKET_PATH);
+#elif defined(yang_BACKEND)
+ YangAccess datastore;
+ datastore.addSchemaDir(schemaDir);
+ datastore.addSchemaFile(exampleSchemaFile);
#else
#error "Unknown backend"
#endif