From 3ab66494ba56afb912de9586ad36533140837ec6 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Fri, 13 Dec 2024 12:34:08 +0900 Subject: [PATCH] Fix the attribute to look up security group ids of a port A port instance from openstacksdk exposes ids of the associated security groups in the 'security_group_ids' attribute[1]. Replace the old attribute name from neutronclient to fix the regression caused by migration to openstacksdk[1]. [1] https://docs.openstack.org/openstacksdk/latest/user/resources/network/v2/port.html#openstack.network.v2.port.Port.security_group_ids [2] c7a640733042ac49a24ce2a457741fd4fe511571 Closes-Bug: #2089557 Change-Id: I58a6d816d0591989abf57261ab98f3368f107a1c --- openstack_dashboard/api/neutron.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openstack_dashboard/api/neutron.py b/openstack_dashboard/api/neutron.py index b999a13c0c..e8b0db0674 100644 --- a/openstack_dashboard/api/neutron.py +++ b/openstack_dashboard/api/neutron.py @@ -510,7 +510,7 @@ class SecurityGroupManager(object): ports = port_list(self.request, device_id=instance_id) sg_ids = [] for p in ports: - sg_ids += p.security_groups + sg_ids += p.security_group_ids return self._list(id=set(sg_ids)) if sg_ids else [] @profiler.trace