X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_lcm%2Flcm_utils.py;h=af460d27a73430050115538c382724308a1fea02;hb=0ee777934b4c165578dd7c0ab411c710a16bb90d;hp=12fd7fbb0d6624397dc9e1f8a69e833aef3c79ed;hpb=7f26b3f6740e12dd35d8024b14c3fe3a32ec5dbf;p=osm%2FLCM.git diff --git a/osm_lcm/lcm_utils.py b/osm_lcm/lcm_utils.py index 12fd7fb..af460d2 100644 --- a/osm_lcm/lcm_utils.py +++ b/osm_lcm/lcm_utils.py @@ -448,6 +448,26 @@ class LcmBase: self.logger.error(f"{error} occured while getting the charm name") raise LcmException(error) + def get_vca_info(self, ee_item, db_nsr, get_charm_name: bool): + vca_name = charm_name = vca_type = None + if ee_item.get("juju"): + vca_name = ee_item["juju"].get("charm") + if get_charm_name: + charm_name = self.find_charm_name(db_nsr, str(vca_name)) + vca_type = ( + "lxc_proxy_charm" + if ee_item["juju"].get("charm") is not None + else "native_charm" + ) + if ee_item["juju"].get("cloud") == "k8s": + vca_type = "k8s_proxy_charm" + elif ee_item["juju"].get("proxy") is False: + vca_type = "native_charm" + elif ee_item.get("helm-chart"): + vca_name = ee_item["helm-chart"] + vca_type = "helm-v3" + return vca_name, charm_name, vca_type + class TaskRegistry(LcmBase): """