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

Bugfix panos_nat_rule.py dnat_dynamic_address #267

Merged
merged 2 commits into from
Oct 5, 2021

Conversation

Spacebjorn
Copy link
Contributor

Description

After upgrading to version 2.8.0 my panos_nat_rule no longer worked. I was getting a key error, see below,

Error:

"module_stderr": "ansible_collections/paloaltonetworks/panos/plugins/modules/panos_nat_rule.py\", line 339, in create_nat_rule\nKeyError: 'dnat_dynamic_address'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1} 

I have corrected this by adding the below to the objects and parsing those params into the function call so create_nat_rule will no longer throw an error when those parameters are not supplied.

  • dnat_dynamic_address
  • dnat_dynamic_port
  • dnat_dynamic_distribution

Motivation and Context

The change is required because it breaks anything not using the dnat_dynamic_address.

Haven't opened an issue - I wanted to see if I could fix it myself before doing so.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

Sebastian With Olsen added 2 commits September 28, 2021 08:41
Copy link
Collaborator

@shinmog shinmog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@shinmog shinmog merged commit 03071b4 into PaloAltoNetworks:develop Oct 5, 2021
github-actions bot pushed a commit that referenced this pull request Oct 5, 2021
## [2.9.0](v2.8.0...v2.9.0) (2021-10-05)

### Features

* **panos_object_facts:** Add support for Custom URL Categories ([#249](#249)) ([30be003](30be003))

### Bug Fixes

* Improve minimum package error message ([#271](#271)) ([a77a53d](a77a53d))
* **panos_nat_rule:** Correct KeyError for dynamic xlate ([#267](#267)) ([03071b4](03071b4))
@github-actions
Copy link

github-actions bot commented Oct 5, 2021

🎉 This PR is included in version 2.9.0 🎉

The release is available on Ansible Galaxy and GitHub release

Posted by semantic-release bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants