Skip to content

Commit 10c6170

Browse files
committed
Fix attribute name casing and streamline node attribute processing in ClusterStatusChecker
1 parent 3a6bd1b commit 10c6170

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/modules/get_cluster_status_scs.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def _process_node_attributes(self, node_attributes: ET.Element) -> Dict[str, Any
7979
:return: A dictionary containing the primary and secondary node information, plus cluster status.
8080
:rtype: Dict[str, Any]
8181
"""
82-
attribute_name = f"runs_ers_{self.sap_sid}"
82+
attribute_name = f"runs_ers_{self.sap_sid.upper()}"
8383
for node in node_attributes:
8484
for attribute in node:
8585
if attribute.attrib["name"] == attribute_name:
@@ -137,9 +137,7 @@ def run(self) -> Dict[str, str]:
137137
self.result["message"] = f"Node {node.attrib['name']} is not online"
138138
self.log(logging.WARNING, self.result["message"])
139139

140-
self.result.update(
141-
self._process_node_attributes(cluster_status_xml.find("node_attributes"))
142-
)
140+
self._process_node_attributes(cluster_status_xml.find("node_attributes"))
143141

144142
if self.result["ascs_node"] == "" or self.result["ers_node"] == "":
145143
self.result["message"] = (

0 commit comments

Comments
 (0)