| Branch: | Tag: | Revision:

root / lib @ 4b5e8271

Name Size
  rapi 791 Bytes 1.8 kB 81.2 kB 59.8 kB 19.2 kB 32.1 kB 279.2 kB 41 kB 17.3 kB 7.7 kB 6.6 kB 40.4 kB 3.7 kB 29.7 kB 10.8 kB 13.9 kB 27.7 kB 18.7 kB 34.3 kB 3.1 kB 11.7 kB 7.2 kB 11 kB 58.4 kB 9 kB

Latest revisions

# Date Author Comment
4b5e8271 08/24/2009 03:11 pm Iustin Pop

Remove extra argument from HooksMaster class

The class needs to have a proc attribute/argument to
init in ordet to call its LogWarning method. However, this is available
from the 'lu' attribute, so we can remove this dependency.

Signed-off-by: Iustin Pop <>...

4dce1a83 08/24/2009 02:39 pm Michael Hanselmann

cmdlib: Fix broken QueryInstanceData for plain instances

Fixes this bug:
Failure: command execution error:
Can't compute disk status for instX.domain.tld: No error information

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

a02b89cf 08/21/2009 01:02 pm Guido Trotter

Reinsert simple timers in Mainloop

This time we use the standard python sched module, rather than doing it
all by ourselves. The scheduler in mainloop can be manipulated directly
by callers, to enter new events.

Signed-off-by: Guido Trotter <>...

112d240d 08/20/2009 05:04 pm Guido Trotter

Convert the http server/mainloop to asyncore

We can avoid most of the Mainloop.Run() code if we use asyncore
for delivering I/O events, and just concentrate on what's missing in
asyncore: singnal handling and timers. This way confd can be ported to
use Mainloop as well....

9b739173 08/20/2009 12:28 pm Guido Trotter

Convert daemon.Mainloop to @SignalHandled

This makes the function a lot simpler, since it used to install two
different signal handlers, which are now transparently handled by the
decorator. The code is unindented, but remains unchanged apart from the
part that checks the signal handlers (which is now collapsed toghether)....

451575de 08/20/2009 12:28 pm Guido Trotter

Add a new SignalHandled decorator

This decorator can be used to call a function holding with protection
from a given signal. The function should accept a dict of
utils.SignalHandler, indexed by signal number, and make use of it.

Signed-off-by: Guido Trotter <>...

6c52849e 08/20/2009 11:43 am Guido Trotter

SignalHandler, only accept list of signals

utils.SignalHandler can accept either a list of signals or a single
signal, but it's always called with a list. Removing the single signal

Signed-off-by: Guido Trotter <>
Reviewed-by: Iustin Pop <>

565fe4c4 08/20/2009 11:43 am Guido Trotter

Simplify IO waiting in Mainloop

IO is never unregistered in our current usage, so dropping that
functionality for now. Also putting the poller outside of the Run()
function allows us to avoid the double step of adding tuples to an
_io_wait_add queue and adding them later in the main loop....

577c90a3 08/20/2009 11:43 am Guido Trotter

Remove timers from Mainloop

Timers are currently unused, slightly buggy (for example timeout doesn't
get updated correctly), and unneeded in the current form. Confd will
have timeouts in more simple fashion, and is not a mainloop user

Signed-off-by: Guido Trotter <>...

d8260842 08/18/2009 12:40 pm Michael Hanselmann

rapi: Add /2/instances/[instance_name]/info resource

Signed-off-by: Michael Hanselmann <>
Reviewed-by: Iustin Pop <>

View revisions

Also available in: Atom