]> git.llucax.com Git - software/pymin.git/log
software/pymin.git
16 years agoMake procman.ProcessInfo.error_count a read-only property.
Leandro Lucarella [Wed, 21 May 2008 04:13:47 +0000 (01:13 -0300)]
Make procman.ProcessInfo.error_count a read-only property.

16 years agoMake procman.ProcessManager.restart(p) update pidmap when p was running.
Leandro Lucarella [Tue, 20 May 2008 04:28:13 +0000 (01:28 -0300)]
Make procman.ProcessManager.restart(p) update pidmap when p was running.

pidmap was not updated, so extrange things could happen. A testcase was
added too.

16 years agoprocman.ProcessManager.restart(p) call start(p) when p was not running.
Leandro Lucarella [Tue, 20 May 2008 04:11:57 +0000 (01:11 -0300)]
procman.ProcessManager.restart(p) call start(p) when p was not running.

Otherwise, the namemap and pidmap are not updated.

16 years agoMake some procman.ProcessManager's methods return the ProcessInfo instance.
Leandro Lucarella [Tue, 20 May 2008 02:21:00 +0000 (23:21 -0300)]
Make some procman.ProcessManager's methods return the ProcessInfo instance.

Now registar(), unregister() and once() procman.ProcessManager's methods
returns the ProcessInfo instance just created/removed.

16 years agoMake magic methods of procman.ProcessManager aliases of normal methods.
Leandro Lucarella [Mon, 19 May 2008 03:42:52 +0000 (00:42 -0300)]
Make magic methods of procman.ProcessManager aliases of normal methods.

Add a simple testcase too.

16 years agoMake procman.ProcessInfo.process a read-only property.
Leandro Lucarella [Mon, 19 May 2008 03:24:27 +0000 (00:24 -0300)]
Make procman.ProcessInfo.process a read-only property.

16 years agoMark procman.ProcessInfo.signal as private.
Leandro Lucarella [Mon, 19 May 2008 02:20:24 +0000 (23:20 -0300)]
Mark procman.ProcessInfo.signal as private.

16 years agoMark procman.ProcessInfo.dont_run as private.
Leandro Lucarella [Mon, 19 May 2008 02:19:56 +0000 (23:19 -0300)]
Mark procman.ProcessInfo.dont_run as private.

16 years agoMake procman.ProcessInfo.name a read-only property.
Leandro Lucarella [Mon, 19 May 2008 02:17:28 +0000 (23:17 -0300)]
Make procman.ProcessInfo.name a read-only property.

16 years agoRename procman.ProcessManager.call to once.
Leandro Lucarella [Sat, 17 May 2008 17:11:21 +0000 (14:11 -0300)]
Rename procman.ProcessManager.call to once.

call made not very clear that the process didn't remain registered.

16 years agoCheck for name uniqueness when a new process is added to ProcessManager.
Leandro Lucarella [Sat, 17 May 2008 05:36:46 +0000 (02:36 -0300)]
Check for name uniqueness when a new process is added to ProcessManager.

This check is against both current running processes (namemap) and the
registered processes (services) to ensure that the name is unique and so
process gets overriden.

16 years agoChange ProcessInfo.running to a read-only property.
Leandro Lucarella [Sat, 17 May 2008 05:08:43 +0000 (02:08 -0300)]
Change ProcessInfo.running to a read-only property.

It's dumb to duplicate that state when it can be more reliably obtained
using Popen.poll().

Add some checks to the testcase too.

16 years agoAdd an example of process waiting to testcase.
Leandro Lucarella [Sat, 17 May 2008 04:36:34 +0000 (01:36 -0300)]
Add an example of process waiting to testcase.

This provides an example on how to access to the subprocess.Popen
associated to a procman.ProcessInfo object.

16 years agoCall wait() on the Popen object instead of the ProcessInfo object.
Leandro Lucarella [Sat, 17 May 2008 04:33:39 +0000 (01:33 -0300)]
Call wait() on the Popen object instead of the ProcessInfo object.

This should fix ProcessManager.restart() method, so we add it as a global
function too.

