Introduce Rally scenarios for Gnocchi 61/56061/1
authorJuha Kosonen <juha.kosonen@nokia.com>
Thu, 19 Apr 2018 12:20:55 +0000 (15:20 +0300)
committerJuha Kosonen <juha.kosonen@nokia.com>
Thu, 19 Apr 2018 12:20:55 +0000 (15:20 +0300)
Added scenarios for testing:

- capabilities
- status
- archive policy
- archive policy rule
- resource
- resource type
- metric

Change-Id: I79f4f0b2bd4d206588ea3edbce8037d1cb993646
Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
functest/opnfv_tests/openstack/rally/rally.py
functest/opnfv_tests/openstack/rally/scenario/full/opnfv-gnocchi.yaml [new file with mode: 0644]
functest/opnfv_tests/openstack/rally/scenario/sanity/opnfv-gnocchi.yaml [new file with mode: 0644]
functest/opnfv_tests/openstack/rally/task.yaml

index 2b775bc..248086e 100644 (file)
@@ -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 (file)
index 0000000..8da5142
--- /dev/null
@@ -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 (file)
index 0000000..15185f3
--- /dev/null
@@ -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() }}
index 033edb8..fe9304f 100644 (file)
 {%- 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 %}