cacti
cacti copied to clipboard
Move Cacti to using yml for templates import/export
Feature Request
Currently, Cacti supports template management using XML files. Most modern frameworks have moved away from XML and presently use YAML as it's much more readable and easier to manage.
Propose Cacti being enhanced to Export to YAML by default and deprecating XML. XML would continue to be supported for some time to come.
Seems like it would be easier to use json, as the encoder is already built in. If we want to use yaml, we have to write our own parser (or find one, which means another dependancy).
PHP has partsers for YAML, They are named odly, not encode/decide.
https://www.php.net/manual/en/function.yaml-parse.php https://www.php.net/manual/en/function.yaml-emit.php
There are also file based versions (_file on the end). I like json because if follows an array structure clearly, whereas yml is nice for readability but easier to misalign things (imho). So overall, not sure what the "best" method is as that is a personal preference. The installer, for example, uses json. Whatever we choose, we should be consistent so we don't break things down the line or cause confusion.
Do you consider also including the scripts that belong to a template? That would be a real help, because then templates can be imported in one go without having to have additional permissions on the shell.
To avoid overwriting stuff, an option "don't overwrite existing files" could be added on import, or make cacti create the files with a name extension like ".imported-
We have a packaging plugin, but need more help on the team to get it released to the public.
@TheWitness i know .. finding more skilled ppl to get on the train can be a pain. Maybe i can provide some help - not sure, as i'm not that much of a php guy, just poking around mostly. Dropped you a mail a while ago to your cacti address, did you see/read it?
Saw it. Have not absorbed it. Responded earlier.