From: David Garcia Date: Thu, 21 Oct 2021 14:39:21 +0000 (+0200) Subject: Fix bug 1717: remove vcaId from NSR instantiation parameter X-Git-Tag: v10.0.3 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=86a36584b5dadb56d7810337b65309e9f3cd0d9e;p=osm%2FNBI.git Fix bug 1717: 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 aa3bbb8..69465ba 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", []))