summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
fbe87af)
Change-Id: Iae9b0c8ee57380dd6fd3655c94e1b7f90e8a03b1
Issue-ID: VFC-779
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns
from django.conf.urls import url
from rest_framework.urlpatterns import format_suffix_patterns
-from lcm.v2.views import VnfGrantView
+from lcm.v2.views import VnfGrantView, VnfNotifyView
urlpatterns = [
url(r'^api/nslcm/v2/grants$', VnfGrantView.as_view()),
urlpatterns = [
url(r'^api/nslcm/v2/grants$', VnfGrantView.as_view()),
+ url(r'^api/nslcm/v2/ns/(?P<vnfmId>[0-9a-zA-Z_-]+)/vnfs/(?P<vnfInstanceId>[0-9a-zA-Z_-]+)/Notify$', VnfNotifyView.as_view()),
]
urlpatterns = format_suffix_patterns(urlpatterns)
]
urlpatterns = format_suffix_patterns(urlpatterns)
logger.error(traceback.format_exc())
logger.error("Exception in VnfGrant: %s", e.message)
return Response(data={'error': e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
logger.error(traceback.format_exc())
logger.error("Exception in VnfGrant: %s", e.message)
return Response(data={'error': e.message}, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
+
+
+class VnfNotifyView(APIView):
+ def post(self, request):
+ logger.debug("VnfNotifyView post: %s" % request.data)
+ return Response(data={}, status=status.HTTP_204_NO_CONTENT)
+
+ def get(self, request):
+ logger.debug("VnfNotifyView get")
+ return Response(data={}, status=status.HTTP_204_NO_CONTENT)