From c96fd6946c24dacce83fe5a14f95ab88ac54bb38 Mon Sep 17 00:00:00 2001 From: K Sai Kiran Date: Wed, 16 Oct 2019 17:50:53 +0530 Subject: [PATCH] Bug 864 - NBI publishes created key to kakfa after editing nsd/vnfd. Change-Id: Ib4ab08dcb3cada34bb3f95468315f37e52486fcf Signed-off-by: K Sai Kiran --- osm_nbi/descriptor_topics.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osm_nbi/descriptor_topics.py b/osm_nbi/descriptor_topics.py index 95ced0d..58efa55 100644 --- a/osm_nbi/descriptor_topics.py +++ b/osm_nbi/descriptor_topics.py @@ -139,6 +139,7 @@ class DescriptorTopic(BaseTopic): self.format_on_new(content, session["project_id"], make_public=session["public"]) _id = self.db.create(self.topic, content) rollback.append({"topic": self.topic, "_id": _id}) + self._send_msg("created", {"_id": _id}) return _id, None except ValidationError as e: raise EngineException(e, HTTPStatus.UNPROCESSABLE_ENTITY) @@ -284,7 +285,7 @@ class DescriptorTopic(BaseTopic): self.fs.dir_rename(temp_folder, _id) indata["_id"] = _id - self._send_msg("created", indata) + self._send_msg("edited", indata) # TODO if descriptor has changed because kwargs update content and remove cached zip # TODO if zip is not present creates one -- 2.25.1