diff options
author | Juha Kosonen <juha.kosonen@nokia.com> | 2019-04-08 14:36:10 +0300 |
---|---|---|
committer | Juha Kosonen <juha.kosonen@nokia.com> | 2019-04-09 11:30:49 +0000 |
commit | 6a52d19860dd98429125e56085a6a77f66280ded (patch) | |
tree | ea510c9a092705462817c3f7766626b59c0edea8 | |
parent | c14d14e1d940a16c8bcac51a81577a2b30cc7270 (diff) |
Set cinder service type in rally tests
As a precondition for executing scenarios requiring volume, Rally
expects the presence of service named as "cinder". In a case when
there is only cinderv2 and cinderv3 configured in the system, Rally
fails to validate a testcase even the volume service is working ok.
Testcases in question changed to use v3.
Change-Id: I42e7f846e80d3647df274b2e03add94c9f0a34d6
Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
(cherry picked from commit ebc2b41505299846faeb2163d34d820a8ef2bdb2)
8 files changed, 99 insertions, 1 deletions
diff --git a/functest/opnfv_tests/openstack/rally/macro/macro.yaml b/functest/opnfv_tests/openstack/rally/macro/macro.yaml index 48c0333e9..2536c92f0 100644 --- a/functest/opnfv_tests/openstack/rally/macro/macro.yaml +++ b/functest/opnfv_tests/openstack/rally/macro/macro.yaml @@ -95,3 +95,9 @@ disk_format: {{ type }} image_location: {{ location }} {%- endmacro %} + +{%- macro volume_service(version, service_type) %} + cinder: + version: {{ version }} + service_type: {{ service_type }} +{%- endmacro %} diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py index f4c968faa..dc64aa0fb 100644 --- a/functest/opnfv_tests/openstack/rally/rally.py +++ b/functest/opnfv_tests/openstack/rally/rally.py @@ -58,6 +58,8 @@ class RallyBase(singlevm.VmReady2): TENANTS_AMOUNT = 3 ITERATIONS_AMOUNT = 10 CONCURRENCY = 4 + VOLUME_VERSION = 3 + VOLUME_SERVICE_TYPE = "volumev3" BLACKLIST_FILE = os.path.join(RALLY_DIR, "blacklist.yaml") TASK_DIR = os.path.join(getattr(config.CONF, 'dir_rally_data'), 'task') TEMP_DIR = os.path.join(TASK_DIR, 'var') @@ -113,6 +115,8 @@ class RallyBase(singlevm.VmReady2): task_args['iterations'] = self.ITERATIONS_AMOUNT task_args['concurrency'] = self.CONCURRENCY task_args['smoke'] = self.smoke + task_args['volume_version'] = self.VOLUME_VERSION + task_args['volume_service_type'] = self.VOLUME_SERVICE_TYPE if self.ext_net: task_args['floating_network'] = str(self.ext_net.name) diff --git a/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-cinder.yaml b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-cinder.yaml index bb9cbfb85..4b3c22ebd 100644 --- a/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-cinder.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-cinder.yaml @@ -8,6 +8,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -23,6 +25,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {{ volumes() }} {% endcall %} runner: @@ -39,6 +43,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -52,6 +58,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -70,6 +78,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -91,6 +101,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -111,6 +123,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -123,6 +137,8 @@ size: 1 context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} - @@ -134,6 +150,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -148,6 +166,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} volumes: size: 1 volumes_per_tenant: 4 @@ -165,6 +185,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {{ volumes() }} {% endcall %} runner: @@ -182,6 +204,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -194,6 +218,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -206,6 +232,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -221,6 +249,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -235,6 +265,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {{ volumes() }} {% endcall %} runner: @@ -250,6 +282,8 @@ read_iops_sec: "1000" context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -263,6 +297,8 @@ read_iops_sec: "1000" context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -279,6 +315,8 @@ set_read_iops_sec: "1001" context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -290,6 +328,8 @@ description: "rally tests creating types" context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -301,6 +341,8 @@ description: "rally tests creating types" context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -313,6 +355,8 @@ update_description: "test update" context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -328,6 +372,8 @@ control_location: "front-end" context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -339,6 +385,8 @@ description: "rally tests creating types" context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: diff --git a/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-nova.yaml b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-nova.yaml index ab2f11443..0f4e7b26e 100644 --- a/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-nova.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-nova.yaml @@ -145,6 +145,8 @@ - net-id: {{ netid }} context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -221,6 +223,8 @@ - net-id: {{ netid }} context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -236,6 +240,8 @@ - net-id: {{ netid }} context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -278,6 +284,8 @@ {{ unlimited_volumes() }} {{ unlimited_neutron() }} {{ unlimited_nova() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -375,6 +383,8 @@ context: {% call user_context(tenants_amount, users_amount, use_existing_users) %} network: {} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} diff --git a/functest/opnfv_tests/openstack/rally/scenario/opnfv-quotas.yaml b/functest/opnfv_tests/openstack/rally/scenario/opnfv-quotas.yaml index a0682acce..3f0cf0840 100644 --- a/functest/opnfv_tests/openstack/rally/scenario/opnfv-quotas.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/opnfv-quotas.yaml @@ -4,6 +4,8 @@ max_quota: 1024 context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -15,6 +17,8 @@ max_quota: 1024 context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: diff --git a/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-cinder.yaml b/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-cinder.yaml index 832358075..f94a5a1a4 100644 --- a/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-cinder.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-cinder.yaml @@ -6,6 +6,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {{ volumes() }} {% endcall %} runner: @@ -23,6 +25,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -35,6 +39,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -47,6 +53,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -62,6 +70,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} @@ -76,6 +86,8 @@ {% call user_context(tenants_amount, users_amount, use_existing_users) %} quotas: {{ unlimited_volumes() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {{ volumes() }} {% endcall %} runner: @@ -91,6 +103,8 @@ read_iops_sec: "1000" context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -107,6 +121,8 @@ set_read_iops_sec: "1001" context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -118,6 +134,8 @@ description: "rally tests creating types" context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -133,6 +151,8 @@ control_location: "front-end" context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: diff --git a/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-nova.yaml b/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-nova.yaml index 23940acfe..b92494a43 100644 --- a/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-nova.yaml +++ b/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-nova.yaml @@ -22,6 +22,8 @@ - net-id: {{ netid }} context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -37,6 +39,8 @@ - net-id: {{ netid }} context: {{ user_context(tenants_amount, users_amount, use_existing_users) }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} sla: @@ -79,6 +83,8 @@ {{ unlimited_volumes() }} {{ unlimited_neutron() }} {{ unlimited_nova() }} + api_versions: + {{ volume_service(version=volume_version, service_type=volume_service_type) }} {% endcall %} runner: {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} diff --git a/functest/opnfv_tests/openstack/rally/task.yaml b/functest/opnfv_tests/openstack/rally/task.yaml index 14d4e718c..181fdb42e 100644 --- a/functest/opnfv_tests/openstack/rally/task.yaml +++ b/functest/opnfv_tests/openstack/rally/task.yaml @@ -4,7 +4,7 @@ {%- endif %} {%- from "macro/macro.yaml" import user_context, vm_params, unlimited_volumes, constant_runner, rps_runner, no_failures_sla -%} -{%- from "macro/macro.yaml" import volumes, unlimited_nova, unlimited_neutron, glance_args -%} +{%- from "macro/macro.yaml" import volumes, unlimited_nova, unlimited_neutron, glance_args, volume_service -%} --- {% if "authenticate" in service_list %} |