Se modifica para que haga el flush ante un commit
y ademas se parse la salida del ip link list para
cargar en el init los devices y direcciones mac de
cada device
Se modifica config.py para que levante un DnsHandler.
Se modifica pymindaemon para que en caso de error 0 agregue
un fin de linea.
Se heredan las excepciones de Dns del HandlerError
.Se corrije el _write_config para que se comporte segun lo
esperado.
Now all errors that should be reported back to the pymin client should
inherit from dispatcher.HandlerError. Any other error is reported to the
client as an internal server error and it's printed in the daemon standard
output for debugging purposes. A new line is now appended to errors
reported to the client for better consistency with OK responses.
Use the serializer mode to automatically serialize handlers results.
Handlers now don't have to worry about serialization. All they have to do
is return list of values (which can be lists or iterable object). Then the
PyminDaemon serialize them to UTF-8 encoded CSV strings and send them
through socket.
Add a decorator to mark which callables are exported by the dispatcher.
All callables which should handle a command should be maked with the
@handler decorator. This is for the sake of security, so users can't call
arbitrary python code (like a constructor).
The path where to store pickled configuration and generated config files
is configurable when constructing the instance.
If there's a pickled configuration it's automatically loaded at
construction time. If not, a new configuration based on defaults is dumped
to disk.
New methods are added: restart(), reload() and rollback() and DhcpHandler
is published in the services module and included in the pymin daemon
command tree.
This error is raised as a translation for the select.error, raised when
the system call is interrupted by a signal, so EventLoop users don't have
to know the details about the loop.
A complete example of a handler class. It uses mako for templates and (c)Pickle
for configuration persistence. There is some more work to be done (loading
pickled configuration and other details) but the class is pretty functional.