Fix bug 1716: remove vcaId from NSR instantiation parameter
[osm/NBI.git] / osm_nbi / instance_topics.py
index de77d5d..243a199 100644 (file)
@@ -432,18 +432,6 @@ class NsrTopic(BaseTopic):
 
         return ns_k8s_namespace
 
-    def _get_vim_account(self, vim_id: str, session):
-        try:
-            db_filter = self._get_project_filter(session)
-            db_filter["_id"] = vim_id
-            return self.db.get_one("vim_accounts", db_filter)
-        except Exception:
-            raise EngineException(
-                "Invalid vimAccountId='{}' not present for the project".format(
-                    vim_id
-                )
-            )
-
     def _create_nsr_descriptor_from_nsd(self, nsd, ns_request, nsr_id, session):
         now = time()
         additional_params, _ = self._format_additional_params(
@@ -490,10 +478,6 @@ class NsrTopic(BaseTopic):
         ns_request["nsr_id"] = nsr_id
         if ns_request and ns_request.get("config-units"):
             nsr_descriptor["config-units"] = ns_request["config-units"]
-        vim_account_id = nsr_descriptor["instantiate_params"].get("vimAccountId")
-        if vim_account_id:
-            vca_id = self._get_vim_account(vim_account_id, session).get("vca")
-            nsr_descriptor["instantiate_params"]["vcaId"] = vca_id
         # Create vld
         if nsd.get("virtual-link-desc"):
             nsr_vld = deepcopy(nsd.get("virtual-link-desc", []))