diff options
author | Quentin Young <qlyoung@nvidia.com> | 2020-12-01 02:00:08 +0100 |
---|---|---|
committer | Quentin Young <qlyoung@nvidia.com> | 2020-12-02 00:42:17 +0100 |
commit | 0833300a7ad7bfadb95237808ff082a83313fa66 (patch) | |
tree | 0a5d523463390173c00bc726273d9c942f213ff7 /doc/user | |
parent | lib: remove extraneous scripting debugs (diff) | |
download | frr-0833300a7ad7bfadb95237808ff082a83313fa66.tar.xz frr-0833300a7ad7bfadb95237808ff082a83313fa66.zip |
doc: add scripting docs
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
Diffstat (limited to 'doc/user')
-rw-r--r-- | doc/user/index.rst | 1 | ||||
-rw-r--r-- | doc/user/installation.rst | 8 | ||||
-rw-r--r-- | doc/user/scripting.rst | 28 | ||||
-rw-r--r-- | doc/user/subdir.am | 1 |
4 files changed, 38 insertions, 0 deletions
diff --git a/doc/user/index.rst b/doc/user/index.rst index 8ac997f8d..2674cc380 100644 --- a/doc/user/index.rst +++ b/doc/user/index.rst @@ -29,6 +29,7 @@ Basics ipv6 kernel snmp + scripting .. modules ######### diff --git a/doc/user/installation.rst b/doc/user/installation.rst index 382d71b71..a13e6ce43 100644 --- a/doc/user/installation.rst +++ b/doc/user/installation.rst @@ -362,6 +362,10 @@ options from the list below. Set hardcoded rpaths in the executable [default=yes]. +.. option:: --enable-scripting + + Enable Lua scripting [default=no]. + You may specify any combination of the above options to the configure script. By default, the executables are placed in :file:`/usr/local/sbin` and the configuration files in :file:`/usr/local/etc`. The :file:`/usr/local/` @@ -382,6 +386,10 @@ options to the configuration script. Configure zebra to use `dir` for local state files, such as pid files and unix sockets. +.. option:: --with-scriptdir <dir> + + Look for Lua scripts in ``dir`` [``prefix``/etc/frr/scripts]. + .. option:: --with-yangmodelsdir <dir> Look for YANG modules in `dir` [`prefix`/share/yang]. Note that the FRR diff --git a/doc/user/scripting.rst b/doc/user/scripting.rst new file mode 100644 index 000000000..b0295e570 --- /dev/null +++ b/doc/user/scripting.rst @@ -0,0 +1,28 @@ +.. _scripting: + +********* +Scripting +********* + +The behavior of FRR may be extended or customized using its built-in scripting +capabilities. + +Some configuration commands accept the name of a Lua script to call to perform +some task or make some decision. These scripts have their environments +populated with some set of inputs, and are expected to populate some set of +output variables, which are read by FRR after the script completes. The names +and expected contents of these scripts are documented alongside the commands +that support them. + +These scripts live in :file:`/etc/frr/scripts/` by default. This is +configurable at compile time via ``--with-scriptdir``. It may be +overriden at runtime with the ``--scriptdir`` daemon option. + +In order to use scripting, FRR must be built with ``--enable-scripting``. + +.. note:: + + Scripts are typically loaded just-in-time. This means you can change the + contents of a script that is in use without restarting FRR. Not all + scripting locations may behave this way; refer to the documentation for the + particular location. diff --git a/doc/user/subdir.am b/doc/user/subdir.am index dd7a193e3..b240c5a9a 100644 --- a/doc/user/subdir.am +++ b/doc/user/subdir.am @@ -34,6 +34,7 @@ user_RSTFILES = \ doc/user/routemap.rst \ doc/user/routeserver.rst \ doc/user/rpki.rst \ + doc/user/scripting.rst \ doc/user/setup.rst \ doc/user/sharp.rst \ doc/user/snmp.rst \ |