schema BUGFIX processing extension instance argument
Due to differences in YANG and YIN, the extension instance's argument is
processed differently. So far, the argument was missing when the source
format was YIN and extension was not compiled. This was breaking
printers and limiting even other use cases of the argument.
This patch solves the problem by getting the extension definition when
needed and finishing the argument processing not finished by YIN parser.
diff --git a/tests/utests/extensions/test_yangdata.c b/tests/utests/extensions/test_yangdata.c
index 02b50f1..7bf1cc6 100644
--- a/tests/utests/extensions/test_yangdata.c
+++ b/tests/utests/extensions/test_yangdata.c
@@ -210,8 +210,7 @@
"import ietf-restconf {revision-date 2017-01-26; prefix rc;}"
"rc:yang-data { container x { leaf x {type string;}}}}";
assert_int_equal(LY_EVALID, lys_parse_mem(UTEST_LYCTX, data, LYS_IN_YANG, NULL));
- CHECK_LOG_CTX("Extension plugin \"libyang 2 - yang-data, version 1\": "
- "Extension rc:yang-data is instantiated without mandatory argument representing YANG data template name.",
+ CHECK_LOG_CTX("Extension instance \"rc:yang-data\" misses argument element \"name\".",
"/a:{extension='rc:yang-data'}");
data = "module a {yang-version 1.1; namespace urn:tests:extensions:yangdata:a; prefix self;"