code: def find_credentials(host):
      '''
      Cycle through all the possible credentials and return the first one that
      works.
      '''
      user_names = [__pillar__['proxy'].get('username', 'root')]
      passwords = __pillar__['proxy']['passwords']
      for user in user_names:
          for password in passwords:
              try:
                  # Try to authenticate with the given user/password combination
                  ret = __salt__['vsphere.system_info'](host=host,
                                                        username=user,
                                                        password=password)
              except SaltSystemExit:
                  # If we can't authenticate, continue on to try the next password.
                  continue
              # If we have data returned from above, we've successfully authenticated.
              if ret:
                  DETAILS['username'] = user
                  DETAILS['password'] = password
                  return user, password
      # We've reached the end of the list without successfully authenticating.
      raise SaltSystemExit('Cannot complete login due to an incorrect user name or password.'f find_credentials(host):
      '''
      Cycle through all the possible credentials and return the first one that
      works.
      '''
      user_names = [__pillar__['proxy'].get('username', 'root')]
      passwords = __pillar__['proxy']['passwords']
      for user in user_names:
          for password in passwords:
              try:
                  # Try to authenticate with the given user/password combination
                  ret = __salt__['vsphere.system_info'](host=host,
                                                        username=user,
                                                        password=password)
              except SaltSystemExit:
                  # If we can't authenticate, continue on to try the next password.
                  continue
              # If we have data returned from above, we've successfully authenticated.
              if ret:
                  DETAILS['username'] = user
                  DETAILS['password'] = password
                  return user, password
      # We've reached the end of the list without successfully authenticating.
      raise SaltSystemExit('Cannot complete login due to an incorrect user name or password.')
docs: Cycle through all the possible credentials and return the first one that
      works.