deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <di...@fast.au.fujitsu.com>
Subject [PATCH] FGCP: added nil check in case a system has addresses but no machines
Date Thu, 25 Apr 2013 06:52:43 GMT
From: Dies Koper <diesk@fast.au.fujitsu.com>

---
 server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb b/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb
index 5a299fe..3410495 100644
--- a/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb
+++ b/server/lib/deltacloud/drivers/fgcp/fgcp_driver.rb
@@ -779,7 +779,8 @@ class FgcpDriver < Deltacloud::BaseDriver
           # 2. for slbs, obtain all ids from list_efm
           if addrs_to_instance.keys.size < associated_ips.keys.size # only if associated
ips left to process
 
-            if slbs = client.list_efm(vsys_id, 'SLB')['efms']
+            slbs = client.list_efm(vsys_id, 'SLB')['efms']
+            if slbs and slbs[0] and slbs[0]['efm']
               slbs[0]['efm'].find do |slb|
 
                 associated_ips.find do |pub,priv|
-- 
1.8.0.msysgit.0



Mime
View raw message