Label->tag mapper: produce InventoryCollection<Tag> #16259
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This works same as last PR #16098 for save_inventory mode but also exposes a more concrete interface that I'll be able to use in graph refresh:
Creation of missing tags: The
tags_to_resolve_collection
can just be added to graph refresh.Reassigning tags: each
map_labels
returns individual InventoryObject - those can used to buildInventoryCollection that will work similar to
retag_entity
.(We originally planned to do reassignment using original code in post-refresh.
I'm postponing the move to post-refresh ;-) because we it was motivated by a new feature (going through policy) that is less critical than getting tagging working as now;
and IIUC I'd need to express desired taggings in some form for post-refresh anyway.
(PRs for both of the above that upcoming, WIP building right query similar to retag_entity and adding tests...)
Overview issue: ManageIQ/manageiq-providers-kubernetes#126
@miq-bot add-label enhancement
@Ladas @zgalor @moolitayer @djberg96 please review.