What is YANG Library Mode?


The netconfd-pro server can be used in a mode where it just provides YANG module retrieval by setting the library-mode parameter to "true".

NOTE: The normal server functions are disabled in this mode.

All of the YANG modules visible to the server will be listed in the YANG library, not just modules loaded with the --module or --bundle parameters.


If library-mode is set to "true", then the server will operate in YANG module library mode. In this case netconfd-pro will find all the YANG modules

and make them available for <get-schema> operations.  The default setting for the library-mode parameter is false, where modules and bundles

must be explicitly loaded by the server in order for them to be retrievable through <get-schema> requests.


The following NETCONF operations are available when the server is operating in library mode:


                    ietf-netconf:get

                    ietf-netconf:get-config

                    ietf-netconf-monitoring:get-schema

                    yuma-system:restart

                    yuma-system:shutdown


NOTE: Beginning with YumaPro SDK version 17.10-3, the yuma-system:restart and yuma-system:shutdown operations are dependent on the with-yuma-system parameter setting.

If with-yuma-system is set to "true", then the restart and shutdown operations will be available when in library mode. If with-yuma-system is set to "false", then shutdown and restart

will not be available in library mode.


How to Enable YANG Library Mode


The library-mode parameter can be invoked via the command line when starting netconfd-pro like this:


user@system> netconfd-pro --library-mode=true


or can be configured in the /etc/yumapro/netconfd-pro.conf file:


#### leaf library-mode
#
# If true, then the server will operate in YANG module
# library mode. It will find all the YANG modules
# and make them available for <get-schema> operations.
#
# The following NETCONF operations are available when
# the server is operating in library mode:
#
#   ietf-netconf:get
#   ietf-netconf:get-config
#   ietf-netconf-monitoring:get-schema
#   yuma-system:restart
#   yuma-system:shutdown
#
# library-mode false
#

library-mode true