From 70068fc9ee91ea4efbe4734a62d2e890f576add6 Mon Sep 17 00:00:00 2001 From: bvargasre Date: Thu, 21 Nov 2024 09:49:01 -0600 Subject: [PATCH 1/2] Fix mask validation to handle None values in NetworkDeviceIPList --- plugins/action/network_device.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/plugins/action/network_device.py b/plugins/action/network_device.py index 98c74a810..cad54585a 100644 --- a/plugins/action/network_device.py +++ b/plugins/action/network_device.py @@ -59,18 +59,19 @@ class NetworkDevice(object): def __init__(self, params, ise): self.ise = ise network_device_iplist = params.get("NetworkDeviceIPList", []) - # Ensure mask is always an integer - for ip in network_device_iplist: - try: - if isinstance(ip.get("mask"), str): - ip["mask"] = int(ip["mask"]) - except ValueError: - self.ise.fail_json( - msg=( - "The mask value for the IP address is not an integer." - " Please provide a valid integer value." + if network_device_iplist is not None: + # Ensure mask is always an integer + for ip in network_device_iplist: + try: + if isinstance(ip.get("mask"), str): + ip["mask"] = int(ip["mask"]) + except ValueError: + self.ise.fail_json( + msg=( + "The mask value for the IP address is not an integer." + " Please provide a valid integer value." + ) ) - ) self.new_object = dict( name=params.get("name"), description=params.get("description"), From b2c839ff25ba38579dccc7dea2f113d1f542e09c Mon Sep 17 00:00:00 2001 From: bvargasre Date: Thu, 21 Nov 2024 09:49:39 -0600 Subject: [PATCH 2/2] Bump version to 2.9.6 and update changelog with bugfixes for network_device module --- README.md | 2 +- changelogs/changelog.yaml | 8 +++++++- galaxy.yml | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8a29968b7..908704796 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ The following table shows the supported versions. | 3.1.0 | 2.0.0 | 1.2.0 | | 3.1_Patch_1 | 2.5.16 | 2.0.10 | | 3.2_beta | 2.8.0 | 2.1.1 | -| 3.3_patch_1 | 2.9.3 | 2.2.3 | +| 3.3_patch_1 | 2.9.6 | 2.2.3 | If your Ansible collection is older please consider updating it first. *Notes*: diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index 3621a6dc9..ce0e9174b 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -1040,4 +1040,10 @@ releases: changes: release_summary: Update. bugfixes: - - cisco.ise.support_bundle_download keeps failing after downloading the file \ No newline at end of file + - cisco.ise.support_bundle_download keeps failing after downloading the file + 2.9.6: + release_date: "2024-11-21" + changes: + release_summary: Update network_device module. + bugfixes: + - network_device - Fix mask validation to handle None values in NetworkDeviceIPList \ No newline at end of file diff --git a/galaxy.yml b/galaxy.yml index 9cd0601af..5678a2363 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,7 +1,7 @@ --- namespace: cisco name: ise -version: 2.9.5 +version: 2.9.6 readme: README.md authors: - Rafael Campos