From: bravof Date: Mon, 22 Feb 2021 21:00:48 +0000 (-0300) Subject: fix(juju): honor juju changes in descriptor X-Git-Tag: v9.1.0 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=42ae7310ef02b4d26ed625bdbfb89708af95e8d7;p=osm%2Fosmclient.git fix(juju): honor juju changes in descriptor Change-Id: Ia2e8de3d7f50b164c386e4bef263c2e851cd2bc0 Signed-off-by: bravof Signed-off-by: garciadeblas --- diff --git a/osmclient/common/package_tool.py b/osmclient/common/package_tool.py index af1e426..e792ce9 100644 --- a/osmclient/common/package_tool.py +++ b/osmclient/common/package_tool.py @@ -558,16 +558,15 @@ class PackageTool(object): charms_list = [] for k1, v1 in sol006_dict.items(): for k2, v2 in v1.items(): - if 'vnf-configuration' in k2: - for vnf_config in v2: - for k3, v3 in vnf_config.items(): - if 'charm' in v3: - charms_list.append((v3['charm'])) - if 'vdu-configuration' in k2: - for vdu_config in v2: - for k3, v3 in vdu_config.items(): - if 'charm' in v3: - charms_list.append((v3['charm'])) + if k2 == "df": + for df in v2: + lcm_ops = df.get("lcm-operations-configuration", {}) + ops_config = lcm_ops.get("operate-vnf-op-config", {}) + for day_12_config in ops_config.get("day1-2", []): + self._logger.debug("Execution environment found") + for ee in day_12_config.get("execution-environment-list", []): + if "juju" in ee: + charms_list.append((ee["juju"]['charm'])) return charms_list def _charms_search_on_nsd_sol006_dict(self, sol006_dict):