Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Match class mappings against entity name incl. subdir
If a node is defined in a subdirectory, then match class mappings against the entire (relative) path of the node, including its subdirectory. For instance, you might have your nodes arranged in subdirectories according to the datacentre that they are in: - zurich/host1.example.ch - zurich/host2.example.ch - munich/host1.example.de - munich/host2.example.de A class mapping such as /^([^\/]+)\// hosted-in-\\1 would now automatically assign the hosted-in-zurich and hosted-in-munich classes to the hosts, according to which subdirectory their (yaml_fs) files reside in. The information is transported in the so-called entity name, so other storage backends can also introduce such "tags", they need not be related to a filesystem path. Signed-off-by: martin f. krafft <madduck@madduck.net>
- Loading branch information
Showing
4 changed files
with
21 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters