Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipam_subnet implementation for Bloxone Ansible v2 #36

Merged
merged 15 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions changelogs/fragments/32-ip-space.yml
annieliinfoblox marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
deprecated_features:
- b1_ipam_ip_space - is deprecated in favor of `ipam_ip_space`.
- b1_ipam_ip_space_gather - is deprecated in favor of `ipam_ip_space_info`.
- b1_ipam_ip_subnet - is deprecated in favor of 'ipam_subnet'.
- b1_ipam_ip_subnet_gather - is deprecated in favor of 'ipam_subnet_info'.
3 changes: 3 additions & 0 deletions changelogs/fragments/36-subnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
deprecated_features:
- b1_ipam_ip_subnet - is deprecated in favor of 'ipam_subnet'.
- b1_ipam_ip_subnet_gather - is deprecated in favor of 'ipam_subnet_info'.
2 changes: 2 additions & 0 deletions meta/runtime.yml
annieliinfoblox marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ action_groups:
ipam:
- ipam_ip_space
- ipam_ip_space_info
- ipam_subnet
- ipam_subnet_info

plugin_routing:
modules:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/b1_ipam_subnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
version_added: "1.1.2"
deprecated:
removed_in: 3.0.0
alternative: Use M(ipam_ip_space) instead.
alternative: Use M(ipam_subnet) instead.
description:
- Create, Update and Delete Subnets on Infoblox BloxOne DDI. This module manages the IPAM Subnet object using BloxOne REST APIs.
requirements:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/b1_ipam_subnet_gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
version_added: "1.1.2"
deprecated:
removed_in: 3.0.0
alternative: Use M(ipam_ip_space) instead.
alternative: Use M(ipam_subnet_info) instead.
description:
- Gather information about subnet object in Infoblox BloxOne DDI. This module manages the subnet object using BloxOne REST APIs.
requirements:
Expand Down
2 changes: 1 addition & 1 deletion plugins/modules/ipam_subnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2467,7 +2467,7 @@ def find(self):
return None
raise e
else:
filter = f"address=='{self.params['address']}' and space=='{self.params['space']}'"
filter = f"address=='{self.params['address']}' and space=='{self.params['space']}' and cidr=='{self.params['cidr']}'"
mathewab marked this conversation as resolved.
Show resolved Hide resolved
resp = SubnetApi(self.client).list(filter=filter, inherit="full")
if len(resp.results) == 1:
return resp.results[0]
Expand Down
6 changes: 0 additions & 6 deletions tests/integration/targets/ipam_subnet/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -438,12 +438,6 @@

always:
# Cleanup if the test fails
- name: "Delete Subnet"
infoblox.bloxone.ipam_subnet:
address: "10.0.0.0/24"
space: "{{ ip_space.id }}"
state: "absent"
ignore_errors: true
- name: "Delete IP Space"
infoblox.bloxone.ipam_ip_space:
name: "{{ name }}"
Expand Down
Loading