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

[PR #1949/d0bb74a0 backport][stable-2] Allow tags strings containing commas in proxmox inventory plug-in #1998

Conversation

patchback[bot]
Copy link

@patchback patchback bot commented Mar 11, 2021

This is a backport of PR #1949 as merged into main (d0bb74a).

SUMMARY

Allowing proxmox tags strings containing commas to be passed as facts

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

plugins/inventory/proxmox.py

ADDITIONAL INFORMATION

The current behavior of the proxmox inventory plugin will attempt to parse values containing commas from the PVE API configs endpoint as dictionaries. However tags strings disallow '=' characters which will always cause parsing to fail for tags strings presented as comma separated list. This change will explicitly allow the 'tags' config to bypass dict parsing.

)

* Included explicit parsing for proxmox guest tags and updated corresponding unit test with tags key

* Including changelog fragment for PR 1949

* Removed ellipsis from test

Proxmox only permits periods when surrounded by alphanumeric characters

* Corrected punctuation for changelog entry

Co-authored-by: Felix Fontein <[email protected]>

* Allowing tags string to contain commas

* Incorporated new parsed tags fact with bugfix

* Correcting whitespace issues

* Update changelogs/fragments/1949-proxmox-inventory-tags.yml

Co-authored-by: Felix Fontein <[email protected]>

* Update plugins/inventory/proxmox.py

Co-authored-by: Felix Fontein <[email protected]>

* Update changelogs/fragments/1949-proxmox-inventory-tags.yml

Co-authored-by: Felix Fontein <[email protected]>

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit d0bb74a)
@ansibullbot ansibullbot added affects_2.10 bug This issue/PR relates to a bug community_review inventory inventory plugin needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) tests tests unit tests/unit labels Mar 11, 2021
@felixfontein felixfontein merged commit 87000ae into stable-2 Mar 12, 2021
@felixfontein felixfontein deleted the patchback/backports/stable-2/d0bb74a03b79b968a2ba6c3867e3f071dcbfbcc4/pr-1949 branch March 12, 2021 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug community_review inventory inventory plugin needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) tests tests unit tests/unit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants