Skip rpc nodes in YangSchema::childNodes

Issue: https://tree.taiga.io/project/jktjkt-netconf-cli/issue/133
Change-Id: Id75e71f690730f7f33c639a9b5b37e8683f4637b
diff --git a/src/yang_schema.cpp b/src/yang_schema.cpp
index dddebf5..4627bd2 100644
--- a/src/yang_schema.cpp
+++ b/src/yang_schema.cpp
@@ -334,6 +334,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 162a194..a90cb8e 100644
--- a/tests/yang.cpp
+++ b/tests/yang.cpp
@@ -262,6 +262,8 @@
         }
     }
 
+    rpc myRpc {}
+
 })";
 
 namespace std {