Method: Pec::Command::Halt.task
- Defined in:
- lib/pec/command/halt.rb
.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 |