def is_current_connection(context, connection):
    """Returns True if connection named name is the default connection"""

    if context.pywbem_server_exists():
        current_connection = context.pywbem_server
    else:
        current_connection = None
    if current_connection and current_connection.name == connection.name:
        return True
    return False