[rhmessaging-commits] rhmessaging commits: r4267 - in mgmt/newdata: rosemary/python/rosemary and 1 other directory.
rhmessaging-commits at lists.jboss.org
rhmessaging-commits at lists.jboss.org
Thu Sep 9 11:07:32 EDT 2010
Author: justi9
Date: 2010-09-09 11:07:32 -0400 (Thu, 09 Sep 2010)
New Revision: 4267
Modified:
mgmt/newdata/cumin/python/cumin/session.py
mgmt/newdata/rosemary/python/rosemary/model.py
Log:
For bzs 630848 and 630855, deploy a workaround for bz 446079. Handle v1 qmf ids specially.
Modified: mgmt/newdata/cumin/python/cumin/session.py
===================================================================
--- mgmt/newdata/cumin/python/cumin/session.py 2010-09-09 13:34:55 UTC (rev 4266)
+++ mgmt/newdata/cumin/python/cumin/session.py 2010-09-09 15:07:32 UTC (rev 4267)
@@ -75,15 +75,34 @@
if not agent:
raise Exception("Agent '%s' is unknown" % obj._qmf_agent_id)
+ if obj._qmf_object_id.isdigit():
+ # Translate v1 object ids
+
+ if obj._class is self.app.model.org_apache_qpid_broker.Queue:
+ # A very special workaround for queue keys
+
+ key = obj.name
+ else:
+ key_args = [getattr(obj, x.name)
+ for x in obj._class._attributes
+ if x.index]
+ key = ",".join(key_args)
+
+ id_args = (obj._class._package._name, obj._class._name.lower(), key)
+
+ object_id = ":".join(id_args)
+ else:
+ object_id = obj._qmf_object_id
+
oid = ObjectId({"_agent_name": obj._qmf_agent_id,
- "_object_name": obj._qmf_object_id})
+ "_object_name": object_id})
qmf_objs = agent.getObjects(_objectId=oid)
try:
qmf_obj = qmf_objs[0]
except IndexError:
- raise Exception("Object '%s' is unknown" % obj._qmf_object_id)
+ raise Exception("Object '%s' is unknown" % object_id)
self.lock.acquire()
try:
Modified: mgmt/newdata/rosemary/python/rosemary/model.py
===================================================================
--- mgmt/newdata/rosemary/python/rosemary/model.py 2010-09-09 13:34:55 UTC (rev 4266)
+++ mgmt/newdata/rosemary/python/rosemary/model.py 2010-09-09 15:07:32 UTC (rev 4267)
@@ -145,6 +145,8 @@
self._title = None
self._object_title = None
+ self._attributes = list()
+
self._headers = list()
self._headers_by_name = dict()
@@ -491,6 +493,8 @@
self.cls = cls
self.name = name
+ self.cls._attributes.append(self)
+
assert not hasattr(self.cls, self.name), self.name
setattr(self.cls, self.name, self)
More information about the rhmessaging-commits
mailing list