Author: justi9
Date: 2010-07-06 13:38:51 -0400 (Tue, 06 Jul 2010)
New Revision: 4073
Modified:
mgmt/newdata/cumin/model/rosemary.xml
mgmt/newdata/rosemary/bin/rosemary-model
mgmt/newdata/rosemary/python/rosemary/model.py
Log:
* Set system titles correctly
* Fix metadata loader to pick up class/title element text
* Improve rosemary-model output
Modified: mgmt/newdata/cumin/model/rosemary.xml
===================================================================
--- mgmt/newdata/cumin/model/rosemary.xml 2010-07-06 15:30:41 UTC (rev 4072)
+++ mgmt/newdata/cumin/model/rosemary.xml 2010-07-06 17:38:51 UTC (rev 4073)
@@ -199,6 +199,12 @@
<package name="com.redhat.sesame">
<class name="Sysimage">
+ <title>System</title>
+
+ <object>
+ <title>%(nodeName)s</title>
+ </object>
+
<property name="uuid">
<title>System ID</title>
</property>
Modified: mgmt/newdata/rosemary/bin/rosemary-model
===================================================================
--- mgmt/newdata/rosemary/bin/rosemary-model 2010-07-06 15:30:41 UTC (rev 4072)
+++ mgmt/newdata/rosemary/bin/rosemary-model 2010-07-06 17:38:51 UTC (rev 4073)
@@ -8,20 +8,20 @@
print "package %s" % pkg._name
for cls in pkg._classes:
- print " class %s" % cls._name
+ print " class %s \"%s\"" % (cls._name, cls._title)
for hdr in cls._headers:
- print " hdr %s %s" % (hdr.name, hdr.title or "")
+ print " hdr %s \"%s\"" % (hdr.name, hdr.title)
for ref in cls._references:
- print " ref %s %s" % (ref.name, ref.title or "")
+ print " ref %s \"%s\"" % (ref.name, ref.title)
for prop in cls._properties:
- print " prop %s %s" % (prop.name, prop.title or
"")
+ print " prop %s \"%s\"" % (prop.name, prop.title)
for stat in cls._statistics:
- print " stat %s %s" % (stat.name, stat.title or
"")
-
+ print " stat %s \"%s\"" % (stat.name, stat.title)
+
for meth in cls._methods:
print " meth %s" % meth.name
Modified: mgmt/newdata/rosemary/python/rosemary/model.py
===================================================================
--- mgmt/newdata/rosemary/python/rosemary/model.py 2010-07-06 15:30:41 UTC (rev 4072)
+++ mgmt/newdata/rosemary/python/rosemary/model.py 2010-07-06 17:38:51 UTC (rev 4073)
@@ -273,7 +273,8 @@
def extend(self, elem):
log.debug("Extending %s", self)
- self._title = elem.find("title")
+ self._title = elem.findtext("title")
+
self._object_title = elem.findtext("object/title")
for child in elem.findall("property"):