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
This commit is contained in:
Boris Pavlovic 2014-08-08 02:08:25 +04:00
parent 8c161b6a4b
commit 66195fa2c2
2 changed files with 5 additions and 6 deletions

View File

@ -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"

View File

@ -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,