diff options
author | maopengzhang <zhang.maopeng1@zte.com.cn> | 2019-04-02 20:19:40 +0800 |
---|---|---|
committer | maopengzhang <zhang.maopeng1@zte.com.cn> | 2019-04-02 20:19:40 +0800 |
commit | 8eb82aa3245fcfc77490a8f23bc580b7f292765c (patch) | |
tree | 405209235f8c2b3dae9dc556ef88456cdaad615a | |
parent | c8db32beb32d5d6552d0cc2fa136951716885487 (diff) |
fix NS Subscription url error
fix NS Subscription url error
Change-Id: Id32773c02221a28bd51f82a5a67cc5339a224560
Issue-ID: VFC-1214
Signed-off-by: maopengzhang <zhang.maopeng1@zte.com.cn>
-rw-r--r-- | lcm/ns/biz/create_subscription.py | 2 | ||||
-rw-r--r-- | lcm/ns/const.py | 3 | ||||
-rw-r--r-- | lcm/ns/urls.py | 6 |
3 files changed, 5 insertions, 6 deletions
diff --git a/lcm/ns/biz/create_subscription.py b/lcm/ns/biz/create_subscription.py index 907353a9..76f478ba 100644 --- a/lcm/ns/biz/create_subscription.py +++ b/lcm/ns/biz/create_subscription.py @@ -135,7 +135,7 @@ class CreateSubscription: "%s to the database" % self.subscription_id) links = { "self": { - "href": const.ROOT_URI + self.subscription_id + "href": const.SUBSCRIPTION_ROOT_URI % self.subscription_id } } SubscriptionModel.objects.create(subscription_id=self.subscription_id, diff --git a/lcm/ns/const.py b/lcm/ns/const.py index 53f49308..c0293598 100644 --- a/lcm/ns/const.py +++ b/lcm/ns/const.py @@ -106,8 +106,6 @@ IPADDRESSES_TYPES = enum( IPV6='IPV6' ) -ROOT_URI = "api/nslcm/v1/subscriptions/" - LCCNNOTIFICATION = "NsLcmOperationOccurrenceNotification" NOTIFICATION_TYPES = [ @@ -175,3 +173,4 @@ CHANGE_RESULT = [ NS_INSTANCE_BASE_URI = MSB_BASE_URL + '/api/nslcm/v1/ns_instances/%s' NS_OCC_BASE_URI = MSB_BASE_URL + '/api/nslcm/v1/ns_lcm_op_occs/%s' +SUBSCRIPTION_ROOT_URI = MSB_BASE_URL + "/api/nslcm/v1/subscriptions/%s" diff --git a/lcm/ns/urls.py b/lcm/ns/urls.py index 529883a9..fd826fab 100644 --- a/lcm/ns/urls.py +++ b/lcm/ns/urls.py @@ -48,13 +48,13 @@ urlpatterns = [ # SOL005 URL API definition url(r'^api/nslcm/v1/ns_instances$', NSInstancesView.as_view()), + url(r'^api/nslcm/v1/ns_instances/(?P<ns_instance_id>[0-9a-zA-Z_-]+)$', IndividualNsInstanceView.as_view()), url(r'^api/nslcm/v1/ns_instances/(?P<ns_instance_id>[0-9a-zA-Z_-]+)/instantiate$', InstantiateNsView.as_view()), - url(r'^api/nslcm/v1/ns_instances/(?P<ns_instance_id>[0-9a-zA-Z_-]+)/terminate$', TerminateNsView.as_view()), - url(r'^api/nslcm/v1/ns_lcm_op_occs/(?P<lcmopoccid>[0-9a-zA-Z_-]+)$', QuerySingleNsLcmOpOcc.as_view()), url(r'^api/nslcm/v1/ns_instances/(?P<ns_instance_id>[0-9a-zA-Z_-]+)/update$', UpdateNSView.as_view()), url(r'^api/nslcm/v1/ns_instances/(?P<ns_instance_id>[0-9a-zA-Z_-]+)/scale$', ScaleNSView.as_view()), url(r'^api/nslcm/v1/ns_instances/(?P<ns_instance_id>[0-9a-zA-Z_-]+)/heal$', HealNSView.as_view()), - url(r'^api/nslcm/v1/ns_instances/(?P<ns_instance_id>[0-9a-zA-Z_-]+)$', IndividualNsInstanceView.as_view()), + url(r'^api/nslcm/v1/ns_instances/(?P<ns_instance_id>[0-9a-zA-Z_-]+)/terminate$', TerminateNsView.as_view()), + url(r'^api/nslcm/v1/ns_lcm_op_occs/(?P<lcmopoccid>[0-9a-zA-Z_-]+)$', QuerySingleNsLcmOpOcc.as_view()), url(r'^api/nslcm/v1/subscriptions$', SubscriptionsView.as_view()), url(r'^api/nslcm/v1/ns_lcm_op_occs$', QueryMultiNsLcmOpOccs.as_view()) |