From 266ce4c8ee022423422caf7bd69f324697d16e82 Mon Sep 17 00:00:00 2001 From: Ricardo Dias Date: Thu, 29 Mar 2018 16:01:08 +0100 Subject: [PATCH] qa/tasks/mgr/dashboard: rbd: use dashboard pool API for creating pools Signed-off-by: Ricardo Dias --- qa/tasks/mgr/dashboard/test_rbd.py | 16 ++++++++++------ 1 file 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') -- 2.39.5