Class: Pec::Command::Halt
Class Method Summary collapse
Methods inherited from Base
after_do, before_do, not_fetch, print_exception, run
Class Method Details
.task(server, config) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/pec/command/halt.rb', line 3 def self.task(server, config) case when server.nil? Pec::Logger.notice "not be created #{config.name}" when server.status != "ACTIVE" Pec::Logger.notice "#{config.name} server status is #{server.status} must be ACTIVE" else Yao::Server.shutoff(server.id) Pec::Logger.info "#{config.name} is halted!" end end |