Bug 864 - NBI publishes created key to kakfa after editing nsd/vnfd. 52/8052/2 feature5837 feature7928
authorK Sai Kiran <saikiran.k@tataelxsi.co.in>
Wed, 16 Oct 2019 12:20:53 +0000 (17:50 +0530)
committerK Sai Kiran <saikiran.k@tataelxsi.co.in>
Thu, 17 Oct 2019 07:30:56 +0000 (13:00 +0530)
Change-Id: Ib4ab08dcb3cada34bb3f95468315f37e52486fcf
Signed-off-by: K Sai Kiran <saikiran.k@tataelxsi.co.in>
osm_nbi/descriptor_topics.py

index 95ced0d..58efa55 100644 (file)
@@ -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