Cover Rally with docstrings & Test this coverage
Rally should have detailed docstrings for: * Benchmark scenario classes * Benchmark scenarios * Deploy engines * Server providers * SLA Here we add such docstrings and also add a test suite that checks that Rally is 100% covered with docstrings and that these docstrings are correctly formed. We also change the interface of the following benchmark scenarios (for the sake of unification): * CinderVolumes.create_and_attach_volume * CinderVolumes.create_snapshot_and_attach_volume * CinderVolumes.create_nested_snapshots_and_attach_volume Finally, we refactor a bit NovaServers.boot_and_bounce_server. Change-Id: Ia38c8fc2d692a09719d3e068d332647d4b0da47f
This commit is contained in:
parent
07a2037e35
commit
c5dae00f94
@ -21,6 +21,7 @@ from rally.benchmark.scenarios import base
|
|||||||
|
|
||||||
|
|
||||||
class FakePlugin(base.Scenario):
|
class FakePlugin(base.Scenario):
|
||||||
|
"""Fake plugin with a scenario."""
|
||||||
|
|
||||||
@base.atomic_action_timer("test1")
|
@base.atomic_action_timer("test1")
|
||||||
def _test1(self, factor):
|
def _test1(self, factor):
|
||||||
@ -32,5 +33,9 @@ class FakePlugin(base.Scenario):
|
|||||||
|
|
||||||
@base.scenario()
|
@base.scenario()
|
||||||
def testplugin(self, factor=1):
|
def testplugin(self, factor=1):
|
||||||
|
"""Fake scenario.
|
||||||
|
|
||||||
|
:param factor: influences the argument value for a time.sleep() call
|
||||||
|
"""
|
||||||
self._test1(factor)
|
self._test1(factor)
|
||||||
self._test2(factor)
|
self._test2(factor)
|
||||||
|
@ -734,7 +734,7 @@
|
|||||||
CinderVolumes.create_and_attach_volume:
|
CinderVolumes.create_and_attach_volume:
|
||||||
-
|
-
|
||||||
args:
|
args:
|
||||||
volume_size: 1
|
size: 1
|
||||||
image:
|
image:
|
||||||
name: "^cirros.*uec$"
|
name: "^cirros.*uec$"
|
||||||
flavor:
|
flavor:
|
||||||
@ -755,7 +755,7 @@
|
|||||||
-
|
-
|
||||||
args:
|
args:
|
||||||
volume_type: false
|
volume_type: false
|
||||||
volume_size:
|
size:
|
||||||
min: 1
|
min: 1
|
||||||
max: 2
|
max: 2
|
||||||
runner:
|
runner:
|
||||||
@ -778,7 +778,7 @@
|
|||||||
-
|
-
|
||||||
args:
|
args:
|
||||||
volume_type: true
|
volume_type: true
|
||||||
volume_size:
|
size:
|
||||||
min: 1
|
min: 1
|
||||||
max: 2
|
max: 2
|
||||||
runner:
|
runner:
|
||||||
@ -803,7 +803,7 @@
|
|||||||
CinderVolumes.create_nested_snapshots_and_attach_volume:
|
CinderVolumes.create_nested_snapshots_and_attach_volume:
|
||||||
-
|
-
|
||||||
args:
|
args:
|
||||||
volume_size:
|
size:
|
||||||
min: 1
|
min: 1
|
||||||
max: 2
|
max: 2
|
||||||
nested_level:
|
nested_level:
|
||||||
|
@ -1288,6 +1288,7 @@ class FakeRunner(object):
|
|||||||
|
|
||||||
|
|
||||||
class FakeScenario(base.Scenario):
|
class FakeScenario(base.Scenario):
|
||||||
|
"""Fake Scenario class."""
|
||||||
|
|
||||||
def idle_time(self):
|
def idle_time(self):
|
||||||
return 0
|
return 0
|
||||||
|
Loading…
Reference in New Issue
Block a user