Rename context.context -> context.configure

We should rename this decorator to be consistent in naming
with other rally plugin types.

Change-Id: I4586e48617f048f8c8a2e88bc3b59aa7f6dfe4a8
This commit is contained in:
Alexandr Nevenchannyy 2015-07-24 00:05:21 +03:00 committed by Boris Pavlovic
parent bb73c5f40f
commit 8b09f60c43
20 changed files with 22 additions and 22 deletions

View File

@ -23,7 +23,7 @@ from rally.task import context
LOG = logging.getLogger(__name__)
@context.context(name="ceilometer", order=450)
@context.configure(name="ceilometer", order=450)
class CeilometerSampleGenerator(context.Context):
"""Context for creating samples and collecting resources for benchmarks."""

View File

@ -25,7 +25,7 @@ from rally.task.scenarios import base as scenario_base
LOG = logging.getLogger(__name__)
@context.context(name="volumes", order=420)
@context.configure(name="volumes", order=420)
class VolumeGenerator(context.Context):
"""Context class for adding volumes to each user for benchmarks."""

View File

@ -24,7 +24,7 @@ from rally.task import context
LOG = logging.getLogger(__name__)
@context.context(name="images", order=410)
@context.configure(name="images", order=410)
class ImageGenerator(context.Context):
"""Context class for adding images to each user for benchmarks."""

View File

@ -24,7 +24,7 @@ from rally.task import context
LOG = logging.getLogger(__name__)
@context.context(name="stacks", order=435)
@context.configure(name="stacks", order=435)
class StackGenerator(context.Context):
"""Context class for create temporary stacks with resources.

View File

@ -25,7 +25,7 @@ from rally.task import context
LOG = logging.getLogger(__name__)
@context.context(name="roles", order=330)
@context.configure(name="roles", order=330)
class RoleGenerator(context.Context):
"""Context class for adding temporary roles for benchmarks."""

View File

@ -52,7 +52,7 @@ CONF.register_opts(USER_CONTEXT_OPTS,
title="benchmark context options"))
@context.context(name="users", order=100)
@context.configure(name="users", order=100)
class UserGenerator(context.Context):
"""Context class for generating temporary users/tenants for benchmarks."""

View File

@ -28,7 +28,7 @@ from rally.task import context
LOG = logging.getLogger(__name__)
@context.context(name="murano_packages", order=401)
@context.configure(name="murano_packages", order=401)
class PackageGenerator(context.Context):
"""Context class for uploading applications for murano."""

View File

@ -85,7 +85,7 @@ def _prepare_open_secgroup(endpoint, secgroup_name):
return rally_open.to_dict()
@context.context(name="allow_ssh", order=320)
@context.configure(name="allow_ssh", order=320)
class AllowSSH(context.Context):
@utils.log_task_wrapper(LOG.info, _("Enter context: `allow_ssh`"))

View File

@ -27,7 +27,7 @@ from rally.task import context
LOG = logging.getLogger(__name__)
@context.context(name="network", order=350)
@context.configure(name="network", order=350)
class Network(context.Context):
CONFIG_SCHEMA = {
"type": "object",

View File

@ -24,7 +24,7 @@ from rally.task import context
LOG = logging.getLogger(__name__)
@context.context(name="lbaas", order=360)
@context.configure(name="lbaas", order=360)
class Lbaas(context.Context):
CONFIG_SCHEMA = {
"type": "object",

View File

@ -25,7 +25,7 @@ from rally.task import context
LOG = logging.getLogger(__name__)
@context.context(name="flavors", order=340)
@context.configure(name="flavors", order=340)
class FlavorsGenerator(context.Context):
"""Context creates a list of flavors."""

View File

@ -26,7 +26,7 @@ from rally.task import context
LOG = logging.getLogger(__name__)
@context.context(name="keypair", order=310)
@context.configure(name="keypair", order=310)
class Keypair(context.Context):
KEYPAIR_NAME = "rally_ssh_key"

View File

@ -26,7 +26,7 @@ from rally.task import types
LOG = logging.getLogger(__name__)
@context.context(name="servers", order=430)
@context.configure(name="servers", order=430)
class ServerGenerator(context.Context):
"""Context class for adding temporary servers for benchmarks.

View File

@ -29,7 +29,7 @@ from rally.task import context
LOG = logging.getLogger(__name__)
@context.context(name="quotas", order=300)
@context.configure(name="quotas", order=300)
class Quotas(context.Context):
"""Context class for updating benchmarks' tenants quotas."""

View File

@ -30,7 +30,7 @@ CONF = cfg.CONF
LOG = logging.getLogger(__name__)
@context.context(name="sahara_cluster", order=441)
@context.configure(name="sahara_cluster", order=441)
class SaharaCluster(context.Context):
"""Context class for setting up the Cluster an EDP job."""

View File

@ -26,7 +26,7 @@ from rally.task import context
LOG = logging.getLogger(__name__)
@context.context(name="sahara_image", order=440)
@context.configure(name="sahara_image", order=440)
class SaharaImage(context.Context):
"""Context class for adding and tagging Sahara images."""

View File

@ -32,7 +32,7 @@ LOG = logging.getLogger(__name__)
@six.add_metaclass(abc.ABCMeta)
@context.context(name="custom_image", order=500, hidden=True)
@context.configure(name="custom_image", order=500, hidden=True)
class BaseCustomImageGenerator(context.Context):
"""Base class for the contexts providing customized image with.

View File

@ -21,7 +21,7 @@ from rally.plugins.openstack.scenarios.vm import utils as vm_utils
import rally.task.context as context
@context.context(name="image_command_customizer", order=501)
@context.configure(name="image_command_customizer", order=501)
class ImageCommandCustomizerContext(custom_image.BaseCustomImageGenerator):
"""Context class for generating image customized by a command execution.

View File

@ -1494,7 +1494,7 @@ class FakeTimer(rally_utils.Timer):
return 0
@context.context(name="fake", order=1)
@context.configure(name="fake", order=1)
class FakeContext(context.Context):
CONFIG_SCHEMA = {
@ -1515,12 +1515,12 @@ class FakeContext(context.Context):
pass
@context.context(name="fake_hidden_context", order=1, hidden=True)
@context.configure(name="fake_hidden_context", order=1, hidden=True)
class FakeHiddenContext(FakeContext):
pass
@context.context(name="fake_user_context", order=1)
@context.configure(name="fake_user_context", order=1)
class FakeUserContext(FakeContext):
admin = {

View File

@ -25,7 +25,7 @@ from tests.unit import test
BASE = "rally.plugins.openstack.context.vm.custom_image"
@context.context(name="test_custom_image", order=500)
@context.configure(name="test_custom_image", order=500)
class TestImageGenerator(custom_image.BaseCustomImageGenerator):
def _customize_image(self, *args):
pass