On demand deep merge #3639
|
Is pre_transform a good place to do a deep merge , or will it come and bite me back ? I do not want to have a separate ipsec plugin and induce dependencies for tunnel plugins, so a deep merge with a small upport API in _ipsec.py might do the job |
Replies: 2 comments
|
I’d be a little wary of doing it there. |
No. Rely on system defaults doing their job. Also, there's the question of settings precedence.
I have no idea how firewalls do IPsec stuff, but most networking vendors realized (the hard way) that people use IPsec to build private networks, and that routing matters, so they eventually gave up crazy ideas like crypto maps and settled on IPsec tunnels. So you'll need an IPsec tunnel plugin anyway, and you could have IPsec defaults defined there. |
I’d be a little wary of doing it there.
pre_transformis fine for derived topology data, but it’s late for defaults, andtopology.merge_update(ipsec_box)would let that file overwrite user values. I’d keep_ipsec.pyfor the shared helper, but load the common YAML through the normal plugin-default path instead