mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-11-21 14:48:41 +00:00
Merge "Search for the router network in specified project"
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
---
|
||||
bugfixes:
|
||||
- modules/router.py in function _build_router_interface_config network search will be performed in defined project first.
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user