projects
/
osm
/
MON.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "[PM] Adds group-id to Kafka consumer in agent"
[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
69abee5
..
dc5816e
100755
(executable)
--- a/
osm_mon/core/message_bus/common_consumer.py
+++ b/
osm_mon/core/message_bus/common_consumer.py
@@
-126,15
+126,16
@@
def main():
# TODO: Standardize all message models to avoid the need of figuring out where are certain fields
contains_list = False
list_index = None
# TODO: Standardize all message models to avoid the need of figuring out where are certain fields
contains_list = False
list_index = None
- ns_id = None
for k, v in six.iteritems(values):
if isinstance(v, dict):
if 'ns_id' in v:
for k, v in six.iteritems(values):
if isinstance(v, dict):
if 'ns_id' in v:
- ns_id = v['ns_id']
contains_list = True
list_index = k
contains_list = True
list_index = k
+ break
if not contains_list and 'ns_id' in values:
ns_id = values['ns_id']
if not contains_list and 'ns_id' in values:
ns_id = values['ns_id']
+ else:
+ ns_id = values[list_index]['ns_id']
vnf_index = values[list_index]['vnf_member_index'] if contains_list else values['vnf_member_index']
vnf_index = values[list_index]['vnf_member_index'] if contains_list else values['vnf_member_index']