예제 #1
0
파일: models.py 프로젝트: stackdio/stackdio
    def health(self):
        """
        Calculates the health of this stack from its hosts
        """
        healths = []

        for component in self.get_components():
            healths.append(component.health)

        return Health.aggregate(healths)
예제 #2
0
파일: models.py 프로젝트: stackdio/stackdio
 def health(self):
     return Health.aggregate([m.health for m in self.metadatas])