def _create_json(name, description, locked, servers, connection,
    connectionManager):
    """
    Create a JSON to be used for the REST API call
    """
    json = {'connection': connection, 'type': 'ldap', 'name': name,
        'description': description, 'locked': locked}
    if connectionManager is not None:
        json['connectionManager'] = connectionManager
    if servers is not None:
        json['servers'] = servers
    return json
