]>
git.llucax.com Git - software/pymin.git/log
Fede [Sun, 21 Oct 2007 21:46:34 +0000 (18:46 -0300)]
Se corrigen el nombre del pid file y se camban prints por calls.
Fede [Sun, 21 Oct 2007 21:44:16 +0000 (18:44 -0300)]
Se agrega el POLICY al script para que el NAMED no se queje.
Fede [Thu, 18 Oct 2007 00:40:28 +0000 (21:40 -0300)]
Make real calls (remove prints).
Fede [Thu, 18 Oct 2007 00:39:25 +0000 (21:39 -0300)]
Alias reload to restart in DhcpHandler (init.d script don't have reload).
Fede [Wed, 17 Oct 2007 23:07:04 +0000 (20:07 -0300)]
Inherit errors from HandlerError.
Fede [Wed, 17 Oct 2007 22:44:03 +0000 (19:44 -0300)]
Merge ../t/pymin/
Conflicts:
pymin/services/ip/__init__.py
Leandro Lucarella [Tue, 16 Oct 2007 03:28:36 +0000 (00:28 -0300)]
Remove unused error classes.
Leandro Lucarella [Tue, 16 Oct 2007 03:28:21 +0000 (00:28 -0300)]
Add ComposedSubHandler (and their List and Dict flavors) to services.util.
Add a class to handle List and Dict subhandlers contained in another
parent object. DnsHandler and IpHandler are updated to use them.
get_devices() function was "promoted" to services.util too, with a little
signature change.
Leandro Lucarella [Tue, 16 Oct 2007 03:25:17 +0000 (00:25 -0300)]
Bugfix: catch LookupErrors instead of IndexError in ContainerSubHandler.
Leandro Lucarella [Tue, 16 Oct 2007 03:22:59 +0000 (00:22 -0300)]
Add a default __cmp__() implementation to pymin.seqtool.Sequence.
Leandro Lucarella [Tue, 16 Oct 2007 00:02:34 +0000 (21:02 -0300)]
Add a clear() method to ContainerSubHandler to remove all the items.
Leandro Lucarella [Tue, 16 Oct 2007 00:02:06 +0000 (21:02 -0300)]
Use more consistent getter name in ContainerSubHandler.
Now the method to access to the container attribute is named _attr() (and
_vattr) instead of _cont() (and _vcont). The method accept now an optional
'attr' argument to act as a setter.
Leandro Lucarella [Mon, 15 Oct 2007 05:22:06 +0000 (02:22 -0300)]
Add NatHandler to handle NAT (port forwarding, snating and masquerading).
Leandro Lucarella [Mon, 15 Oct 2007 04:25:27 +0000 (01:25 -0300)]
Add RestartHandler and ReloadHandler to pymin.services.util.
RestartHandler adds a command restart() that calls stop() and then start().
ReloadHandler adds a command reload() that calls restart().
This are utility classes to automatically handler restart and reload
commands on services that don't support them directly.
or3st3s [Sat, 13 Oct 2007 17:04:31 +0000 (17:04 +0000)]
Se agrega soporto para balanceo de carga.
Se agrega en el comando hop que permite agregar
distintos gateways para hacer balanceo de carga.
Nicolas Emiliani [Fri, 12 Oct 2007 19:05:00 +0000 (16:05 -0300)]
Se agrega el template de chap-secrets para el pptp
Nicolas Emiliani [Fri, 12 Oct 2007 18:59:55 +0000 (15:59 -0300)]
Merge or3st3s@azazel:/home/luca/repos/pymin
Leandro Lucarella [Thu, 11 Oct 2007 21:06:57 +0000 (18:06 -0300)]
Add support to "operation tagging" to ListSubHandler and DictSubHandler.
"Operation tagging" means that if the contained objects has an _add,
_update or _delete attribute, it set them to true when the item is
added, updated or deleted respectively (in case that it's deleted, it's
not removed from the container, but it's not listed either, i.e. the
items are "logically" deleted, not really removed from the container).
Now ListSubHandler and DictSubHandler ihnerit from a new class
ContainerSubHandler which handles 95% of the code. Because of this, now
the "magic" attributes starts with _cont_ instead of _list_ or _dict_.
Existing handler were updated, but new ones should take this into
account.
Leandro Lucarella [Thu, 11 Oct 2007 20:10:30 +0000 (17:10 -0300)]
Add a new, backward compatible, way to specify specific config dirs.
Now _config_writer_cfg_dir could be a dictionary instead of a string.
The dictionary maps template filenames to directories where to generate
(render) the configure files.
See the DnsHandler for an example.
Nicolas Emiliani [Thu, 11 Oct 2007 19:27:32 +0000 (16:27 -0300)]
Se agrega soporte de pppoe, pptp al ppp.
Nicolas Emiliani [Thu, 11 Oct 2007 16:54:46 +0000 (13:54 -0300)]
Se agrega el manejo de ppp.
Leandro Lucarella [Wed, 10 Oct 2007 20:27:39 +0000 (17:27 -0300)]
Use ListSubHandler in firewall rules.
Leandro Lucarella [Wed, 10 Oct 2007 20:19:49 +0000 (17:19 -0300)]
Add a new helper class for services: ListSubHandler.
Leandro Lucarella [Wed, 10 Oct 2007 20:19:18 +0000 (17:19 -0300)]
Bugfix: skip SubHandlers parent when looking for a handler/command/help.
Leandro Lucarella [Wed, 10 Oct 2007 20:01:16 +0000 (17:01 -0300)]
Bugfix: use hasattr() right when looking for help.
Leandro Lucarella [Wed, 10 Oct 2007 19:36:11 +0000 (16:36 -0300)]
Bugfix: remove unused DictSubHandler attribute.
Leandro Lucarella [Wed, 10 Oct 2007 19:34:11 +0000 (16:34 -0300)]
Add default conversion from Sequence to str and unicode.
Leandro Lucarella [Wed, 10 Oct 2007 20:31:08 +0000 (17:31 -0300)]
Update services to use SubHandler and DictSubHandler.
Leandro Lucarella [Wed, 10 Oct 2007 19:00:43 +0000 (16:00 -0300)]
Raise a CommandNotFoundError if updating an object without update().
When a DictSubHandler try to update an object that doesn't have an
update() method, it raises a CommandNotFoundError to emulate that the
update command doesn't exist.
Nicolas Emiliani [Wed, 10 Oct 2007 18:31:07 +0000 (15:31 -0300)]
Merge or3st3s@azazel:/home/luca/repos/pymin
Leandro Lucarella [Wed, 10 Oct 2007 18:23:47 +0000 (15:23 -0300)]
Add new service helper classes: SubHandler and DictSubHandler.
SubHandler just takes a reference to his parent.
DictSubHandler manages a parent's dict attribute, providing add, update,
delete, get, list and show commands.
Error classes were added too: ItemError, ItemNotFoundError and
ItemAlreadyExistsError.
Leandro Lucarella [Wed, 10 Oct 2007 18:21:09 +0000 (15:21 -0300)]
Update TODO list.
Nicolas Emiliani [Wed, 10 Oct 2007 18:18:33 +0000 (15:18 -0300)]
Modificacion al vrrp para start y stop
Nicolas Emiliani [Wed, 10 Oct 2007 17:38:36 +0000 (14:38 -0300)]
Se agrega el servicio de VRRP.
Leandro Lucarella [Wed, 10 Oct 2007 15:06:15 +0000 (12:06 -0300)]
Improve WrongArgumentError class.
Leandro Lucarella [Wed, 10 Oct 2007 14:57:58 +0000 (11:57 -0300)]
Handle calling a command with an unexpected keyword argument errors.
Nicolas Emiliani [Wed, 10 Oct 2007 14:36:00 +0000 (11:36 -0300)]
Merge or3st3s@azazel:/home/luca/repos/pymin
Nicolas Emiliani [Wed, 10 Oct 2007 14:35:48 +0000 (11:35 -0300)]
Se agrega el archivo de usuarios de proxy
Leandro Lucarella [Mon, 8 Oct 2007 16:19:28 +0000 (13:19 -0300)]
Better error message of wrong arguments in Dispatcher.
Leandro Lucarella [Sun, 7 Oct 2007 22:01:45 +0000 (19:01 -0300)]
Bugfix: make rollback to work.
Rollback did never worked right on composed handlers (handlers with
sub-handlers) because when the class attributes were unpickled, they were
bounded to a new object instance, and the sub-handlers references were
never updated (the sub-handler referenced directly the handler attributes).
Now all sub-handlers references the handler object itself (called parent)
so when the unpikle is done, all can reference to the same objects.
Leandro Lucarella [Sun, 7 Oct 2007 21:36:09 +0000 (18:36 -0300)]
Bugfix in command parser.
When escape sequences were after another token they were joined in a
single token. Now they are parsed as expected.
Leandro Lucarella [Sat, 6 Oct 2007 22:44:53 +0000 (19:44 -0300)]
Add preliminary support for wrong arguments error reporting.
It support wrong ammount of arguments, but not unexpected keyword argument
and maybe others.
Fede [Sat, 6 Oct 2007 17:06:44 +0000 (14:06 -0300)]
fix command names
Fede [Sat, 6 Oct 2007 17:04:06 +0000 (14:04 -0300)]
Suse way
Fede [Sat, 6 Oct 2007 17:01:39 +0000 (14:01 -0300)]
fix host FQDN
Fede [Sat, 6 Oct 2007 16:01:30 +0000 (13:01 -0300)]
Bugfixes to firewall service.
Fede [Sat, 6 Oct 2007 16:00:59 +0000 (13:00 -0300)]
Add flush to iptables.sh template.
Fede [Sat, 6 Oct 2007 15:59:55 +0000 (12:59 -0300)]
Update services.util errors to be unicode compatible.
Fede [Sat, 6 Oct 2007 15:37:19 +0000 (12:37 -0300)]
Bugfix and add service reload when loading pickled config.
Fede [Sat, 6 Oct 2007 15:34:14 +0000 (12:34 -0300)]
replaces prints with calls
Fede [Sat, 6 Oct 2007 15:32:50 +0000 (12:32 -0300)]
bug fixes to proxy service
Fede [Sat, 6 Oct 2007 13:46:08 +0000 (10:46 -0300)]
fix string quotation
Fede [Sat, 6 Oct 2007 13:43:11 +0000 (10:43 -0300)]
support for proxy users auth
Fede [Sat, 6 Oct 2007 13:04:02 +0000 (10:04 -0300)]
Merge ../pymin
Leandro Lucarella [Sat, 6 Oct 2007 04:02:35 +0000 (01:02 -0300)]
Improve a lot error reporting and unicode/utf-8 compatibility.
Conversion between unicode and utf-8 is now done when sending/receiving
over the network by the PyminDaemon.
All errors provides now a conversion to unicode.
Dispatcher CommandNotFoundError was refactored to multiple classes with
specific and more descriptive error messages.
Handlers now can have a little help string (handler_help).
Handler's help command now list subhandlers (using handler_help).
A new error was added for help command (HelpNotFoundError).
All service handlers were updated.
Leandro Lucarella [Sat, 6 Oct 2007 02:47:55 +0000 (23:47 -0300)]
Use common config and pickle paths in the pymind config.
Leandro Lucarella [Fri, 5 Oct 2007 16:02:37 +0000 (13:02 -0300)]
Add iptables configuration doc.
Leandro Lucarella [Fri, 5 Oct 2007 16:01:53 +0000 (13:01 -0300)]
Use a handler object as the root dispatcher handler instead of a dict.
Now the dispatcher use a handler object as the root handler. This way you
can inherit your root handler from Handler and get the useful 'help' and
'coommands' commands for free.
Nicolas Emiliani [Thu, 4 Oct 2007 19:21:14 +0000 (16:21 -0300)]
Se agrega el manejo de usuarios al proxy
Leandro Lucarella [Thu, 4 Oct 2007 16:10:14 +0000 (13:10 -0300)]
Create a package named pymin with all the pymin modules.
Leandro Lucarella [Thu, 4 Oct 2007 14:48:23 +0000 (11:48 -0300)]
Change "var" for "attr" where it refer to an object attribute.
For example _persistent_vars is now _persistent_attrs. Mostly for
consistency and clarity.
Leandro Lucarella [Thu, 4 Oct 2007 14:35:40 +0000 (11:35 -0300)]
Add a ParametersHandler to services.util.
This class is a helper to provide common service parameters commands: get,
set, list and show.
All service handlers that use parameters were update to inherit from this
class.
Leandro Lucarella [Wed, 3 Oct 2007 21:41:48 +0000 (18:41 -0300)]
Factored out a lot of common code.
A new module is created: services.util which has a lot of helper classes
and functions to do common tasks of service handlers. Actual classes are:
Persistent, Restorable, ConfigWriter, ServiceHandler, InitdHandler and
TransactionalHandler (see documentation for details).
A call() function is provided as a simple wrapper for subprocess.call() to
execute simple commands. It can raise and ExecutionError, as a wrapper for
subprocess.call exceptions or ReturnNot0Error if the returned value is not
0.
All actual service handlers were updated.
Nicolas Emiliani [Wed, 3 Oct 2007 18:26:22 +0000 (15:26 -0300)]
Se agrega el proxy.
Nicolas Emiliani [Tue, 2 Oct 2007 16:11:13 +0000 (13:11 -0300)]
Se agrega el comando ip a la pymind y se corrige @handler
Se agrega a la configuracion el comando ip y se modifican
los handlers de dns e ip para que devuelvan con help
or3st3s [Tue, 2 Oct 2007 12:12:52 +0000 (12:12 +0000)]
Merge /home/luca/pymin
Conflicts:
config.py
services/__init__.py
Nicolas Emiliani [Tue, 2 Oct 2007 15:09:58 +0000 (12:09 -0300)]
Se corrige bug que impide crear, borrar yc crear una zona.
Nicolas Emiliani [Mon, 1 Oct 2007 21:13:00 +0000 (18:13 -0300)]
Se modifica el comando ip.
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
Leandro Lucarella [Mon, 1 Oct 2007 02:03:40 +0000 (23:03 -0300)]
Implement firewall handler.
Leandro Lucarella [Mon, 1 Oct 2007 02:03:04 +0000 (23:03 -0300)]
Rename pymin daemon executable to pymind.
Leandro Lucarella [Mon, 1 Oct 2007 01:06:39 +0000 (22:06 -0300)]
Add a special \N escape sequence to represent None to command parser.
Now \N can be used in positional parameters and keyword argument values to
represent a python None value.
Tests and examples are improved.
Leandro Lucarella [Mon, 1 Oct 2007 01:03:42 +0000 (22:03 -0300)]
Bugfix: tokens starting with escape sequences where splitted up.
Leandro Lucarella [Sun, 30 Sep 2007 20:33:01 +0000 (17:33 -0300)]
Fix a typo in the documentation.
or3st3s [Sun, 30 Sep 2007 16:44:58 +0000 (16:44 +0000)]
Se agrega la estructura del comando IP
or3st3s [Sat, 29 Sep 2007 14:20:31 +0000 (14:20 +0000)]
Se agregar el dns al manejo del dispatcher.
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.
Leandro Lucarella [Sat, 29 Sep 2007 05:58:41 +0000 (02:58 -0300)]
Export only selected symbols.
Leandro Lucarella [Sat, 29 Sep 2007 05:55:38 +0000 (02:55 -0300)]
Add support for quoted and keyword arguments to the Dispatcher.
Now it's possible to dispatch commands with quoted arguments, like:
echo "hello world"
Keyword arguments are supported too, you can write something like:
set variable=value
and the handler for set will be called like set(variable="value").
See dispatcher.parse_command for more detail.
Leandro Lucarella [Fri, 28 Sep 2007 21:20:54 +0000 (18:20 -0300)]
Add help messages and command listing to dispatcher handlers.
Now the @handle decorator takes a mandatory help argument to specify a
short help string for that handler. A new functions get_help() is added to
the dispatcher module to get the help string from a handler.
A new base Handler class is provided in dispatcher module to automatically
have a 'help' and 'commands' commands available.
Leandro Lucarella [Fri, 28 Sep 2007 19:36:17 +0000 (16:36 -0300)]
Add missing \n to Internal server error.
Leandro Lucarella [Fri, 28 Sep 2007 19:25:29 +0000 (16:25 -0300)]
Update TODO (add logging).
Leandro Lucarella [Fri, 28 Sep 2007 17:11:14 +0000 (14:11 -0300)]
Improve error handling.
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.
Leandro Lucarella [Fri, 28 Sep 2007 16:59:05 +0000 (13:59 -0300)]
Invert PyminDaemon constructor options and add defaults.
It's more likely to just want to override the routes and not the addr.
Leandro Lucarella [Fri, 28 Sep 2007 16:55:51 +0000 (13:55 -0300)]
Bugfix: handle empty lists on as_table().
or3st3s [Fri, 28 Sep 2007 15:48:18 +0000 (15:48 +0000)]
Merge /home/luca/pymin
Nicolas Emiliani [Fri, 28 Sep 2007 18:44:47 +0000 (15:44 -0300)]
Se Agrega la estructura del DNS
Leandro Lucarella [Thu, 27 Sep 2007 20:48:37 +0000 (17:48 -0300)]
Add more documentation to seqtools module.
Leandro Lucarella [Thu, 27 Sep 2007 20:48:09 +0000 (17:48 -0300)]
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.
Leandro Lucarella [Thu, 27 Sep 2007 20:45:05 +0000 (17:45 -0300)]
Add a module to serialize a set of tabular data as a CSV file.
Leandro Lucarella [Thu, 27 Sep 2007 16:38:42 +0000 (13:38 -0300)]
Add a module to handle unicode CSV files with multiple encodings.
Leandro Lucarella [Thu, 27 Sep 2007 16:37:10 +0000 (13:37 -0300)]
Add an utility module for operating on sequences.
Leandro Lucarella [Thu, 27 Sep 2007 16:34:37 +0000 (13:34 -0300)]
Add LoopInterruptedError documentation.
Leandro Lucarella [Wed, 26 Sep 2007 21:15:39 +0000 (18:15 -0300)]
Make Host iterable so it can be used as a sequence when serializing.
Leandro Lucarella [Tue, 25 Sep 2007 17:17:18 +0000 (14:17 -0300)]
Remove old commented code.
Leandro Lucarella [Mon, 24 Sep 2007 20:59:20 +0000 (17:59 -0300)]
Add DhcpHandler.get() and HostHandler.get() to get a single value.
As a show() companion, new get() commands are added to get the information
about a single DHCP parameter or host.
Leandro Lucarella [Mon, 24 Sep 2007 20:58:25 +0000 (17:58 -0300)]
Update TODO list.
Leandro Lucarella [Mon, 24 Sep 2007 20:58:02 +0000 (17:58 -0300)]
Improve error reporting.
Add new exception classes with better description of errors.
Leandro Lucarella [Mon, 24 Sep 2007 20:55:49 +0000 (17:55 -0300)]
Bugfix: close() files after use them so the changes get flushed to disk.
Leandro Lucarella [Mon, 24 Sep 2007 20:55:15 +0000 (17:55 -0300)]
Add a simple error reporting to the protocol.
A new response type is added "ERROR", which indicates a failure in the
command execution. In the future different types of error could be defined.
Leandro Lucarella [Mon, 24 Sep 2007 17:46:23 +0000 (14:46 -0300)]
Add a missing handler decorator to PyminDaemon test.
Leandro Lucarella [Mon, 24 Sep 2007 17:11:33 +0000 (14:11 -0300)]
Add a simple response to all commands.
The response consist of a success indicator ("OK") followed by the response
body lenght. The response body is command-dependant.