]> git.ipfire.org Git - thirdparty/pdns.git/commit - pdns/dnsdist-lua.cc
dnsdist: Add UUIDs to rules
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 28 Nov 2017 16:16:19 +0000 (17:16 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 12 Jan 2018 11:40:54 +0000 (12:40 +0100)
commit4d5959e62e069ca3baf7d52e645211e179de14d1
treeee8b27d30b3409a38e04c2d153b0af7b8b27545a
parentd24089b75a9f71c2433f7d5ca3eb7c64ea28abe3
dnsdist: Add UUIDs to rules

Having UUID assigned to rules makes it possible to track a given rule,
as opposed to the existing rule numbers that changed everytime a rule
was deleted or moved around. A rule now keeps the same UUID for the
lifetime of the dnsdist process and can even keep this UUID persistent
across restart if the UUID is provided when the rule is added:

```
addAction(AllRule(), AllowAction(), {uuid="123e4567-e89b-12d3-a456-426655440000"})
```

This is especially useful if the rules are managed via a central
controller using the console, or to display metrics retrieved via
the API.
12 files changed:
pdns/dnsdist-console.cc
pdns/dnsdist-lua-actions.cc
pdns/dnsdist-lua-rules.cc
pdns/dnsdist-lua.cc
pdns/dnsdist-lua.hh
pdns/dnsdist-web.cc
pdns/dnsdist.cc
pdns/dnsdist.hh
pdns/dnsdistdist/configure.ac
pdns/dnsdistdist/docs/guides/webserver.rst
pdns/dnsdistdist/docs/rules-actions.rst
regression-tests.dnsdist/test_API.py