summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-06-11 01:35:40 +0000
committerGerrit Code Review <review@openstack.org>2018-06-11 01:35:40 +0000
commita3da86e5ae28737422b41847330447af6485569a (patch)
tree7f979147578125dea1da0e288ad48cabdb6f939b
parent9984712d4d8ba7aae028336677ea2062f07675ac (diff)
parent71523ec35c7e39d93c115327ed90d44942e596a0 (diff)
Merge "Use convert_mapping_to_xml helper function"
-rw-r--r--jenkins_jobs/modules/project_folder.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/jenkins_jobs/modules/project_folder.py b/jenkins_jobs/modules/project_folder.py
index 72555ac..a16a121 100644
--- a/jenkins_jobs/modules/project_folder.py
+++ b/jenkins_jobs/modules/project_folder.py
@@ -36,6 +36,7 @@ Job template example:
36 36
37import xml.etree.ElementTree as XML 37import xml.etree.ElementTree as XML
38import jenkins_jobs.modules.base 38import jenkins_jobs.modules.base
39from jenkins_jobs.modules.helpers import convert_mapping_to_xml
39 40
40 41
41class Folder(jenkins_jobs.modules.base.Base): 42class Folder(jenkins_jobs.modules.base.Base):
@@ -50,7 +51,11 @@ class Folder(jenkins_jobs.modules.base.Base):
50 XML.SubElement(xml_parent, 'views') 51 XML.SubElement(xml_parent, 'views')
51 attributes = {"class": "hudson.views.DefaultViewsTabBar"} 52 attributes = {"class": "hudson.views.DefaultViewsTabBar"}
52 XML.SubElement(xml_parent, 'viewsTabBar', attrib=attributes) 53 XML.SubElement(xml_parent, 'viewsTabBar', attrib=attributes)
53 XML.SubElement(xml_parent, 'primaryView').text = 'All' 54
54 XML.SubElement(xml_parent, 'healthMetrics') 55 mappings = [
56 ('', 'primaryView', 'All'),
57 ('', 'healthMetrics', ''),
58 ]
59 convert_mapping_to_xml(xml_parent, data, mappings, True)
55 60
56 return xml_parent 61 return xml_parent