summaryrefslogtreecommitdiff
path: root/cloudinit/distros/__init__.py
diff options
context:
space:
mode:
authorDaniel Watkins <oddbloke@ubuntu.com>2020-06-23 10:08:16 -0400
committerGitHub <noreply@github.com>2020-06-23 10:08:16 -0400
commit9a97a3f24e196401a9c54e9c7977ef6a03c98aeb (patch)
treed761417e508ccf721ef91148437288528c8bc325 /cloudinit/distros/__init__.py
parentddc4c2de1b1e716b31384af92f5356bfc6136944 (diff)
downloadvyos-cloud-init-9a97a3f24e196401a9c54e9c7977ef6a03c98aeb.tar.gz
vyos-cloud-init-9a97a3f24e196401a9c54e9c7977ef6a03c98aeb.zip
distros.networking: initial implementation of layout (#391)
This commit introduces the initial structure for the "cloudinit.net -> cloudinit.distros.networking Hierarchy" refactor, as detailed in [0]. It also updates that section with some changes driven by this initial implementation, as well as adding a lot more specifics to it. [0] https://cloudinit.readthedocs.io/en/latest/topics/hacking.html#cloudinit-net-cloudinit-distros-networking-hierarchy
Diffstat (limited to 'cloudinit/distros/__init__.py')
-rwxr-xr-xcloudinit/distros/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/cloudinit/distros/__init__.py b/cloudinit/distros/__init__.py
index 016ba64d..89940cf0 100755
--- a/cloudinit/distros/__init__.py
+++ b/cloudinit/distros/__init__.py
@@ -29,6 +29,7 @@ from cloudinit import subp
from cloudinit import util
from cloudinit.distros.parsers import hosts
+from .networking import LinuxNetworking
# Used when a cloud-config module can be run on all cloud-init distibutions.
@@ -67,11 +68,13 @@ class Distro(metaclass=abc.ABCMeta):
init_cmd = ['service'] # systemctl, service etc
renderer_configs = {}
_preferred_ntp_clients = None
+ networking_cls = LinuxNetworking
def __init__(self, name, cfg, paths):
self._paths = paths
self._cfg = cfg
self.name = name
+ self.networking = self.networking_cls()
@abc.abstractmethod
def install_packages(self, pkglist):