From 611db08eac264a43642101a5ee1c65fc9a3384c8 Mon Sep 17 00:00:00 2001 From: Anton Studenov Date: Fri, 16 Sep 2016 12:29:25 +0300 Subject: [PATCH] New plugin type - Hook - Added Hook Base class - Added HookExecuter implements spec: hook_section Change-Id: Ib72247c412ba06ec107b2635c79ce109bef83f16 --- rally/consts.py | 9 +++++++++ tests/unit/fakes.py | 3 +++ 2 files changed, 12 insertions(+) diff --git a/rally/consts.py b/rally/consts.py index dab791f2..a0a48128 100644 --- a/rally/consts.py +++ b/rally/consts.py @@ -181,6 +181,14 @@ class _ServiceType(utils.ImmutableMixin, utils.EnumMixin): return self.__names[service_type] +class _HookStatus(utils.ImmutableMixin, utils.EnumMixin): + """Hook result statuses.""" + UNKNOWN = "n/a" + SUCCESS = "success" + FAILED = "failed" + VALIDATION_FAILED = "validation_failed" + + TaskStatus = _TaskStatus() DeployStatus = _DeployStatus() EndpointPermission = _EndpointPermission() @@ -189,3 +197,4 @@ Service = _Service() EndpointType = _EndpointType() TempestTestsAPI = _TempestTestsAPI() TempestTestsSets = _TempestTestsSets() +HookStatus = _HookStatus() diff --git a/tests/unit/fakes.py b/tests/unit/fakes.py index 92b5d624..0735bc23 100644 --- a/tests/unit/fakes.py +++ b/tests/unit/fakes.py @@ -1713,6 +1713,9 @@ class FakeTimer(rally_utils.Timer): def timestamp(self): return 0 + def finish_timestamp(self): + return 3 + @context.configure(name="fake", order=1) class FakeContext(context.Context):