Create a connection resource

def create_connector_resource(name, server=None, **kwargs):
    '''
    Create a connection resource
    '''
    defaults = {
        'description': '',
        'enabled': True,
        'id': name,
        'poolName': '',
        'objectType': 'user',
        'target': 'server'
    }

    # Data = defaults + merge kwargs + poolname
    data = defaults
    data.update(kwargs)

    if not data['poolName']:
        raise CommandExecutionError('No pool name!')

    # Fix for lowercase vs camelCase naming differences
    for key, value in list(data.items()):
        del data[key]
        data[key.lower()] = value

    return _create_element(name, 'resources/connector-resource', data, server)