Skip to content

Commit

Permalink
improved autoyast handler
Browse files Browse the repository at this point in the history
  • Loading branch information
lslezak committed Apr 9, 2015
1 parent 3a8e1f8 commit 9920803
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/clients/scc_auto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,36 +78,34 @@ def import_modules
end

def handle_autoyast(func, param)
ret = nil

case func
ret = case func
when "Summary"
# Create a summary
ret = summary
summary
when "Reset"
# Reset configuration
@config.reset
ret = {}
{}
when "Change"
# Change configuration
ret = start_workflow
start_workflow
when "Import"
# import configuration
ret = import(param)
import(param)
when "Export"
# Return the current config
ret = export
export
when "Packages"
# Return needed packages
ret = auto_packages
auto_packages
when "Write"
# Write given settings
ret = write
write
when "GetModified"
ret = @config.modified
@config.modified
when "SetModified"
@config.modified = true
ret = true
true
else
log.error "Unknown function: #{func}"
raise "Unknown function parameter: #{func}"
Expand Down

0 comments on commit 9920803

Please sign in to comment.