Returns True if connection is to be done via a vCenter (no connection is attempted).
    Check to see if the host is responding when connecting directly via an ESXi
    host.

    CLI Example:

    .. code-block:: bash

        salt esxi-host test.ping

def ping():
    '''
    Returns True if connection is to be done via a vCenter (no connection is attempted).
    Check to see if the host is responding when connecting directly via an ESXi
    host.

    CLI Example:

    .. code-block:: bash

        salt esxi-host test.ping
    '''
    if DETAILS.get('esxi_host'):
        return True
    else:
        # TODO Check connection if mechanism is SSPI
        if DETAILS['mechanism'] == 'userpass':
            find_credentials(DETAILS['host'])
            try:
                __salt__['vsphere.system_info'](host=DETAILS['host'],
                                                username=DETAILS['username'],
                                                password=DETAILS['password'])
            except SaltSystemExit as err:
                log.warning(err)
                return False
    return True