[rhmessaging-commits] rhmessaging commits: r1449 - mgmt/cumin/python/cumin.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Mon Dec 10 12:05:07 EST 2007
Author: justi9
Date: 2007-12-10 12:05:06 -0500 (Mon, 10 Dec 2007)
New Revision: 1449
Modified:
mgmt/cumin/python/cumin/formats.py
Log:
For demo purposes, add some random status changes.
Modified: mgmt/cumin/python/cumin/formats.py
===================================================================
--- mgmt/cumin/python/cumin/formats.py 2007-12-10 16:57:09 UTC (rev 1448)
+++ mgmt/cumin/python/cumin/formats.py 2007-12-10 17:05:06 UTC (rev 1449)
@@ -1,4 +1,5 @@
from datetime import datetime
+from random import random
from util import *
@@ -81,8 +82,16 @@
return "<div class=\"statuslight %s\">%s</div>" % (class_, number)
def fmt_ostatus(object):
- return fmt_status(0, 0)
+ errs, warns = 0, 0
+ if random() < 0.075:
+ errs = 1
+
+ if random() < 0.10:
+ warns = 1
+
+ return fmt_status(errs, warns)
+
def fmt_none():
return "<span class=\"none\">None</span>"
More information about the rhmessaging-commits
mailing list