Skip to content

Commit

Permalink
Merge branch 'SLE-12-GA' into SLE-12-SP1
Browse files Browse the repository at this point in the history
Conflicts:
	package/yast2-network.spec
	src/clients/lan_auto.rb

NOTE that due to changes done in the development branch (master AKA
SLE-12-SP1) in the meantime, the original bug bsc#949193 is not present,
as evidenced by this new test:
yast/autoyast-integration-test#42

It also seemed that a different bug (bsc#874259#c157) was present but my
testing did not confirm that.
  • Loading branch information
mvidner committed Nov 6, 2015
2 parents e7b968f + ace7478 commit e1ed7e3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/clients/lan_auto.rb
Expand Up @@ -88,13 +88,13 @@ def main
elsif @func == "Change"
@ret = LanAutoSequence("")
elsif @func == "Import"
@new = FromAY(@param)
# see bnc#498993
# in case keep_install_network is set to true (in AY)
# we'll keep values from installation
# and merge with XML data (bnc#712864)
@param = NetworkAutoYast.instance.merge_configs(@param) if @param["keep_install_network"]
@new = NetworkAutoYast.instance.merge_configs(@new) if @new["keep_install_network"]

@new = FromAY(@param)
Lan.Import(@new)
LanUdevAuto.Import(@new)
@ret = true
Expand Down
15 changes: 11 additions & 4 deletions src/modules/Lan.rb
Expand Up @@ -660,7 +660,11 @@ def WriteOnly
Write()
end

# Import data
# Import data.
# It expects data described networking.rnc
# and then passed through {LanAutoClient#FromAY}.
# Most prominently, instead of a flat list called "interfaces"
# we import a 2-level map of typed "devices"
# @param [Hash] settings settings to be imported
# @return true on success
def Import(settings)
Expand All @@ -687,14 +691,17 @@ def Import(settings)
true
end

# Export data
# @return dumped settings (later acceptable by Import())
# Export data.
# They need to be passed through {LanAutoClient#ToAY} to become
# what networking.rnc describes.
# Most prominently, instead of a flat list called "interfaces"
# we export a 2-level map of typed "devices"
# @return dumped settings
def Export
devices = NetworkInterfaces.Export("")
udev_rules = LanUdevAuto.Export(devices)
ay = {
"dns" => DNS.Export,
# FIXME: MOD "modules" : Modules,
"s390-devices" => Ops.get_map(
udev_rules,
"s390-devices",
Expand Down

0 comments on commit e1ed7e3

Please sign in to comment.