Revert "Fix bug 1900 to populate WIM parameters and auto-select WIM when needed."
This reverts commit a4245861f9d6f6db8165bd63e0d3aff1720bb588.
Reason for revert:
Parameter 'vnfd-connection-point-ref' from old NSD causes bug 2034.
Change-Id: I989c586069b133b9f6ee68927e77517b84fb9ecb
Signed-off-by: Gabriel Cuba <gcuba@whitestack.com>
diff --git a/osm_lcm/ns.py b/osm_lcm/ns.py
index 6df1c0a..9eb368d 100644
--- a/osm_lcm/ns.py
+++ b/osm_lcm/ns.py
@@ -70,11 +70,6 @@
from osm_lcm.data_utils.database.database import Database
from osm_lcm.data_utils.filesystem.filesystem import Filesystem
-from osm_lcm.data_utils.wim import (
- get_sdn_ports,
- get_target_wim_attrs,
- select_feasible_wim_account,
-)
from n2vc.n2vc_juju_conn import N2VCJujuConnector
from n2vc.exceptions import N2VCException, N2VCNotFound, K8sException
@@ -811,30 +806,9 @@
target_vld["vim_info"][target_sdn]["sdn-ports"] = vld_params[
"provider-network"
]["sdn-ports"]
-
- # check if WIM is needed; if needed, choose a feasible WIM able to connect VIMs
- # if wim_account_id is specified in vld_params, validate if it is feasible.
- wim_account_id, db_wim = select_feasible_wim_account(
- db_nsr, db_vnfrs, target_vld, vld_params, self.logger
- )
-
- if wim_account_id:
- # WIM is needed and a feasible one was found, populate WIM target and SDN ports
- self.logger.info("WIM selected: {:s}".format(str(wim_account_id)))
- # update vld_params with correct WIM account Id
- vld_params["wimAccountId"] = wim_account_id
-
- target_wim = "wim:{}".format(wim_account_id)
- target_wim_attrs = get_target_wim_attrs(nsr_id, target_vld, vld_params)
- sdn_ports = get_sdn_ports(vld_params, db_wim)
- if len(sdn_ports) > 0:
- target_vld["vim_info"][target_wim] = target_wim_attrs
- target_vld["vim_info"][target_wim]["sdn-ports"] = sdn_ports
-
- self.logger.debug(
- "Target VLD with WIM data: {:s}".format(str(target_vld))
- )
-
+ if vld_params.get("wimAccountId"):
+ target_wim = "wim:{}".format(vld_params["wimAccountId"])
+ target_vld["vim_info"][target_wim] = {}
for param in ("vim-network-name", "vim-network-id"):
if vld_params.get(param):
if isinstance(vld_params[param], dict):