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
This commit is contained in:
Sumit Naiksatam 2017-05-17 16:48:36 -07:00
parent 90fcafd4da
commit 0dc6c63fe3
1 changed files with 6 additions and 0 deletions

View File

@ -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')