deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject git commit: Core: Fixed the url helper to deal with number id (DTACLOUD-255)
Date Mon, 09 Jul 2012 12:27:58 GMT
Updated Branches:
  refs/heads/master 1b48f1723 -> b9746d3fe


Core: Fixed the url helper to deal with number id (DTACLOUD-255)


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

Branch: refs/heads/master
Commit: b9746d3fe70cb99fd03de3fd0e5cd470f6014da7
Parents: 1b48f17
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Mon Jul 9 14:28:47 2012 +0200
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Mon Jul 9 14:28:47 2012 +0200

----------------------------------------------------------------------
 .../lib/deltacloud/drivers/gogrid/gogrid_driver.rb |    2 +-
 server/lib/deltacloud/helpers/url_helper.rb        |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b9746d3f/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb b/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb
index 06e4b3b..a145fc0 100644
--- a/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb
+++ b/server/lib/deltacloud/drivers/gogrid/gogrid_driver.rb
@@ -409,7 +409,7 @@ class GogridDriver < Deltacloud::BaseDriver
 
   def convert_image(gg_image, owner_id=nil)
     Image.new( {
-      :id=>gg_image['id'],
+      :id=>gg_image['id'].to_s,
       :name => "#{gg_image['friendlyName']}",
       :description=> convert_description(gg_image).to_s,
       :owner_id=>gg_image['owner']['name'].to_s,

http://git-wip-us.apache.org/repos/asf/deltacloud/blob/b9746d3f/server/lib/deltacloud/helpers/url_helper.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/helpers/url_helper.rb b/server/lib/deltacloud/helpers/url_helper.rb
index eead293..1822057 100644
--- a/server/lib/deltacloud/helpers/url_helper.rb
+++ b/server/lib/deltacloud/helpers/url_helper.rb
@@ -35,9 +35,9 @@ module Sinatra
           t = $1
           if t.match(/^(stop|reboot|start|attach|detach)_/)
             action = $1
-            api_url_for(t.pluralize.split('_').last + '/' + args.first + '/' + action, :full)
+            api_url_for(t.pluralize.split('_').last + '/' + args.first.to_s + '/' + action,
:full)
           elsif t.match(/^(destroy|update)_/)
-            api_url_for(t.pluralize.split('_').last + '/' + args.first, :full)
+            api_url_for(t.pluralize.split('_').last + '/' + args.first.to_s, :full)
           else
             api_url_for(t.pluralize, :full) + '/' + "#{args.first}"
           end


Mime
View raw message