Skip to content

Commit

Permalink
support multiple reserved IP blocks of same type in a metro
Browse files Browse the repository at this point in the history
  • Loading branch information
ctreatma committed Oct 10, 2024
1 parent 4c83264 commit a3bc586
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/modules/metal_reserved_ip_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,14 @@ def main():
fetched = module.get_by_id("metal_ip_reservation", tolerate_not_found)
else:
module.params['types'] = [module.params.get('type')]

attributes_to_compare = ["type", "metro"]
if module.params['network'] is not None:
attributes_to_compare.append("network")

fetched = module.get_one_from_list(
"metal_ip_reservation",
["type", "metro"],
attributes_to_compare,
)

if fetched:
Expand Down

0 comments on commit a3bc586

Please sign in to comment.