Skip to content

fix: support comma, semicolon, and whitespace tag separators in get_tags_from_guests - #136

Open
dguerri wants to merge 1 commit into
credativ:mainfrom
dguerri:fix/tag-separator-parsing
Open

dguerri wants to merge 1 commit into
credativ:mainfrom
dguerri:fix/tag-separator-parsing

Conversation

@dguerri

@dguerri dguerri commented Oct 6, 2026

Copy link
Copy Markdown

Description

Proxmox VE serializes VM and container tags as comma-separated lists (tags: tag1,tag2,tag3) in guest configurations and API responses.

Currently, Tags.get_tags_from_guests splits only on semicolons (;), causing comma-separated tag lists to be ingested as a single unparsed string. Consequently, any tags after the first (including plb_affinity_*, plb_anti_affinity_*, plb_pin_*, and plb_ignore_*) fail prefix matching and are silently ignored.

Solution

Update Tags.get_tags_from_guests to split on [,;\s]+, supporting:

  • Standard Proxmox comma-separated tags (,)
  • CLI/legacy semicolon-separated tags (;)
  • Space-padded entries

Added unit tests in tests/test_tags.py covering QEMU and LXC guests with comma, semicolon, and spaced tags.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant