- 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
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
--- /dev/null
|
||||
+++ cloudinit/distros/opensuse.py
|
||||
@@ -0,0 +1,212 @@
|
||||
@@ -0,0 +1,224 @@
|
||||
+# vi: ts=4 expandtab
|
||||
+#
|
||||
+# Copyright (C) 2014 SUSE LLC
|
||||
+# Copyright (C) 2016 SUSE LLC
|
||||
+# Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
|
||||
+#
|
||||
+# Author: Robert Schweikert <rjschwei@suse.com>
|
||||
@ -33,6 +33,8 @@
|
||||
+
|
||||
+from cloudinit.distros import net_util
|
||||
+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
|
||||
+
|
||||
+LOG = logging.getLogger(__name__)
|
||||
@ -48,15 +50,17 @@
|
||||
+ route_conf_tpl = '/etc/sysconfig/network/ifroute-%s'
|
||||
+ tz_local_fn = '/etc/localtime'
|
||||
+ systemd_locale_conf_fn = '/etc/locale.conf'
|
||||
+ systemd_hostname_conf_fn = '/etc/hostname'
|
||||
+
|
||||
+ def __init__(self, name, cfg, paths):
|
||||
+ distros.Distro.__init__(self, name, cfg, paths)
|
||||
+ self._net_renderer = sysconfig.Renderer()
|
||||
+ # This will be used to restrict certain
|
||||
+ # calls from repeatly happening (when they
|
||||
+ # should only happen say once per instance...)
|
||||
+ self._runner = helpers.Runners(paths)
|
||||
+ cfg['ssh_svcname'] = 'sshd'
|
||||
+ self.osfamily = 'suse'
|
||||
+ cfg['ssh_svcname'] = 'sshd'
|
||||
+ self.systemdDist = util.which('systemctl')
|
||||
+ if self.systemdDist:
|
||||
+ self.init_cmd = ['systemctl']
|
||||
@ -149,7 +153,10 @@
|
||||
+ return conf
|
||||
+
|
||||
+ 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))
|
||||
+
|
||||
+ def _write_hostname(self, hostname, out_fn):
|
||||
@ -213,6 +220,11 @@
|
||||
+ rhutil.update_resolve_conf_file(self.resolve_conf_fn,
|
||||
+ nameservers, searchservers)
|
||||
+ 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
|
||||
@@ -1,10 +1,9 @@
|
||||
|
Loading…
x
Reference in New Issue
Block a user