Ignore kafka message ns-nsi/created 24/8524/2
authortierno <alfonso.tiernosepulveda@telefonica.com>
Sun, 26 Jan 2020 23:35:59 +0000 (23:35 +0000)
committermadavi <jm00553988@techmahindra.com>
Mon, 27 Jan 2020 03:29:07 +0000 (04:29 +0100)
Change-Id: Ia0fb38fa3e59bd6f9cda56dd1e3863b847e777b5
Signed-off-by: tierno <alfonso.tiernosepulveda@telefonica.com>
osm_lcm/lcm.py

index 5b77c5c..8cd15e8 100644 (file)
@@ -310,7 +310,7 @@ class Lcm:
                 self.lcm_tasks.register("k8srepo", k8srepo_id, order_id, "k8srepo_delete", task)
                 return
         elif topic == "ns":
-            if command == "instantiate" or command == "instantiated":
+            if command == "instantiate":
                 # self.logger.debug("Deploying NS {}".format(nsr_id))
                 nslcmop = params
                 nslcmop_id = nslcmop["_id"]
@@ -318,7 +318,7 @@ class Lcm:
                 task = asyncio.ensure_future(self.ns.instantiate(nsr_id, nslcmop_id))
                 self.lcm_tasks.register("ns", nsr_id, nslcmop_id, "ns_instantiate", task)
                 return
-            elif command == "terminate" or command == "terminated":
+            elif command == "terminate":
                 # self.logger.debug("Deleting NS {}".format(nsr_id))
                 nslcmop = params
                 nslcmop_id = nslcmop["_id"]
@@ -361,7 +361,7 @@ class Lcm:
             elif command in ("terminated", "instantiated", "scaled", "actioned"):  # "scaled-cooldown-time"
                 return
         elif topic == "nsi":  # netslice LCM processes (instantiate, terminate, etc)
-            if command == "instantiate" or command == "instantiated":
+            if command == "instantiate":
                 # self.logger.debug("Instantiating Network Slice {}".format(nsilcmop["netsliceInstanceId"]))
                 nsilcmop = params
                 nsilcmop_id = nsilcmop["_id"]  # slice operation id
@@ -369,7 +369,7 @@ class Lcm:
                 task = asyncio.ensure_future(self.netslice.instantiate(nsir_id, nsilcmop_id))
                 self.lcm_tasks.register("nsi", nsir_id, nsilcmop_id, "nsi_instantiate", task)
                 return
-            elif command == "terminate" or command == "terminated":
+            elif command == "terminate":
                 # self.logger.debug("Terminating Network Slice NS {}".format(nsilcmop["netsliceInstanceId"]))
                 nsilcmop = params
                 nsilcmop_id = nsilcmop["_id"]  # slice operation id