Merge "Skip rpc nodes in YangSchema::childNodes"
diff --git a/src/yang_schema.cpp b/src/yang_schema.cpp
index 10565d3..88f0154 100644
--- a/src/yang_schema.cpp
+++ b/src/yang_schema.cpp
@@ -309,6 +309,11 @@
for (const auto node : nodes) {
if (node->module()->name() == "ietf-yang-library"sv)
continue;
+ // FIXME: This is a temporary fix to filter out RPC nodes in
+ // tab-completion. The method will have to be changed/reworked when RPC
+ // support gets added.
+ if (node->nodetype() == LYS_RPC)
+ continue;
if (recursion == Recursion::Recursive) {
for (auto it : node->tree_dfs()) {
res.insert(it->path(LYS_PATH_FIRST_PREFIX));
diff --git a/tests/yang.cpp b/tests/yang.cpp
index 017107c..9af8b47 100644
--- a/tests/yang.cpp
+++ b/tests/yang.cpp
@@ -262,6 +262,8 @@
}
}
+ rpc myRpc {}
+
})";
namespace std {