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:
parent
5878990105
commit
63618c81a5
@ -24,6 +24,7 @@ from rally.task import scenario
|
|||||||
from test_relative_import import zzz
|
from test_relative_import import zzz
|
||||||
|
|
||||||
|
|
||||||
|
@scenario.configure(name="FakePlugin.testplugin")
|
||||||
class FakePlugin(scenario.Scenario):
|
class FakePlugin(scenario.Scenario):
|
||||||
"""Fake plugin with a scenario."""
|
"""Fake plugin with a scenario."""
|
||||||
|
|
||||||
@ -35,8 +36,7 @@ class FakePlugin(scenario.Scenario):
|
|||||||
def _test2(self, factor):
|
def _test2(self, factor):
|
||||||
time.sleep(random.random() * factor)
|
time.sleep(random.random() * factor)
|
||||||
|
|
||||||
@scenario.configure()
|
def run(self, factor=1):
|
||||||
def testplugin(self, factor=1):
|
|
||||||
"""Fake scenario.
|
"""Fake scenario.
|
||||||
|
|
||||||
:param factor: influences the argument value for a time.sleep() call
|
:param factor: influences the argument value for a time.sleep() call
|
||||||
|
@ -16,10 +16,9 @@
|
|||||||
from rally.task import scenario
|
from rally.task import scenario
|
||||||
|
|
||||||
|
|
||||||
|
@scenario.configure(name="FakeScenarioPlugin1.list")
|
||||||
class FakeScenarioPlugin1(scenario.Scenario):
|
class FakeScenarioPlugin1(scenario.Scenario):
|
||||||
"""Sample fake plugin."""
|
|
||||||
|
|
||||||
@scenario.configure()
|
def run(self):
|
||||||
def list(self):
|
"""Sample fake scenario."""
|
||||||
"""Fake scenario."""
|
|
||||||
pass
|
pass
|
||||||
|
@ -16,10 +16,9 @@
|
|||||||
from rally.task import scenario
|
from rally.task import scenario
|
||||||
|
|
||||||
|
|
||||||
|
@scenario.configure(name="FakeScenarioPlugin2.list")
|
||||||
class FakeScenarioPlugin2(scenario.Scenario):
|
class FakeScenarioPlugin2(scenario.Scenario):
|
||||||
"""Sample fake plugin."""
|
|
||||||
|
|
||||||
@scenario.configure()
|
def run(self):
|
||||||
def list(self):
|
"""Sample fake scenario."""
|
||||||
"""Fake scenario."""
|
|
||||||
pass
|
pass
|
||||||
|
Loading…
Reference in New Issue
Block a user