Fix NetconfAccess not being able to fetch submodules
When I implemented SysrepoAccess, I ignored the submoduleRevision
argument in the "libyang missing schema callback" as Sysrepo seemed to
work just fine without supplying it. However, libnetconf needs it
because one can't supply both module name and submodule name to a
<get-schema> request. Now, if a submodule is being requested by libyang
from NetconfAccess, I pass the submodule name to libnetconf rather
than the module name.
Issue: https://tree.taiga.io/project/jktjkt-netconf-cli/issue/123
Change-Id: I0e5f6b82b1598ecc9f27732f450b1a204ee500f9
diff --git a/src/netconf_access.hpp b/src/netconf_access.hpp
index 4c0e813..ccfffcc 100644
--- a/src/netconf_access.hpp
+++ b/src/netconf_access.hpp
@@ -44,7 +44,10 @@
std::shared_ptr<Schema> schema() override;
private:
- std::string fetchSchema(const std::string_view module, const std::optional<std::string_view> revision, const std::optional<std::string_view>);
+ std::string fetchSchema(const std::string_view module, const
+ std::optional<std::string_view> revision, const
+ std::optional<std::string_view> submodule, const
+ std::optional<std::string_view> submoduleRevision);
std::vector<std::string> listImplementedSchemas();
void datastoreInit();
void doEditFromDataNode(std::shared_ptr<libyang::Data_Node> dataNode);