Add more types to YangSchema::nodeType
This doesn't do much here (we can't parse paths to these new types, so
no way to call it with that a path of a new type), but it will be useful
with the new approach to node parsing, where nodeType is used.
Change-Id: If7aefca145094f305752a192bfaa3ea658f32081
diff --git a/src/yang_schema.cpp b/src/yang_schema.cpp
index 2c8b30d..b243fd2 100644
--- a/src/yang_schema.cpp
+++ b/src/yang_schema.cpp
@@ -344,11 +344,7 @@
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(ModuleNodePair(boost::none, it->path(LYS_PATH_FIRST_PREFIX)));
@@ -420,6 +416,16 @@
return yang::NodeTypes::Leaf;
case LYS_LIST:
return yang::NodeTypes::List;
+ case LYS_RPC:
+ return yang::NodeTypes::Rpc;
+ case LYS_ACTION:
+ return yang::NodeTypes::Action;
+ case LYS_NOTIF:
+ return yang::NodeTypes::Notification;
+ case LYS_ANYXML:
+ return yang::NodeTypes::AnyXml;
+ case LYS_LEAFLIST:
+ return yang::NodeTypes::LeafList;
default:
throw InvalidNodeException(); // FIXME: Implement all types.
}