def exclusion(registry, xml_parent, data):
 exl = XML.SubElement(xml_parent, 'org.jvnet.hudson.plugins.exclusion.IdAllocator')
 exl.set('plugin', 'Exclusion')
 ids = XML.SubElement(exl, 'ids')
 resources = data.get('resources', [])
 for resource in resources:
  dit = XML.SubElement(ids, 'org.jvnet.hudson.plugins.exclusion.DefaultIdType')
  XML.SubElement(dit, 'name').text = str(resource).upper()

def exclusion ( registry , xml_parent , data ) : exl = XML . SubElement ( xml_parent , 'org.jvnet.hudson.plugins.exclusion.IdAllocator' ) exl . set ( 'plugin' , 'Exclusion' ) ids = XML . SubElement ( exl , 'ids' ) resources = data . get ( 'resources' , [ ] ) for resource in resources : dit = XML . SubElement ( ids , 'org.jvnet.hudson.plugins.exclusion.DefaultIdType' ) XML . SubElement ( dit , 'name' ) . text = str ( resource ) . upper ( )
yaml: exclusion add a resource to use for critical sections to establish a mutex on .