Lochnair / vyatta-wireguard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rewrite of template logic

Lochnair opened this issue · comments

IMO it's about time for a rewrite of all the logic in the templates. Or rather ripping all the logic out of the templates (except syntax validation etc.).

As things currently stand the templates are becoming harder and harder to maintain every time we try to add features or fix bugs, because more logic are added to an already convoluted template system.

Personally I'd like to see everything moved out to an external script in much the same way the VyOS guys have done, avoiding a mess in the templates.

VyOS' Python wrapper for cli-shell-api partly works on EdgeOS, because the cli_shell_api version on EdgeOS doesn't include isMulti, isTag and the likes.

I have managed to get it cpmpletely working by building a patched cli_shell_api binary that includes them. I guess we could ship that, and let it live side-by-side with the stock one.

This would also be a good opportunity to do breaking changes such as #92.

I'd love to hear what people think about this and any suggestions you might have.