- Nov 26, 2010
-
-
Iustin Pop authored
First change is to replace "range(len(self.NOTIFIERS)))" with self.NOTIFIERS, as range(len(range(N))) ≡ range(N). Sencond change is switch from an explicit indexing to use of zip. Unittests still pass :) Signed-off-by:
Iustin Pop <iustin@google.com> Reviewed-by:
Michael Hanselmann <hansmi@google.com>
-
- Oct 13, 2010
-
-
Michael Hanselmann authored
The base class can contain code useful to other inotify users. As it is “SingleFileEventHandler” can not be used in ganeti-rapi, therefore it'll use its own small inotify handler class based on this base class. Signed-off-by:
Michael Hanselmann <hansmi@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- Jun 30, 2010
-
-
Manuel Franceschini authored
Signed-off-by:
Manuel Franceschini <livewire@google.com> Reviewed-by:
Guido Trotter <ultrotter@google.com>
-
- Jun 01, 2010
-
-
Guido Trotter authored
This makes sure that any unforeseen error raises an exception rather then just increasing a counter. It makes unittest debugging a lot easier. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 25, 2010
-
-
Guido Trotter authored
- Create a new _MyErrorLoggingAsyncNotifier class which registers error counts, rather than logging them - Add an additional ERR notifier to test with - Check that no error was returned, for tests that weren't supposed to - Add a new test case for a callback that's supposed to raise an exception Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
Guido Trotter authored
This mixes AsyncNotifier with GanetiBaseAsyncoreDispatcher to provide an AsyncNotifier which will log errors, rather than bail out. Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-
- May 24, 2010
-
-
Guido Trotter authored
Rather than hardcode that we have two notifiers, and notifier 0 is the terminating one, we abstract this with class level constants. This makes it easier to add more, with different features. The only real change is that now the callback class takes as input the whole test object, rather than just the notified array, to have access to those constants. The rest is just replacing of hardcoded 0s and 1s with self.NOTIFIER_TERM and self.NOTIFIER_NORM, and of notifier_count with len(self.NOTIFIERS). Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Balazs Lecz <leczb@google.com>
-
- May 21, 2010
-
-
Guido Trotter authored
Signed-off-by:
Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
-