Rename Meta-Action to 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.

This patchset is there to change Meta-Action to Action

Partially implements: blueprint glossary-related-refactoring

Change-Id: Ie67b800332179be93718030ddd7a36ddc76a544c
This commit is contained in:
Jean-Emile DARTOIS
2015-12-04 18:13:03 +01:00
parent 5e8c1af665
commit 087c4d49ed
19 changed files with 137 additions and 200 deletions

View File

@@ -57,6 +57,6 @@ class Solution(object):
"Should have implemented this") # pragma:no cover
@abc.abstractproperty
def meta_actions(self):
def actions(self):
raise NotImplementedError(
"Should have implemented this") # pragma:no cover

View File

@@ -24,20 +24,21 @@ LOG = log.getLogger(__name__)
class DefaultSolution(Solution):
def __init__(self):
self._meta_actions = []
def add_change_request(self, r):
self._meta_actions.append(r)
def __str__(self):
val = ""
for action in self._meta_actions:
val += str(action) + "\n"
return val
@property
def meta_actions(self):
"""Get the current meta-actions of the solution
"""The DefaultSolution class store a set of actions generated by a
strategy in order to achieve the goal.
"""
return self._meta_actions
super(DefaultSolution, self).__init__()
self._actions = []
def add_change_request(self, r):
self._actions.append(r)
def __str__(self):
return "\n".join(self._actions)
@property
def actions(self):
"""Get the current actions of the solution
"""
return self._actions