X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=lcm%2Flcm%2Fnf%2Fbiz%2Finstantiate_vnf.py;h=101c96fdee0dbda0775e3ee6456a269f3d274699;hb=1cbfeb8366d32855c1d4daf4e7371bb4081f89de;hp=203a12be88b151cc19c52834609e7457508ee70d;hpb=4d830f4d202669d16c8baf6ef9ad1d8c67aa6c61;p=vfc%2Fgvnfm%2Fvnflcm.git diff --git a/lcm/lcm/nf/biz/instantiate_vnf.py b/lcm/lcm/nf/biz/instantiate_vnf.py index 203a12be..101c96fd 100644 --- a/lcm/lcm/nf/biz/instantiate_vnf.py +++ b/lcm/lcm/nf/biz/instantiate_vnf.py @@ -20,7 +20,7 @@ from threading import Thread from lcm.pub.database.models import NfInstModel from lcm.pub.exceptions import NFLCMException from lcm.pub.msapi.gvnfmdriver import prepare_notification_data -# from lcm.pub.msapi.gvnfmdriver import notify_lcm_to_nfvo +from lcm.pub.msapi.gvnfmdriver import notify_lcm_to_nfvo from lcm.pub.msapi.sdc_run_catalog import query_vnfpackage_by_id from lcm.pub.utils.jobutil import JobUtil from lcm.pub.utils.timeutil import now_time @@ -136,8 +136,11 @@ class InstantiateVnf(Thread): def lcm_notify(self): notification_content = prepare_notification_data(self.nf_inst_id, self.job_id, CHANGE_TYPE.ADDED, OPERATION_TYPE.INSTANTIATE) logger.info('Notify request data = %s' % notification_content) - # resp = notify_lcm_to_nfvo(json.dumps(notification_content)) - # logger.info('Lcm notify end, response %s' % resp) + try: + resp = notify_lcm_to_nfvo(json.dumps(notification_content)) + logger.info('Lcm notify end, response %s' % resp) + except Exception as e: + logger.error("Lcm instantiate notify failed: %s", e.message) NotificationsUtil().send_notification(notification_content) def vnf_inst_failed_handle(self, error_msg):