Fix: Include target_project_id in RBAC creation

This fixes an issue where we cannot create multiple Neutron RBAC
policies using the same source project and network.

Closes-Bug: #2129677
Change-Id: Ib3c63131f9ae09abd03fc7d619e3566267690216
Signed-off-by: Matt Crees <mattc@stackhpc.com>
This commit is contained in:
Matt Crees
2026-09-23 09:35:26 +01:00
parent da4a211b2d
commit 291d64adaa
2 changed files with 6 additions and 2 deletions
+3 -2
View File
@@ -252,7 +252,7 @@ class NeutronRBACPolicy(OpenStackModule):
matches = self._find_matches()
if len(matches) > 1:
self.fail_json(msg='Found more a single matching RBAC policy'
self.fail_json(msg='Found more than a single matching RBAC policy'
' which match the given parameters.')
elif len(matches) == 1:
return matches[0]
@@ -269,7 +269,8 @@ class NeutronRBACPolicy(OpenStackModule):
.format(', '.join(missing_keys)))
kwargs = dict((k, self.params[k])
for k in ['action', 'object_type', 'project_id'])
for k in ['action', 'object_type', 'project_id',
'target_project_id'])
policies = self.conn.network.rbac_policies(**kwargs)