Add swift scenario in rally 51/68151/2
authorCédric Ollivier <cedric.ollivier@orange.com>
Fri, 28 Jun 2019 09:31:45 +0000 (11:31 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Fri, 28 Jun 2019 12:31:59 +0000 (14:31 +0200)
As for refstack_object, it forces swift in SUT.
Role is hardcoded to admin as for a few Neutron tests.

Change-Id: I0ae823fc8f31016d37831a82f7a50e92b2ed5f58
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
(cherry picked from commit 72a238d63d6e2e15eb74d02c3030663404c3872c)

functest/opnfv_tests/openstack/rally/rally.py
functest/opnfv_tests/openstack/rally/scenario/opnfv-swift.yaml [new file with mode: 0644]
functest/opnfv_tests/openstack/rally/task.yaml

index 37b1488..780506e 100644 (file)
@@ -41,7 +41,7 @@ class RallyBase(singlevm.VmReady2):
 
     # pylint: disable=too-many-instance-attributes, too-many-public-methods
     TESTS = ['authenticate', 'glance', 'cinder', 'gnocchi', 'heat',
-             'keystone', 'neutron', 'nova', 'quotas']
+             'keystone', 'neutron', 'nova', 'quotas', 'swift']
 
     RALLY_CONF_PATH = "/etc/rally/rally.conf"
     RALLY_AARCH64_PATCH_PATH = pkg_resources.resource_filename(
diff --git a/functest/opnfv_tests/openstack/rally/scenario/opnfv-swift.yaml b/functest/opnfv_tests/openstack/rally/scenario/opnfv-swift.yaml
new file mode 100644 (file)
index 0000000..ccbe7be
--- /dev/null
@@ -0,0 +1,71 @@
+  SwiftObjects.create_container_and_object_then_list_objects:
+    -
+      args:
+        objects_per_container: 2
+        object_size: 5120
+      runner:
+        {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }}
+      context:
+        {{ user_context(tenants_amount, users_amount, use_existing_users) }}
+        roles:
+          - "admin"
+      sla:
+        {{ no_failures_sla() }}
+
+  SwiftObjects.list_objects_in_containers:
+    -
+      runner:
+        {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }}
+      context:
+        {{ user_context(tenants_amount, users_amount, use_existing_users) }}
+        roles:
+          - "admin"
+        swift_objects:
+          containers_per_tenant: 1
+          objects_per_container: 10
+          object_size: 1024
+      sla:
+        {{ no_failures_sla() }}
+
+  SwiftObjects.create_container_and_object_then_download_object:
+    -
+      args:
+        objects_per_container: 5
+        object_size: 1024
+      runner:
+        {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }}
+      context:
+        {{ user_context(tenants_amount, users_amount, use_existing_users) }}
+        roles:
+          - "admin"
+      sla:
+        {{ no_failures_sla() }}
+
+  SwiftObjects.create_container_and_object_then_delete_all:
+    -
+      args:
+        objects_per_container: 5
+        object_size: 102400
+      runner:
+        {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }}
+      context:
+        {{ user_context(tenants_amount, users_amount, use_existing_users) }}
+        roles:
+          - "admin"
+      sla:
+        {{ no_failures_sla() }}
+
+  SwiftObjects.list_and_download_objects_in_containers:
+    -
+      runner:
+        {{ constant_runner(concurrency=concurrency, times=iterations, is_smoke=smoke) }}
+      context:
+        {{ user_context(tenants_amount, users_amount, use_existing_users) }}
+        roles:
+          - "admin"
+        swift_objects:
+          containers_per_tenant: 2
+          objects_per_container: 5
+          object_size: 10240
+      sla:
+        {{ no_failures_sla() }}
index 181fdb4..3e69289 100644 (file)
@@ -42,3 +42,7 @@
 {% if "heat" in service_list %}
 {%- include "var/opnfv-heat.yaml"-%}
 {% endif %}
+
+{% if "swift" in service_list %}
+{%- include "var/opnfv-swift.yaml"-%}
+{% endif %}