The read-only environment variable $YUMAPRO_MODPATH specifies the search path for YANG files.


The $YUMAPRO_MODPATH environment variable consists of a colon (':') separated list of path specifications, commonly found in Unix, such as the $PATH environment variable.

For example, the following commands will cause YumaPro tools to search for YANG and YIN objects in $HOME/modules, $HOME/module-DEV, and /usr/share/modules:


user@localhost:~$ YUMAPRO_MODPATH = ~/modules:~/module-DEV:/usr/share/modules

user@localhost:~$ export YUMAPRO_MODPATH


You can override the $YUMAPRO_MODPATH variable by setting the --modpath parameter for netconfd-pro and/or yangcli-pro either via command line or in the respective program's configuration file.


The following command instructs netconfd-pro to discover YANG and YIN modules in $HOME/testmodules, $HOME/modules, and $HOME/trunk/netconf/modules:


user@localhost:~$ netconfd-pro --modpath="~/testmodules:~/modules:~/trunk/netconf/modules"


The same modpath as configured above would be set in netconfd-pro's configuration file (/etc/yumapro/netconfd-pro.conf) like this:


#### leaf modpath
#
#  Internal file search path for YANG files.
#  e.g., modpath "~/modules:/some/path:../another/path"
#  Refer to user manual for complete module search path
#
# no default for modpath

modpath ~/testmodules:~/modules:~/trunk/netconf/modules



Starting yangcli-pro with the --modpath parameter also overrides the $YUMAPRO_MODPATH environment variable, if it is present. 


For example:


user@localhost:~$ yangcli-pro --modpath="~/testmodules:~/modules:~/trunk/netconf/modules”


Note: The $YUMAPRO_HOME/modules sub-tree is searched for YANG files if the read-only environment variable $YUMAPRO_HOME is set.  Using the --yumapro-home parameter when yangcli-pro starts overrides $YUMAPRO_HOME variable.



Using the $HOME/modules Directory


The server will automatically look for YANG modules in a directory called "modules" in your home directory.

If this directory exists, it will be checked for YANG modules before the YUMAPRO_MODPATH is checked.

It is recommended that this location only be used for modules in progress.