target = {}
target.update(migrate_params)
- desc = await self.RO.migrate(nsr_id, target)
- self.logger.debug("RO return > {}".format(desc))
- action_id = desc["action_id"]
- await self._wait_ng_ro(
- nsr_id,
- action_id,
- nslcmop_id,
- start_deploy,
- self.timeout.migrate,
- operation="migrate",
- )
+
+ if "migrateToHost" in target:
+ desc = await self.RO.migrate(nsr_id, target)
+ self.logger.debug("RO return > {}".format(desc))
+ action_id = desc["action_id"]
+ await self._wait_ng_ro(
+ nsr_id,
+ action_id,
+ nslcmop_id,
+ start_deploy,
+ self.timeout.migrate,
+ operation="migrate",
+ )
+
+ elif "targetHostK8sLabels" in target:
+ await self.k8sclusterhelm3.migrate(nsr_id, target)
+
except (ROclient.ROClientException, DbException, LcmException) as e:
self.logger.error("Exit Exception {}".format(e))
exc = e