Merge "Search for the router network in specified project"

This commit is contained in:
Zuul
2026-09-09 16:01:25 +00:00
committed by Gerrit Code Review
2 changed files with 11 additions and 1 deletions
+3
View File
@@ -0,0 +1,3 @@
---
bugfixes:
- modules/router.py in function _build_router_interface_config network search will be performed in defined project first.
+8 -1
View File
@@ -497,8 +497,15 @@ class RouterModule(OpenStackModule):
if 'net' not in iface:
self.fail(
"Network name missing from interface definition")
# First try to find a network in the specified project.
net = self.conn.network.find_network(iface['net'],
ignore_missing=False)
ignore_missing=False,
**filters)
# Fall back to a global search for the network.
if not net:
net = self.conn.network.find_network(
iface['net'],
ignore_missing=False)
if 'portip' not in iface:
# portip not set, add any ip from subnet