Class: Registration::UI::RegistrationSyncWorkflow

Inherits:
WizardClient
  • Object
show all
Includes:
Yast::UIShortcuts
Defined in:
src/lib/registration/ui/registration_sync_workflow.rb

Overview

This class handles synchronizing the repositories/services after abort

Instance Method Summary collapse

Methods inherited from WizardClient

#main, #run

Constructor Details

#initializeRegistrationSyncWorkflow

the constructor


35
36
37
38
39
40
# File 'src/lib/registration/ui/registration_sync_workflow.rb', line 35

def initialize
  textdomain "registration"

  registration = Registration.new(UrlHelpers.registration_url)
  self.registration_ui = RegistrationUI.new(registration)
end

Instance Method Details

#run_sequenceSymbol

restore the registration status


44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'src/lib/registration/ui/registration_sync_workflow.rb', line 44

def run_sequence
  log.info "Restoring the original repository and registration status..."

  restore_repos

  # load the installed products
  Yast::Pkg.TargetLoad
  products = SwMgmt.installed_products

  # downgrade all installed products
  return :abort unless downgrade_products(products)

  reload_repos

  # synchronize all installed products (remove additional registrations at the server)
  registration_ui.synchronize_products(products) ? :next : :abort
end