Class: DInstallerCli::Commands::Storage

Inherits:
Thor
  • Object
show all
Includes:
EnsureConfigPhase
Defined in:
lib/dinstaller_cli/commands/storage.rb

Overview

Subcommand to manage storage settings

Instance Method Summary collapse

Methods included from EnsureConfigPhase

#config_phase?, #ensure_config_phase

Instance Method Details

#actionsObject



47
48
49
# File 'lib/dinstaller_cli/commands/storage.rb', line 47

def actions
  storage_client.actions.each { |a| say(a) }
end

#available_devicesObject



34
35
36
# File 'lib/dinstaller_cli/commands/storage.rb', line 34

def available_devices
  storage_client.available_devices.each { |d| say(d) }
end

#selected_devices(*devices) ⇒ Object



40
41
42
43
44
# File 'lib/dinstaller_cli/commands/storage.rb', line 40

def selected_devices(*devices)
  return storage_client.candidate_devices.each { |d| say(d) } if devices.none?

  ensure_config_phase { storage_client.calculate(devices) }
end