projects
/
osm
/
MON.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Fixes bugs for integration with policy module"
[osm/MON.git]
/
osm_mon
/
core
/
message_bus
/
common_consumer.py
diff --git
a/osm_mon/core/message_bus/common_consumer.py
b/osm_mon/core/message_bus/common_consumer.py
index
e79e98a
..
0ba003b
100755
(executable)
--- a/
osm_mon/core/message_bus/common_consumer.py
+++ b/
osm_mon/core/message_bus/common_consumer.py
@@
-77,10
+77,12
@@
aws_access_credentials = AccessCredentials()
vrops_rcvr = plugin_receiver.PluginReceiver()
vrops_rcvr = plugin_receiver.PluginReceiver()
-def get_vim_type(m
essage
):
+def get_vim_type(m
sg
):
"""Get the vim type that is required by the message."""
try:
"""Get the vim type that is required by the message."""
try:
- return json.loads(message.value)["vim_type"].lower()
+ vim_uuid = json.loads(msg.value)["vim_uuid"].lower()
+ credentials = database_manager.get_credentials(vim_uuid)
+ return credentials.type
except Exception as exc:
log.warn("vim_type is not configured correctly; %s", exc)
return None
except Exception as exc:
log.warn("vim_type is not configured correctly; %s", exc)
return None