haproxy-tools
haproxy-tools copied to clipboard
More Feature Support
Thanks for creating this! I wanted to add support for updating/parsing more portions of HAProxy config files. I also added normalizing leading indentation, but let me know if you want me to rip that out or put it behind a flag.
I will be continuing to add more support as I run this on our large haproxy config, but I wanted to get this to you early for feedback and thoughts.
Thanks for the PR! Generally, the support for new config elements looks good, but I'd like to see some tests to prevent regressions.
I'm not sure about the indentation feature. I don't want to start worrying about tabs vs. spaces. :space_invader: But, it might be nice to clean things up as long as there's no danger of corrupting the config. Again, some tests demonstrating how the auto-indent feature should work would make me feel more confident about it.
@drewsonne You've been working on this actively; any thoughts or opinions on this PR?
@subakva thanks for taking a look! I will definitely go about adding tests (and probably just rip out the indentation stuff, or at least put it behind a flag and add tests). Glad to hear that the general approach sounds good, so I'll definitely go about adding test support. Cheers!
P.S. I am thinking of better flushing out the keyword support and use_backend
since they do not currently work with the keyword handling uniqueness currently.
Uhhh... nothing substantive. :-) I can see the auto-indent would be nice, as long as it doesn't mean tabs v spaces. Yes, I agree tests are always good, in fact, practically mandatory. As @nowells has implemented users lists, which I was beating my head against for a while, that makes me a very happy camper. I'm happy to help with writing test cases.