def _validate_cluster_basic_status()

in src/module_utils/get_cluster_status.py [0:0]


    def _validate_cluster_basic_status(self, cluster_status_xml: ET.Element):
        """
        Validate the basic status of the cluster.

        :param cluster_status_xml: XML element containing cluster status.
        :type cluster_status_xml: ET.Element
        """
        if self.execute_command_subprocess(PACEMAKER_STATUS).strip() == "active":
            self.result["pacemaker_status"] = "running"
        else:
            self.result["pacemaker_status"] = "stopped"
        self.log(logging.INFO, f"Pacemaker status: {self.result['pacemaker_status']}")

        if int(cluster_status_xml.find("summary").find("nodes_configured").attrib["number"]) < 2:
            self.result["message"] = "Pacemaker cluster isn't stable (insufficient nodes)"
            self.log(logging.WARNING, self.result["message"])

        nodes = cluster_status_xml.find("nodes")
        for node in nodes:
            if node.attrib["online"] != "true":
                self.result["message"] = f"Node {node.attrib['name']} is not online"
                self.log(logging.WARNING, self.result["message"])