projects
/
osm
/
SO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge from OSM SO master
[osm/SO.git]
/
rwlaunchpad
/
plugins
/
rwnsm
/
rift
/
tasklets
/
rwnsmtasklet
/
rwnsm_conman.py
diff --git
a/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsm_conman.py
b/rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsm_conman.py
index
23ab7b6
..
7d05457
100644
(file)
--- a/
rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsm_conman.py
+++ b/
rwlaunchpad/plugins/rwnsm/rift/tasklets/rwnsmtasklet/rwnsm_conman.py
@@
-46,6
+46,7
@@
class ROConfigManager(object):
self._loop = loop
self._dts = dts
self.nsm = parent
self._loop = loop
self._dts = dts
self.nsm = parent
+ self.project = parent._project
self._log.debug("Initialized ROConfigManager")
def is_ready(self):
self._log.debug("Initialized ROConfigManager")
def is_ready(self):
@@
-53,7
+54,7
@@
class ROConfigManager(object):
@property
def cm_state_xpath(self):
@property
def cm_state_xpath(self):
- return ("/rw-conman:cm-state/rw-conman:cm-nsr")
+ return
self.project.add_project
("/rw-conman:cm-state/rw-conman:cm-nsr")
@classmethod
def map_config_status(cls, status):
@classmethod
def map_config_status(cls, status):
@@
-119,7
+120,7
@@
class ROConfigManager(object):
@asyncio.coroutine
def register(self):
""" Register for cm-state changes """
@asyncio.coroutine
def register(self):
""" Register for cm-state changes """
-
+
@asyncio.coroutine
def on_prepare(xact_info, query_action, ks_path, msg):
""" cm-state changed """
@asyncio.coroutine
def on_prepare(xact_info, query_action, ks_path, msg):
""" cm-state changed """
@@
-151,4
+152,9
@@
class ROConfigManager(object):
handler=handler)
except Exception as e:
self._log.error("Failed to register for cm-state changes as %s", str(e))
handler=handler)
except Exception as e:
self._log.error("Failed to register for cm-state changes as %s", str(e))
-
+
+
+ def deregister(self):
+ if self.dts_reg_hdl:
+ self.dts_reg_hdl.deregister()
+ self.dts_reg_hdl = None