Fix project delete exception 75/1675/1 projects
authorPhilip Joseph <philip.joseph@riftio.com>
Tue, 25 Apr 2017 06:39:32 +0000 (06:39 +0000)
committerPhilip Joseph <philip.joseph@riftio.com>
Tue, 25 Apr 2017 06:39:32 +0000 (06:39 +0000)
Change-Id: Ife7efba80a86ee6a1e4d3885bee5db675c3ccebd
Signed-off-by: Philip Joseph <philip.joseph@riftio.com>
rwprojectmano/plugins/rwprojectmano/rift/tasklets/rwprojectmano/rolesmano.py

index e5c5db1..8c91bb9 100644 (file)
@@ -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)