From 485f38fa0d504a5e5723a92525e4a6ab02176201 Mon Sep 17 00:00:00 2001 From: Sumit Naiksatam Date: Wed, 17 May 2017 16:48:36 -0700 Subject: [PATCH] Fix member list population In cases where the member is not created via the UI, the metadata used for filtering the members on retrieval is not added to the VMs. Hence any member VMs that are created outside the UI are never shown in the member list. This patch fixes this issue by reinstating the earlier filtering logic to find the member VMs belonging to a particular PTG in case the above metadata is not present. Change-Id: Ic2154d04c292269dd7cb46edf19f3a7f3bbe1364 Closes-bug: 1691598 --- gbpui/panels/policytargets/tabs.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gbpui/panels/policytargets/tabs.py b/gbpui/panels/policytargets/tabs.py index 15b95f8..bb21e4b 100644 --- a/gbpui/panels/policytargets/tabs.py +++ b/gbpui/panels/policytargets/tabs.py @@ -158,6 +158,12 @@ class InstancesTab(tabs.TableTab): if pt in policy_target_ids: filtered_instances.append(item) break + else: + for port in api.neutron.port_list(self.request, + device_id=item.id): + if port.id in policy_target_ports: + filtered_instances.append(item) + break except Exception: self._has_more = False error_message = _('Unable to get instances')