diff --git a/watcher/common/exception.py b/watcher/common/exception.py index 1fcd668ec..ee8c5df87 100644 --- a/watcher/common/exception.py +++ b/watcher/common/exception.py @@ -297,7 +297,3 @@ class VMNotFound(WatcherException): class HypervisorNotFound(WatcherException): message = _("The hypervisor could not be found") - - -class MetaActionNotFound(WatcherException): - message = _("The Meta-Action could not be found") diff --git a/watcher/decision_engine/planner/default.py b/watcher/decision_engine/planner/default.py index 6262b29e9..80ea60ed9 100644 --- a/watcher/decision_engine/planner/default.py +++ b/watcher/decision_engine/planner/default.py @@ -124,7 +124,7 @@ class DefaultPlanner(base.BasePlanner): description="{0}".format( action)) else: - raise exception.MetaActionNotFound() + raise exception.ActionNotFound() priority = priority_primitives[primitive['action_type']] to_schedule.append((priority, primitive)) diff --git a/watcher/locale/fr/LC_MESSAGES/watcher.po b/watcher/locale/fr/LC_MESSAGES/watcher.po index ce996004e..fe5261395 100644 --- a/watcher/locale/fr/LC_MESSAGES/watcher.po +++ b/watcher/locale/fr/LC_MESSAGES/watcher.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: python-watcher 0.21.1.dev32\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-12-18 15:33+0100\n" +"POT-Creation-Date: 2016-01-05 14:22+0100\n" "PO-Revision-Date: 2015-12-11 15:42+0100\n" "Last-Translator: FULL NAME \n" "Language: fr\n" @@ -66,7 +66,7 @@ msgstr "" msgid "ErrorDocumentMiddleware received an invalid status %s" msgstr "" -#: watcher/applier/primitives/change_nova_service_state.py:74 +#: watcher/applier/primitives/change_nova_service_state.py:75 msgid "The target state is not defined" msgstr "" @@ -258,10 +258,6 @@ msgstr "" msgid "The hypervisor could not be found" msgstr "" -#: watcher/common/exception.py:303 -msgid "The Meta-Action could not be found" -msgstr "" - #: watcher/common/keystone.py:59 msgid "No Keystone service catalog loaded" msgstr "" @@ -295,7 +291,7 @@ msgstr "" msgid "'obj' argument type is not valid" msgstr "" -#: watcher/decision_engine/strategy/selection/default.py:56 +#: watcher/decision_engine/strategy/selection/default.py:58 #, python-format msgid "Incorrect mapping: could not find associated strategy for '%s'" msgstr "" @@ -434,3 +430,6 @@ msgstr "" #~ msgid "'vm' argument type is not valid" #~ msgstr "" +#~ msgid "The Meta-Action could not be found" +#~ msgstr "" + diff --git a/watcher/locale/watcher.pot b/watcher/locale/watcher.pot index 2a67aa0da..856af3f9b 100644 --- a/watcher/locale/watcher.pot +++ b/watcher/locale/watcher.pot @@ -1,15 +1,15 @@ # Translations template for python-watcher. -# Copyright (C) 2015 ORGANIZATION +# Copyright (C) 2016 ORGANIZATION # This file is distributed under the same license as the python-watcher # project. -# FIRST AUTHOR , 2015. +# FIRST AUTHOR , 2016. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: python-watcher 0.21.1.dev62\n" +"Project-Id-Version: python-watcher 0.21.1.dev79\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" -"POT-Creation-Date: 2015-12-18 15:33+0100\n" +"POT-Creation-Date: 2016-01-05 14:22+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -65,7 +65,7 @@ msgstr "" msgid "ErrorDocumentMiddleware received an invalid status %s" msgstr "" -#: watcher/applier/primitives/change_nova_service_state.py:74 +#: watcher/applier/primitives/change_nova_service_state.py:75 msgid "The target state is not defined" msgstr "" @@ -256,10 +256,6 @@ msgstr "" msgid "The hypervisor could not be found" msgstr "" -#: watcher/common/exception.py:303 -msgid "The Meta-Action could not be found" -msgstr "" - #: watcher/common/keystone.py:59 msgid "No Keystone service catalog loaded" msgstr "" @@ -293,7 +289,7 @@ msgstr "" msgid "'obj' argument type is not valid" msgstr "" -#: watcher/decision_engine/strategy/selection/default.py:56 +#: watcher/decision_engine/strategy/selection/default.py:58 #, python-format msgid "Incorrect mapping: could not find associated strategy for '%s'" msgstr "" diff --git a/watcher/tests/decision_engine/test_default_planner.py b/watcher/tests/decision_engine/test_default_planner.py index 284335d48..3f829e4ea 100644 --- a/watcher/tests/decision_engine/test_default_planner.py +++ b/watcher/tests/decision_engine/test_default_planner.py @@ -17,9 +17,8 @@ import mock from mock import MagicMock -from watcher.common.exception import MetaActionNotFound +from watcher.common.exception import ActionNotFound from watcher.common import utils - from watcher.db import api as db_api from watcher.decision_engine.actions.base import BaseAction from watcher.decision_engine.planner.default import DefaultPlanner @@ -118,7 +117,7 @@ class TestDefaultPlanner(base.DbTestCase): audit = db_utils.create_test_audit(uuid=utils.generate_uuid()) fake_solution = SolutionFaker.build() fake_solution.actions[0] = "valeur_qcq" - self.assertRaises(MetaActionNotFound, self.default_planner.schedule, + self.assertRaises(ActionNotFound, self.default_planner.schedule, self.context, audit.id, fake_solution) def test_schedule_scheduled_empty(self):