from __future__ import absolute_import
import logging
-import six
import time
from contextlib import contextmanager
}, allow_unknown=True)
pool_list_stat_schema = JObj(sub_elems={
- 'latest': JUnion([int,float]),
+ 'latest': JUnion([int, float]),
'rate': float,
'rates': JList(JAny(none=False)),
})
self.assertStatus(204)
def _validate_pool_properties(self, data, pool, timeout=DashboardTestCase.TIMEOUT_HEALTH_CLEAR):
+ # pylint: disable=too-many-branches
for prop, value in data.items():
if prop == 'pool_type':
self.assertEqual(pool['type'], value)
data = self._get('/api/pool/{}/configuration'.format(pool_name))
self.assertStatus(200)
self.assertSchema(data, JList(JObj({
- 'name': str,
- 'value': str,
- 'source': int
- })))
+ 'name': str,
+ 'value': str,
+ 'source': int
+ })))
def test_pool_list(self):
data = self._get("/api/pool")
'compression_mode': 'aggressive',
'compression_max_blob_size': '10000000',
'compression_required_ratio': '0.8',
+ 'application_metadata': ['rbd'],
'configuration': {
'rbd_qos_bps_limit': 2048,
'rbd_qos_iops_limit': None,
def test_pool_info(self):
self._get("/ui-api/pool/info")
self.assertSchemaBody(JObj({
- 'pool_names': JList(six.string_types),
- 'compression_algorithms': JList(six.string_types),
- 'compression_modes': JList(six.string_types),
+ 'pool_names': JList(str),
+ 'compression_algorithms': JList(str),
+ 'compression_modes': JList(str),
'is_all_bluestore': bool,
- 'bluestore_compression_algorithm': six.string_types,
+ 'bluestore_compression_algorithm': str,
'osd_count': int,
'crush_rules_replicated': JList(JObj({}, allow_unknown=True)),
'crush_rules_erasure': JList(JObj({}, allow_unknown=True)),
- 'pg_autoscale_default_mode': six.string_types,
- 'pg_autoscale_modes': JList(six.string_types),
+ 'pg_autoscale_default_mode': str,
+ 'pg_autoscale_modes': JList(str),
'erasure_code_profiles': JList(JObj({}, allow_unknown=True)),
'used_rules': JObj({}, allow_unknown=True),
'used_profiles': JObj({}, allow_unknown=True),