- Modify suseIntegratedHandler.patch (bsc#1007529)

+ Fall back to the previous method of writing network information
    We have to work out upstream how to have distro specific renderer
    for sysconfig

OBS-URL: https://build.opensuse.org/package/show/Cloud:Tools/cloud-init?expand=0&rev=65
This commit is contained in:
Robert Schweikert 2016-11-01 15:58:23 +00:00 committed by Git OBS Bridge
parent 4eeb8d512a
commit 1bf8793650
2 changed files with 18 additions and 8 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Nov 1 15:56:50 UTC 2016 - rjschwei@suse.com
- Modify suseIntegratedHandler.patch (bsc#1007529)
+ Fall back to the previous method of writing network information
We have to work out upstream how to have distro specific renderer
for sysconfig
-------------------------------------------------------------------
Mon Oct 31 12:44:21 UTC 2016 - rjschwei@suse.com

View File

@ -1,6 +1,6 @@
--- /dev/null
+++ cloudinit/distros/opensuse.py
@@ -0,0 +1,224 @@
@@ -0,0 +1,226 @@
+# vi: ts=4 expandtab
+#
+# Copyright (C) 2016 SUSE LLC
@ -33,8 +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.net import sysconfig
+#from cloudinit.net.network_state import parse_net_config_data
+from cloudinit.settings import PER_INSTANCE
+
+LOG = logging.getLogger(__name__)
@ -54,7 +54,7 @@
+
+ def __init__(self, name, cfg, paths):
+ distros.Distro.__init__(self, name, cfg, paths)
+ self._net_renderer = sysconfig.Renderer()
+# 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...)
@ -221,10 +221,12 @@
+ 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 []
+# New interface cannot yet be implemented/used as we have to figure out
+# how to have a distro specific renderer
+# 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 @@