]> git.llucax.com Git - software/pymin.git/commit
Factored out a lot of common code.
authorLeandro Lucarella <llucarella@integratech.com.ar>
Wed, 3 Oct 2007 21:41:48 +0000 (18:41 -0300)
committerLeandro Lucarella <llucarella@integratech.com.ar>
Wed, 3 Oct 2007 21:41:48 +0000 (18:41 -0300)
commitd6dfd46ed31d985e364b9ea9a404c394f15c2348
tree37dac4be26df789395d27821dec3bff938f59048
parentb0a3c1e4b502098164e16c72fc4937a23c8f5835
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.
16 files changed:
TODO
config.py
services/__init__.py
services/dhcp/__init__.py
services/dns/__init__.py
services/firewall/__init__.py
services/ip/__init__.py
services/ip/templates/device [moved from services/ip/templates/device.command with 100% similarity]
services/ip/templates/ip_add [moved from services/ip/templates/ip_add.command with 100% similarity]
services/ip/templates/ip_del [moved from services/ip/templates/ip_del.command with 100% similarity]
services/ip/templates/ip_flush [moved from services/ip/templates/ip_flush.command with 100% similarity]
services/ip/templates/route_add [moved from services/ip/templates/route_add.command with 100% similarity]
services/ip/templates/route_del [moved from services/ip/templates/route_del.command with 100% similarity]
services/ip/templates/route_flush [moved from services/ip/templates/route_flush.command with 100% similarity]
services/proxy/__init__.py
services/util.py [new file with mode: 0644]