From 042e572b67418716dabd7390eeb56cc9b1cccad4 Mon Sep 17 00:00:00 2001 From: fujinhua Date: Tue, 19 Mar 2019 16:05:48 +0800 Subject: Fix lcm notify bug Change-Id: Ib1fe4d73f60fb8754caf42c40dc5a93dfb14f066 Issue-ID: VFC-1306 Signed-off-by: fujinhua --- lcm/lcm/pub/utils/notificationsutil.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lcm/lcm/pub/utils/notificationsutil.py b/lcm/lcm/pub/utils/notificationsutil.py index 5327dc16..d8e8b640 100644 --- a/lcm/lcm/pub/utils/notificationsutil.py +++ b/lcm/lcm/pub/utils/notificationsutil.py @@ -32,7 +32,6 @@ class NotificationsUtil(object): def send_notification(self, notification): logger.info("Send Notifications to the callbackUri") filters = { - "vnfInstanceId": "vnf_instance_filter", "operationState": "operation_states", "operation": "operation_types" } @@ -51,7 +50,10 @@ class NotificationsUtil(object): auth_info = json.loads(subscription.auth_info) if auth_info["authType"] == const.OAUTH2_CLIENT_CREDENTIALS: pass - self.post_notification(callbackUri, auth_info, notification) + try: + self.post_notification(callbackUri, auth_info, notification) + except Exception as e: + logger.error("Failed to post notification: %s", e.message) def post_notification(self, callbackUri, auth_info, notification): params = auth_info.get("paramsBasic", {}) -- cgit 1.2.3-korg