From: maopeng zhang Date: Fri, 24 May 2019 07:06:02 +0000 (+0000) Subject: Merge "update version to 1.3.2" X-Git-Tag: 1.3.2~4 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=vfc%2Fgvnfm%2Fvnflcm.git;a=commitdiff_plain;h=53a83288a7c8d591c9665c80e2ff759ac305f4a1;hp=7c8e11ef929fa920f4939795f4d951695724e50c Merge "update version to 1.3.2" --- diff --git a/lcm/lcm/nf/biz/create_subscription.py b/lcm/lcm/nf/biz/create_subscription.py index 6802c221..8c6d4528 100644 --- a/lcm/lcm/nf/biz/create_subscription.py +++ b/lcm/lcm/nf/biz/create_subscription.py @@ -27,6 +27,7 @@ from lcm.pub.database.models import SubscriptionModel from lcm.pub.exceptions import NFLCMException from lcm.pub.exceptions import NFLCMExceptionSeeOther from lcm.pub.utils.values import ignore_case_get +from lcm.pub.config.config import MSB_SERVICE_IP, MSB_SERVICE_PORT logger = logging.getLogger(__name__) @@ -117,8 +118,8 @@ class CreateSubscription: return True for subscription in subscriptions: if self.check_filter_exists(subscription): - raise NFLCMExceptionSeeOther("Already Subscription exists with the " - "same callbackUri and filter") + links = json.loads(subscription.links) + raise NFLCMExceptionSeeOther("http://%s:%s/%s" % (MSB_SERVICE_IP, MSB_SERVICE_PORT, links["self"]["href"])) return False def save_db(self): diff --git a/lcm/lcm/nf/views/common.py b/lcm/lcm/nf/views/common.py index 4f864263..a57a93e1 100644 --- a/lcm/lcm/nf/views/common.py +++ b/lcm/lcm/nf/views/common.py @@ -53,7 +53,7 @@ def view_safe_call_with_log(logger): except NFLCMExceptionSeeOther as e: logger.error(e.message) resp = Response(status=status.HTTP_303_SEE_OTHER) - resp["Location"] = "" + resp["Location"] = e.message # resp["Location"] = "subscriptions/%s" % e.id return resp except NFLCMExceptionNotFound as e: