cloud-init team mailing list archive
Mailing list archive
Re: Refactoring cloudinit.net (again)
Robert Schweikert <rjschwei@xxxxxxxx>
Sat, 11 Jan 2020 08:07:29 -0500
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.3.0
On 12/16/19 4:48 PM, Igor Galić wrote:
goneri's Pull Request to introduce a [FreeBSD renderer](https://github.com/canonical/cloud-init/pull/61) is also a
I'm currently testing this patch, but it seems to be "write-only" so far.
I tried to change that, and ran into something that seemed eerily familiar: this pull request of mine, from a year
So, after taking a year break, and having hopefully learned something, I'd like to get back to this.
Running this by the IRC channel, i got some responses.
OddBloke suggested we could prototype an OOP aproach, by rewriting one of the functions for Linux to be loaded from a class.
The more i thought about this, the more the classes seemed like container; and all methods would just be static.
But it does seem like the easiest way to isolate things in python, so why not?
If you have opinions, i invite you to share them here on the list.
If you have design suggestions; perhaps the best place would be this HackMD Note: https://hackmd.io/3-
YBj1t9TAeKhmfLBQUjXQ (at least until our design gets… better :)
Having whacked at the network implementation for a couple of years now
off and on with the latest changes in  and still carrying 4 or 5
network related patches in the SUSE package I think that network
rendering should be tied to the distro rather than being independent.
Obviously the writing of the network config is distro dependent. While
RH based distros and SUSE distros both put their configs into
/etc/sysconfig the introduction of "flavor" in  clearly shows that
the very large underlying differences. Further  does not address
routing setup for SUSE, which is still carried in a patch in the SUSE
I would favor a complete refactor, where clouinit.net is mostly dropped
and the implementation of the API moves to the distro classes. In the
end network rendering needs to know for which distro the config is being
rendered. Having to pass that information in creates extra complications
Robert Schweikert MAY THE SOURCE BE WITH YOU
Distinguished Architect LINUX
Technical Team Lead Public Cloud