Find the number of pgs that are down.
(self)
| 2775 | return num |
| 2776 | |
| 2777 | def get_num_down(self): |
| 2778 | """ |
| 2779 | Find the number of pgs that are down. |
| 2780 | """ |
| 2781 | pgs = self.get_pg_stats() |
| 2782 | num = 0 |
| 2783 | for pg in pgs: |
| 2784 | if ((pg['state'].count('down') and not |
| 2785 | pg['state'].count('stale')) or |
| 2786 | (pg['state'].count('incomplete') and not |
| 2787 | pg['state'].count('stale'))): |
| 2788 | num += 1 |
| 2789 | return num |
| 2790 | |
| 2791 | def get_num_active_down(self): |
| 2792 | """ |