-
Notifications
You must be signed in to change notification settings - Fork 48
load_template improvements #143
Comments
I can work on these, I just wanted a placeholder so I remember things that I saw. |
I'm into this.
Funny one :) Yes, we should definitely avoid this.
They all sound good to me @ktbyers! Thanks! |
The idea behind this was that you would specify you want the
If you load the template |
The advantage I see is since a lot of platforms copy Cisco for configuration, you could potentially use the same template across multiple platforms (without resorting to symlinks). The method was confusing when trying to use it as it took several tries to figure out how to get it to work (i.e. the most logical expectation was you could specify 'my_file.j2' and it would look in current working directory). This could be improved, however, by improving the documentation for this method. I don't think the loading from current working directory is very important, however... |
That the documentation could be improved nobody doubts it :( |
Here are some improvements to load_template() I think we should make.
Support 'replace' operation. I would propose that we add a mode='merge' / mode='replace' parameter.
Have it behave properly if you specify 'my_template.j2' currently it will look for 'my_template.j2.j2'.
Be able to load templates from current working directory (as long as we can make this work in a reasonable way without breaking backwords compatibility).
Improve the docs here, http://napalm.readthedocs.io/en/latest/base.html
I think the behavior of some of the parameters needs clarified.
The text was updated successfully, but these errors were encountered: