From 8767f8c7bd592f4556b29e2816971714acf44110 Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Tue, 28 May 2024 12:05:28 +0200 Subject: [PATCH 1/2] Add error msg --- IM/connectors/Kubernetes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/IM/connectors/Kubernetes.py b/IM/connectors/Kubernetes.py index b55e908a..fa1512ed 100644 --- a/IM/connectors/Kubernetes.py +++ b/IM/connectors/Kubernetes.py @@ -269,6 +269,7 @@ def _create_volumes(self, namespace, system, pod_name, auth_data): res.append((name, disk_size, disk_mount_path)) else: self.log_error("Error creating PersistentVolumeClaim:" + name) + self.error_messages += "Error creating PersistentVolumeClaim for pod %s" % name cont += 1 From 80ebf91d772024b0cdf803e64c9934f70c223875 Mon Sep 17 00:00:00 2001 From: Miguel Caballer Date: Tue, 28 May 2024 12:05:43 +0200 Subject: [PATCH 2/2] Set own endpoint last --- IM/tosca/Tosca.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/IM/tosca/Tosca.py b/IM/tosca/Tosca.py index e3dcf6bd..1a01449c 100644 --- a/IM/tosca/Tosca.py +++ b/IM/tosca/Tosca.py @@ -468,13 +468,7 @@ def _get_node_endpoints(self, node, nodetemplates): """ Get all endpoint associated with a node """ endpoints = [] - # First add its own endpoints - node_caps = node.get_capabilities() - if node_caps: - if "endpoint" in node_caps and node_caps["endpoint"]: - endpoints.append(node_caps["endpoint"]) - - # Now other hosted nodes ones + # First add hosted nodes ones for other_node in nodetemplates: root_type = Tosca._get_root_parent_type(other_node).type compute = None @@ -489,6 +483,12 @@ def _get_node_endpoints(self, node, nodetemplates): if root_type == "tosca.capabilities.Endpoint": endpoints.append(cap) + # Then add its own endpoints + node_caps = node.get_capabilities() + if node_caps: + if "endpoint" in node_caps and node_caps["endpoint"]: + endpoints.append(node_caps["endpoint"]) + return endpoints def _add_node_nets(self, node, radl, system, nodetemplates):