From 897c277e7242485213d561ff815b598f7ec448ee Mon Sep 17 00:00:00 2001 From: Juha Kosonen Date: Thu, 19 Apr 2018 15:20:55 +0300 Subject: Introduce Rally scenarios for Gnocchi Added scenarios for testing: - capabilities - status - archive policy - archive policy rule - resource - resource type - metric Change-Id: I79f4f0b2bd4d206588ea3edbce8037d1cb993646 Signed-off-by: Juha Kosonen --- functest/opnfv_tests/openstack/rally/rally.py | 2 +- .../rally/scenario/full/opnfv-gnocchi.yaml | 163 +++++++++++++++++++++ .../rally/scenario/sanity/opnfv-gnocchi.yaml | 110 ++++++++++++++ functest/opnfv_tests/openstack/rally/task.yaml | 4 + 4 files changed, 278 insertions(+), 1 deletion(-) create mode 100644 functest/opnfv_tests/openstack/rally/scenario/full/opnfv-gnocchi.yaml create mode 100644 functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-gnocchi.yaml diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py index 2b775bca0..248086e15 100644 --- a/functest/opnfv_tests/openstack/rally/rally.py +++ b/functest/opnfv_tests/openstack/rally/rally.py @@ -44,7 +44,7 @@ class RallyBase(testcase.TestCase): """Base class form Rally testcases implementation.""" # pylint: disable=too-many-instance-attributes - TESTS = ['authenticate', 'glance', 'cinder', 'heat', + TESTS = ['authenticate', 'glance', 'cinder', 'gnocchi', 'heat', 'keystone', 'neutron', 'nova', 'quotas', 'vm', 'all'] GLANCE_IMAGE_NAME = getattr(config.CONF, 'openstack_image_name') GLANCE_IMAGE_FILENAME = getattr(config.CONF, 'openstack_image_file_name') diff --git a/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-gnocchi.yaml b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-gnocchi.yaml new file mode 100644 index 000000000..8da5142e7 --- /dev/null +++ b/functest/opnfv_tests/openstack/rally/scenario/full/opnfv-gnocchi.yaml @@ -0,0 +1,163 @@ + Gnocchi.list_capabilities: + - + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + Gnocchi.get_status: + - + args: + detailed: false + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiArchivePolicyRule.list_archive_policy_rule: + - + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiArchivePolicyRule.create_archive_policy_rule: + - + args: + metric_pattern: "cpu_*" + archive_policy_name: "low" + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiArchivePolicyRule.create_delete_archive_policy_rule: + - + args: + metric_pattern: "cpu_*" + archive_policy_name: "low" + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiArchivePolicy.list_archive_policy: + - + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiArchivePolicy.create_archive_policy: + - + args: + definition: + - granularity: "0:00:01" + timespan: "1:00:00" + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiArchivePolicy.create_delete_archive_policy: + - + args: + definition: + - granularity: "0:00:01" + timespan: "1:00:00" + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiResourceType.list_resource_type: + - + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiResourceType.create_resource_type: + - + args: + attributes: + foo: + required: false + type: "string" + bar: + required: true + type: "number" + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiResourceType.create_delete_resource_type: + - + args: + attributes: + foo: + required: false + type: "string" + bar: + required: true + type: "number" + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiMetric.list_metric: + - + args: + limit: 10000 + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiMetric.create_metric: + - + args: + archive_policy_name: "low" + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiMetric.create_delete_metric: + - + args: + archive_policy_name: "low" + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} diff --git a/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-gnocchi.yaml b/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-gnocchi.yaml new file mode 100644 index 000000000..15185f385 --- /dev/null +++ b/functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-gnocchi.yaml @@ -0,0 +1,110 @@ + Gnocchi.list_capabilities: + - + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + Gnocchi.get_status: + - + args: + detailed: false + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiArchivePolicyRule.list_archive_policy_rule: + - + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiArchivePolicyRule.create_delete_archive_policy_rule: + - + args: + metric_pattern: "cpu_*" + archive_policy_name: "low" + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiArchivePolicy.list_archive_policy: + - + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiArchivePolicy.create_delete_archive_policy: + - + args: + definition: + - granularity: "0:00:01" + timespan: "1:00:00" + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiResourceType.list_resource_type: + - + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiResourceType.create_delete_resource_type: + - + args: + attributes: + foo: + required: false + type: "string" + bar: + required: true + type: "number" + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiMetric.list_metric: + - + args: + limit: 10000 + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} + + GnocchiMetric.create_delete_metric: + - + args: + archive_policy_name: "low" + context: + {{ user_context(tenants_amount, users_amount, use_existing_users) }} + runner: + {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }} + sla: + {{ no_failures_sla() }} diff --git a/functest/opnfv_tests/openstack/rally/task.yaml b/functest/opnfv_tests/openstack/rally/task.yaml index 033edb831..fe9304fc2 100644 --- a/functest/opnfv_tests/openstack/rally/task.yaml +++ b/functest/opnfv_tests/openstack/rally/task.yaml @@ -15,6 +15,10 @@ {%- include "var/opnfv-cinder.yaml"-%} {% endif %} +{% if "gnocchi" in service_list %} +{%- include "var/opnfv-gnocchi.yaml"-%} +{% endif %} + {% if "keystone" in service_list %} {%- include "var/opnfv-keystone.yaml"-%} {% endif %} -- cgit 1.2.3-korg