Clears community details.

def _clear_community_details(community_details):

    '''
    Clears community details.
    '''

    for key in ['acl', 'mode']:
        _str_elem(community_details, key)

    _mode = community_details.get['mode'] = community_details.get('mode').lower()

    if _mode in _COMMUNITY_MODE_MAP.keys():
        community_details['mode'] = _COMMUNITY_MODE_MAP.get(_mode)

    if community_details['mode'] not in ['ro', 'rw']:
        community_details['mode'] = 'ro'  # default is read-only

    return community_details