Sha256: 3c1c4926a1f4866415f7fe05018fdfaafe0d664ab0ab8f6a747124713ca1cd18
Contents?: true
Size: 574 Bytes
Versions: 11
Compression:
Stored size: 574 Bytes
Contents
require 'mccloud/util/iterator' module Mccloud module Command def destroy(selection=nil,options=nil) on_selected_machines(selection) do |id,vm| unless vm.instance.nil? || vm.instance.state == "shutting-down" || vm.instance.state =="terminated" puts "Destroying machine #{vm.name} (#{id})" vm.instance.destroy vm.instance.wait_for { print "."; STDOUT.flush; state=="terminated"} puts else puts "Machine #{vm.name} is already terminated" end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems