Class: Crowbar::Client::App::Upgrade

Inherits:
Base
  • Object
show all
Defined in:
lib/crowbar/client/app/upgrade.rb

Overview

A Thor based CLI wrapper for upgrade commands

Instance Method Summary collapse

Methods inherited from Base

banner, handle_argument_error, #initialize

Constructor Details

This class inherits a constructor from Crowbar::Client::App::Base

Instance Method Details

#adminObject



184
185
186
187
188
189
190
# File 'lib/crowbar/client/app/upgrade.rb', line 184

def admin
  Command::Upgrade::Admin.new(
    *command_params
  ).execute
rescue => e
  catch_errors(e)
end

#backup(component) ⇒ Object



237
238
239
240
241
242
243
244
245
# File 'lib/crowbar/client/app/upgrade.rb', line 237

def backup(component)
  Command::Upgrade::Backup.new(
    *command_params(
      component: component
    )
  ).execute
rescue => e
  catch_errors(e)
end

#cancelObject



424
425
426
427
428
429
430
# File 'lib/crowbar/client/app/upgrade.rb', line 424

def cancel
  Command::Upgrade::Cancel.new(
    *command_params
  ).execute
rescue => e
  catch_errors(e)
end

#database(mode) ⇒ Object



374
375
376
377
378
379
380
381
382
# File 'lib/crowbar/client/app/upgrade.rb', line 374

def database(mode)
  Command::Upgrade::Database.new(
    *command_params(
      mode: mode
    )
  ).execute
rescue => e
  catch_errors(e)
end

#mode(mode = nil) ⇒ Object



397
398
399
400
401
402
403
404
405
# File 'lib/crowbar/client/app/upgrade.rb', line 397

def mode(mode = nil)
  Command::Upgrade::Mode.new(
    *command_params(
      mode: mode
    )
  ).execute
rescue => e
  catch_errors(e)
end

#nodes(component) ⇒ Object



219
220
221
222
223
224
225
226
227
# File 'lib/crowbar/client/app/upgrade.rb', line 219

def nodes(component)
  Command::Upgrade::Nodes.new(
    *command_params(
      component: component
    )
  ).execute
rescue => e
  catch_errors(e)
end

#prechecksObject



169
170
171
172
173
174
175
# File 'lib/crowbar/client/app/upgrade.rb', line 169

def prechecks
  Command::Upgrade::Prechecks.new(
    *command_params
  ).execute
rescue => e
  catch_errors(e)
end

#prepareObject



91
92
93
94
95
96
97
# File 'lib/crowbar/client/app/upgrade.rb', line 91

def prepare
  Command::Upgrade::Prepare.new(
    *command_params
  ).execute
rescue => e
  catch_errors(e)
end

#repocheck(component) ⇒ Object



300
301
302
303
304
305
306
307
308
# File 'lib/crowbar/client/app/upgrade.rb', line 300

def repocheck(component)
  Command::Upgrade::Repocheck.new(
    *command_params(
      component: component
    )
  ).execute
rescue => e
  catch_errors(e)
end

#servicesObject



115
116
117
118
119
120
121
# File 'lib/crowbar/client/app/upgrade.rb', line 115

def services
  Command::Upgrade::Services.new(
    *command_params
  ).execute
rescue => e
  catch_errors(e)
end

#status(component = nil) ⇒ Object



74
75
76
77
78
79
80
81
82
# File 'lib/crowbar/client/app/upgrade.rb', line 74

def status(component = nil)
  Command::Upgrade::Status.new(
    *command_params(
      nodes: component == "nodes"
    )
  ).execute
rescue => e
  catch_errors(e)
end