aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lcm/v2/__init__.py13
-rw-r--r--lcm/v2/serializers.py13
-rw-r--r--lcm/v2/urls.py23
-rw-r--r--lcm/v2/views.py26
4 files changed, 75 insertions, 0 deletions
diff --git a/lcm/v2/__init__.py b/lcm/v2/__init__.py
new file mode 100644
index 00000000..342c2a8c
--- /dev/null
+++ b/lcm/v2/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2018 ZTE Corporation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/lcm/v2/serializers.py b/lcm/v2/serializers.py
new file mode 100644
index 00000000..342c2a8c
--- /dev/null
+++ b/lcm/v2/serializers.py
@@ -0,0 +1,13 @@
+# Copyright 2018 ZTE Corporation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/lcm/v2/urls.py b/lcm/v2/urls.py
new file mode 100644
index 00000000..b901e880
--- /dev/null
+++ b/lcm/v2/urls.py
@@ -0,0 +1,23 @@
+# Copyright 2016 ZTE Corporation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+from django.conf.urls import url
+from rest_framework.urlpatterns import format_suffix_patterns
+
+from lcm.v2.views import VnfInstancesView
+
+urlpatterns = [
+ url(r'^api/nslcm/v2/vnf_instances$', VnfInstancesView.as_view()),
+]
+
+urlpatterns = format_suffix_patterns(urlpatterns)
diff --git a/lcm/v2/views.py b/lcm/v2/views.py
new file mode 100644
index 00000000..d142176f
--- /dev/null
+++ b/lcm/v2/views.py
@@ -0,0 +1,26 @@
+# Copyright 2016 ZTE Corporation.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+import logging
+
+from rest_framework.response import Response
+from rest_framework.views import APIView
+from rest_framework import status
+
+logger = logging.getLogger(__name__)
+
+
+class VnfInstancesView(APIView):
+ def post(self, request):
+ logger.debug("VnfInstancesView Post: %s" % request.data)
+ return Response(data={}, status=status.HTTP_202_ACCEPTED)