16 years agoImprove procman testcase.
Leandro Lucarella [Sat, 17 May 2008 03:09:52 +0000 (00:09 -0300)]
Improve procman testcase.

16 years agoTidy procman.ProcessInfo constructor related arguments.
Leandro Lucarella [Sat, 17 May 2008 04:30:35 +0000 (01:30 -0300)]
Tidy procman.ProcessInfo constructor related arguments.

16 years agoCatch exception when trying to write /proc/.../ip_forward in the config file.
Leandro Lucarella [Fri, 16 May 2008 21:59:53 +0000 (18:59 -0300)]
Catch exception when trying to write /proc/.../ip_forward in the config file.

This way pymind can be used by non-root users.

16 years agoFix ConfigWriter class documentation.
Leandro Lucarella [Thu, 15 May 2008 00:08:05 +0000 (21:08 -0300)]
Fix ConfigWriter class documentation.

16 years agoRemove imports for unused modules.
Leandro Lucarella [Thu, 15 May 2008 00:07:25 +0000 (21:07 -0300)]
Remove imports for unused modules.

16 years agoUse the "virual deletion" facilities from XxxSubHandler (fixes #23).
Leandro Lucarella [Mon, 12 May 2008 15:45:38 +0000 (12:45 -0300)]
Use the "virual deletion" facilities from XxxSubHandler (fixes #23).

16 years agoGive a nice error if a VPN key can't be readed (refs #22).
Leandro Lucarella [Mon, 12 May 2008 15:32:24 +0000 (12:32 -0300)]
Give a nice error if a VPN key can't be readed (refs #22).

16 years agoRemove duplicated code.
Leandro Lucarella [Mon, 12 May 2008 15:12:00 +0000 (12:12 -0300)]
Remove duplicated code.

16 years agoUse os.makedirs to create directories instead of exec mkdir (refs #22).
Leandro Lucarella [Mon, 12 May 2008 15:29:53 +0000 (12:29 -0300)]
Use os.makedirs to create directories instead of exec mkdir (refs #22).

Also check for errors creating the new diretory.

16 years agoConvert to unicode before encoding to UTF-8 in firewall template (fixes #16).
Leandro Lucarella [Sun, 11 May 2008 16:23:36 +0000 (13:23 -0300)]
Convert to unicode before encoding to UTF-8 in firewall template (fixes #16).

16 years agoDon't override the ListSubHandler.delete() method in HopHandler (fixes #19).
Leandro Lucarella [Sat, 10 May 2008 22:06:04 +0000 (19:06 -0300)]
Don't override the ListSubHandler.delete() method in HopHandler (fixes #19).

16 years agoUse the ContainerSubHandler._attr method as a method (fixes #18).
Leandro Lucarella [Sat, 10 May 2008 04:28:22 +0000 (01:28 -0300)]
Use the ContainerSubHandler._attr method as a method (fixes #18).

16 years agoConvert HopHandler to a ListSubHandler (fixes #15, fixes #12).
Leandro Lucarella [Sat, 10 May 2008 03:55:59 +0000 (00:55 -0300)]
Convert HopHandler to a ListSubHandler (fixes #15, fixes #12).

HopHandler was doing all the dirty job in the old fashion. Now it inherits
from ListSubHandler, adding code only for the custom checks.

16 years agoRemove TODO list (moved to issues tracker).
Leandro Lucarella [Thu, 8 May 2008 01:57:45 +0000 (22:57 -0300)]
Remove TODO list (moved to issues tracker).

16 years agoConvert Rule to Item for validation in firewall service handler.
Leandro Lucarella [Thu, 3 Jan 2008 09:15:28 +0000 (07:15 -0200)]
Convert Rule to Item for validation in firewall service handler.

16 years agoBugfix: use index/key to report ItemAlreadyExistsError.
Leandro Lucarella [Wed, 2 Jan 2008 02:33:14 +0000 (00:33 -0200)]
Bugfix: use index/key to report ItemAlreadyExistsError.

16 years agoRemove unused formencode validators imports.
Leandro Lucarella [Wed, 2 Jan 2008 02:32:22 +0000 (00:32 -0200)]
Remove unused formencode validators imports.

16 years agoAdd __all__ to pymin.item.
Leandro Lucarella [Wed, 2 Jan 2008 02:31:38 +0000 (00:31 -0200)]
Add __all__ to pymin.item.

16 years agoBugfix: replace __ALL__ with the correct __all__.
Leandro Lucarella [Wed, 2 Jan 2008 02:31:24 +0000 (00:31 -0200)]
Bugfix: replace __ALL__ with the correct __all__.

16 years agoMerge branch 'master' of git.llucax.com.ar:/var/lib/git/software/pymin
Leandro Lucarella [Tue, 1 Jan 2008 04:59:59 +0000 (02:59 -0200)]
Merge branch 'master' of git.llucax.com.ar:/var/lib/git/software/pymin

* 'master' of git.llucax.com.ar:/var/lib/git/software/pymin:
  Improve detection of bad arguments errors in dispatcher handlers.

16 years agoPrepare pymindaemon to handle formencode.Invalid exceptions.
Leandro Lucarella [Mon, 31 Dec 2007 19:36:52 +0000 (17:36 -0200)]
Prepare pymindaemon to handle formencode.Invalid exceptions.

Now the pymindaemon can handle 2 kind of exceptions as "expected":
dispatcher.Error and formencode.Invalid.

The documentation and testcases has been improved.

16 years agoImprove description parsing again the TypeError.
Leandro Lucarella [Mon, 31 Dec 2007 18:37:22 +0000 (16:37 -0200)]
Improve  description parsing again the TypeError.

Now the parsing is done in the WrongArgumentsError class, improving the
encapsulation. The parsing is improved too, to detect more errors.

16 years agoImprove detection of bad arguments errors in dispatcher handlers.
Leandro Lucarella [Mon, 31 Dec 2007 17:08:45 +0000 (15:08 -0200)]
Improve detection of bad arguments errors in dispatcher handlers.

The previos scheme was based on parsing TypeError messages, so it was very
poor because spourious errors could have been raised (is a subcall inside
a handler made a wrong function call). The new scheme involves a wrapper
with a dummy function with the same signature as the original handler.
The wrapper then call the dummy function to check the arguments and catches
any TypeError in that NOP call. If an error is catched, it's translated to
a WrongArgumentError, if not, the real hanlder is called with that (now
knonw to be right) arguments.

Testcases were updated and extended too.

16 years agoImprove detection of bad arguments errors in dispatcher handlers.
Leandro Lucarella [Mon, 31 Dec 2007 16:38:12 +0000 (14:38 -0200)]
Improve detection of bad arguments errors in dispatcher handlers.

The previos scheme was based on parsing TypeError messages, so it was very
poor because spourious errors could have been raised (is a subcall inside
a handler made a wrong function call). The new scheme involves a wrapper
with a dummy function with the same signature as the original handler.
The wrapper then call the dummy function to check the arguments and catches
any TypeError in that NOP call. If an error is catched, it's translated to
a WrongArgumentError, if not, the real hanlder is called with that (now
knonw to be right) arguments.

Testcases were updated and extended too.

16 years agoBugfix: don't call the handler twice.
Leandro Lucarella [Mon, 31 Dec 2007 15:32:02 +0000 (13:32 -0200)]
Bugfix: don't call the handler twice.

16 years agoMerge branch 'master' of git.llucax.com.ar:/var/lib/git/software/pymin
Leandro Lucarella [Mon, 31 Dec 2007 01:59:30 +0000 (23:59 -0200)]
Merge branch 'master' of git.llucax.com.ar:/var/lib/git/software/pymin

* 'master' of git.llucax.com.ar:/var/lib/git/software/pymin:
  Move handler decorator help checking to avoid an extra level in the stack trace.

16 years agoMove handler decorator help checking to avoid an extra level in the stack trace.
Leandro Lucarella [Sun, 30 Dec 2007 23:17:56 +0000 (21:17 -0200)]
Move handler decorator help checking to avoid an extra level in the stack trace.

16 years agoAdd an INSTALL file, at least to keep track of the dependencies.
Leandro Lucarella [Sat, 29 Dec 2007 05:41:37 +0000 (02:41 -0300)]
Add an INSTALL file, at least to keep track of the dependencies.

16 years agoBugfix: fix pymin.serializer test case import.
Leandro Lucarella [Sat, 29 Dec 2007 05:40:17 +0000 (02:40 -0300)]
Bugfix: fix pymin.serializer test case import.

16 years agoAdd pymin.item module.
Leandro Lucarella [Sat, 29 Dec 2007 05:30:36 +0000 (02:30 -0300)]
Add pymin.item module.

16 years agoAdd pymin.validatedclass module.
Leandro Lucarella [Sat, 29 Dec 2007 05:20:25 +0000 (02:20 -0300)]
Add pymin.validatedclass module.

16 years agoAdd logging support to procman module.
Leandro Lucarella [Thu, 27 Dec 2007 15:53:47 +0000 (12:53 -0300)]
Add logging support to procman module.

16 years agoMerge branch 'procman'
Leandro Lucarella [Thu, 27 Dec 2007 15:53:10 +0000 (12:53 -0300)]
Merge branch 'procman'

* procman:
  Bugfix: set the catched signal to None *after* calling the signal handler.
  Improve vrrp restorable defaults readability.
  Use procman.restart() to restart vrrp service.
  Add ProcessManager.restart() method to block until the restart is done.
  Use procman to manage vrrp service.
  Bugfix: raise a KeyError, don't return it.
  Bugfix: call ProcessInfo.stop() in the right way (without parameters).
  Bugfix: use self instead of an unbinded pi object when killing a process.
  Remove unused ProcessInfo.last_return attribute.
  Bugfix: use correct module for simbol ECHILD.
  Handle SIGCHLD in PyminDaemon.
  Add a global ProcessManager instance and functions to procman module.
  Implement timer in PyminDaemon using EventLoop signal handling.
  Support general signals handling in EventLoop.
  Replace time.sleep() for signal.pause() in the ProcessManager test.
  Improve ProcessManager to manage registerable named services.
  Add a ProcessManager class to manage processes.
  Improve ProcessManager to manage registerable named services.
  Add a ProcessManager class to manage processes.

Conflicts:

pymin/eventloop.py
pymin/pymindaemon.py
pymin/services/vrrp/__init__.py

16 years agoMerge branch 'master' of git.llucax.com.ar:/var/lib/git/software/pymin into logging
Leandro Lucarella [Mon, 24 Dec 2007 05:24:38 +0000 (02:24 -0300)]
Merge branch 'master' of git.llucax.com.ar:/var/lib/git/software/pymin into logging

* 'master' of git.llucax.com.ar:/var/lib/git/software/pymin:
  Add protocol specification of firewall and nat commands.
  Added the protocol specification.
  Root class inyects ip forwrading in constructor.
  Added route handling capabilities and service restarting
  Fix so that when a device is brought back up, the routes
  Added support to hook services to IPHandler.
  Support for inactive devices added in IPHandler.

Conflicts:

pymin/services/ip/__init__.py

16 years agoMerge branch 'master' of git.llucax.com.ar:/var/lib/git/software/pymin into procman
Leandro Lucarella [Mon, 24 Dec 2007 05:07:33 +0000 (02:07 -0300)]
Merge branch 'master' of git.llucax.com.ar:/var/lib/git/software/pymin into procman

* 'master' of git.llucax.com.ar:/var/lib/git/software/pymin:
  Add protocol specification of firewall and nat commands.
  Added the protocol specification.
  Root class inyects ip forwrading in constructor.
  Added route handling capabilities and service restarting
  Fix so that when a device is brought back up, the routes
  Added support to hook services to IPHandler.
  Support for inactive devices added in IPHandler.
  Remove ReturnNot0Error, use subprocess.check_call instead.
  qos implementation (working)
  qos template fixes

16 years agoMerge branch 'master' of git.llucax.com.ar:/var/lib/git/software/pymin
Leandro Lucarella [Wed, 19 Dec 2007 17:41:39 +0000 (14:41 -0300)]
Merge branch 'master' of git.llucax.com.ar:/var/lib/git/software/pymin

16 years agoMerge commit 'llucax/logging' into logging
Leandro Lucarella [Wed, 19 Dec 2007 17:37:43 +0000 (14:37 -0300)]
Merge commit 'llucax/logging' into logging

Conflicts:

config.py
pymin/pymindaemon.py

16 years agoMerge commit 'scm/master'
Leandro Lucarella [Wed, 19 Dec 2007 17:28:28 +0000 (14:28 -0300)]
Merge commit 'scm/master'

16 years agoMerge branch 'master' of baryon.com.ar:/home/luca/pymin
Leandro Lucarella [Wed, 19 Dec 2007 17:24:10 +0000 (14:24 -0300)]
Merge branch 'master' of baryon.com.ar:/home/luca/pymin

Conflicts:

config.py

16 years agoAdd protocol specification of firewall and nat commands.
Leandro Lucarella [Wed, 19 Dec 2007 17:22:43 +0000 (14:22 -0300)]
Add protocol specification of firewall and nat commands.

16 years agoAdded the protocol specification.
Nicolas Emiliani [Mon, 17 Dec 2007 19:30:18 +0000 (16:30 -0300)]
Added the protocol specification.

17 years agoRoot class inyects ip forwrading in constructor.
Nicolas Emiliani [Wed, 5 Dec 2007 15:57:36 +0000 (12:57 -0300)]
Root class inyects ip forwrading in constructor.

17 years agoAdded route handling capabilities and service restarting
or3st3s [Mon, 3 Dec 2007 18:11:12 +0000 (18:11 +0000)]
Added route handling capabilities and service restarting
upon device events such as up and down.

17 years agoFix so that when a device is brought back up, the routes
or3st3s [Sat, 1 Dec 2007 12:10:50 +0000 (12:10 +0000)]
Fix so that when a device is brought back up, the routes
asociated to it get brought up too.

17 years agoAdded support to hook services to IPHandler.
Nicolas Emiliani [Mon, 26 Nov 2007 12:52:34 +0000 (09:52 -0300)]
Added support to hook services to IPHandler.

A service that has to be restarted after detection
of a device bring up, can be hooked to do so by calling
the method device_up_hook. The service while be added to
the hook list only in case it has the attributes start
and stop.

17 years agoSupport for inactive devices added in IPHandler.
or3st3s [Sun, 25 Nov 2007 11:03:37 +0000 (11:03 +0000)]
Support for inactive devices added in IPHandler.

17 years agoAdd logging to pymin.eventloop module.
Leandro Lucarella [Sun, 18 Nov 2007 18:56:21 +0000 (15:56 -0300)]
Add logging to pymin.eventloop module.

17 years agoBugfix: set the catched signal to None *after* calling the signal handler.
Leandro Lucarella [Sun, 18 Nov 2007 18:16:26 +0000 (15:16 -0300)]
Bugfix: set the catched signal to None *after* calling the signal handler.

17 years agoImprove vrrp restorable defaults readability.
Leandro Lucarella [Sun, 18 Nov 2007 18:13:36 +0000 (15:13 -0300)]
Improve vrrp restorable defaults readability.

17 years agoUse procman.restart() to restart vrrp service.
Leandro Lucarella [Sun, 18 Nov 2007 18:12:57 +0000 (15:12 -0300)]
Use procman.restart() to restart vrrp service.

17 years agoAdd ProcessManager.restart() method to block until the restart is done.
Leandro Lucarella [Sun, 18 Nov 2007 18:12:07 +0000 (15:12 -0300)]
Add ProcessManager.restart() method to block until the restart is done.

17 years agoAdd logging to pymin.services.vrrp module.
Leandro Lucarella [Sun, 18 Nov 2007 05:53:14 +0000 (02:53 -0300)]
Add logging to pymin.services.vrrp module.

17 years agoAdd logging to pymin.services.vpn module.
Leandro Lucarella [Sun, 18 Nov 2007 05:53:06 +0000 (02:53 -0300)]
Add logging to pymin.services.vpn module.

17 years agoAdd logging to pymin.services.proxy module.
Leandro Lucarella [Sun, 18 Nov 2007 05:52:58 +0000 (02:52 -0300)]
Add logging to pymin.services.proxy module.

17 years agoAdd logging to pymin.services.ppp module.
Leandro Lucarella [Sun, 18 Nov 2007 05:52:52 +0000 (02:52 -0300)]
Add logging to pymin.services.ppp module.

17 years agoAdd logging to pymin.services.nat module.
Leandro Lucarella [Sun, 18 Nov 2007 05:52:41 +0000 (02:52 -0300)]
Add logging to pymin.services.nat module.

17 years agoAdd logging to pymin.services.ip module.
Leandro Lucarella [Sun, 18 Nov 2007 05:52:33 +0000 (02:52 -0300)]
Add logging to pymin.services.ip module.

17 years agoAdd logging to pymin.services.firewall module.
Leandro Lucarella [Sun, 18 Nov 2007 05:52:22 +0000 (02:52 -0300)]
Add logging to pymin.services.firewall module.

17 years agoAdd logging to pymin.services.dns module.
Leandro Lucarella [Sun, 18 Nov 2007 05:52:13 +0000 (02:52 -0300)]
Add logging to pymin.services.dns module.

17 years agoAdd logging to pymin.services.dhcp module.
Leandro Lucarella [Sun, 18 Nov 2007 05:52:03 +0000 (02:52 -0300)]
Add logging to pymin.services.dhcp module.

17 years agoAdd logging to pymin.services.util module.
Leandro Lucarella [Sun, 18 Nov 2007 05:51:10 +0000 (02:51 -0300)]
Add logging to pymin.services.util module.

17 years agoAdd logging to pymin.dispatcher module.
Leandro Lucarella [Sat, 17 Nov 2007 22:40:13 +0000 (19:40 -0300)]
Add logging to pymin.dispatcher module.

17 years agoImprove logging format.
Leandro Lucarella [Sat, 17 Nov 2007 22:39:52 +0000 (19:39 -0300)]
Improve logging format.

17 years agoUse %r instead of %s for logging.
Leandro Lucarella [Sat, 17 Nov 2007 22:31:32 +0000 (19:31 -0300)]
Use %r instead of %s for logging.

17 years agoAdd basic initial logging support.
Leandro Lucarella [Fri, 16 Nov 2007 19:50:12 +0000 (16:50 -0300)]
Add basic initial logging support.

17 years agoqos implementation (working)
Federico Cuello [Tue, 13 Nov 2007 02:06:03 +0000 (23:06 -0300)]
qos implementation (working)

17 years agoqos template fixes
Federico Cuello [Tue, 13 Nov 2007 01:16:19 +0000 (22:16 -0300)]
qos template fixes

17 years agoRemove ReturnNot0Error, use subprocess.check_call instead.
Leandro Lucarella [Sun, 18 Nov 2007 02:38:21 +0000 (23:38 -0300)]
Remove ReturnNot0Error, use subprocess.check_call instead.

17 years agoAdd basic initial logging support.
Leandro Lucarella [Fri, 16 Nov 2007 19:50:12 +0000 (16:50 -0300)]
Add basic initial logging support.

17 years agoUse procman to manage vrrp service.
Leandro Lucarella [Thu, 15 Nov 2007 12:59:40 +0000 (09:59 -0300)]
Use procman to manage vrrp service.

17 years agoBugfix: raise a KeyError, don't return it.
Leandro Lucarella [Thu, 15 Nov 2007 12:58:57 +0000 (09:58 -0300)]
Bugfix: raise a KeyError, don't return it.

17 years agoBugfix: call ProcessInfo.stop() in the right way (without parameters).
Leandro Lucarella [Thu, 15 Nov 2007 12:58:20 +0000 (09:58 -0300)]
Bugfix: call ProcessInfo.stop() in the right way (without parameters).

17 years agoBugfix: use self instead of an unbinded pi object when killing a process.
Leandro Lucarella [Thu, 15 Nov 2007 12:57:34 +0000 (09:57 -0300)]
Bugfix: use self instead of an unbinded pi object when killing a process.

17 years agoMerge commit 'scm/master'
Leandro Lucarella [Wed, 14 Nov 2007 15:27:43 +0000 (12:27 -0300)]
Merge commit 'scm/master'

17 years agoMerge commit 'nico-baryon/master'
Leandro Lucarella [Wed, 14 Nov 2007 15:26:39 +0000 (12:26 -0300)]
Merge commit 'nico-baryon/master'

17 years agoRemove unused ProcessInfo.last_return attribute.
Leandro Lucarella [Tue, 13 Nov 2007 19:25:45 +0000 (16:25 -0300)]
Remove unused ProcessInfo.last_return attribute.

17 years agoBugfix: use correct module for simbol ECHILD.
Leandro Lucarella [Tue, 13 Nov 2007 18:24:17 +0000 (15:24 -0300)]
Bugfix: use correct module for simbol ECHILD.

17 years agoHandle SIGCHLD in PyminDaemon.
Leandro Lucarella [Tue, 13 Nov 2007 18:22:10 +0000 (15:22 -0300)]
Handle SIGCHLD in PyminDaemon.

17 years agoAdd a global ProcessManager instance and functions to procman module.
Leandro Lucarella [Tue, 13 Nov 2007 17:18:53 +0000 (14:18 -0300)]
Add a global ProcessManager instance and functions to procman module.

17 years agoMerge branch 'procman' of baryon.com.ar:/home/luca/pymin into procman
Leandro Lucarella [Tue, 13 Nov 2007 03:54:06 +0000 (00:54 -0300)]
Merge branch 'procman' of baryon.com.ar:/home/luca/pymin into procman

Conflicts:

pymin/procman.py

nothing to commit (working directory clean)

17 years agoImplement timer in PyminDaemon using EventLoop signal handling.
Leandro Lucarella [Tue, 13 Nov 2007 02:42:59 +0000 (23:42 -0300)]
Implement timer in PyminDaemon using EventLoop signal handling.

17 years agoSupport general signals handling in EventLoop.
Leandro Lucarella [Tue, 13 Nov 2007 00:58:04 +0000 (21:58 -0300)]
Support general signals handling in EventLoop.

Now the EventLoop has no support for timers but have general signals
handling support. Signals to be handled can be specified in the constructor
or by calling set_signal() method. Stop handling a particular type of
signals is supported too by calling to the unset_signal() method.

A callback can be specified for each type of signal, or all signal handling
can be done in the handle_signal() method, if overriden by EventLoop
subclasses.

17 years agoReplace time.sleep() for signal.pause() in the ProcessManager test.
Leandro Lucarella [Mon, 12 Nov 2007 23:51:31 +0000 (20:51 -0300)]
Replace time.sleep() for signal.pause() in the ProcessManager test.

17 years agoImprove ProcessManager to manage registerable named services.
Leandro Lucarella [Mon, 12 Nov 2007 20:01:06 +0000 (17:01 -0300)]
Improve ProcessManager to manage registerable named services.

Besides call, now ProcessManager can register (and unregister) named
services. Once registered, they can be started and stopped (or killed if
multiple stop are issued before the process actually dies) at will, just
like regular processes. Processes can be signaled too.

Documentation is still missing.

17 years agoAdd a ProcessManager class to manage processes.
Leandro Lucarella [Mon, 12 Nov 2007 17:00:26 +0000 (14:00 -0300)]
Add a ProcessManager class to manage processes.

17 years agoFix config file and DEBUG settings for testing.
Leandro Lucarella [Tue, 13 Nov 2007 02:58:27 +0000 (23:58 -0300)]
Fix config file and DEBUG settings for testing.