"path": nsr_db_path,
}
- kdu_instance = self.k8scluster_map[
- k8sclustertype
- ].generate_kdu_instance_name(
- db_dict=db_dict_install,
- kdu_model=k8s_instance_info["kdu-model"],
- kdu_name=k8s_instance_info["kdu-name"],
- )
+ if k8s_instance_info.get("kdu-deployment-name"):
+ kdu_instance = k8s_instance_info.get("kdu-deployment-name")
+ else:
+ kdu_instance = self.k8scluster_map[
+ k8sclustertype
+ ].generate_kdu_instance_name(
+ db_dict=db_dict_install,
+ kdu_model=k8s_instance_info["kdu-model"],
+ kdu_name=k8s_instance_info["kdu-name"],
+ )
self.update_db_2(
"nsrs", nsr_id, {nsr_db_path + ".kdu-instance": kdu_instance}
)
if kdud["name"] == kdur["kdu-name"]
)
namespace = kdur.get("k8s-namespace")
+ kdu_deployment_name = kdur.get("kdu-deployment-name")
if kdur.get("helm-chart"):
kdumodel = kdur["helm-chart"]
# Default version: helm3, if helm-version is v2 assign v2
"kdu-name": kdur["kdu-name"],
"kdu-model": kdumodel,
"namespace": namespace,
+ "kdu-deployment-name": kdu_deployment_name,
}
db_path = "_admin.deployed.K8s.{}".format(index)
db_nsr_update[db_path] = k8s_instance_info
)
if "execution-environment-list" in descriptor_config:
ee_list = descriptor_config.get("execution-environment-list", [])
+ elif "juju" in descriptor_config:
+ ee_list = [descriptor_config] # ns charms
else: # other types as script are not supported
ee_list = []
for vca_index, vca in enumerate(get_iterable(nsr_deployed, "VCA")):
config_descriptor = None
-
- vca_id = self.get_vca_id(db_vnfrs_dict[vca["member-vnf-index"]], db_nsr)
+ vca_member_vnf_index = vca.get("member-vnf-index")
+ vca_id = self.get_vca_id(
+ db_vnfrs_dict.get(vca_member_vnf_index)
+ if vca_member_vnf_index
+ else None,
+ db_nsr,
+ )
if not vca or not vca.get("ee_id"):
continue
if not vca.get("member-vnf-index"):