]> git.proxmox.com Git - pve-guest-common.git/commit
tag helpers: add get_unique_tags method for filtering out duplicates
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 21 Nov 2022 07:09:24 +0000 (08:09 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 21 Nov 2022 07:15:21 +0000 (08:15 +0100)
commit091598000c8dee1a348402c677d3892a1581f424
tree6ca3af92894b439b6e1cb31c9a8b0c863c5a1418
parent2bf45e382ac85e01804f52bd2cd36920004e2f5c
tag helpers: add get_unique_tags method for filtering out duplicates

tags must be unique, allow the user some control in how unique (case
sensitive) and honor the ordering settings (even if I doubt any
production setups wants to spent time and $$$ on cautiously
reordering all tags of their dozens to hundreds virtual guests..

Have some duplicate code to avoid checking to much in the loop
itself, as frequent branches can be more expensive.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/GuestHelpers.pm