deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 4/4] Vsphere: Fixed typo in create_instance method (DTACLOUD-401)
Date Wed, 02 Jan 2013 14:11:16 GMT
From: Michal Fojtik <mfojtik@redhat.com>

In case the driver method is called from CIMI, the opts[:image_id]
is empty. Lets use the 'image_id' here anyway.

Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb b/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
index 2ddd43a..272f471 100644
--- a/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
+++ b/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
@@ -214,7 +214,7 @@ module Deltacloud::Drivers::Vsphere
         if opts[:hwp_cpu]
           raise "Invalid CPU value. Must be in integer format" unless valid_cpu_value?(opts[:hwp_cpu])
         end
-        vm = find_vm(credentials, opts[:image_id])
+        vm = find_vm(credentials, image_id)
         raise "ERROR: Could not find the image in given datacenter" unless vm[:instance]
         # New instance need valid resource pool and datastore to be placed.
         # For this reason, realm_id **needs** to be set.
-- 
1.8.0.2


Mime
View raw message