Some YANG modules have top-level mandatory objects, even though this is not recommended for YANG design. This means that as soon as the module is loaded into the server, a mandatory configuration node must be present or the <running> configuration will not be valid.
> netconfd-pro module=ietf-syslog Starting netconfd-pro... Copyright (c) 2008-2012, Andy Bierman, All Rights Reserved. Copyright (c) 2012-2018, YumaWorks, Inc., All Rights Reserved. Starting ypwatcher... Warning: sil code for module 'ietf-syslog' not found Error: top-level NP container 'syslog' is mandatory ietf-syslog.yang:230.3: error(384): top-level mandatory objects are not allowed Load module 'ietf-syslog' failed (top-level mandatory objects are not allowed) Error: server exit due to init2 error (top-level mandatory objects are not allowed) netconfd-pro: init returned (top-level mandatory objects are not allowed)
It is possible for the server instrumentation code to populate the mandatory nodes during the boot-up phase, so that is why this is only a warning in the YANG compiler:
> yangdump-pro ietf-syslog Warning: top-level NP container 'syslog' is mandatory ietf-syslog.yang:230.3: warning(1048): top-level object is mandatory *** /home/andy/modules/ietf-syslog.yang *** 0 Errors, 1 Warnings
The server can be configured to allow the startup and running configurations to fail validation tests at startup. The operator can provide the missing mandatory nodes using normal NETCONF or RESTCONF edit operations.
To configure the server to allow top-level mandatory nodes:
> netconfd-pro --startup-error=continue --running-error=continue