def port_allocator(registry, xml_parent, data):
 pa = XML.SubElement(xml_parent, 'org.jvnet.hudson.plugins.port__allocator.PortAllocator')
 ports = XML.SubElement(pa, 'ports')
 names = data.get('names')
 if (not names):
  logger = logging.getLogger(__name__)
  logger.warning('port_allocator name is deprecated, use a names list  instead')
  names = [data['name']]
 for name in names:
  dpt = XML.SubElement(ports, 'org.jvnet.hudson.plugins.port__allocator.DefaultPortType')
  XML.SubElement(dpt, 'name').text = name

def port_allocator ( registry , xml_parent , data ) : pa = XML . SubElement ( xml_parent , 'org.jvnet.hudson.plugins.port__allocator.PortAllocator' ) ports = XML . SubElement ( pa , 'ports' ) names = data . get ( 'names' ) if ( not names ) : logger = logging . getLogger ( __name__ ) logger . warning ( 'port_allocator name is deprecated, use a names list  instead' ) names = [ data [ 'name' ] ] for name in names : dpt = XML . SubElement ( ports , 'org.jvnet.hudson.plugins.port__allocator.DefaultPortType' ) XML . SubElement ( dpt , 'name' ) . text = name
yaml: port-allocator assign unique tcp port numbers requires the jenkins :jenkins-wiki:port allocator plugin <port+allocator+plugin> .