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

azure_rm_securitygroup: allow string priority #23343

Closed
wants to merge 1 commit into from
Closed

azure_rm_securitygroup: allow string priority #23343

wants to merge 1 commit into from

Conversation

xkrt
Copy link

@xkrt xkrt commented Apr 6, 2017

SUMMARY

Due to #9362 Ansible jinja filters fails to convert strings to integers in complex objects scenario and azure_rm_securitygroup do not follow best practices for converting strings to integers in arguments where possible (descibed here #17992 (comment)), so if pass string value like '123' to priority argument - I get an error:

... 'priority': '123' - Rule priority attribute must be an integer.

I fix that by parsing priority if it have type string.
Plus I fix false changed: True for scenario where source_port_range or destination_port_range just single ports, compare_rules function compared strings with integers, which always led to false changed.

Tested with Ansible 2.3.0rc3.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

azure_rm_securitygroup

ANSIBLE VERSION
ansible 2.3.0.0
  config file = /vagrant/ansible/ansible.cfg
  configured module search path = Default w/o overrides
  python version = 2.7.12 (default, Nov 19 2016, 06:48:10) [GCC 5.4.0 20160609]

@ansibot ansibot added affects_2.4 This issue/PR affects Ansible v2.4 azure bugfix_pull_request cloud committer_review In order to be merged, this PR must follow the certified review workflow. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. labels Apr 6, 2017
@xkrt
Copy link
Author

xkrt commented Apr 6, 2017

@chouseknecht @nitzmahone plz review

@nitzmahone nitzmahone self-assigned this Apr 8, 2017
@nitzmahone nitzmahone added affects_2.2 This issue/PR affects Ansible v2.2 affects_2.3 This issue/PR affects Ansible v2.3 and removed needs_triage Needs a first human triage before being processed. labels Apr 8, 2017
@xkrt
Copy link
Author

xkrt commented Apr 26, 2017

@nitzmahone what committer_review label means? can't find it at https://github.com/ansible/community/blob/master/PR-FLOW.md

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Apr 26, 2017
@ansibot
Copy link
Contributor

ansibot commented Jun 23, 2017

@ansibot ansibot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed committer_review In order to be merged, this PR must follow the certified review workflow. labels Jul 26, 2017
@ansibot ansibot added the support:certified This issue/PR relates to certified code. label Aug 16, 2017
@xkrt
Copy link
Author

xkrt commented Sep 5, 2017

"Priority integer" issue resolved with #27354

@xkrt xkrt closed this Sep 6, 2017
@dagwieers
Copy link
Member

There is a light at the end of the tunnel. We made a change to Jinja2 so we don't see all variable types changed into strings. See: pallets/jinja#708

@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.2 This issue/PR affects Ansible v2.2 affects_2.3 This issue/PR affects Ansible v2.3 affects_2.4 This issue/PR affects Ansible v2.4 azure bug This issue/PR relates to a bug. cloud module This issue/PR relates to a module. needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:certified This issue/PR relates to certified code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants