Fix `prepare`

The parsing algorithm was broken and prepare couldn't recognize RPC
nodes. The mistake probably happened when I added Action support, but
with no tests. Tests are now included.

Change-Id: I1b4eb2eb76a30c4495e2aacbb6848f449eba3abb
diff --git a/src/static_schema.hpp b/src/static_schema.hpp
index e343087..3009d7e 100644
--- a/src/static_schema.hpp
+++ b/src/static_schema.hpp
@@ -37,6 +37,9 @@
 struct rpc {
 };
 
+struct action {
+};
+
 struct module {
 };
 
@@ -46,7 +49,7 @@
 };
 }
 
-using NodeType = std::variant<yang::container, yang::list, yang::leaf, yang::leaflist, yang::rpc>;
+using NodeType = std::variant<yang::container, yang::list, yang::leaf, yang::leaflist, yang::rpc, yang::action>;
 
 struct NodeInfo {
     NodeType m_nodeType;
@@ -87,6 +90,7 @@
     void addLeafList(const std::string& location, const std::string& name, const yang::LeafDataType& type);
     void addList(const std::string& location, const std::string& name, const std::set<std::string>& keys);
     void addRpc(const std::string& location, const std::string& name);
+    void addAction(const std::string& location, const std::string& name);
     void addModule(const std::string& name);
     void addIdentity(const std::optional<identityRef_>& base, const identityRef_& name);