Class: Pec::Command::Destroy
Class Method Summary collapse
Methods inherited from Base
before_do, print_exception, run
Class Method Details
.task(host_name, options, server, config) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/pec/command/destroy.rb', line 4 def self.task(host_name, , server, config) unless server Pec::Logger.notice "not be created #{config.name}" else if [:force] || Thor.new.yes?("#{config.name}: Are you sure you want to destroy the '#{config.name}' VM? [y/N]") Yao::Server.destroy(server.id) Pec::Logger.info "#{config.name} is deleted!" end end end |