Browse Source

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
Sumit Naiksatam 1 year ago
parent
commit
0dc6c63fe3
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      gbpui/panels/policytargets/tabs.py

+ 6
- 0
gbpui/panels/policytargets/tabs.py View File

@@ -158,6 +158,12 @@ class InstancesTab(tabs.TableTab):
158 158
                         if pt in policy_target_ids:
159 159
                             filtered_instances.append(item)
160 160
                             break
161
+                else:
162
+                    for port in api.neutron.port_list(self.request,
163
+                                                      device_id=item.id):
164
+                        if port.id in policy_target_ports:
165
+                            filtered_instances.append(item)
166
+                            break
161 167
         except Exception:
162 168
             self._has_more = False
163 169
             error_message = _('Unable to get instances')

Loading…
Cancel
Save