mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-11-24 01:43:43 +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:
|
if 'net' not in iface:
|
||||||
self.fail(
|
self.fail(
|
||||||
"Network name missing from interface definition")
|
"Network name missing from interface definition")
|
||||||
|
# First try to find a network in the specified project.
|
||||||
net = self.conn.network.find_network(iface['net'],
|
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:
|
if 'portip' not in iface:
|
||||||
# portip not set, add any ip from subnet
|
# portip not set, add any ip from subnet
|
||||||
|
|||||||
Reference in New Issue
Block a user