+ # Mark the VIM 'delete' HA task as erroneous
+ operationState_HA = 'FAILED'
+ detailed_status_HA = "ERROR {}: {}".format(step, exc)
+ self.lcm_tasks.register_HA('vim', 'delete', op_id,
+ operationState=operationState_HA,
+ detailed_status=detailed_status_HA)
+ try:
+ if db_vim and db_vim_update:
+ self.update_db_2("vim_accounts", vim_id, db_vim_update)
+ # If the VIM 'delete' HA task was succesful, the DB entry has been deleted,
+ # which means that there is nowhere to register this task, so do nothing here.
+ except DbException as e:
+ self.logger.error(logging_text + "Cannot update database: {}".format(e))