from osm_lcm.data_utils.vnfd import get_vdu_list, get_vdu_profile, \
get_ee_sorted_initial_config_primitive_list, get_ee_sorted_terminate_config_primitive_list, \
get_kdu_list, get_virtual_link_profiles, get_vdu, get_configuration, \
- get_vdu_index, get_scaling_aspect, get_number_of_instances
+ get_vdu_index, get_scaling_aspect, get_number_of_instances, get_juju_ee_ref
from osm_lcm.data_utils.list_utils import find_in_list
from osm_lcm.data_utils.vnfr import get_osm_params
from osm_lcm.data_utils.dict_utils import parse_yaml_strings
vnfr_update_dict["kdur.{}.status".format(kdu_index)] = "READY"
self.update_db_2("vnfrs", vnfr_data.get("_id"), vnfr_update_dict)
- kdu_config = kdud.get("kdu-configuration")
- if kdu_config and kdu_config.get("initial-config-primitive") and kdu_config.get("juju") is None:
+ kdu_config = get_configuration(vnfd, k8s_instance_info["kdu-name"])
+ if kdu_config and kdu_config.get("initial-config-primitive") and \
+ get_juju_ee_ref(vnfd, k8s_instance_info["kdu-name"]) is None:
initial_config_primitive_list = kdu_config.get("initial-config-primitive")
initial_config_primitive_list.sort(key=lambda val: int(val["seq"]))
# fill db_nsr._admin.deployed.VCA.<index>
self.logger.debug(logging_text + "_deploy_n2vc vnfd_id={}, vdu_id={}".format(vnfd_id, vdu_id))
- if descriptor_config.get("juju"): # There is one execution envioronment of type juju
- ee_list = [descriptor_config]
- elif descriptor_config.get("execution-environment-list"):
- ee_list = descriptor_config.get("execution-environment-list")
+ if "execution-environment-list" in descriptor_config:
+ ee_list = descriptor_config.get("execution-environment-list", [])
else: # other types as script are not supported
ee_list = []
vnfr_params.update(db_vnfr["additionalParamsForVnf"])
# look for primitive
- for config_primitive in db_vnfd.get("vnf-configuration", {}).get("config-primitive", ()):
+ for config_primitive in (
+ get_configuration(db_vnfd, db_vnfd["id"]) or {}
+ ).get("config-primitive", ()):
if config_primitive["name"] == vnf_config_primitive:
break
else:
operate-vnf-op-config:
day1-2:
- id: hackfest3charmed-vnf
+ execution-environment-list:
+ - id: simple-ee
+ juju:
+ charm: simple
initial-config-primitive:
- seq: "1"
+ execution-environment-ref: simple-ee
name: config
parameter:
- name: ssh-hostname
- name: ssh-password
value: osm4u
- seq: "2"
+ execution-environment-ref: simple-ee
name: touch
parameter:
- name: filename
value: <touch_filename>
config-primitive:
- name: touch
+ execution-environment-ref: simple-ee
parameter:
- data-type: STRING
default-value: <touch_filename2>
name: filename
- juju:
- charm: simple
- _admin:
created: 1575031727.5383403
- name: mgmt
description: KNF with two KDU using helm-charts
id: multikdu_knf
+ df:
+ - id: "default_df"
k8s-cluster:
nets:
- external-connection-point-ref: mgmt