Sha256: 5c6d6ecf401d0abb80a9d81e4fde00e7eedc96592df793e64f1e9cb92a1667f2
Contents?: true
Size: 612 Bytes
Versions: 13
Compression:
Stored size: 612 Bytes
Contents
module Fog module Compute class OpenNebula class Real def vm_suspend(id) vmpool = ::OpenNebula::VirtualMachinePool.new(client) vmpool.info!(-2,id,id,-1) vmpool.each do |vm| vm.suspend end end end class Mock def vm_suspend(id) response = Excon::Response.new response.status = 200 self.data['vms'].each do |vm| if id == vm['id'] vm['state'] = 'LCM_INIT' vm['status'] = 5 end end end end end end end
Version data entries
13 entries across 11 versions & 3 rubygems