Skip to content

Commit

Permalink
refactor s390 disk detection
Browse files Browse the repository at this point in the history
  • Loading branch information
jreidinger committed Dec 2, 2013
1 parent 6c92197 commit f0324fe
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions src/clients/inst_disks_activate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,12 @@ def main
UI.OpenDialog(Label(_("Detecting Available Controllers")))

# detect DASD disks
@disks = Convert.convert(
SCR.Read(path(".probe.disk")),
:from => "any",
:to => "list <map <string, any>>"
)

@disks = Builtins.filter(@disks) do |d|
Builtins.tolower(Ops.get_string(d, "device", "")) == "dasd"
end
@have_dasd = Ops.greater_than(Builtins.size(@disks), 0)
disks = SCR.Read(path(".probe.disk"))
@have_dasd = disks.any? {|d| d["device"] == "dasd" }

# detect zFCP disks
@controllers = Convert.convert(
SCR.Read(path(".probe.storage")),
:from => "any",
:to => "list <map <string, any>>"
)
@controllers = Builtins.filter(@controllers) do |c|
Ops.get_string(c, "device", "") == "zFCP controller"
end
@have_zfcp = Ops.greater_than(Builtins.size(@controllers), 0)
controllers = SCR.Read(path(".probe.storage"))
@have_zfcp = controllers.any? {|c| c["device"] == "zFCP controller"

This comment has been minimized.

Copy link
@gabi2

gabi2 Dec 2, 2013

Contributor

Missing }?

This comment has been minimized.

Copy link
@jreidinger

jreidinger Dec 2, 2013

Author Member

yes, good catch, fixed in 057cbd7 ( I test client in real installation, but not on s390 so I don't see problem with zfce )

UI.CloseDialog
end
Expand Down

0 comments on commit f0324fe

Please sign in to comment.