summaryrefslogtreecommitdiffstats
path: root/doc/user/scripting.rst
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@nvidia.com>2020-12-01 02:00:08 +0100
committerQuentin Young <qlyoung@nvidia.com>2020-12-02 00:42:17 +0100
commit0833300a7ad7bfadb95237808ff082a83313fa66 (patch)
tree0a5d523463390173c00bc726273d9c942f213ff7 /doc/user/scripting.rst
parentlib: remove extraneous scripting debugs (diff)
downloadfrr-0833300a7ad7bfadb95237808ff082a83313fa66.tar.xz
frr-0833300a7ad7bfadb95237808ff082a83313fa66.zip
doc: add scripting docs
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
Diffstat (limited to 'doc/user/scripting.rst')
-rw-r--r--doc/user/scripting.rst28
1 files changed, 28 insertions, 0 deletions
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.