netreplica / nrx

Netreplica Exporter
Apache License 2.0
85 stars 15 forks source link

Use `platforms_map.yaml` from `.nr` folder #90

Closed bortok closed 8 months ago

bortok commented 9 months ago

If a user has a customized platforms_map.yaml it would be better to store it outside of templates folder, so it won't be overwritten or conflict with git.

Since the file is searched through the same methods as the templates, would it have more sense to store the edited file under a custom folder where the custom templates could be stored as well? The custom folder could be placed under .nr by the user, or any other place, and path to it added to nrx.conf.

Alternatively, PLATFORM_MAP key in the nrx.conf could be used as well, as a replacement for -M parameter.

It might be useful to use $HOME/.nr/platform_map.yaml as a default value for PLATFORM_MAP, instead of current platform_map.yaml. [Implementation comment] didn't change the default, since it can be easily accomplished now via the combination if PLATFORM_MAP key in the nrx.conf and $HOME/.nr/platform_map.yaml value.

Is it possible to improve usability of template paths in nrx.conf by leveraging $HOME env var, instead using an absolute path? [Implementation comment] yes, implemented for several path-related parameters.