Skip to content

Commit

Permalink
Merge branch 'v2' into addressblock
Browse files Browse the repository at this point in the history
  • Loading branch information
ybhalchim authored Jan 23, 2025
2 parents 7e58d71 + 4f3529b commit 2baf2ca
Show file tree
Hide file tree
Showing 27 changed files with 1,601 additions and 47 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,6 @@ cython_debug/

# Ignore the metadata files
**/.DS_Store

# Ignore the Anstibull files addded
dest/
3 changes: 3 additions & 0 deletions changelogs/fragments/55-ipam-address.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
deprecated_features:
- b1_ipam_ipv4_reservation - is deprecated in favor of 'ipam_address'.
- b1_ipam_ipv4_reservation_gather - is deprecated in favor of 'ipam_address_info'.
12 changes: 12 additions & 0 deletions meta/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ action_groups:
- ipam_host
- ipam_host_info
- ipam_next_available_address_block_info
- ipam_address
- ipam_address_info
- ipam_next_available_ip_info

infra:
- infra_join_token
Expand Down Expand Up @@ -88,3 +91,12 @@ plugin_routing:
deprecation:
removal_version: 3.0.0
warning_text: Use infoblox.bloxone.ipam_host_info instead.

b1_ipam_ipv4_reservation:
deprecation:
removal_version: 3.0.0
warning_text: Use infoblox.bloxone.ipam_address instead.
b1_ipam_ipv4_reservation_gather:
deprecation:
removal_version: 3.0.0
warning_text: Use infoblox.bloxone.ipam_address_info instead.
4 changes: 4 additions & 0 deletions plugins/modules/b1_ipam_ipv4_reservation.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
author: "Amit Mishra (@amishra), Sriram Kannan(@kannans)"
short_description: Configure IPv4 address reservation on Infoblox BloxOne DDI
version_added: "1.0.1"
deprecated:
removed_in: 3.0.0
why: This module is deprecated and will be removed in version 3.0.0. Use M(ipam_address) instead.
alternative: Use M(ipam_address) instead.
description:
- Get, Create, Update and Delete IPv4 address reservation on Infoblox BloxOne DDI. This module manages the IPAM IPv4 address reservation object using BloxOne REST APIs.
requirements:
Expand Down
4 changes: 4 additions & 0 deletions plugins/modules/b1_ipam_ipv4_reservation_gather.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
author: "Amit Mishra (@amishra), Sriram Kannan(@kannans)"
short_description: Gather information about Address Block in B1DDI
version_added: "1.0.1"
deprecated:
removed_in: 3.0.0
why: This module is deprecated and will be removed in version 3.0.0. Use M(ipam_address_info) instead.
alternative: Use M(ipam_address_info) instead.
description:
- Gather information about Address Block object on Infoblox BloxOne DDI. This module gather information about address block object using BloxOne REST APIs.
requirements:
Expand Down
9 changes: 5 additions & 4 deletions plugins/modules/dns_auth_zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,7 @@
description:
- "The resource identifier."
type: str
required: true
zone_authority:
description:
- "Optional. ZoneAuthority."
Expand Down Expand Up @@ -2015,7 +2016,7 @@ def find(self):
return None
raise e
else:
filter = f"fqdn=='{self.params['fqdn']}'"
filter = f"fqdn=='{self.params['fqdn']}' and view=='{self.params['view']}'"
resp = AuthZoneApi(self.client).list(filter=filter, inherit="full")
if len(resp.results) == 1:
return resp.results[0]
Expand All @@ -2036,7 +2037,7 @@ def update(self):
return None

update_body = self.payload
update_body = self.validate_readonly_on_update(self.existing, update_body, ["fqdn", "primary_type"])
update_body = self.validate_readonly_on_update(self.existing, update_body, ["fqdn", "primary_type", "view"])

resp = AuthZoneApi(self.client).update(id=self.existing.id, body=update_body, inherit="full")
return resp.result.model_dump(by_alias=True, exclude_none=True)
Expand Down Expand Up @@ -2309,7 +2310,7 @@ def main():
),
),
use_forwarders_for_subzones=dict(type="bool"),
view=dict(type="str"),
view=dict(type="str", required=True),
zone_authority=dict(
type="dict",
options=dict(
Expand All @@ -2328,7 +2329,7 @@ def main():
module = AuthZoneModule(
argument_spec=module_args,
supports_check_mode=True,
required_if=[("state", "present", ["fqdn", "primary_type"])],
required_if=[("state", "present", ["fqdn", "primary_type", "view"])],
)

module.run_command()
Expand Down
6 changes: 2 additions & 4 deletions plugins/modules/dns_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,7 @@ def find(self):
return None
raise e
else:
# TODO - add view to filter once it is supported, removed due to NORTHSTAR-12614
# filter = f"fqdn=='{self.params['fqdn']}' and view =='{self.params['view']}'"
filter = f"fqdn=='{self.params['fqdn']}'"
filter = f"fqdn=='{self.params['fqdn']}' and view =='{self.params['view']}'"
resp = DelegationApi(self.client).list(filter=filter)
if len(resp.results) == 1:
return resp.results[0]
Expand Down Expand Up @@ -327,7 +325,7 @@ def main():
module = DelegationModule(
argument_spec=module_args,
supports_check_mode=True,
required_if=[("state", "present", ["fqdn", "delegation_servers"])],
required_if=[("state", "present", ["fqdn", "delegation_servers", "view"])],
)

module.run_command()
Expand Down
9 changes: 5 additions & 4 deletions plugins/modules/dns_forward_zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
description:
- "The resource identifier."
type: str
required: true
extends_documentation_fragment:
- infoblox.bloxone.common
Expand Down Expand Up @@ -306,7 +307,7 @@ def find(self):
return None
raise e
else:
filter = f"fqdn=='{self.params['fqdn']}'"
filter = f"fqdn=='{self.params['fqdn']}' and view=='{self.params['view']}'"
resp = ForwardZoneApi(self.client).list(filter=filter)
if len(resp.results) == 1:
return resp.results[0]
Expand All @@ -327,7 +328,7 @@ def update(self):
return None

update_body = self.payload
update_body = self.validate_readonly_on_update(self.existing, update_body, ["fqdn"])
update_body = self.validate_readonly_on_update(self.existing, update_body, ["fqdn", "view"])

resp = ForwardZoneApi(self.client).update(id=self.existing.id, body=update_body)
return resp.result.model_dump(by_alias=True, exclude_none=True)
Expand Down Expand Up @@ -399,13 +400,13 @@ def main():
nsgs=dict(type="list", elements="str"),
parent=dict(type="str"),
tags=dict(type="dict"),
view=dict(type="str"),
view=dict(type="str", required=True),
)

module = ForwardZoneModule(
argument_spec=module_args,
supports_check_mode=True,
required_if=[("state", "present", ["fqdn"])],
required_if=[("state", "present", ["fqdn", "view"])],
)

module.run_command()
Expand Down
Loading

0 comments on commit 2baf2ca

Please sign in to comment.