From cf15829f05ce8f7b248ed5ddad7da60924b97f08 Mon Sep 17 00:00:00 2001 From: Glenn Sarti Date: Fri, 31 Mar 2017 14:22:58 -0700 Subject: [PATCH] (POOLER-70) Remove get_vm_host_info from pool_manager Previously the Pool Manager would use vSphere objects directly. This commit removes get_vm_host_info as this functionality is now in the vSphere VM Provider. --- lib/vmpooler/pool_manager.rb | 5 ----- spec/unit/pool_manager_spec.rb | 16 ---------------- 2 files changed, 21 deletions(-) diff --git a/lib/vmpooler/pool_manager.rb b/lib/vmpooler/pool_manager.rb index 2111dd4..747f760 100644 --- a/lib/vmpooler/pool_manager.rb +++ b/lib/vmpooler/pool_manager.rb @@ -498,11 +498,6 @@ module Vmpooler end end - def get_vm_host_info(vm_object) - parent_host = vm_object.summary.runtime.host - [parent_host, parent_host.name] - end - def remove_vmpooler_migration_vm(pool, vm) begin $redis.srem('vmpooler__migration', vm) diff --git a/spec/unit/pool_manager_spec.rb b/spec/unit/pool_manager_spec.rb index 43323a6..78ad85e 100644 --- a/spec/unit/pool_manager_spec.rb +++ b/spec/unit/pool_manager_spec.rb @@ -1667,22 +1667,6 @@ EOT end end - describe "#get_vm_host_info" do - before do - expect(subject).not_to be_nil - end - - let(:vm_object) { double('vm_object') } - let(:parent_host) { double('parent_host') } - - it 'should return an array with host information' do - expect(vm_object).to receive_message_chain(:summary, :runtime, :host).and_return(parent_host) - expect(parent_host).to receive(:name).and_return('vmhostname') - - expect(subject.get_vm_host_info(vm_object)).to eq([parent_host,'vmhostname']) - end - end - describe "#execute!" do let(:threads) {{}}