make_sil_sa_bundle(1)

NAME
make_sil_sa_bundle - create a SIL-SA bundle working directory

SYNOPSIS

   make_sil_sa_bundle  bundle-name 1*(module-name) 0*(extra-parms)

DESCRIPTION
make_sil_sa_bundle is a script to create a server instrumentation library for a sub-agent (SIL-SA) root work directory, for a set of YANG modules, called a SIL-SA bundle.

Refer to the online YumaPro Developer Manual for full details on SIL-SA development:

https://docs.yumaworks.com/en/latest/dev/index.html

The bundle-name parameter must be present to specify the name of the SIL-SA bundle. This name is used with the --bundle parameter in netconfd-pro. This name cannot be the same as any YANG module name in the SIL bundle.

One or more module-name parameters must be present to specify the names of the module to include in the SIL-SA bundle. At least 1 module must be included.

SIL-SA code generated will be split in 'YumaPro' files and 'User' files. A YumaPro SIL-SA file or external definition begins with the prefix 'y_'. A User SIL-SA file or external definition begins with the prefix 'u_'.

Zero or more extra-parms additional parameters may be present to specify additional parameters to pass to the YANG compiler program. Almost any parameter accepted by the yangdump-pro program can be added at the end as an extra parameter. The --module and --sil-bundle parameters cannot be added as extra params.

There are some CLI parameters that directly affect SIL-SA code generation that can be used as extra parms. These parameters are:

 --deviation=module-name Zero or more 'deviation' parameters can be specified so they are applied during code generation. This parameter must be provided if the deviations alter any object type definitions. The deviations will be applied to the bundle modules before the code is generated. Objects marked as 'not-supported' will be skipped.

 --sil-edit1 If present, then the first generation 'edit' functions will be generated for SIL-SA modes instead of second generation 'edit' functions. This mode is deprecated and should not be used. A deprecation warning will be generated if it is used. The deprecated EDIT1 callbacks will still be generated.

 --sil-edit2 If present, then the 2nd generation 'edit' functions will be generated for SIL-SA modes instead of first generation 'edit' functions. The default is to use edit3 mode so set this parameter to enable edit2 mode.

 --sil-edit3 If present, then the 3rd generation 'edit' functions will be generated for SIL-SA modes instead of other generation 'edit' functions. The default is to use this mode so this parameter can be omitted.

 --sil-get1 If present, then the first generation 'get' functions will be generated for SIL-SA modes instead of second generation 'get' functions. This mode is deprecated and should not be used. A deprecation warning will be generated if it is used. The deprecated GET1 callbacks will still be generated.

 --sil-get2 If present, then the 2nd generation 'get' functions will be generated for SIL-SA modes instead of first generation 'get' functions. The default is to use this mode so this parameter can be omitted.

 --sil-include=filename The name of an include file to inject into C files when the conversion format is equal to 'c' or 'yc'. An include statement will be generated for each instance of this parameter, in the order these parameters are given. Zero or more instances of this parameter are allowed.

The include statements will be generated after the system <include> statement and general YumaPro include statements, but before the YANG module specific include statements.

 --sil-nmda If present, then the 2nd generation NMDA 'get' functions will be generated for SIL or SIL-SA modes, if code generation is being requested. Ignored otherwise. The GET2 callbacks will be generated with extra NMDA specific code for config=true data nodes. It is an error if sil-nmda is selected but sil-get2 is not selected.

All YANG modules will be compiled together before generating any SIL-SA code in order to properly generate SIL-SA code for augment statements that add data to another YANG module.

The SIL-SA callback functions do not support rpc and notification statements. These are ignored if encountered in a YANG module.

There will be C and H files generated for the bundle itself. They are only used to call the init and cleanup functions for the YANG modules in the SIL-SA bundle. When adding a new module to the bundle, these files need to be updated as well.

The following directories and files would be created if the command 'make_sil_sa_bundle bundle1 test1 test2' was called from the current directory.

  ./bundle1/ -+
           |
           + bin/
           |
           + lib/
           |
           + Makefile
           |
           + output/html   (*** doxygen generates this directory ***)
           |
           + src/ -+
                   |
                   + Makefile
                   |
                   + y_bundle1.c
                   |
                   + y_bundle1.h
                   |
                   + y_test1.h
                   |
                   + y_test1.c
                   |
                   + y_test2.h
                   |
                   + y_test2.c
                   |
                   + u_test1.h
                   |
                   + u_test1.c (*** Developer edits this file ***)
                   |
                   + u_test2.h
                   |
                   + u_test2.c (*** Developer edits this file ***)

The doxygen program should be installed, so the HTML documentation can be used.

The 'make doc' command in the root directory will run doxygen and generate the output/html directory contents.

The 'make opendoc' command will launch the default browser to view the doxygen documentation in the output/html directory. It must be run after the 'make doc' command.

The YumaPro files never need to be edited. All the code that needs device instrumentation is contained in the User SIL-SA C files.

The 'make' command in the root or 'src' directory will attempt to compile the C files and produce a library called root/lib/lib<bundle-name>_sa.so. (e.g. /work/test/lib/libtest_sa.so). Note the extra '_sa' that is added in the library name for 'sub-agent'.

The 'make install' command in the root or 'src' directory will attempt to install the library file for the bundle in the YumaPro library directory (e.g., /usr/lib/yumapro).

USAGE
This script must be called from the parent directory where the SIL bundle root work directory should be created. The 'bundle-name' parameter will be used for the name of the directory created. The 'module-name' parameters must match YANG module names found in the module search path by yangdump-pro.

AUTHOR
YumaWorks, Inc., <support at yumaworks dot com>

SEE ALSO
make_sil_bundle(1) make_sil_dir_pro(1) make_sil_sa_dir(1) netconfd-pro(1) yangdump-pro(1)