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:
parent
bb73c5f40f
commit
8b09f60c43
@ -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."""
|
||||
|
||||
|
@ -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."""
|
||||
|
||||
|
@ -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."""
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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."""
|
||||
|
||||
|
@ -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."""
|
||||
|
||||
|
@ -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."""
|
||||
|
||||
|
@ -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`"))
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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."""
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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."""
|
||||
|
||||
|
@ -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."""
|
||||
|
||||
|
@ -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."""
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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 = {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user