From 47d669d5cd437f57d83f3db5ed0749032c12dc91 Mon Sep 17 00:00:00 2001 From: Tino Vazquez Date: Tue, 28 May 2013 19:22:34 +0200 Subject: [PATCH] feature #1977: Proper namespacing for the RbVmomi gem --- src/vmm_mad/remotes/vmware/vi_driver.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vmm_mad/remotes/vmware/vi_driver.rb b/src/vmm_mad/remotes/vmware/vi_driver.rb index 44ed6a03fc..daef7a60d8 100644 --- a/src/vmm_mad/remotes/vmware/vi_driver.rb +++ b/src/vmm_mad/remotes/vmware/vi_driver.rb @@ -112,7 +112,7 @@ class VIDriver vm = get_vm(deploy_id)[:vm] card_num = 1 # start in one, we want the next avaiable id vm.config.hardware.device.each{ |dv| - if dv.class.ancestors[1] == VIM::VirtualEthernetCard + if dv.class.ancestors[1] == RbVmomi::VIM::VirtualEthernetCard card_num = card_num + 1 end } @@ -146,14 +146,14 @@ class VIDriver vm = get_vm(deploy_id)[:vm] nic_to_detach = nil vm.config.hardware.device.each{ |dv| - if dv.class.ancestors[1] == VIM::VirtualEthernetCard + if dv.class.ancestors[1] == RbVmomi::VIM::VirtualEthernetCard nic_to_detach = dv if nic.macAddress == mac end } return -1 if !nic_to_detach - spec = {:deviceChange => [:operation => :remove, :device => nic_to_detach]} + spec = {:deviceChange => [:operation => :remove,:device => nic_to_detach]} vm.ReconfigVM_Task(:spec => spec).wait_for_completion end