]> git.proxmox.com Git - ceph.git/blobdiff - ceph/qa/tasks/mgr/dashboard/test_pool.py
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / qa / tasks / mgr / dashboard / test_pool.py
index a3aac763135fd9be6c7ead1ef4d880784a1edd87..cbf920b91897ba87601dd5621999ab2833b44cb7 100644 (file)
@@ -2,7 +2,6 @@
 from __future__ import absolute_import
 
 import logging
-import six
 import time
 from contextlib import contextmanager
 
@@ -23,7 +22,7 @@ class PoolTest(DashboardTestCase):
     }, 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)),
     })
@@ -85,6 +84,7 @@ class PoolTest(DashboardTestCase):
         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)
@@ -167,10 +167,10 @@ class PoolTest(DashboardTestCase):
         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")
@@ -259,6 +259,7 @@ class PoolTest(DashboardTestCase):
             '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,
@@ -416,16 +417,16 @@ class PoolTest(DashboardTestCase):
     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),