fix bug for failure in deleting subscriptions for vnfm 84/94784/1
authorhongyuzhao <zhao.hongyu@zte.com.cn>
Tue, 3 Sep 2019 05:09:31 +0000 (13:09 +0800)
committerhongyuzhao <zhao.hongyu@zte.com.cn>
Tue, 3 Sep 2019 05:11:25 +0000 (13:11 +0800)
Change-Id: I3127f65f364e39a172cd0634da5a7218fabe20f0
Issue-ID: VFC-1508
Signed-off-by: hongyuzhao <zhao.hongyu@zte.com.cn>
lcm/lcm/nf/biz/delete_subscription.py

index 387aa5d..6310586 100644 (file)
@@ -15,7 +15,7 @@
 import logging
 
 from lcm.pub.database.models import SubscriptionModel
-from lcm.pub.exceptions import NFLCMException
+from lcm.pub.exceptions import NFLCMExceptionNotFound
 
 logger = logging.getLogger(__name__)
 
@@ -27,5 +27,5 @@ class DeleteSubscription:
     def delete_single_subscription(self):
         subscription = SubscriptionModel.objects.filter(subscription_id=self.subscription_id)
         if not subscription.exists():
-            raise NFLCMException('Subscription(%s) does not exist' % self.subscription_id)
+            raise NFLCMExceptionNotFound('Subscription(%s) does not exist' % self.subscription_id)
         subscription.delete()