From 93ba5dff76502fb1b15b1c9fa79eff26d07ce676 Mon Sep 17 00:00:00 2001 From: David Garcia Date: Thu, 21 Oct 2021 16:39:21 +0200 Subject: [PATCH] Fix bug 1716: remove vcaId from NSR instantiation parameter Change-Id: I9b19f09309886608a04e779d18702c1bdf32052c Signed-off-by: David Garcia --- osm_nbi/instance_topics.py | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/osm_nbi/instance_topics.py b/osm_nbi/instance_topics.py index de77d5d..243a199 100644 --- a/osm_nbi/instance_topics.py +++ b/osm_nbi/instance_topics.py @@ -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", [])) -- 2.17.1