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
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):