Problem:
You get a YANG compiler error because the "default" keyword is not accepted for a leaf-list.
This feature is not allowed in YANG 1.0. It was added in YANG 1.1.
andy@andy-i9-homedev:~/modules$ yangdump-pro codetest Error: Got 'default', Expected: keyword codetest.yang:16.10: error(246): wrong token value Error: Got 'semicolon', Expected: keyword codetest.yang:16.26: error(245): wrong token type
Solution:
The "yang-version 1.1" statement is probably missing from your module.
Check the very top of the module.
It should be the first statement found inside the module.
module codetest { yang-version 1.1; namespace "http://netconfcentral.org/ns/codetest"; prefix "ct"; // rest of module }
Example YANG
container top { leaf a { type int32; } leaf-list b { type int32; default "14 42 -7"; } }