From: David Garcia Date: Thu, 21 Oct 2021 14:39:21 +0000 (+0200) Subject: Fix bug 1716: remove vcaId from NSR instantiation parameter X-Git-Tag: release-v11.0-start X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=2c92b7de64b0834728c39e52437d50b40059cde1;p=osm%2FNBI.git Fix bug 1716: remove vcaId from NSR instantiation parameter Change-Id: I9b19f09309886608a04e779d18702c1bdf32052c Signed-off-by: David Garcia --- 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", []))