code: def _connect():
      '''
      Return server object used to interact with Jenkins.
  
      :return: server object used to interact with Jenkins
      '''
      jenkins_url = __salt__['config.get']('jenkins.url') or \
          __salt__['config.get']('jenkins:url') or \
          __salt__['pillar.get']('jenkins.url')
  
      jenkins_user = __salt__['config.get']('jenkins.user') or \
          __salt__['config.get']('jenkins:user') or \
          __salt__['pillar.get']('jenkins.user')
  
      jenkins_password = __salt__['config.get']('jenkins.password') or \
          __salt__['config.get']('jenkins:password') or \
          __salt__['pillar.get']('jenkins.password')
  
      if not jenkins_url:
          raise SaltInvocationError('No Jenkins URL found.')
  
      return jenkins.Jenkins(jenkins_url,
                             username=jenkins_user,
                             password=jenkins_passwordf _connect():
      '''
      Return server object used to interact with Jenkins.
  
      :return: server object used to interact with Jenkins
      '''
      jenkins_url = __salt__['config.get']('jenkins.url') or \
          __salt__['config.get']('jenkins:url') or \
          __salt__['pillar.get']('jenkins.url')
  
      jenkins_user = __salt__['config.get']('jenkins.user') or \
          __salt__['config.get']('jenkins:user') or \
          __salt__['pillar.get']('jenkins.user')
  
      jenkins_password = __salt__['config.get']('jenkins.password') or \
          __salt__['config.get']('jenkins:password') or \
          __salt__['pillar.get']('jenkins.password')
  
      if not jenkins_url:
          raise SaltInvocationError('No Jenkins URL found.')
  
      return jenkins.Jenkins(jenkins_url,
                             username=jenkins_user,
                             password=jenkins_password)
docs: Return server object used to interact with Jenkins.
  
      :return: server object used to interact with Jenkins