def post(self, request, *args, **kwargs): try: log.info("POST Datacenter") if not request.DATA.get('dc'): raise exceptions.InvalidInputException() dc = facade.save_dc(request.DATA.get('dc')) dc_serializer = DCSerializer(dc) data = dict() data['dc'] = dc_serializer.data return Response(data, status=status.HTTP_201_CREATED) except Exception, e: raise api_exceptions.NetworkAPIException(e)