diff options
author | Ricardo Dias <rdias@suse.com> | 2018-03-29 17:01:08 +0200 |
---|---|---|
committer | Ricardo Dias <rdias@suse.com> | 2018-04-13 16:58:48 +0200 |
commit | 266ce4c8ee022423422caf7bd69f324697d16e82 (patch) | |
tree | 2294fa0dec5642cffd429fd32deb12592fb3b3e5 /qa | |
parent | qa/tasks/mgr/dashboard: rbd: image edit tests (diff) | |
download | ceph-266ce4c8ee022423422caf7bd69f324697d16e82.tar.xz ceph-266ce4c8ee022423422caf7bd69f324697d16e82.zip |
qa/tasks/mgr/dashboard: rbd: use dashboard pool API for creating pools
Signed-off-by: Ricardo Dias <rdias@suse.com>
Diffstat (limited to 'qa')
-rw-r--r-- | qa/tasks/mgr/dashboard/test_rbd.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/qa/tasks/mgr/dashboard/test_rbd.py b/qa/tasks/mgr/dashboard/test_rbd.py index e8608c0e50b..4f3b9625209 100644 --- a/qa/tasks/mgr/dashboard/test_rbd.py +++ b/qa/tasks/mgr/dashboard/test_rbd.py @@ -14,9 +14,15 @@ class RbdTest(DashboardTestCase): @classmethod def create_pool(cls, name, pg_num, pool_type, application='rbd'): - cls._post("/api/pool", {'pool': name, 'pg_num': pg_num, - 'pool_type': pool_type, - 'application_metadata': application}) + data = { + 'pool': name, + 'pg_num': pg_num, + 'pool_type': pool_type, + 'application_metadata': application + } + if pool_type == 'erasure': + data['flags'] = ['ec_overwrites'] + cls._post("/api/pool", data) @classmethod def create_image(cls, pool, name, size, **kwargs): @@ -191,9 +197,7 @@ class RbdTest(DashboardTestCase): if not self.bluestore_support: self.skipTest('requires bluestore cluster') - self._ceph_cmd(['osd', 'pool', 'create', 'data_pool', '12', '12', 'erasure']) - self._ceph_cmd(['osd', 'pool', 'application', 'enable', 'data_pool', 'rbd']) - self._ceph_cmd(['osd', 'pool', 'set', 'data_pool', 'allow_ec_overwrites', 'true']) + self.create_pool('data_pool', 12, 'erasure') rbd_name = 'test_rbd_in_data_pool' res = self.create_image('rbd', rbd_name, 10240, data_pool='data_pool') |