Move provider_hosts to vsphere provider

This commit updates the providers to move provider_hosts under the vsphere provider, which is the only place it's applicable. Methods where redis is passed through are updated to remove this pass through and use the globally available redis object, where applicable. Remove_vmpooler_migration_vm method is not needed and is removed.
This commit is contained in:
kirby@puppetlabs.com 2017-11-03 15:43:39 -07:00 committed by mattkirby
parent cd979fc24d
commit 0efb79a133
3 changed files with 14 additions and 21 deletions

View file

@ -462,7 +462,7 @@ module Vmpooler
def migrate_vm(vm_name, pool_name, provider)
Thread.new do
begin
$redis.srem('vmpooler__migrating__' + pool_name, vm_name)
$redis.srem("vmpooler__migrating__#{pool_name}", vm_name)
provider.migrate_vm(pool_name, vm_name)
rescue => err
$logger.log('s', "[x] [#{pool_name}] '#{vm_name}' migration failed with an error: #{err}")