Tagging rules can be written in such a way as to produce stranded children in the remediation config for a particular tag. While this is infrequent, it can be painful to track down.
[x] Under the HConfigChild class, populate the tag of a trunk HConfigChild object by recursively examining the tags of the leaf HConfigChild objects.
class HConfigChild(object):
@property
def tags(self):
my_tags = set(self._tags)
for child in self.children:
my_tags.update(child.tags)
return mytags
- [x] Update `add_tags`, `deep_append_tags`, etc. as needed
Exaggerated example
Tagging rules can be written in such a way as to produce stranded children in the remediation config for a particular tag. While this is infrequent, it can be painful to track down.
@property def tags(self): my_tags = set(self._tags) for child in self.children: my_tags.update(child.tags) return mytags
Remediation config with interfaces_with_children tag: