def ssh_agent_credentials(registry, xml_parent, data):
 logger = logging.getLogger(__name__)
 entry_xml = XML.SubElement(xml_parent, 'com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper')
 xml_key = 'user'
 user_list = list()
 if ('users' in data):
  user_list += data['users']
  if (len(user_list) > 1):
   entry_xml = XML.SubElement(entry_xml, 'credentialIds')
   xml_key = 'string'
  if ('user' in data):
   logger.warning("Both 'users' and 'user' parameters specified for ssh-agent-credentials. 'users' is used, 'user' is ignored.")
 elif ('user' in data):
  logger.warning("The 'user' param has been deprecated, use the 'users' param instead.")
  user_list.append(data['user'])
 else:
  raise JenkinsJobsException("Missing 'user' or 'users' parameter for ssh-agent-credentials")
 for user in user_list:
  XML.SubElement(entry_xml, xml_key).text = user

def ssh_agent_credentials ( registry , xml_parent , data ) : logger = logging . getLogger ( __name__ ) entry_xml = XML . SubElement ( xml_parent , 'com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper' ) xml_key = 'user' user_list = list ( ) if ( 'users' in data ) : user_list += data [ 'users' ] if ( len ( user_list ) > 1 ) : entry_xml = XML . SubElement ( entry_xml , 'credentialIds' ) xml_key = 'string' if ( 'user' in data ) : logger . warning ( "Both 'users' and 'user' parameters specified for ssh-agent-credentials. 'users' is used, 'user' is ignored." ) elif ( 'user' in data ) : logger . warning ( "The 'user' param has been deprecated, use the 'users' param instead." ) user_list . append ( data [ 'user' ] ) else : raise JenkinsJobsException ( "Missing 'user' or 'users' parameter for ssh-agent-credentials" ) for user in user_list : XML . SubElement ( entry_xml , xml_key ) . text = user
yaml: ssh-agent-credentials sets up the user for the ssh agent plugin for jenkins .