diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2019-03-19 16:05:48 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2019-03-19 16:05:48 +0800 |
commit | 042e572b67418716dabd7390eeb56cc9b1cccad4 (patch) | |
tree | 3f0fee2eabfd0331426186aa985c5f19344377a6 | |
parent | c14f1ae7b1610be369a14f9577f9d4274d06357f (diff) |
Fix lcm notify bug
Change-Id: Ib1fe4d73f60fb8754caf42c40dc5a93dfb14f066
Issue-ID: VFC-1306
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
-rw-r--r-- | lcm/lcm/pub/utils/notificationsutil.py | 6 |
1 files 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", {}) |