Class: Registration::UI::MigrationReposWorkflow

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

Overview

This class handles workflow for adding migration services

Instance Method Summary collapse

Methods inherited from WizardClient

#main, #run

Constructor Details

#initializeMigrationReposWorkflow

the constructor


37
38
39
40
41
42
43
44
# File 'src/lib/registration/ui/migration_repos_workflow.rb', line 37

def initialize
  textdomain "registration"

  url = UrlHelpers.registration_url
  self.registration = Registration.new(url)
  self.registration_ui = RegistrationUI.new(registration)
  self.registered_services = []
end

Instance Method Details

#run_sequenceSymbol

The repositories migration workflow is:

  • if the system is not registered ask the user to register it first (otherwise abort the online migration)
  • find all installed products
  • query registered addons from the server
  • ask the registration server for the available product migrations (for both installed and registered products)
  • user selects the migration target
  • the registered products are upgraded and new services/repositories are added to the system
  • (optionally) user manually selects the migration repositories
  • user is asked to install also the latest updates (or to migrate to the GA version)
  • "Update from ALL" is set in libzypp (uses all enabled repositories)
  • (optional step) user can manually set the migration repositories, the selected repositories are enabled or disabled
  • return the user input symbol (:next or :abort) to the caller

65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'src/lib/registration/ui/migration_repos_workflow.rb', line 65

def run_sequence
  log.info "Starting migration repositories sequence"

  aliases = {
    "registration_check"          => [->() { registration_check }, true],
    "find_products"               => [->() { find_products }, true],
    "load_migration_products"     => [->() { load_migration_products }, true],
    "select_migration_products"   => ->() { select_migration_products },
    "update_releasever"           => ->() { update_releasever },
    "register_migration_products" => [->() { register_migration_products }, true],
    "activate_migration_repos"    => [->() { activate_migration_repos }, true],
    "select_migration_repos"      => ->() { select_migration_repos },
    "store_repos_state"           => ->() { store_repos_state }
  }

  ui = Yast::Sequencer.Run(aliases, WORKFLOW_SEQUENCE)
  log.info "User input: #{ui}"
  ui
end