Page MenuHomeVyOS Platform

Break up the vyos.util module
Open, NormalPublic


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.
  • — 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.


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Internal change (not visible to end users)

Event Timeline

dmbaturin triaged this task as Normal priority.May 2 2023, 11:53 PM
dmbaturin created this task.