Skip to content

Commit

Permalink
Merge pull request #145 from CiscoISE/develop
Browse files Browse the repository at this point in the history
Develop v2.9.4
  • Loading branch information
fmunozmiranda authored Oct 16, 2024
2 parents 800568b + 0472df1 commit 2d75144
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
11 changes: 10 additions & 1 deletion changelogs/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1026,4 +1026,13 @@ releases:
- network_device - mask param can be string or int, cast to int at the end.
- reservation - remove duplicate parameter.
- support_bundle_download - remove duplicate parameter.
- trusted_certificate - fix comparison between request and current object.
- trusted_certificate - fix comparison between request and current object.
2.9.4:
release_date: "2024-10-16"
changes:
release_summary: Update.
bugfixes:
- Collection not compatible with ansible.utils 5.x.y
- Getting deployment info for entire deployment does not work
- cisco.ise.pan_ha object has no attribute 'enable_pan_ha'

2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tags:
- networking
- sdn
dependencies:
ansible.utils: ">=2.0.0,<5.0"
ansible.utils: ">=2.0.0,<6.0"
repository: https://github.com/CiscoISE/ansible-ise
documentation: https://ciscoise.github.io/ansible-ise/
homepage: https://github.com/CiscoISE/ansible-ise
Expand Down
2 changes: 1 addition & 1 deletion plugins/action/node_deployment_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def run(self, tmp=None, task_vars=None):
if not name and not id:
response = ise.exec(
family="node_deployment",
function='get_nodes',
function='get_deployment_nodes',
params=self.get_object(self._task.args)
).response['response']
self._result.update(dict(ise_response=response))
Expand Down
23 changes: 19 additions & 4 deletions plugins/action/pan_ha.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def exists(self):
if name_exists:
_id = prev_obj.get("id")
if id_exists and name_exists and o_id != _id:
raise InconsistentParameters("The 'id' and 'name' params don't refer to the same object")
raise InconsistentParameters(
"The 'id' and 'name' params don't refer to the same object")
it_exists = prev_obj is not None and isinstance(prev_obj, dict)
return (it_exists, prev_obj)

Expand Down Expand Up @@ -133,7 +134,8 @@ def delete(self):
class ActionModule(ActionBase):
def __init__(self, *args, **kwargs):
if not ANSIBLE_UTILS_IS_INSTALLED:
raise AnsibleActionFail("ansible.utils is not installed. Execute 'ansible-galaxy collection install ansible.utils'")
raise AnsibleActionFail(
"ansible.utils is not installed. Execute 'ansible-galaxy collection install ansible.utils'")
super(ActionModule, self).__init__(*args, **kwargs)
self._supports_async = False
self._supports_check_mode = False
Expand Down Expand Up @@ -173,8 +175,21 @@ def run(self, tmp=None, task_vars=None):
(obj_exists, prev_obj) = obj.exists()
if obj_exists:
if obj.requires_update(prev_obj):
response = prev_obj
ise.object_present_and_different()
ise_update_response = obj.update()
self._result.update(
dict(ise_update_response=ise_update_response))
(obj_exists, updated_obj) = obj.exists()
response = updated_obj
has_changed = None
has_changed = ise_update_response.get(
"UpdatedFieldsList").get("updatedField")
if (len(has_changed) == 0 or
has_changed[0].get("newValue") == "" and
has_changed[0].get("newValue") == has_changed[0].get("oldValue")):
self._result.pop("ise_update_response", None)
ise.object_already_present()
else:
ise.object_updated()
else:
response = prev_obj
ise.object_already_present()
Expand Down

0 comments on commit 2d75144

Please sign in to comment.