Remove old way to describe scenario plugin via method

Initally Rally scenario plugins were methods of speical class.
However to unify scenarios with other plugins we moved to model
where plugin is class.

We have a bunch of code that was used for transition and backward
compatiblity that we can finally remove.

Change-Id: Ia6841068eb1d5a39a8f64f160160f1fcc1e05ac5
This commit is contained in:
Boris Pavlovic 2017-05-14 21:43:57 -07:00
parent 5878990105
commit 63618c81a5
3 changed files with 8 additions and 10 deletions

View File

@ -24,6 +24,7 @@ from rally.task import scenario
from test_relative_import import zzz
@scenario.configure(name="FakePlugin.testplugin")
class FakePlugin(scenario.Scenario):
"""Fake plugin with a scenario."""
@ -35,8 +36,7 @@ class FakePlugin(scenario.Scenario):
def _test2(self, factor):
time.sleep(random.random() * factor)
@scenario.configure()
def testplugin(self, factor=1):
def run(self, factor=1):
"""Fake scenario.
:param factor: influences the argument value for a time.sleep() call

View File

@ -16,10 +16,9 @@
from rally.task import scenario
@scenario.configure(name="FakeScenarioPlugin1.list")
class FakeScenarioPlugin1(scenario.Scenario):
"""Sample fake plugin."""
@scenario.configure()
def list(self):
"""Fake scenario."""
def run(self):
"""Sample fake scenario."""
pass

View File

@ -16,10 +16,9 @@
from rally.task import scenario
@scenario.configure(name="FakeScenarioPlugin2.list")
class FakeScenarioPlugin2(scenario.Scenario):
"""Sample fake plugin."""
@scenario.configure()
def list(self):
"""Fake scenario."""
def run(self):
"""Sample fake scenario."""
pass