From a135a73521e6d1eb32b22a7f0f24fb145d852f89 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Thu, 23 Jul 2020 13:44:27 +0200 Subject: Add VMTasks.dd_load_test in Rally test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It allows running dd in VM (simple disk benchmarking). https://github.com/cntt-n/CNTT/issues/1477 Change-Id: I4f1150637460f6e0b661fc80fec2cc292efcc511 Signed-off-by: Cédric Ollivier --- functest/opnfv_tests/openstack/rally/rally.py | 5 ++++- .../opnfv_tests/openstack/rally/scenario/opnfv-vm.yaml | 17 +++++++++++++++++ functest/opnfv_tests/openstack/rally/task.yaml | 4 ++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 functest/opnfv_tests/openstack/rally/scenario/opnfv-vm.yaml diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py index e2b0b07bd..63f281b67 100644 --- a/functest/opnfv_tests/openstack/rally/rally.py +++ b/functest/opnfv_tests/openstack/rally/rally.py @@ -43,7 +43,8 @@ class RallyBase(singlevm.VmReady2): # pylint: disable=too-many-instance-attributes, too-many-public-methods stests = ['authenticate', 'glance', 'cinder', 'gnocchi', 'heat', - 'keystone', 'neutron', 'nova', 'quotas', 'swift', 'barbican'] + 'keystone', 'neutron', 'nova', 'quotas', 'swift', 'barbican', + 'vm'] rally_conf_path = "/etc/rally/rally.conf" rally_aar4_patch_path = pkg_resources.resource_filename( @@ -70,6 +71,7 @@ class RallyBase(singlevm.VmReady2): shared_network = True allow_no_fip = True task_timeout = 3600 + username = 'cirros' def __init__(self, **kwargs): """Initialize RallyBase object.""" @@ -121,6 +123,7 @@ class RallyBase(singlevm.VmReady2): task_args['volume_version'] = self.volume_version task_args['volume_service_type'] = self.volume_service_type task_args['block_migration'] = env.get("BLOCK_MIGRATION").lower() + task_args['username'] = self.username if self.ext_net: task_args['floating_network'] = str(self.ext_net.name) diff --git a/functest/opnfv_tests/openstack/rally/scenario/opnfv-vm.yaml b/functest/opnfv_tests/openstack/rally/scenario/opnfv-vm.yaml new file mode 100644 index 000000000..cea3940fb --- /dev/null +++ b/functest/opnfv_tests/openstack/rally/scenario/opnfv-vm.yaml @@ -0,0 +1,17 @@ + VMTasks.dd_load_test: + - + args: + flavor: + name: {{ flavor_name }} + image: + name: {{ image_name }} + floating_network: {{ floating_network }} + force_delete: false + username: {{ username }} + runner: + {{ constant_runner(concurrency=1, times=iterations, is_smoke=smoke) }} + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + network: {} + sla: + {{ no_failures_sla() }} diff --git a/functest/opnfv_tests/openstack/rally/task.yaml b/functest/opnfv_tests/openstack/rally/task.yaml index 2581765b1..649c04557 100644 --- a/functest/opnfv_tests/openstack/rally/task.yaml +++ b/functest/opnfv_tests/openstack/rally/task.yaml @@ -50,3 +50,7 @@ {% if "barbican" in service_list %} {%- include "var/opnfv-barbican.yaml"-%} {% endif %} + +{% if "vm" in service_list %} +{%- include "var/opnfv-vm.yaml"-%} +{% endif %} -- cgit 1.2.3-korg