deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lut...@apache.org
Subject [2/2] git commit: Rimuhosting driver: fix syntax errors
Date Thu, 05 Apr 2012 20:53:01 GMT
Rimuhosting driver: fix syntax errors


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/546fd64d
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/546fd64d
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/546fd64d

Branch: refs/heads/master
Commit: 546fd64df44d13f1b8bb47aa3c39370f99457e8c
Parents: 452ca54
Author: David Lutterkort <lutter@redhat.com>
Authored: Thu Mar 1 15:54:26 2012 -0800
Committer: David Lutterkort <lutter@redhat.com>
Committed: Thu Apr 5 13:52:16 2012 -0700

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


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/546fd64d/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_client.rb
----------------------------------------------------------------------
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

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/546fd64d/server/lib/deltacloud/drivers/rimuhosting/rimuhosting_driver.rb
----------------------------------------------------------------------
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


Mime
View raw message