diff options
author | 2017-09-29 01:38:18 +0300 | |
---|---|---|
committer | 2017-09-29 01:38:18 +0300 | |
commit | d32f75145676bacefde0d08a14680a5984623451 (patch) | |
tree | 4b5eaf1107e6973b1eac636309a99c83074acbfc /app/discover/event_manager.py | |
parent | 0c5426cd309d720db1e30641e43d311ee0b751b0 (diff) |
release 1.0 calipso for opnfv apex
Change-Id: I3e63cd27c5f4d3756e67a07c749863a68e84dde2
Signed-off-by: Koren Lev <korenlev@gmail.com>
Diffstat (limited to 'app/discover/event_manager.py')
-rw-r--r-- | app/discover/event_manager.py | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/app/discover/event_manager.py b/app/discover/event_manager.py index 6a56912..e2f8282 100644 --- a/app/discover/event_manager.py +++ b/app/discover/event_manager.py @@ -40,12 +40,18 @@ class EventManager(Manager): } LISTENERS = { - 'Mirantis-6.0': DefaultListener, - 'Mirantis-7.0': DefaultListener, - 'Mirantis-8.0': DefaultListener, - 'RDO-Mitaka': DefaultListener, - 'RDO-Liberty': DefaultListener, - 'Apex-Euphrates': DefaultListener, + 'Mirantis': { + '6.0': DefaultListener, + '7.0': DefaultListener, + '8.0': DefaultListener, + }, + 'RDO': { + 'Mitaka': DefaultListener, + 'Liberty': DefaultListener, + }, + 'Apex': { + 'Euphrates': DefaultListener, + }, } def __init__(self): @@ -105,7 +111,8 @@ class EventManager(Manager): def get_listener(self, env: str): env_config = self.inv.get_env_config(env) - return self.LISTENERS.get(env_config.get('distribution')) + return (self.LISTENERS.get(env_config.get('distribution'), {}) + .get(env_config.get('distribution_version'))) def listen_to_events(self, listener: ListenerBase, env_name: str, process_vars: dict): listener.listen({ |