From 66195fa2c2ef7767390b72260a3e53ed8e445abf Mon Sep 17 00:00:00 2001 From: Boris Pavlovic Date: Fri, 8 Aug 2014 02:08:25 +0400 Subject: [PATCH] Fix rally performance job in glance Recently we merged non backward compability change in rally https://review.openstack.org/#/c/112045/ So we need to fix plugin As well change name to something reasonable Change-Id: I040959e9d1e36f524e88174c9cbbeb7db2f4b66b --- rally-scenarios/glance.yaml | 2 +- rally-scenarios/plugins/plugin_sample.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/rally-scenarios/glance.yaml b/rally-scenarios/glance.yaml index 94ca94efd0..8e5db0e98c 100644 --- a/rally-scenarios/glance.yaml +++ b/rally-scenarios/glance.yaml @@ -29,7 +29,7 @@ tenants: 5 users_per_tenant: 2 - GlancePlugin.your_mega_benchmark: + GlancePlugin.create_and_list: - args: image_location: "~/.rally/extra/fake.img" diff --git a/rally-scenarios/plugins/plugin_sample.py b/rally-scenarios/plugins/plugin_sample.py index cde6c90173..7a5676eb88 100644 --- a/rally-scenarios/plugins/plugin_sample.py +++ b/rally-scenarios/plugins/plugin_sample.py @@ -26,13 +26,12 @@ Rally concepts https://wiki.openstack.org/wiki/Rally/Concepts import os from rally.benchmark.scenarios import base -from rally.benchmark.scenarios import utils as scenario_utils from rally.benchmark import utils as bench_utils class GlancePlugin(base.Scenario): - @scenario_utils.atomic_action_timer("glance.create_image_label") + @base.atomic_action_timer("glance.create_image_label") def _create_image(self, image_name, container_format, image_location, disk_format, **kwargs): """Create a new image. @@ -77,13 +76,13 @@ class GlancePlugin(base.Scenario): return image - @scenario_utils.atomic_action_timer("glance.list_images_label") + @base.atomic_action_timer("glance.list_images_label") def _list_images(self): return list(self.clients("glance").images.list()) @base.scenario(context={"cleanup": ["glance"]}) - def your_mega_benchmark(self, container_format, - image_location, disk_format, **kwargs): + def create_and_list(self, container_format, + image_location, disk_format, **kwargs): self._create_image(self._generate_random_name(), container_format, image_location,