Skip to content

Commit

Permalink
Rubocop fix: Style/CaseIndentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Apr 20, 2017
1 parent f65cd0a commit e426c3f
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 52 deletions.
20 changes: 10 additions & 10 deletions src/clients/dasd_auto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,35 +58,35 @@ def main
Builtins.y2debug("param=%1", @param)

case @func
when "Summary"
when "Summary"
@ret = HTML.List(DASDController.Summary)
when "Reset"
when "Reset"
DASDController.Import({})
DASDController.SetModified(true)
@ret = {}
when "Change"
when "Change"
@ret = DASDAutoSequence()
DASDController.SetModified(true)
when "Import"
when "Import"
@ret = DASDController.Import(@param)
DASDController.SetModified(true)
when "Export"
when "Export"
@ret = DASDController.Export
DASDController.SetModified(false)
when "GetModified"
when "GetModified"
@ret = DASDController.GetModified
when "SetModified"
when "SetModified"
DASDController.SetModified(true)
@ret = true
when "Packages"
when "Packages"
@ret = DASDController.AutoPackages
when "Read"
when "Read"
Yast.import "Progress"
Progress.off
@ret = DASDController.Read
Progress.on
DASDController.SetModified(true)
when "Write"
when "Write"
Yast.import "Progress"
Progress.off
@ret = DASDController.Write
Expand Down
20 changes: 10 additions & 10 deletions src/clients/zfcp_auto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,35 +58,35 @@ def main
Builtins.y2debug("param=%1", @param)

case @func
when "Summary"
when "Summary"
@ret = HTML.List(ZFCPController.Summary)
when "Reset"
when "Reset"
ZFCPController.Import({})
ZFCPController.SetModified(true)
@ret = {}
when "Change"
when "Change"
@ret = ZFCPAutoSequence()
ZFCPController.SetModified(true)
when "Import"
when "Import"
@ret = ZFCPController.Import(@param)
ZFCPController.SetModified(true)
when "Export"
when "Export"
@ret = ZFCPController.Export
ZFCPController.SetModified(false)
when "GetModified"
when "GetModified"
@ret = ZFCPController.GetModified
when "SetModified"
when "SetModified"
ZFCPController.SetModified(true)
@ret = true
when "Packages"
when "Packages"
@ret = ZFCPController.AutoPackages
when "Read"
when "Read"
Yast.import "Progress"
Progress.set(false)
@ret = ZFCPController.Read
Progress.set(true)
ZFCPController.SetModified(true)
when "Write"
when "Write"
Yast.import "Progress"
Progress.set(false)
@ret = ZFCPController.Write
Expand Down
10 changes: 5 additions & 5 deletions src/include/s390/dasd/dialogs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def PerformAction(action)

if !Mode.config
case action
when :activate, :deactivate
when :activate, :deactivate
value = action == :activate
unformatted_disks = []

Expand Down Expand Up @@ -274,7 +274,7 @@ def PerformAction(action)

return true

when :diag_off, :diag_on
when :diag_off, :diag_on
value = action == :diag_on

Builtins.foreach(selected) do |id|
Expand All @@ -295,7 +295,7 @@ def PerformAction(action)

return true

when :format
when :format
# check if disks are R/W and active
problem = ""
Builtins.foreach(selected) do |id|
Expand Down Expand Up @@ -376,15 +376,15 @@ def PerformAction(action)
end
else
case action
when :diag_off, :diag_on
when :diag_off, :diag_on
value = action == :diag_on

Builtins.foreach(selected) do |id|
Ops.set(DASDController.devices, [id, "diag"], value)
end

return true
when :format_off, :format_on
when :format_off, :format_on
value = action == :format_on

Builtins.foreach(selected) do |id|
Expand Down
18 changes: 9 additions & 9 deletions src/modules/DASDController.rb
Original file line number Diff line number Diff line change
Expand Up @@ -436,41 +436,41 @@ def ProbeDisks
# @param [Fixnum] ret integer exit code of the operation
def ReportActivationError(channel, ret)
case ret
when 0
when 0

when 1
when 1
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: sysfs not mounted."),
channel
)
)
when 2
when 2
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Invalid status for <online>."),
channel
)
)
when 3
when 3
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: No device found for <ccwid>."),
channel
)
)
when 4
when 4
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Could not change state of the device."),
channel
)
)
when 5
when 5
# https://bugzilla.novell.com/show_bug.cgi?id=446998#c15
Report.Error(
Builtins.sformat(
Expand All @@ -479,7 +479,7 @@ def ReportActivationError(channel, ret)
channel
)
)
when 6
when 6
# https://bugzilla.novell.com/show_bug.cgi?id=446998#c15
Report.Error(
Builtins.sformat(
Expand All @@ -488,7 +488,7 @@ def ReportActivationError(channel, ret)
channel
)
)
when 7
when 7
# http://bugzilla.novell.com/show_bug.cgi?id=561876#c8
Report.Error(
Builtins.sformat(
Expand All @@ -497,7 +497,7 @@ def ReportActivationError(channel, ret)
channel
)
)
when 8
when 8
# http://bugzilla.novell.com/show_bug.cgi?id=561876#c8
Report.Error(
Builtins.sformat(
Expand Down
36 changes: 18 additions & 18 deletions src/modules/ZFCPController.rb
Original file line number Diff line number Diff line change
Expand Up @@ -411,73 +411,73 @@ def ProbeDisks
# @param [Fixnum] ret integer exit code of the operation
def ReportActivationError(channel, ret)
case ret
when 0
when 0

when 1
when 1
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: sysfs not mounted."),
channel
)
)
when 2
when 2
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Invalid status for <online>."),
channel
)
)
when 3
when 3
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: No device found for <ccwid>."),
channel
)
)
when 4
when 4
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: WWPN invalid."),
channel
)
)
when 5
when 5
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Could not activate WWPN for adapter %1."),
channel
)
)
when 6
when 6
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Could not activate ZFCP device."),
channel
)
)
when 7
when 7
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: SCSI disk could not be deactivated."),
channel
)
)
when 8
when 8
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: LUN could not be unregistered."),
channel
)
)
when 9
when 9
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
Expand All @@ -504,57 +504,57 @@ def ReportActivationError(channel, ret)
# @param [Fixnum] ret integer exit code of the operation
def ReportControllerActivationError(channel, ret)
case ret
when 0
when 0

when 1
when 1
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: sysfs not mounted."),
channel
)
)
when 2
when 2
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Invalid status for <online>."),
channel
)
)
when 3
when 3
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Device <ccwid> does not exist."),
channel
)
)
when 4
when 4
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Module zfcp could not be loaded."),
channel
)
)
when 5
when 5
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: Adapter status could not be changed."),
channel
)
)
when 6
when 6
Report.Error(
Builtins.sformat(
# error report, %1 is device identification
_("%1: WWPN ports still active."),
channel
)
)
when 10
when 10
Report.Message(
Builtins.sformat(
# message, %1 is device identification
Expand Down

0 comments on commit e426c3f

Please sign in to comment.