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] c7a6407330
Closes-Bug: #2089557
Change-Id: I58a6d816d0591989abf57261ab98f3368f107a1c
This commit is contained in:
parent
2ec0177edc
commit
3ab66494ba
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user