deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@redhat.com
Subject [PATCH 1/2] Rimuhosting driver: fix syntax errors
Date Fri, 02 Mar 2012 00:02:40 GMT
From: David Lutterkort <lutter@redhat.com>

---
 .../drivers/rimuhosting/rimuhosting_client.rb      |   17 +++++++++--------
 .../drivers/rimuhosting/rimuhosting_driver.rb      |    2 +-
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb b/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb
index f44336a..58f8e1b 100644
--- a/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb
+++ b/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb
@@ -41,16 +41,17 @@ class RimuHostingClient
       headers["Authorization"] = @auth
     end
     safely do
-    r = @service.send_request(method, @uri.path + resource, data, headers)
-         puts r.body
-    res = JSON.parse(r.body)
-    res = res[res.keys[0]]
+      r = @service.send_request(method, @uri.path + resource, data, headers)
+          puts r.body
+      res = JSON.parse(r.body)
+      res = res[res.keys[0]]
 
-    if(res['response_type'] == "ERROR" and ( (res['error_info']['error_class'] == "PermissionException")
or
+      if(res['response_type'] == "ERROR" and ( (res['error_info']['error_class'] == "PermissionException")
or
 					     (res['error_info']['error_class'] == "LoginRequired") ))
-      raise "AuthFailure"
+        raise "AuthFailure"
+      end
+      res
     end
-    res
   end
 
   def list_images
@@ -81,6 +82,6 @@ class RimuHostingClient
   end
 end
 
-    end
   end
 end
+end
diff --git a/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb b/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb
index 9f786d0..6b61b8c 100644
--- a/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb
+++ b/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb
@@ -131,7 +131,7 @@ class RimuHostingDriver < Deltacloud::BaseDriver
             :owner_id => "root",
             :instance_profile => InstanceProfile.new("none"),
             :actions => instance_actions_for("RUNNING"),
-            :public_addresses => [ InstanceAddress.new(inst["allocated_ips"]["primary_ip"]
),
+            :public_addresses => [ InstanceAddress.new(inst["allocated_ips"]["primary_ip"]
) ],
             :launch_time => inst["billing_info"]["order_date"]["iso_format"]
     })
   end
-- 
1.7.7.6


Mime
View raw message