Class: DInstaller::Storage::Callbacks::Activate

Inherits:
Storage::ActivateCallbacksLuks
  • Object
show all
Includes:
Y2Storage::Callbacks::IssuesCallback
Defined in:
lib/dinstaller/storage/callbacks/activate.rb

Overview

Callbacks to manage devices activation

Instance Method Summary collapse

Constructor Details

#initialize(questions_manager, logger) ⇒ Activate

Constructor

Parameters:



38
39
40
41
42
43
44
# File 'lib/dinstaller/storage/callbacks/activate.rb', line 38

def initialize(questions_manager, logger)
  super()

  @questions_manager = questions_manager
  @logger = logger
  @issues = Y2Issues::List.new
end

Instance Method Details

#luks(info, attempt) ⇒ Storage::PairBoolString

Decides whether a LUKS device should be activated

Parameters:

  • info (Storage::LuksInfo)
  • attempt (Numeric)

Returns:

  • (Storage::PairBoolString)

    Whether to activate the device and the password

See Also:



72
73
74
75
76
77
78
# File 'lib/dinstaller/storage/callbacks/activate.rb', line 72

def luks(info, attempt)
  callback = ActivateLuks.new(questions_manager, logger)

  activate, password = callback.call(info, attempt)

  ::Storage::PairBoolString.new(activate, password || "")
end

#message(_message) ⇒ Object

Messages are ignored to not bother the user

See Storage::Callbacks#message in libstorage-ng



49
# File 'lib/dinstaller/storage/callbacks/activate.rb', line 49

def message(_message); end

#multipath(looks_like_real_multipath) ⇒ Boolean

Decides whether multipath should be activated

Parameters:

  • looks_like_real_multipath (Boolean)

    true if the system seems to contain a multipath device.

Returns:

  • (Boolean)

See Also:



58
59
60
61
62
# File 'lib/dinstaller/storage/callbacks/activate.rb', line 58

def multipath(looks_like_real_multipath)
  callback = ActivateMultipath.new(questions_manager, logger)

  callback.call(looks_like_real_multipath)
end