Class: DInstaller::Storage::Callbacks::Activate
- Inherits:
-
Storage::ActivateCallbacksLuks
- Object
- Storage::ActivateCallbacksLuks
- DInstaller::Storage::Callbacks::Activate
- Includes:
- Y2Storage::Callbacks::IssuesCallback
- Defined in:
- lib/dinstaller/storage/callbacks/activate.rb
Overview
Callbacks to manage devices activation
Instance Method Summary collapse
-
#initialize(questions_manager, logger) ⇒ Activate
constructor
Constructor.
-
#luks(info, attempt) ⇒ Storage::PairBoolString
Decides whether a LUKS device should be activated.
-
#message(_message) ⇒ Object
Messages are ignored to not bother the user.
-
#multipath(looks_like_real_multipath) ⇒ Boolean
Decides whether multipath should be activated.
Constructor Details
#initialize(questions_manager, logger) ⇒ Activate
Constructor
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
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 (); end |
#multipath(looks_like_real_multipath) ⇒ Boolean
Decides whether multipath should be activated
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 |