From c806beecdb2b6e1baa8d5ce07c031ca8bc605dca Mon Sep 17 00:00:00 2001 From: fujinhua Date: Tue, 16 Jul 2019 16:24:32 +0800 Subject: Add subscription callback sample api Change-Id: Iafbe0b52c3afe41deb28076612b94dd20143d332 Issue-ID: VFC-1429 Signed-off-by: fujinhua --- lcm/lcm/samples/urls.py | 1 + lcm/lcm/samples/views.py | 11 +++++++++++ 2 files changed, 12 insertions(+) (limited to 'lcm') diff --git a/lcm/lcm/samples/urls.py b/lcm/lcm/samples/urls.py index a8b37c39..ee9d75c4 100644 --- a/lcm/lcm/samples/urls.py +++ b/lcm/lcm/samples/urls.py @@ -18,5 +18,6 @@ from lcm.samples import views urlpatterns = [ url(r'^api/vnflcm/v1/resources/(?P(inst|term)+)$', views.ResourceList.as_view()), url(r'^samples/$', views.SampleList.as_view()), + url(r'^api/vnflcm/v1/callback_sample$', views.CallbackSample.as_view()), url(r'^api/vnflcm/v1/health_check$', views.HealthCheckView.as_view()) ] diff --git a/lcm/lcm/samples/views.py b/lcm/lcm/samples/views.py index 86b4b8ab..b82c5558 100644 --- a/lcm/lcm/samples/views.py +++ b/lcm/lcm/samples/views.py @@ -33,6 +33,17 @@ class SampleList(APIView): return Response({"status": "active"}) +class CallbackSample(APIView): + @swagger_auto_schema( + responses={ + status.HTTP_204_NO_CONTENT: 'Successfully' + } + ) + def get(self, request, format=None): + logger.debug("Callback Sample") + return Response(status=status.HTTP_204_NO_CONTENT) + + class ResourceList(APIView): @swagger_auto_schema( responses={ -- cgit 1.2.3-korg