class HealthTest(DashboardTestCase):
CEPHFS = True
+ __pg_info_schema = JObj({
+ 'object_stats': JObj({
+ 'num_objects': int,
+ 'num_object_copies': int,
+ 'num_objects_degraded': int,
+ 'num_objects_misplaced': int,
+ 'num_objects_unfound': int
+ }),
+ 'pgs_per_osd': float,
+ 'statuses': JObj({}, allow_unknown=True, unknown_schema=int)
+ })
+
def test_minimal_health(self):
data = self._get('/api/health/minimal')
self.assertStatus(200)
'stats': JObj({
'total_avail_bytes': int,
'total_bytes': int,
- 'total_objects': int,
'total_used_raw_bytes': int,
})
}),
'up': int,
})),
}),
- 'pg_info': JObj({
- 'pgs_per_osd': float,
- 'statuses': JObj({}, allow_unknown=True, unknown_schema=int)
- }),
+ 'pg_info': self.__pg_info_schema,
'pools': JList(JLeaf(dict)),
'rgw': int,
'scrub_status': str
'stats': JObj({
'total_avail_bytes': int,
'total_bytes': int,
- 'total_objects': int,
'total_used_bytes': int,
'total_used_raw_bytes': int,
- 'total_used_raw_ratio': float
+ 'total_used_raw_ratio': float,
+ 'num_osds': int,
+ 'num_per_pool_osds': int
})
}),
'fs_map': JObj({
'up': int,
}, allow_unknown=True)),
}, allow_unknown=True),
- 'pg_info': JObj({
- 'pgs_per_osd': float,
- 'statuses': JObj({}, allow_unknown=True, unknown_schema=int)
- }),
+ 'pg_info': self.__pg_info_schema,
'pools': JList(JLeaf(dict)),
'rgw': int,
'scrub_status': str