* [Cluster-devel] conga/ricci/test Variable.py add_sources_rende ...
@ 2006-06-28 20:20 kupcevic
0 siblings, 0 replies; only message in thread
From: kupcevic @ 2006-06-28 20:20 UTC (permalink / raw)
To: cluster-devel.redhat.com
CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-06-28 20:20:20
Modified files:
ricci/test : Variable.py add_sources_renderer.py
Log message:
storage cgi test: fix add_sources
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/test/Variable.py.diff?cvsroot=cluster&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/test/add_sources_renderer.py.diff?cvsroot=cluster&r1=1.2&r2=1.3
--- conga/ricci/test/Variable.py 2006/04/07 16:42:40 1.2
+++ conga/ricci/test/Variable.py 2006/06/28 20:20:20 1.3
@@ -261,13 +261,13 @@
elem.setAttribute('name', self.__name)
elem.setAttribute('type', self.type())
- l = self.get_value()
- for i in range(len(l)):
- x = l[i]
- e2 = doc.createElement(VARIABLE_TYPE_LISTENTRY)
- e2.setAttribute('value', str(x))
- e2.setAttribute('list_index', str(i))
- elem.appendChild(e2)
+ for x in self.get_value():
+ if self.type() == VARIABLE_TYPE_LIST_XML:
+ elem.appendChild(x)
+ else:
+ e2 = doc.createElement(VARIABLE_TYPE_LISTENTRY)
+ e2.setAttribute('value', str(x))
+ elem.appendChild(e2)
for mod in self.__mods:
elem.setAttribute(str(mod), str(self.__mods[mod]))
return elem
--- conga/ricci/test/add_sources_renderer.py 2006/04/07 16:42:40 1.2
+++ conga/ricci/test/add_sources_renderer.py 2006/06/28 20:20:20 1.3
@@ -125,10 +125,7 @@
func.appendChild(Variable('mapper_type', mapper_type).export_xml(doc))
func.appendChild(Variable('mapper_id', mapper_id).export_xml(doc))
func.appendChild(Variable('mapper_state_ind', mapper_state_ind).export_xml(doc))
- node_l = doc.createElement("list")
- for s in sources:
- node_l.appendChild(s)
- func.appendChild(Variable("bds", node_l).export_xml(doc))
+ func.appendChild(VariableList("bds", sources, {}, VARIABLE_TYPE_LIST_XML).export_xml(doc))
req.appendChild(func)
### submit request ###
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-06-28 20:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-28 20:20 [Cluster-devel] conga/ricci/test Variable.py add_sources_rende kupcevic
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).