Move heal ns view as single
[vfc/nfvo/lcm.git] / lcm / ns / urls.py
1 # Copyright 2016-2017 ZTE Corporation.
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 #         http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 from django.conf.urls import url
15 from rest_framework.urlpatterns import format_suffix_patterns
16
17 from lcm.ns.views.create_ns_view import CreateNSView
18 from lcm.ns.views.inst_ns_view import NSInstView
19 from lcm.ns.views.term_ns_view import TerminateNSView
20 from lcm.ns.views.heal_ns_view import NSHealView
21 from lcm.ns.views.views import NSDetailView, NSInstPostDealView, \
22     NSManualScaleView
23
24 urlpatterns = [
25     # API will be deprecated in the future release
26
27     url(r'^api/nslcm/v1/ns$', CreateNSView.as_view()),
28     url(r'^api/nslcm/v1/ns/(?P<ns_instance_id>[0-9a-zA-Z_-]+)/instantiate$', NSInstView.as_view()),
29     url(r'^api/nslcm/v1/ns/(?P<ns_instance_id>[0-9a-zA-Z_-]+)/terminate$', TerminateNSView.as_view()),
30     url(r'^api/nslcm/v1/ns/(?P<ns_instance_id>[0-9a-zA-Z_-]+)$', NSDetailView.as_view()),
31     url(r'^api/nslcm/v1/ns/(?P<ns_instance_id>[0-9a-zA-Z_-]+)/postdeal$', NSInstPostDealView.as_view()),
32     url(r'^api/nslcm/v1/ns/(?P<ns_instance_id>[0-9a-zA-Z_-]+)/scale$', NSManualScaleView.as_view()),
33     url(r'^api/nslcm/v1/ns/(?P<ns_instance_id>[0-9a-zA-Z_-]+)/heal$', NSHealView.as_view())
34
35     # SOL005 URL API definition TODO
36
37 ]
38
39 urlpatterns = format_suffix_patterns(urlpatterns)