summaryrefslogtreecommitdiffstats
path: root/lcm
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2019-07-16 16:24:32 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2019-07-16 16:24:32 +0800
commitc806beecdb2b6e1baa8d5ce07c031ca8bc605dca (patch)
tree982f77eb53a1217a6ac8757615b1f2a10e37c5ba /lcm
parentc2e150a6c3901b664c963b389ee6e9b9e00ed2ab (diff)
Add subscription callback sample api
Change-Id: Iafbe0b52c3afe41deb28076612b94dd20143d332 Issue-ID: VFC-1429 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'lcm')
-rw-r--r--lcm/lcm/samples/urls.py1
-rw-r--r--lcm/lcm/samples/views.py11
2 files changed, 12 insertions, 0 deletions
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<action_type>(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={