Elektra  0.9.10
Plugin: python

DNS Python plugin

This filter plugin checks if a Key is a valid domain name, i.e. if the name can be resolved into an IPv4 address. The validation takes place whenever the kdb set method is called.

Usage

The python plugin requires the configuration parameter script holding the file path to the python script. The mount command looks like

sudo kdb mount file.ini /python ni python script=/path/to/dns_plugin.py

For the plugin to actually check a certain key, the check/dns metakey must be set.

sudo kdb meta-set spec:/python/my_hostname check/dns ''

Now each time the key is set, the filter plugin validates the given value.

kdb set user:/python/my_hostname www.libelektra.org