def sonatype_clm(registry, xml_parent, data):
 clm = XML.SubElement(xml_parent, 'com.sonatype.insight.ci.hudson.PreBuildScan')
 clm.set('plugin', 'sonatype-clm-ci')
 SUPPORTED_VALUES = ['list', 'manual']
 SUPPORTED_STAGES = ['build', 'stage-release', 'release', 'operate']
 application_select = XML.SubElement(clm, 'applicationSelectType')
 application_mappings = [('value', 'value', 'list', SUPPORTED_VALUES), ('application-name', 'applicationId', None)]
 convert_mapping_to_xml(application_select, data, application_mappings, fail_required=True)
 path = XML.SubElement(clm, 'pathConfig')
 path_mappings = [('scan-targets', 'scanTargets', ''), ('module-excludes', 'moduleExcludes', ''), ('advanced-options', 'scanProperties', '')]
 convert_mapping_to_xml(path, data, path_mappings, fail_required=True)
 mappings = [('fail-on-clm-server-failure', 'failOnClmServerFailures', False), ('stage', 'stageId', 'build', SUPPORTED_STAGES), ('username', 'username', ''), ('password', 'password', '')]
 convert_mapping_to_xml(clm, data, mappings, fail_required=True)

def sonatype_clm ( registry , xml_parent , data ) : clm = XML . SubElement ( xml_parent , 'com.sonatype.insight.ci.hudson.PreBuildScan' ) clm . set ( 'plugin' , 'sonatype-clm-ci' ) SUPPORTED_VALUES = [ 'list' , 'manual' ] SUPPORTED_STAGES = [ 'build' , 'stage-release' , 'release' , 'operate' ] application_select = XML . SubElement ( clm , 'applicationSelectType' ) application_mappings = [ ( 'value' , 'value' , 'list' , SUPPORTED_VALUES ) , ( 'application-name' , 'applicationId' , None ) ] convert_mapping_to_xml ( application_select , data , application_mappings , fail_required = True ) path = XML . SubElement ( clm , 'pathConfig' ) path_mappings = [ ( 'scan-targets' , 'scanTargets' , '' ) , ( 'module-excludes' , 'moduleExcludes' , '' ) , ( 'advanced-options' , 'scanProperties' , '' ) ] convert_mapping_to_xml ( path , data , path_mappings , fail_required = True ) mappings = [ ( 'fail-on-clm-server-failure' , 'failOnClmServerFailures' , False ) , ( 'stage' , 'stageId' , 'build' , SUPPORTED_STAGES ) , ( 'username' , 'username' , '' ) , ( 'password' , 'password' , '' ) ] convert_mapping_to_xml ( clm , data , mappings , fail_required = True )
yaml: sonatype-clm requires the jenkins :jenkins-wiki:sonatype clm plugin <sonatype+clm+%28formerly+insight+for+ci%29> .