Class: DInstaller::Storage::Manager

Inherits:
Object
  • Object
show all
Defined in:
lib/dinstaller/storage/manager.rb

Overview

Manager to handle storage configuration

Instance Method Summary collapse

Constructor Details

#initialize(logger, config) ⇒ Manager

Returns a new instance of Manager.



33
34
35
36
# File 'lib/dinstaller/storage/manager.rb', line 33

def initialize(logger, config)
  @logger = logger
  @config = config
end

Instance Method Details

#finishObject

Umounts the target file system



56
57
58
# File 'lib/dinstaller/storage/manager.rb', line 56

def finish
  Yast::WFM.CallFunction("umount_finish", ["Write"])
end

#installObject

Prepares the partitioning to install the system



50
51
52
53
# File 'lib/dinstaller/storage/manager.rb', line 50

def install
  add_packages
  Yast::WFM.CallFunction("inst_prepdisk", [])
end

#probe(questions_manager) ⇒ Object

Probes storage devices and performs an initial proposal

Parameters:



41
42
43
44
45
46
47
# File 'lib/dinstaller/storage/manager.rb', line 41

def probe(questions_manager)
  # TODO: Add progress once this is moved to its own service
  logger.info "Probing storage and performing proposal"
  activate_devices(questions_manager)
  probe_devices
  proposal.calculate
end

#proposalStorage::Proposal

Storage proposal manager

Returns:



63
64
65
# File 'lib/dinstaller/storage/manager.rb', line 63

def proposal
  @proposal ||= Proposal.new(logger, config)
end