From: Philip Joseph Date: Tue, 25 Apr 2017 06:39:32 +0000 (+0000) Subject: Fix project delete exception X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fprojects;p=osm%2FSO.git Fix project delete exception Change-Id: Ife7efba80a86ee6a1e4d3885bee5db675c3ccebd Signed-off-by: Philip Joseph --- diff --git a/rwprojectmano/plugins/rwprojectmano/rift/tasklets/rwprojectmano/rolesmano.py b/rwprojectmano/plugins/rwprojectmano/rift/tasklets/rwprojectmano/rolesmano.py index e5c5db11..8c91bb90 100644 --- a/rwprojectmano/plugins/rwprojectmano/rift/tasklets/rwprojectmano/rolesmano.py +++ b/rwprojectmano/plugins/rwprojectmano/rift/tasklets/rwprojectmano/rolesmano.py @@ -26,11 +26,13 @@ from enum import Enum import gi gi.require_version('RwDts', '1.0') gi.require_version('RwRbacInternalYang', '1.0') +gi.require_version('RwProjectManoYang', '1.0') from gi.repository import ( RwDts as rwdts, ProtobufC, RwTypes, RwRbacInternalYang, + RwProjectManoYang, ) import rift.tasklets @@ -224,6 +226,14 @@ class ProjectConfigSubscriber(object): self._log.warning("Delete on unknown user: {}". format(user.key)) + try: + xact_info.respond_xpath(rwdts.XactRspCode.ACK) + except rift.tasklets.dts.ResponseError as e: + xpath = ks_path.to_xpath(RwProjectManoYang.get_schema()) + self._log.debug("Exception sending response for {}: {}". + format(xpath, e)) + return + else: self._log.error("Action (%s) NOT SUPPORTED", action) xact_info.respond_xpath(rwdts.XactRspCode.NACK)