NETCONF: list instance queries should hit the ops tree as well

getItems() operates on config and operation data, not just on the config
data. It is possible that there are lists which only live in an ops data
subtree.

Change-Id: I0206290dfcc4c1ebe91b4728f8e7a9230fc387cb
diff --git a/tests/mock/sysrepo_subscription.hpp b/tests/mock/sysrepo_subscription.hpp
index 0102d1b..7683814 100644
--- a/tests/mock/sysrepo_subscription.hpp
+++ b/tests/mock/sysrepo_subscription.hpp
@@ -10,6 +10,7 @@
 
 #include <optional>
 #include <memory>
+#include "datastore_access.hpp"
 
 namespace sysrepo {
 class Callback;
@@ -25,6 +26,13 @@
     virtual void write(const std::string& xpath, const std::optional<std::string>& oldValue, const std::optional<std::string>& newValue) = 0;
 };
 
+class DataSupplier {
+public:
+    virtual ~DataSupplier();
+    virtual DatastoreAccess::Tree get_data(const std::string& xpath) const = 0;
+};
+
+
 class SysrepoSubscription {
 public:
     SysrepoSubscription(const std::string& moduleName, Recorder* rec = nullptr);
@@ -36,3 +44,14 @@
     std::shared_ptr<sysrepo::Callback> m_callback;
     std::shared_ptr<sysrepo::Subscribe> m_subscription;
 };
+
+class OperationalDataSubscription {
+public:
+    OperationalDataSubscription(const std::string& moduleName, const DataSupplier& dataSupplier);
+private:
+    std::shared_ptr<sysrepo::Connection> m_connection;
+    std::shared_ptr<sysrepo::Session> m_session;
+    std::shared_ptr<YangSchema> m_schema;
+    std::shared_ptr<sysrepo::Subscribe> m_subscription;
+    std::shared_ptr<sysrepo::Callback> m_callback;
+};