Class: Crowbar::Client::App::Node
- Inherits:
-
Base
- Object
- Thor
- Base
- Crowbar::Client::App::Node
show all
- Defined in:
- lib/crowbar/client/app/node.rb
Overview
A Thor based CLI wrapper for node commands
Instance Method Summary
collapse
Methods inherited from Base
banner, handle_argument_error, #initialize
Instance Method Details
#allocate(name) ⇒ Object
405
406
407
408
409
410
411
412
413
|
# File 'lib/crowbar/client/app/node.rb', line 405
def allocate(name)
Command::Node::Allocate.new(
*command_params(
name: name
)
).execute
rescue => e
catch_errors(e)
end
|
#delete(name) ⇒ Object
261
262
263
264
265
266
267
268
269
|
# File 'lib/crowbar/client/app/node.rb', line 261
def delete(name)
Command::Node::Delete.new(
*command_params(
name: name
)
).execute
rescue => e
catch_errors(e)
end
|
#group(name, value) ⇒ Object
463
464
465
466
467
468
469
470
471
472
|
# File 'lib/crowbar/client/app/node.rb', line 463
def group(name, value)
Command::Node::Group.new(
*command_params(
name: name,
value: value
)
).execute
rescue => e
catch_errors(e)
end
|
#hardware(name) ⇒ Object
225
226
227
228
229
230
231
232
233
|
# File 'lib/crowbar/client/app/node.rb', line 225
def hardware(name)
Command::Node::Hardware.new(
*command_params(
name: name
)
).execute
rescue => e
catch_errors(e)
end
|
#identify(name) ⇒ Object
243
244
245
246
247
248
249
250
251
|
# File 'lib/crowbar/client/app/node.rb', line 243
def identify(name)
Command::Node::Identify.new(
*command_params(
name: name
)
).execute
rescue => e
catch_errors(e)
end
|
#list ⇒ Object
148
149
150
151
152
153
154
|
# File 'lib/crowbar/client/app/node.rb', line 148
def list
Command::Node::List.new(
*command_params
).execute
rescue => e
catch_errors(e)
end
|
#powercycle(name) ⇒ Object
351
352
353
354
355
356
357
358
359
|
# File 'lib/crowbar/client/app/node.rb', line 351
def powercycle(name)
Command::Node::Powercycle.new(
*command_params(
name: name
)
).execute
rescue => e
catch_errors(e)
end
|
#poweroff(name) ⇒ Object
369
370
371
372
373
374
375
376
377
|
# File 'lib/crowbar/client/app/node.rb', line 369
def poweroff(name)
Command::Node::Poweroff.new(
*command_params(
name: name
)
).execute
rescue => e
catch_errors(e)
end
|
#poweron(name) ⇒ Object
387
388
389
390
391
392
393
394
395
|
# File 'lib/crowbar/client/app/node.rb', line 387
def poweron(name)
Command::Node::Poweron.new(
*command_params(
name: name
)
).execute
rescue => e
catch_errors(e)
end
|
#reboot(name) ⇒ Object
333
334
335
336
337
338
339
340
341
|
# File 'lib/crowbar/client/app/node.rb', line 333
def reboot(name)
Command::Node::Reboot.new(
*command_params(
name: name
)
).execute
rescue => e
catch_errors(e)
end
|
#reinstall(name) ⇒ Object
279
280
281
282
283
284
285
286
287
|
# File 'lib/crowbar/client/app/node.rb', line 279
def reinstall(name)
Command::Node::Reinstall.new(
*command_params(
name: name
)
).execute
rescue => e
catch_errors(e)
end
|
#rename(name, value) ⇒ Object
442
443
444
445
446
447
448
449
450
451
|
# File 'lib/crowbar/client/app/node.rb', line 442
def rename(name, value)
Command::Node::Rename.new(
*command_params(
name: name,
value: value
)
).execute
rescue => e
catch_errors(e)
end
|
#reset(name) ⇒ Object
297
298
299
300
301
302
303
304
305
|
# File 'lib/crowbar/client/app/node.rb', line 297
def reset(name)
Command::Node::Reset.new(
*command_params(
name: name
)
).execute
rescue => e
catch_errors(e)
end
|
#role(name, value) ⇒ Object
423
424
425
426
427
428
429
430
431
432
|
# File 'lib/crowbar/client/app/node.rb', line 423
def role(name, value)
Command::Node::Role.new(
*command_params(
name: name,
value: value
)
).execute
rescue => e
catch_errors(e)
end
|
#show(name) ⇒ Object
207
208
209
210
211
212
213
214
215
|
# File 'lib/crowbar/client/app/node.rb', line 207
def show(name)
Command::Node::Show.new(
*command_params(
name: name
)
).execute
rescue => e
catch_errors(e)
end
|
#shutdown(name) ⇒ Object
315
316
317
318
319
320
321
322
323
|
# File 'lib/crowbar/client/app/node.rb', line 315
def shutdown(name)
Command::Node::Shutdown.new(
*command_params(
name: name
)
).execute
rescue => e
catch_errors(e)
end
|
#status ⇒ Object
82
83
84
85
86
87
88
|
# File 'lib/crowbar/client/app/node.rb', line 82
def status
Command::Node::Status.new(
*command_params
).execute
rescue => e
catch_errors(e)
end
|
#transition(name, state) ⇒ Object
482
483
484
485
486
487
488
489
490
491
|
# File 'lib/crowbar/client/app/node.rb', line 482
def transition(name, state)
Command::Node::Transition.new(
*command_params(
name: name,
state: state
)
).execute
rescue => e
catch_errors(e)
end
|