Author: justi9
Date: 2007-10-26 09:21:14 -0400 (Fri, 26 Oct 2007)
New Revision: 1165
Modified:
mgmt/cumin/python/cumin/demo.py
mgmt/notes/Todo
Log:
Introduces a parameter to reduce the size of the demo data, since the
server start time was beginning to be annoying.
Modified: mgmt/cumin/python/cumin/demo.py
===================================================================
--- mgmt/cumin/python/cumin/demo.py 2007-10-25 20:58:09 UTC (rev 1164)
+++ mgmt/cumin/python/cumin/demo.py 2007-10-26 13:21:14 UTC (rev 1165)
@@ -8,8 +8,9 @@
return "%s%02i" % (str_, int_)
class DemoData(object):
- def __init__(self, model):
+ def __init__(self, model, mult=5):
self.model = model
+ self.mult = mult
def load(self):
# XXX need some locking in here
@@ -128,38 +129,33 @@
obj.add_config_property(prop)
def load_vhost(self, vhost):
- for name in ("realm0", "realm1", "realm2"):
- realm = Realm(self.model)
- realm.name = name
- vhost.add_realm(realm)
-
for name in ("amq.direct", "amq.fanout",
"amq.topic", "amq.match"):
exchange = Exchange(self.model)
exchange.name = name
vhost.add_exchange(exchange)
- for producer_count in range(10):
+ for producer_count in range(self.mult):
producer = Producer(self.model)
producer.name = fmt("producer", producer_count)
exchange.add_producer(producer)
- for queue_count in range(10):
+ for queue_count in range(self.mult):
queue = Queue(self.model)
queue.name = fmt("queue", queue_count)
vhost.add_queue(queue)
- for consumer_count in range(10):
+ for consumer_count in range(self.mult):
consumer = Consumer(self.model)
consumer.name = fmt("consumer", consumer_count)
queue.add_consumer(consumer)
- for num in range(100, 200, 10):
+ for num in range(100, 100 + self.mult * 10, 10):
client = Client(self.model)
client.address = "192.168.0.%i:16565" % num
vhost.add_client(client)
- for session_count in range(10):
+ for session_count in range(self.mult):
session = Session(self.model)
session.name = fmt("session", session_count)
client.add_session(session)
Modified: mgmt/notes/Todo
===================================================================
--- mgmt/notes/Todo 2007-10-25 20:58:09 UTC (rev 1164)
+++ mgmt/notes/Todo 2007-10-26 13:21:14 UTC (rev 1165)
@@ -65,9 +65,6 @@
* Move q,e to server level (using default vhost)
- * Instead of individual remove links, use checkboxes and a bulk
- remove
-
* Cluster
- Add load balance action
@@ -89,10 +86,6 @@
* Add a frame() accessor to Widget
- * Perhaps make templates do this: <ul>{<li><a
href="">somename</a></li>}</ul>
-
- - or this: <ul>{?href <li><a href="$">Add
User</A></li>}</ul>
-
* Add a sanity check traversal to the widget tree and to the
registered sets of widgets and parameters
@@ -112,5 +105,3 @@
log
* Make the 0 errors, 0 warnings thing more compact; maybe just lights
-
- * Find out how to make pycairo write to an existing file