netdevops / hier_config

Hierarchical Configuration
MIT License
126 stars 24 forks source link

Tag leaf items #65

Closed aedwardstx closed 3 years ago

aedwardstx commented 6 years ago

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

- [x] Update `add_tags`, `deep_append_tags`, etc. as needed

Exaggerated example

Remediation config with interfaces_with_children tag:

interface fa0/1
interface fa0/2
aedwardstx commented 3 years ago

Addressed in #68