'Create a user.
Create a user using the parameters supplied in the POST
application/json object. The base parameters are name (string), email
(string, optional), password (string, optional), project_id (string,
optional), enabled (boolean, defaults to true). The user will be
created in the default domain.
This action returns the new user object on success.'

@rest_utils.ajax(data_required=True)
def post(self, request):

    domain = api.keystone.get_default_domain(request)
    new_user = api.keystone.user_create(request, name=request.DATA['name'], email=(request.DATA.get('email') or None), password=request.DATA.get('password'), project=(request.DATA.get('project_id') or None), enabled=True, domain=domain.id)
    return rest_utils.CreatedResponse(('/api/keystone/users/%s' % new_user.id), new_user.to_dict())
