both standby mgr and active mgr have this sub-schema. so extract it out
and reuse it.
Signed-off-by: Kefu Chai <kchai@redhat.com>
def test_full_health(self):
data = self._get('/api/health/full')
self.assertStatus(200)
+ module_info_schema = JObj({
+ 'can_run': bool,
+ 'error_string': str,
+ 'name': str
+ })
schema = JObj({
'client_perf': JObj({
'read_bytes_sec': int,
allow_unknown=True, unknown_schema=JList(str)
),
'available': bool,
- 'available_modules': JList(JObj({
- 'can_run': bool,
- 'error_string': str,
- 'name': str
- })),
+ 'available_modules': JList(module_info_schema),
'epoch': int,
'modules': JList(str),
'services': JObj(
allow_unknown=True, unknown_schema=str
),
'standbys': JList(JObj({
- 'available_modules': JList(JObj({
- 'can_run': bool,
- 'error_string': str,
- 'name': str
- })),
+ 'available_modules': JList(module_info_schema),
'gid': int,
'name': str
}))