From e5fcb0d2d2bfcdaf6c0fae04307d7a9ca14036af Mon Sep 17 00:00:00 2001 From: Alfredo Deza Date: Fri, 31 Aug 2018 12:29:17 -0700 Subject: [PATCH] tests: allow defining arbitrary number of OSDs Some tests might want to set this since number of devices will not necessarily map to number of OSDs Signed-off-by: Alfredo Deza --- tests/conftest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index f35783a61..a89ff260e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -91,6 +91,9 @@ def node(host, request): num_devices = len(ansible_vars.get("devices", [])) if not num_devices: num_devices = len(ansible_vars.get("lvm_volumes", [])) + # If number of devices doesn't map to number of OSDs, allow tests to define + # that custom number, defaulting it to ``num_devices`` + num_osds = ansible_vars.get('num_osds', num_devices) cluster_name = ansible_vars.get("cluster", "ceph") conf_path = "/etc/ceph/{}.conf".format(cluster_name) if "osds" in group_names: @@ -116,6 +119,7 @@ def node(host, request): osd_ids=osd_ids, num_mons=num_mons, num_devices=num_devices, + num_osds=num_osds, cluster_name=cluster_name, conf_path=conf_path, cluster_address=cluster_address, -- 2.39.5