From: Pedro Escaleira Date: Wed, 20 Apr 2022 17:00:17 +0000 (+0100) Subject: Bug 1998 fixed: DeployedK8sResource is now obtaining the model name from the namespace X-Git-Tag: v11.0.3~4 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F12%2F11912%2F2;p=osm%2FLCM.git Bug 1998 fixed: DeployedK8sResource is now obtaining the model name from the namespace Change-Id: Id7e08031097b3a1e66475c49af4fe1cfd233930e Signed-off-by: Pedro Escaleira --- diff --git a/osm_lcm/data_utils/vca.py b/osm_lcm/data_utils/vca.py index 2116549..0e31f35 100644 --- a/osm_lcm/data_utils/vca.py +++ b/osm_lcm/data_utils/vca.py @@ -151,7 +151,8 @@ class Relation(dict): class DeployedComponent(dict): - """Represents a deployed component (nsr["_admin"]["deployed"])""" + """Represents a deployed component (nsr["_admin"]["deployed"]["VCA" | "K8s"])""" + def __init__(self, data: Dict[str, Any]): """ Args: @@ -182,7 +183,7 @@ class DeployedK8sResource(DeployedComponent): @property def ee_id(self): """Returns the execution environment id""" - model = self["kdu-instance"] + model = self["namespace"] application_name = self["resource-name"] return f"{model}.{application_name}.k8s"