- Forward port suseIntegratedHandler.patch
+ Implement new abstract interfaces + Some minor implementation fixes OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=54
This commit is contained in:
parent
b0d7643923
commit
02e7568f6d
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 27 19:40:31 UTC 2016 - rjschwei@suse.com
|
||||||
|
|
||||||
|
- Forward port suseIntegratedHandler.patch
|
||||||
|
+ Implement new abstract interfaces
|
||||||
|
+ Some minor implementation fixes
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Oct 26 14:27:55 UTC 2016 - rjschwei@suse.com
|
Wed Oct 26 14:27:55 UTC 2016 - rjschwei@suse.com
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ cloudinit/distros/opensuse.py
|
+++ cloudinit/distros/opensuse.py
|
||||||
@@ -0,0 +1,212 @@
|
@@ -0,0 +1,224 @@
|
||||||
+# vi: ts=4 expandtab
|
+# vi: ts=4 expandtab
|
||||||
+#
|
+#
|
||||||
+# Copyright (C) 2014 SUSE LLC
|
+# Copyright (C) 2016 SUSE LLC
|
||||||
+# Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
|
+# Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
|
||||||
+#
|
+#
|
||||||
+# Author: Robert Schweikert <rjschwei@suse.com>
|
+# Author: Robert Schweikert <rjschwei@suse.com>
|
||||||
@ -33,6 +33,8 @@
|
|||||||
+
|
+
|
||||||
+from cloudinit.distros import net_util
|
+from cloudinit.distros import net_util
|
||||||
+from cloudinit.distros import rhel_util as rhutil
|
+from cloudinit.distros import rhel_util as rhutil
|
||||||
|
+from cloudinit.net import sysconfig
|
||||||
|
+from cloudinit.net.network_state import parse_net_config_data
|
||||||
+from cloudinit.settings import PER_INSTANCE
|
+from cloudinit.settings import PER_INSTANCE
|
||||||
+
|
+
|
||||||
+LOG = logging.getLogger(__name__)
|
+LOG = logging.getLogger(__name__)
|
||||||
@ -48,15 +50,17 @@
|
|||||||
+ route_conf_tpl = '/etc/sysconfig/network/ifroute-%s'
|
+ route_conf_tpl = '/etc/sysconfig/network/ifroute-%s'
|
||||||
+ tz_local_fn = '/etc/localtime'
|
+ tz_local_fn = '/etc/localtime'
|
||||||
+ systemd_locale_conf_fn = '/etc/locale.conf'
|
+ systemd_locale_conf_fn = '/etc/locale.conf'
|
||||||
|
+ systemd_hostname_conf_fn = '/etc/hostname'
|
||||||
+
|
+
|
||||||
+ def __init__(self, name, cfg, paths):
|
+ def __init__(self, name, cfg, paths):
|
||||||
+ distros.Distro.__init__(self, name, cfg, paths)
|
+ distros.Distro.__init__(self, name, cfg, paths)
|
||||||
|
+ self._net_renderer = sysconfig.Renderer()
|
||||||
+ # This will be used to restrict certain
|
+ # This will be used to restrict certain
|
||||||
+ # calls from repeatly happening (when they
|
+ # calls from repeatly happening (when they
|
||||||
+ # should only happen say once per instance...)
|
+ # should only happen say once per instance...)
|
||||||
+ self._runner = helpers.Runners(paths)
|
+ self._runner = helpers.Runners(paths)
|
||||||
+ cfg['ssh_svcname'] = 'sshd'
|
|
||||||
+ self.osfamily = 'suse'
|
+ self.osfamily = 'suse'
|
||||||
|
+ cfg['ssh_svcname'] = 'sshd'
|
||||||
+ self.systemdDist = util.which('systemctl')
|
+ self.systemdDist = util.which('systemctl')
|
||||||
+ if self.systemdDist:
|
+ if self.systemdDist:
|
||||||
+ self.init_cmd = ['systemctl']
|
+ self.init_cmd = ['systemctl']
|
||||||
@ -149,7 +153,10 @@
|
|||||||
+ return conf
|
+ return conf
|
||||||
+
|
+
|
||||||
+ def _read_system_hostname(self):
|
+ def _read_system_hostname(self):
|
||||||
+ host_fn = self.hostname_conf_fn
|
+ if self.systemdDist:
|
||||||
|
+ host_fn = self.systemd_hostname_conf_fn
|
||||||
|
+ else:
|
||||||
|
+ host_fn = self.hostname_conf_fn
|
||||||
+ return (host_fn, self._read_hostname(host_fn))
|
+ return (host_fn, self._read_hostname(host_fn))
|
||||||
+
|
+
|
||||||
+ def _write_hostname(self, hostname, out_fn):
|
+ def _write_hostname(self, hostname, out_fn):
|
||||||
@ -213,6 +220,11 @@
|
|||||||
+ rhutil.update_resolve_conf_file(self.resolve_conf_fn,
|
+ rhutil.update_resolve_conf_file(self.resolve_conf_fn,
|
||||||
+ nameservers, searchservers)
|
+ nameservers, searchservers)
|
||||||
+ return dev_names
|
+ return dev_names
|
||||||
|
+
|
||||||
|
+ def _write_network_config(self, netconfig):
|
||||||
|
+ ns = parse_net_config_data(netconfig)
|
||||||
|
+ self._net_renderer.render_network_state("/", ns)
|
||||||
|
+ return []
|
||||||
--- cloudinit/distros/sles.py.orig
|
--- cloudinit/distros/sles.py.orig
|
||||||
+++ cloudinit/distros/sles.py
|
+++ cloudinit/distros/sles.py
|
||||||
@@ -1,10 +1,9 @@
|
@@ -1,10 +1,9 @@
|
||||||
|
Loading…
x
Reference in New Issue
Block a user