I don't like that we have the exact same code in two places (the exact same code is in VlanManager's periodic_tasks).
Maybe you could make it a module level function or move it into the NetworkManager class and make it conditional on a "needs_dhcp_cleanup" class variable that is set appropriately for the various managers?
I don't like that we have the exact same code in two places (the exact same code is in VlanManager's periodic_tasks).
Maybe you could make it a module level function or move it into the NetworkManager class and make it conditional on a "needs_ dhcp_cleanup" class variable that is set appropriately for the various managers?