Skip to content

Commit

Permalink
autoyast_export: Exporting active DASD only
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Jul 17, 2014
1 parent 6c05e20 commit 73fd953
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/modules/DASDController.rb
Expand Up @@ -228,7 +228,23 @@ def Import(settings)
# (For use by autoinstallation.)
# @return [Hash] Dumped settings (later acceptable by Import ())
def Export
l = Builtins.maplist(@devices) { |i, d| Builtins.filter(d) do |k, v|
# Exporting active DASD only.
# (bnc#
active_devices = @devices.select { |nr, device|
device.has_key?("resource") &&
device["resource"].has_key?("io") &&
!device["resource"]["io"].empty? &&
device["resource"]["io"].first["active"]
}

if active_devices.empty?
# If no device is active we are exporting all. So the admin
# can patch this manually.
Builtins.y2milestone("No active DASD found. --> Taking all")
active_devices = @devices
end

l = Builtins.maplist(active_devices) { |i, d| Builtins.filter(d) do |k, v|
Builtins.contains(["channel", "format", "diag"], k)
end }

Expand Down

0 comments on commit 73fd953

Please sign in to comment.