def clustertest(self, name): try: cluster = Cluster.getCluster(name) except NoSuchClusterException: self.fail("value error in getcluster, cluster %s has no class extending Cluster for it" % name) cluster.getWorkerNodes() try: cluster.getWorkerNodes() except Exception, e: self.fail("getting quattor results failed for cluster %s with: %s" % (name, e))
def test_ClustersInQuator(self): """ test if all clusters with a class implementing them are in quator """ for cls in Cluster.__subclasses__(): self.clustertest(cls.__name__)