def custom_tools(registry, xml_parent, data):
 base = 'com.cloudbees.jenkins.plugins.customtools'
 wrapper = XML.SubElement(xml_parent, (base + '.CustomToolInstallWrapper'))
 wrapper_tools = XML.SubElement(wrapper, 'selectedTools')
 tools = data.get('tools', [])
 tool_node = (base + '.CustomToolInstallWrapper_-SelectedTool')
 for tool in tools:
  tool_wrapper = XML.SubElement(wrapper_tools, tool_node)
  XML.SubElement(tool_wrapper, 'name').text = str(tool)
 opts = XML.SubElement(wrapper, 'multiconfigOptions')
 skip_install = str(data.get('skip-master-install', 'false'))
 XML.SubElement(opts, 'skipMasterInstallation').text = skip_install
 convert_home = str(data.get('convert-homes-to-upper', 'false'))
 XML.SubElement(wrapper, 'convertHomesToUppercase').text = convert_home

def custom_tools ( registry , xml_parent , data ) : base = 'com.cloudbees.jenkins.plugins.customtools' wrapper = XML . SubElement ( xml_parent , ( base + '.CustomToolInstallWrapper' ) ) wrapper_tools = XML . SubElement ( wrapper , 'selectedTools' ) tools = data . get ( 'tools' , [ ] ) tool_node = ( base + '.CustomToolInstallWrapper_-SelectedTool' ) for tool in tools : tool_wrapper = XML . SubElement ( wrapper_tools , tool_node ) XML . SubElement ( tool_wrapper , 'name' ) . text = str ( tool ) opts = XML . SubElement ( wrapper , 'multiconfigOptions' ) skip_install = str ( data . get ( 'skip-master-install' , 'false' ) ) XML . SubElement ( opts , 'skipMasterInstallation' ) . text = skip_install convert_home = str ( data . get ( 'convert-homes-to-upper' , 'false' ) ) XML . SubElement ( wrapper , 'convertHomesToUppercase' ) . text = convert_home
yaml: custom-tools requires the jenkins :jenkins-wiki:custom tools plugin <custom+tools+plugin> .