paradrop.backend.pdconfd package¶
Subpackages¶
- paradrop.backend.pdconfd.config package
- Submodules
- paradrop.backend.pdconfd.config.base module
- paradrop.backend.pdconfd.config.command module
- paradrop.backend.pdconfd.config.dhcp module
- paradrop.backend.pdconfd.config.firewall module
- paradrop.backend.pdconfd.config.manager module
- paradrop.backend.pdconfd.config.network module
- paradrop.backend.pdconfd.config.wireless module
- Module contents
Submodules¶
paradrop.backend.pdconfd.client module¶
-
class
Blocking
(deferred)[source]¶ Bases:
object
Uses threading.Event to implement blocking on a twisted deferred object.
The wait method will wait for its completion and return its result.
Dear Lance. I hope you stub your toe.
-
reload
(path, dbus=False)[source]¶ Reload file(s) specified by path.
This function blocks until the request completes. On completion it returns a status string, which is a JSON list of loaded configuration sections with a ‘success’ field. For critical errors such as failure to connect to the D-Bus service, it will return None.
-
reloadAll
(dbus=False)[source]¶ Reload all files from the system configuration directory.
This function blocks until the request completes. On completion it returns a status string, which is a JSON list of loaded configuration sections with a ‘success’ field. For critical errors such as failure to connect to the D-Bus service, it will return None.
-
waitSystemUp
(dbus=False)[source]¶ Wait for the configuration daemon to finish its first load.
This function blocks until the request completes. On completion it returns a status string, which is a JSON list of loaded configuration sections with a ‘success’ field. For critical errors such as failure to connect to the D-Bus service, it will return None.
paradrop.backend.pdconfd.main module¶
This module listens for D-Bus messages and triggers reloading of configuration files. This module is the service side of the implementation. If you want to issue reload commands to the service, see the client.py file instead.
- Operation:
- When triggered, read in UCI configuration files.
- Pass sections off to appropriate handlers (interface, etc.).
- Perform some validation (check for required options).
- Emit commands (start/stop daemon, ip, iw, etc.) into a queue.
- Issue commands, maybe rollback on failure.
- Update known state of the system.
Reference: http://excid3.com/blog/an-actually-decent-python-dbus-tutorial/