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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user