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:
Mikhail Dubov 2014-10-13 12:28:45 +04:00
parent 07a2037e35
commit c5dae00f94
3 changed files with 10 additions and 4 deletions

View File

@ -21,6 +21,7 @@ from rally.benchmark.scenarios import base
class FakePlugin(base.Scenario):
"""Fake plugin with a scenario."""
@base.atomic_action_timer("test1")
def _test1(self, factor):
@ -32,5 +33,9 @@ class FakePlugin(base.Scenario):
@base.scenario()
def testplugin(self, factor=1):
"""Fake scenario.
:param factor: influences the argument value for a time.sleep() call
"""
self._test1(factor)
self._test2(factor)

View File

@ -734,7 +734,7 @@
CinderVolumes.create_and_attach_volume:
-
args:
volume_size: 1
size: 1
image:
name: "^cirros.*uec$"
flavor:
@ -755,7 +755,7 @@
-
args:
volume_type: false
volume_size:
size:
min: 1
max: 2
runner:
@ -778,7 +778,7 @@
-
args:
volume_type: true
volume_size:
size:
min: 1
max: 2
runner:
@ -803,7 +803,7 @@
CinderVolumes.create_nested_snapshots_and_attach_volume:
-
args:
volume_size:
size:
min: 1
max: 2
nested_level:

View File

@ -1288,6 +1288,7 @@ class FakeRunner(object):
class FakeScenario(base.Scenario):
"""Fake Scenario class."""
def idle_time(self):
return 0