[#7] Improve tag handling
All checks were successful
CI / ci (push) Successful in 1m16s

Closes: #7
This commit is contained in:
Aloïs Micard 2025-05-01 08:49:38 +02:00
parent eb663ee3c6
commit c892d596f4
2 changed files with 7 additions and 1 deletions

View file

@ -2,6 +2,10 @@
## [Unreleased]
### Fixed
- [#7] Improve tag handling.
## [0.2.0] - 21/04/2025
### New

View file

@ -88,6 +88,7 @@ def _process_pve_tags(
slug=f'pool-{_pve_pool["poolid"]}'.lower(),
description=f'Proxmox pool {_pve_pool["poolid"]}',
)
_nb_objects['tags'][_nb_tag.name] = _nb_tag
return _nb_objects
@ -433,6 +434,7 @@ def main():
for pve_vm_resource in pve_api.cluster.resources.get(type='vm'):
pve_vm_tags[pve_vm_resource['vmid']] = []
if 'pool' in pve_vm_resource:
pve_vm_tags[pve_vm_resource['vmid']].append(f'Pool/{pve_vm_resource["pool"]}')
if 'tags' in pve_vm_resource: