Sha256: ff16e68b5b3d523b9e5bc2b11da9aeec6593aba1ac43cb6999b2eb12a074b8d6
Contents?: true
Size: 546 Bytes
Versions: 16
Compression:
Stored size: 546 Bytes
Contents
require 'mccloud/util/iterator' module Mccloud module Command include Mccloud::Util def halt(selection=nil,options=nil) on_selected_machines(selection) do |id,vm| unless vm.instance.state == "stopping" || vm.instance.state =="stopped" puts "Halting machine #{vm.name}(#{id})" vm.instance.stop vm.instance.wait_for { printf "."; STDOUT.flush; state=="stopped"} puts else puts "#{vm.name}(#{id}) is already halted." end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems