diff --git a/inventory_provider/routes/poller.py b/inventory_provider/routes/poller.py index 2742531ad336b2685effacd122820724ef2a105e..a76b9981356907e37ebd78c2fac91390f697c26c 100644 --- a/inventory_provider/routes/poller.py +++ b/inventory_provider/routes/poller.py @@ -526,7 +526,15 @@ def _get_dashboard_data(ifc, possible_names): name = _get_customer_name(description) names = [name] if BRIAN_DASHBOARDS.L2_CIRCUIT.name in dashboards: - names = names + possible_names + # DBOARD3-524 + # Uncomment this line and comment the next if they want all + # customers from IMS + # names = names + possible_names + + # Uncomment this line and comment previous if they only want + # customers from IMS that appear in the interface description + names = names + [n for n in possible_names + if n in description.upper().split(' ')] return { **ifc, @@ -534,19 +542,10 @@ def _get_dashboard_data(ifc, possible_names): 'name': name, 'interface_type': interface_type.name }, - # DBOARD3-524 - # Uncomment this section if they want all customers from IMS 'dashboards_info': [{ 'name': name, 'interface_type': interface_type.name } for name in set(names)] - - # Uncomment this section if they only want customers from IMS that - # appear in the interface description - # 'dashboards_info': [{ - # 'name': name, - # 'interface_type': interface_type.name - # } for name in set(names) if name in description.upper().split(' ')] }