Remove useless Meta-Action
Some Python class and packages need to be renamed for a better compliance with the shared terminology which provides a better understanding of Watcher objects and components by every contributor. Partially implements: blueprint glossary-related-refactoring Change-Id: Ie0e33562f5e990c264a50ab3f533cfa62eac1d19
This commit is contained in:
parent
8ebc898924
commit
b41a2cc940
@ -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")
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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 <EMAIL@ADDRESS>\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 ""
|
||||
|
||||
|
@ -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 <EMAIL@ADDRESS>, 2015.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 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 <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\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 ""
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user