def ping_ip(name):
    '\n    Function to ping name.\n    return the result of ping\n\n    Parameters\n    ----------\n    name : string\n        This variable is IP address\n\n    Returns\n    -------\n    status : String\n        Status result : UP or DOWN\n\n    '
    try:
        name = str(name).strip('[]')
        name = str(name).strip("''")
        hostname = format(name)
        response = os.system((('ping -c 1 ' + hostname) + ' > /dev/null 2>&1'))
        if (response == 0):
            return 'UP'
        else:
            return 'DOWN'
    except requests.ConnectionError:
        return 'DOWN'
    return 'DOWN'
Function to ping name.
return the result of ping

Parameters
----------
name : string
    This variable is IP address

Returns
-------
status : String
    Status result : UP or DOWN
def ping_ip(name):
    '\n    Function to ping name.\n    return the result of ping\n\n    Parameters\n    ----------\n    name : string\n        This variable is IP address\n\n    Returns\n    -------\n    status : String\n        Status result : UP or DOWN\n\n    '
    try:
        name = str(name).strip('[]')
        name = str(name).strip()
        hostname = format(name)
        response = os.system((('ping -c 1 ' + hostname) + ' > /dev/null 2>&1'))
        if (response == 0):
            return 'UP'
        else:
            return 'DOWN'
    except requests.ConnectionError:
        return 'DOWN'
    return 'DOWN'