Initially, the vyos.util module only had a few misc functions. Now it's thousand lines long and contains a whole lot of functions that mostly belong to a few categories. I suggest that we break it up into multiple files:
- vyos.utils.dict — manipulation and search in dictionaries.
- vyos.utils.process — spawning subprocesses and checking running processes.
- vyos.utils.file — file manipulation and checking (chmods, chowns, inotify waits...)
- vyos.utils.system — wrappers around systemd unit commands and similar.
- vyos.utils.net — interface and port utilities.
- vyos.utils.convert — value conversions (seconds to human-readable time intervals, MAC to EUI64...).
I believe it's better to do a gradual migration: first introduce new modules, then replace all uses of vyos.util functions with calls to new functions, and only then remove the old vyos.util.