'Perform some action on the collection of domains.
This action creates a domain using parameters supplied in the POST
application/json object. The "name" (string) parameter is required,
others are optional: "description" (string) and "enabled" (boolean,
defaults to true).
This method returns the new domain object on success.'

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

    new_domain = api.keystone.domain_create(request, request.DATA['name'], description=request.DATA.get('description'), enabled=request.DATA.get('enabled', True))
    return rest_utils.CreatedResponse(('/api/keystone/domains/%s' % new_domain.id), new_domain.to_dict())
