Delete code related to Namespaces
Change-Id: I0f55e8a8a4306654bfb16926d03abdd5df68142b
This commit is contained in:
parent
374ffec8a1
commit
7f6d69933e
|
@ -80,28 +80,3 @@ class Action(object):
|
|||
doesn't override this method then the action is synchronous.
|
||||
"""
|
||||
return True
|
||||
|
||||
|
||||
class Namespace(object):
|
||||
"""Action namespace."""
|
||||
|
||||
def __init__(self, namespace):
|
||||
self.name = namespace
|
||||
self.actions = {}
|
||||
|
||||
def contains_action_name(self, name):
|
||||
return name in self.actions
|
||||
|
||||
def get_action_class(self, name):
|
||||
return self.actions.get(name)
|
||||
|
||||
def __len__(self):
|
||||
return len(self.actions)
|
||||
|
||||
def log(self):
|
||||
for ext in self.actions:
|
||||
LOG.debug('%s:%s' % (self.name, ext))
|
||||
|
||||
def add(self, name, action):
|
||||
if name not in self.actions:
|
||||
self.actions[name] = action
|
||||
|
|
|
@ -16,7 +16,6 @@ import inspect
|
|||
|
||||
from stevedore import extension
|
||||
|
||||
from mistral.actions import base
|
||||
from mistral.actions import generator_factory
|
||||
from mistral.actions import std_actions
|
||||
from mistral.db.v2 import api as db_api
|
||||
|
@ -31,18 +30,6 @@ from mistral.workbook import parser as spec_parser
|
|||
LOG = logging.getLogger(__name__)
|
||||
|
||||
_ACTION_CTX_PARAM = 'action_context'
|
||||
_NAMESPACES = {}
|
||||
|
||||
|
||||
# TODO(nmakhotkin): It's not used anywhere.
|
||||
def _find_or_create_namespace(name):
|
||||
ns = _NAMESPACES.get(name)
|
||||
|
||||
if not ns:
|
||||
ns = base.Namespace(name)
|
||||
_NAMESPACES[name] = ns
|
||||
|
||||
return ns
|
||||
|
||||
|
||||
def get_registered_actions(**kwargs):
|
||||
|
|
Loading…
Reference in New Issue