- return "D,/nsr:ns-instance-opdata/nsr:nsr"
-
- @asyncio.coroutine
- def register_for_nsr(self):
- """ Register for NSR changes """
-
- @asyncio.coroutine
- def on_prepare(xact_info, query_action, ks_path, msg):
- """ This NSR is created """
- self._log.debug("Received NSR instantiate on_prepare (%s:%s:%s)",
- query_action,
- ks_path,
- msg)
-
- if (query_action == rwdts.QueryAction.UPDATE or
- query_action == rwdts.QueryAction.CREATE):
- pass
- elif query_action == rwdts.QueryAction.DELETE:
- nsr_id = msg.ns_instance_config_ref
- asyncio.ensure_future(self._terminate_nsr(nsr_id), loop=self._loop)
- else:
- raise NotImplementedError(
- "%s action on cm-state not supported",
- query_action)
-
- xact_info.respond_xpath(rwdts.XactRspCode.ACK)