Files
openstacksdk/openstack
Stephen Finucane dcaba75909 compute: Use security group name or ID
Despite what Nova's api-ref currently says [1], the 'addSecurityGroup'
action only requires a security group name if using nova-network: it
will happily accept either a name or ID if using neutron.

We are using 'Proxy._get_resource' to allow users to pass either an ID
or an 'openstack.network.v2.security_group.SecurityGroup' object
(there's no implementation of Nova's deprecated SecurityGroup resource).
If given an ID, this help method will only populate the 'id' field of
the created resource. Thus, we need to use this if provided.

[1] https://docs.openstack.org/api-ref/compute/#add-security-group-to-a-server-addsecuritygroup-action

Change-Id: I3dd56414b32207a16c6c83971f0494ccb86e07d4
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #2089821
(cherry picked from commit ad6beea71d)
2025-10-14 11:18:22 +00:00
..
2025-03-31 16:50:55 +00:00
2023-05-05 11:31:36 +01:00
2024-01-09 10:54:07 +00:00
2023-05-05 12:46:17 +01:00
2019-10-04 13:08:21 +02:00
2016-06-03 09:32:26 -04:00