Fix for test_remove_vnf failing in Heal VDU
[osm/LCM.git] / osm_lcm / lcm.py
index 326847c..9eb37fa 100644 (file)
@@ -455,6 +455,13 @@ class Lcm:
                 task = asyncio.ensure_future(self.ns.scale(nsr_id, nslcmop_id))
                 self.lcm_tasks.register("ns", nsr_id, nslcmop_id, "ns_scale", task)
                 return
+            elif command == "migrate":
+                nslcmop = params
+                nslcmop_id = nslcmop["_id"]
+                nsr_id = nslcmop["nsInstanceId"]
+                task = asyncio.ensure_future(self.ns.migrate(nsr_id, nslcmop_id))
+                self.lcm_tasks.register("ns", nsr_id, nslcmop_id, "ns_migrate", task)
+                return
             elif command == "show":
                 nsr_id = params
                 try:
@@ -478,13 +485,17 @@ class Lcm:
             elif command == "deleted":
                 return  # TODO cleaning of task just in case should be done
             elif command in (
+                "vnf_terminated",
+                "policy_updated",
                 "terminated",
                 "instantiated",
                 "scaled",
                 "actioned",
                 "updated",
+                "migrated",
             ):  # "scaled-cooldown-time"
                 return
+
         elif topic == "nsi":  # netslice LCM processes (instantiate, terminate, etc)
             if command == "instantiate":
                 # self.logger.debug("Instantiating Network Slice {}".format(nsilcmop["netsliceInstanceId"]))