Bug 2042 fixed
[osm/LCM.git] / osm_lcm / data_utils / vca.py
index f4235cb..ff52d22 100644 (file)
@@ -152,7 +152,7 @@ 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]):
         """
@@ -185,7 +185,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"
 
@@ -224,3 +224,7 @@ class DeployedVCA(DeployedComponent):
     @property
     def config_sw_installed(self) -> bool:
         return self.get("config_sw_installed", False)
+
+    @property
+    def target_element(self) -> str:
+        return self.get("target_element", "")