Closed miroslavkohutik closed 1 year ago
This is due to this line:
Since there can be multiple network views containing the same networks, we need to ensure that the correct one in the list is picked, not just the first one.
For example in our test Infoblox, when we get the networkcontainer
for the 192.168.0.0/24
network, we get the following list:
[{'_ref': 'networkcontainer/ZG5zLm5ldHdb2dj3fuM8C6dPMAVyJDE5Mi4xNjguMC4wLzI0LzE:192.168.0.0/24/ipam',
'comment': 'Misc module',
'network': '192.168.0.0/24',
'network_view': 'ipam'},
{'_ref': 'networkcontainer/ZG5zLm5ldHdb2dj3fuM8C6dPMAVyJDE5Mi4xNjguMC4wLzI0LzA:192.168.0.0/24/default',
'comment': 'ipam3',
'network': '192.168.0.0/24',
'network_view': 'default'}]
The first one is not the correct one to use. The lookup plugin should provide a network_view
parameter that defaults to default
but can be overridden to a desired network view name. This should be used to extract the correct _ref
.
Infoblox returns an error:
Can not find requested number of networks
when trying to look up the next available network. My playbook:The full error message: