Method: CollinsShell::Cli#power
- Defined in:
- lib/collins_shell/cli.rb
#power(action) ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/collins_shell/cli.rb', line 72 def power action action = Collins::Power.normalize_action(action) call_collins get_collins_client, "power" do |client| client.log! .tag, .reason, 'ALERT' if client.power!(.tag, action) then say_success "power #{action} on #{.tag}" else say_error "power #{action} on #{.tag}", :exit => true end end end |